Bentrix Docs
HomePricingDashboard

MCP tools: charts

Chart windows: opened, closed, arranged and placed; their market, timeframe, type, price lines and view set — each the act a chart's own bar, menu or keys performs.

Reached from a connected client as client.chart in Python, client.chart in JavaScript, client.chart() in Rust — each tool below shows its call in every language.

chart_arrange#

Arrange a workbench's charts

labplan: plussince 1.0.0

Tiles the workbench's chart windows that are not minimized, as the chart toolbar's Arrange does. Answers the windows' states.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—The workbench's uri.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chart_arrange",
    "arguments": {
      "bench": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.chart
def arrange(self, bench: str) -> Dict[str, Any]

JavaScript

client.chart
arrange(args)

C#

client.Chart
public Task<JsonNode?> Arrange(string bench, CancellationToken ct = default)

Go

client.Chart
func (a *ChartAPI) Arrange(ctx context.Context, args ChartArrangeArgs) (any, error)

Java

client.chart
public Object arrange(ArrangeArgs args)

C++

client.chart
Json arrange(const ArrangeArgs &args)

Julia

client.chart
arrange = (bench)

R

client$chart
`arrange` = function(bench)

Rust

client.chart()
pub fn arrange(&self, args: ChartArrangeArgs) -> Result<Value, Error>

chart_close#

Close a chart

labplan: plussince 1.0.0destructive

Closes a chart window. A workbench's last chart is never closed, as on screen. Answers the workbench's charts left.

ArgumentTypeRequiredDefaultWhat it is
chartstringyes—The chart's uri, as get_state gives it at depth charts.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chart_close",
    "arguments": {
      "chart": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.chart
def close(self, chart: str) -> Dict[str, Any]

JavaScript

client.chart
close(args)

C#

client.Chart
public Task<JsonNode?> Close(string chart, CancellationToken ct = default)

Go

client.Chart
func (a *ChartAPI) Close(ctx context.Context, args ChartCloseArgs) (any, error)

Java

client.chart
public Object close(CloseArgs args)

C++

client.chart
Json close(const CloseArgs &args)

Julia

client.chart
close = (chart)

R

client$chart
`close` = function(chart)

Rust

client.chart()
pub fn close(&self, args: ChartCloseArgs) -> Result<Value, Error>

chart_open#

Open a chart

labplan: plussince 1.0.0

Opens a chart window of one of the workbench's markets, as Market Watch's Chart window does: a market already charted comes to the front unless new_window asks for a second window. Answers the chart.

ArgumentTypeRequiredDefaultWhat it is
benchstringyes—The workbench's uri.
new_windowboolean—falseA second window of a market already charted, as the bar's new-window button opens.
symbolstringyes—One of the workbench's markets.
timeframestring——The interval, as the menu writes it (M1 when absent).

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chart_open",
    "arguments": {
      "bench": "…",
      "symbol": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.chart
def open(self, bench: str, symbol: str, *, new_window: Optional[bool] = None, timeframe: Optional[str] = None) -> Dict[str, Any]

JavaScript

client.chart
open(args)

C#

client.Chart
public Task<JsonNode?> Open(string bench, string symbol, bool? newWindow = null, string? timeframe = null, CancellationToken ct = default)

Go

client.Chart
func (a *ChartAPI) Open(ctx context.Context, args ChartOpenArgs) (any, error)

Java

client.chart
public Object open(OpenArgs args)

C++

client.chart
Json open(const OpenArgs &args)

Julia

client.chart
open = (bench, symbol; new_window = nothing, timeframe = nothing)

R

client$chart
`open` = function(bench, symbol, new_window = NULL, timeframe = NULL)

Rust

client.chart()
pub fn open(&self, args: ChartOpenArgs) -> Result<Value, Error>

chart_revert_type#

Put a chart's type back

labplan: plussince 1.0.0

Puts the chart's type, price, style and price lines back as they were before the Chart type & price widget first edited it, as the widget's Revert does. Answers the chart.

ArgumentTypeRequiredDefaultWhat it is
chartstringyes—The chart's uri, as get_state gives it at depth charts.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chart_revert_type",
    "arguments": {
      "chart": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.chart
def revert_type(self, chart: str) -> Dict[str, Any]

JavaScript

client.chart
revertType(args)

C#

client.Chart
public Task<JsonNode?> RevertType(string chart, CancellationToken ct = default)

Go

client.Chart
func (a *ChartAPI) RevertType(ctx context.Context, args ChartRevertTypeArgs) (any, error)

Java

client.chart
public Object revertType(RevertTypeArgs args)

C++

client.chart
Json revert_type(const RevertTypeArgs &args)

Julia

client.chart
revert_type = (chart)

R

client$chart
`revert_type` = function(chart)

Rust

client.chart()
pub fn revert_type(&self, args: ChartRevertTypeArgs) -> Result<Value, Error>

chart_set_market#

Change a chart's market

labplan: plussince 1.0.0

Replaces the chart in its window by the same interval on another of the workbench's markets, carrying its type, studies and colours and none of its drawings, as the bar's market button does. The chart gets a new uri, which the answer gives.

ArgumentTypeRequiredDefaultWhat it is
chartstringyes—
symbolstringyes—One of the workbench's markets.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chart_set_market",
    "arguments": {
      "chart": "…",
      "symbol": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.chart
def set_market(self, chart: str, symbol: str) -> Dict[str, Any]

JavaScript

client.chart
setMarket(args)

C#

client.Chart
public Task<JsonNode?> SetMarket(string chart, string symbol, CancellationToken ct = default)

Go

client.Chart
func (a *ChartAPI) SetMarket(ctx context.Context, args ChartSetMarketArgs) (any, error)

Java

client.chart
public Object setMarket(SetMarketArgs args)

C++

client.chart
Json set_market(const SetMarketArgs &args)

Julia

client.chart
set_market = (chart, symbol)

R

client$chart
`set_market` = function(chart, symbol)

Rust

client.chart()
pub fn set_market(&self, args: ChartSetMarketArgs) -> Result<Value, Error>

chart_set_pane#

Set a chart's grid and magnet

labplan: plussince 1.0.0

Sets what the chart's gear sets — the grid and its step and colour, the layering, the period marks and their colour, the frame's colour, the magnet and its radius, the economic calendar's releases and whose — each field optional. Answers the chart.

ArgumentTypeRequiredDefaultWhat it is
chartstringyes—
frame_colourarray of integer (0–255)——
gridstring——Automatic, every or off.
grid_colourarray of integer (0–255)——[r, g, b].
grid_stepnumber——The grid's step in price, with grid every.
layeringstring——Which is drawn on top, as the setup writes it.
magnetboolean——Whether a point placed snaps to a candle.
magnet_pxnumber——The magnet's radius in screen pixels.
newsstring——The economic calendar's releases marked on the chart: off, every, moderate (MetaTrader's moderate and high) or high.
news_currenciesstring——Whose releases: market (the market's own currencies) or every.
period_colourarray of integer (0–255)——
period_marksboolean——Whether the calendar's own boundaries are marked.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chart_set_pane",
    "arguments": {
      "chart": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.chart
def set_pane(self, chart: str, *, frame_colour: Optional[List[int]] = None, grid: Optional[str] = None, grid_colour: Optional[List[int]] = None, grid_step: Optional[float] = None, layering: Optional[str] = None, magnet: Optional[bool] = None, magnet_px: Optional[float] = None, news: Optional[str] = None, news_currencies: Optional[str] = None, period_colour: Optional[List[int]] = None, period_marks: Optional[bool] = None) -> Dict[str, Any]

JavaScript

client.chart
setPane(args)

C#

client.Chart
public Task<JsonNode?> SetPane(string chart, IReadOnlyList<long>? frameColour = null, string? grid = null, IReadOnlyList<long>? gridColour = null, double? gridStep = null, string? layering = null, bool? magnet = null, double? magnetPx = null, string? news = null, string? newsCurrencies = null, IReadOnlyList<long>? periodColour = null, bool? periodMarks = null, CancellationToken ct = default)

Go

client.Chart
func (a *ChartAPI) SetPane(ctx context.Context, args ChartSetPaneArgs) (any, error)

Java

client.chart
public Object setPane(SetPaneArgs args)

C++

client.chart
Json set_pane(const SetPaneArgs &args)

Julia

client.chart
set_pane = (chart; frame_colour = nothing, grid = nothing, grid_colour = nothing, grid_step = nothing, layering = nothing, magnet = nothing, magnet_px = nothing, news = nothing, news_currencies = nothing, period_colour = nothing, period_marks = nothing)

R

client$chart
`set_pane` = function(chart, frame_colour = NULL, grid = NULL, grid_colour = NULL, grid_step = NULL, layering = NULL, magnet = NULL, magnet_px = NULL, news = NULL, news_currencies = NULL, period_colour = NULL, period_marks = NULL)

Rust

client.chart()
pub fn set_pane(&self, args: ChartSetPaneArgs) -> Result<Value, Error>

chart_set_price_lines#

Choose a chart's price lines

labplan: plussince 1.0.0

Turns the chart's price lines on or off — bid, ask, the last price, the spread band, the previous close, the day's high and low, the candle countdown, the book's chips on the scale — as the widget's PRICE section does. Answers the chart.

ArgumentTypeRequiredDefaultWhat it is
chartstringyes—
priceanyyes—Fields of the chart's price lines, laid over setup.price: bid, ask, last, spread_band, prev_close, session_hl, countdown, trade_chips.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chart_set_price_lines",
    "arguments": {
      "chart": "…",
      "price": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.chart
def set_price_lines(self, chart: str, price: Any) -> Dict[str, Any]

JavaScript

client.chart
setPriceLines(args)

C#

client.Chart
public Task<JsonNode?> SetPriceLines(string chart, object price, CancellationToken ct = default)

Go

client.Chart
func (a *ChartAPI) SetPriceLines(ctx context.Context, args ChartSetPriceLinesArgs) (any, error)

Java

client.chart
public Object setPriceLines(SetPriceLinesArgs args)

C++

client.chart
Json set_price_lines(const SetPriceLinesArgs &args)

Julia

client.chart
set_price_lines = (chart, price)

R

client$chart
`set_price_lines` = function(chart, price)

Rust

client.chart()
pub fn set_price_lines(&self, args: ChartSetPriceLinesArgs) -> Result<Value, Error>

chart_set_timeframe#

Change a chart's interval

labplan: plussince 1.0.0

Changes this chart's interval, as the interval menu does: a timeframe replaces the chart in its window (a new uri, in the answer), or range_points makes it Range bars of that many points. Exactly one of the two.

ArgumentTypeRequiredDefaultWhat it is
chartstringyes—
range_pointsinteger——Instead of an interval, Range bars of this many points (the menu's RANGES).
timeframestring——The interval, as the menu writes it: M1, M5, H1, D1, W1, MN1, a custom M95, seconds S30, ticks T100.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chart_set_timeframe",
    "arguments": {
      "chart": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.chart
def set_timeframe(self, chart: str, *, range_points: Optional[int] = None, timeframe: Optional[str] = None) -> Dict[str, Any]

JavaScript

client.chart
setTimeframe(args)

C#

client.Chart
public Task<JsonNode?> SetTimeframe(string chart, long? rangePoints = null, string? timeframe = null, CancellationToken ct = default)

Go

client.Chart
func (a *ChartAPI) SetTimeframe(ctx context.Context, args ChartSetTimeframeArgs) (any, error)

Java

client.chart
public Object setTimeframe(SetTimeframeArgs args)

C++

client.chart
Json set_timeframe(const SetTimeframeArgs &args)

Julia

client.chart
set_timeframe = (chart; range_points = nothing, timeframe = nothing)

R

client$chart
`set_timeframe` = function(chart, range_points = NULL, timeframe = NULL)

Rust

client.chart()
pub fn set_timeframe(&self, args: ChartSetTimeframeArgs) -> Result<Value, Error>

chart_set_type#

Change a chart's type and style

labplan: plussince 1.0.0

Sets the chart's type, the price a line follows and its style, as the Chart type & price widget does — each field optional — and copies them onto the workbench's other charts when apply_to_all asks. Chart_revert_type puts the chart back as it was before its first edit.

ArgumentTypeRequiredDefaultWhat it is
appliedstring——The price a one-line type follows: close, open, high, low, median, typical, weighted.
apply_to_allboolean—falseThen the type, price, style and price lines copied onto every other chart of the workbench.
baseline_at_last_closeboolean—falseA Baseline's level set at the chart's latest close.
chartstringyes—
styleany——Fields of the chart's style, laid over the style its setup holds (setup.style in the answer).
typestring——The type, as a chart's setup writes it: candlestick, ohlc_bars, hollow_candles, volume_candles, heikin_ashi, line, step_line, area, baseline, renko, range_bars, three_line_break, point_and_figure, kagi, tick_bars, volume_bars, hlc_bars, line_markers, columns, high_low_bars, tpo.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chart_set_type",
    "arguments": {
      "chart": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.chart
def set_type(self, chart: str, *, applied: Optional[str] = None, apply_to_all: Optional[bool] = None, baseline_at_last_close: Optional[bool] = None, style: Optional[Any] = None, type_: Optional[str] = None) -> Dict[str, Any]

JavaScript

client.chart
setType(args)

C#

client.Chart
public Task<JsonNode?> SetType(string chart, string? applied = null, bool? applyToAll = null, bool? baselineAtLastClose = null, object? style = null, string? type = null, CancellationToken ct = default)

Go

client.Chart
func (a *ChartAPI) SetType(ctx context.Context, args ChartSetTypeArgs) (any, error)

Java

client.chart
public Object setType(SetTypeArgs args)

C++

client.chart
Json set_type(const SetTypeArgs &args)

Julia

client.chart
set_type = (chart; applied = nothing, apply_to_all = nothing, baseline_at_last_close = nothing, style = nothing, type_ = nothing)

R

client$chart
`set_type` = function(chart, applied = NULL, apply_to_all = NULL, baseline_at_last_close = NULL, style = NULL, type = NULL)

Rust

client.chart()
pub fn set_type(&self, args: ChartSetTypeArgs) -> Result<Value, Error>

chart_set_view#

Scroll or zoom a chart

labplan: plussince 1.0.0

Scrolls or zooms a chart as its keys do, applied where the chart is drawn: a chart of the workbench in front, not minimized. To_end takes it back to the newest bar and holds it there.

ArgumentTypeRequiredDefaultWhat it is
act"scroll_back" | "scroll_forward" | "scroll_back_fast" | "scroll_forward_fast" | "to_start" | "to_end" | "zoom_in" | "zoom_out" | "bar_back" | "bar_forward"yes—What the chart's own keys do: scroll a tenth of the window, a whole window, to either end, zoom, one bar.
chartstringyes—
ninteger—1How many times.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chart_set_view",
    "arguments": {
      "act": "scroll_back",
      "chart": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.chart
def set_view(self, chart: str, act: Literal["scroll_back", "scroll_forward", "scroll_back_fast", "scroll_forward_fast", "to_start", "to_end", "zoom_in", "zoom_out", "bar_back", "bar_forward"], *, n: Optional[int] = None) -> Dict[str, Any]

JavaScript

client.chart
setView(args)

C#

client.Chart
public Task<JsonNode?> SetView(string chart, string act, long? n = null, CancellationToken ct = default)

Go

client.Chart
func (a *ChartAPI) SetView(ctx context.Context, args ChartSetViewArgs) (any, error)

Java

client.chart
public Object setView(SetViewArgs args)

C++

client.chart
Json set_view(const SetViewArgs &args)

Julia

client.chart
set_view = (chart, act; n = nothing)

R

client$chart
`set_view` = function(chart, act, n = NULL)

Rust

client.chart()
pub fn set_view(&self, args: ChartSetViewArgs) -> Result<Value, Error>

chart_window#

Move a chart window

labplan: plussince 1.0.0

Activates, minimizes, maximizes, detaches or attaches a chart window, as its title bar does. Answers the chart.

ArgumentTypeRequiredDefaultWhat it is
action"minimize" or stringyes—
chartstringyes—

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chart_window",
    "arguments": {
      "action": "minimize",
      "chart": "…"
    },
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.chart
def window(self, chart: str, action: Literal["minimize", "activate", "maximize_toggle", "detach", "attach"]) -> Dict[str, Any]

JavaScript

client.chart
window(args)

C#

client.Chart
public Task<JsonNode?> Window(string chart, string action, CancellationToken ct = default)

Go

client.Chart
func (a *ChartAPI) Window(ctx context.Context, args ChartWindowArgs) (any, error)

Java

client.chart
public Object window(WindowArgs args)

C++

client.chart
Json window(const WindowArgs &args)

Julia

client.chart
window = (chart, action)

R

client$chart
`window` = function(chart, action)

Rust

client.chart()
pub fn window(&self, args: ChartWindowArgs) -> Result<Value, Error>

timeframe_custom#

Add or remove a custom interval

labplan: plussince 1.0.0

Adds a custom interval to the interval menu, or removes one, as the menu's custom dialog and its row's x do; the list is the application's. Answers the custom intervals.

ArgumentTypeRequiredDefaultWhat it is
range_pointsinteger——
removeboolean—falseTrue takes it out of the menu; false adds it.
timeframestring——The interval as the menu writes it (M95, H5, S45, T250) — or range_points.

MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "timeframe_custom",
    "arguments": {},
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": {}
    }
  }
}

Python

client.chart
def timeframe_custom(self, *, range_points: Optional[int] = None, remove: Optional[bool] = None, timeframe: Optional[str] = None) -> Dict[str, Any]

JavaScript

client.chart
timeframeCustom(args)

C#

client.Chart
public Task<JsonNode?> TimeframeCustom(long? rangePoints = null, bool? remove = null, string? timeframe = null, CancellationToken ct = default)

Go

client.Chart
func (a *ChartAPI) TimeframeCustom(ctx context.Context, args ChartTimeframeCustomArgs) (any, error)

Java

client.chart
public Object timeframeCustom(TimeframeCustomArgs args)

C++

client.chart
Json timeframe_custom(const TimeframeCustomArgs &args)

Julia

client.chart
timeframe_custom = (; range_points = nothing, remove = nothing, timeframe = nothing)

R

client$chart
`timeframe_custom` = function(range_points = NULL, remove = NULL, timeframe = NULL)

Rust

client.chart()
pub fn timeframe_custom(&self, args: ChartTimeframeCustomArgs) -> Result<Value, Error>

Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed