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
Tiles the workbench's chart windows that are not minimized, as the chart toolbar's Arrange does. Answers the windows' states.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
bench | string | yes | — | 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
Closes a chart window. A workbench's last chart is never closed, as on screen. Answers the workbench's charts left.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
chart | string | yes | — | 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
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.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
bench | string | yes | — | The workbench's uri. |
new_window | boolean | — | false | A second window of a market already charted, as the bar's new-window button opens. |
symbol | string | yes | — | One of the workbench's markets. |
timeframe | string | — | — | 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
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.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
chart | string | yes | — | 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
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.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
chart | string | yes | — | |
symbol | string | yes | — | 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
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.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
chart | string | yes | — | |
frame_colour | array of integer (0–255) | — | — | |
grid | string | — | — | Automatic, every or off. |
grid_colour | array of integer (0–255) | — | — | [r, g, b]. |
grid_step | number | — | — | The grid's step in price, with grid every. |
layering | string | — | — | Which is drawn on top, as the setup writes it. |
magnet | boolean | — | — | Whether a point placed snaps to a candle. |
magnet_px | number | — | — | The magnet's radius in screen pixels. |
news | string | — | — | The economic calendar's releases marked on the chart: off, every, moderate (MetaTrader's moderate and high) or high. |
news_currencies | string | — | — | Whose releases: market (the market's own currencies) or every. |
period_colour | array of integer (0–255) | — | — | |
period_marks | boolean | — | — | 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
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.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
chart | string | yes | — | |
price | any | yes | — | 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
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.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
chart | string | yes | — | |
range_points | integer | — | — | Instead of an interval, Range bars of this many points (the menu's RANGES). |
timeframe | string | — | — | 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
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.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
applied | string | — | — | The price a one-line type follows: close, open, high, low, median, typical, weighted. |
apply_to_all | boolean | — | false | Then the type, price, style and price lines copied onto every other chart of the workbench. |
baseline_at_last_close | boolean | — | false | A Baseline's level set at the chart's latest close. |
chart | string | yes | — | |
style | any | — | — | Fields of the chart's style, laid over the style its setup holds (setup.style in the answer). |
type | string | — | — | 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
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.
| Argument | Type | Required | Default | What 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. |
chart | string | yes | — | |
n | integer | — | 1 | How 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
Activates, minimizes, maximizes, detaches or attaches a chart window, as its title bar does. Answers the chart.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
action | "minimize" or string | yes | — | |
chart | string | yes | — |
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
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.
| Argument | Type | Required | Default | What it is |
|---|---|---|---|---|
range_points | integer | — | — | |
remove | boolean | — | false | True takes it out of the menu; false adds it. |
timeframe | string | — | — | 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>