Every method of client.zone in the C++ SDK.
bars_in_zone#
Read a market's candles in any time zone · tool bars_in_zone
Answers a workbench's candles of one market and interval read and cut in a time zone of the caller's choosing, without changing what the screen shows: a day opens at that zone's midnight, a week at its Monday, H4 on its grid — folded from the workbench's own finer candles (H1, or M30/M15 for a half- or quarter-hour zone), up to the cursor and never past it. Rows are time_ms (the workbench's own stamps), zone_time (the bar's open in that zone), open, high, low, close, tick_volume; newest limit (200 when omitted, at most 2000), oldest first. An interval the zone does not move is read as it is.
Declaration
client.zone
Json bars_in_zone(const BarsInZoneArgs &args)Parameters
| Name | Type | What it is | |
|---|---|---|---|
bench | std::string | required | The workbench's uri. |
symbol | std::string | required | One of the workbench's markets. |
timeframe | std::string | required | The interval, as the menu writes it (H4, D1, W1…). |
zone | std::string | required | The zone to read and cut in: a code from zones_list, an IANA name, system, or display (the workbench's charts' zone). |
limit | int64_t | optional | The newest bars kept, 200 when omitted, at most 2000. |
Returns
Json — the tool’s answer as a Json value.
What it answers
Answers a workbench's candles of one market and interval read and cut in a time zone of the caller's choosing, without changing what the screen shows: a day opens at that zone's midnight, a week at its Monday, H4 on its grid — folded from the workbench's own finer candles (H1, or M30/M15 for a half- or quarter-hour zone), up to the cursor and never past it.
Example
client.zone.bars_in_zone(ZoneApi::BarsInZoneArgs(bench, "SYN-DOCS", "H1", "…"))bench_set_display_zone#
Set a workbench's charts' time zone · tool bench_set_display_zone
Sets the time zone a workbench's charts are read in and their candles cut in, as a press on the clock's charts' face does: every chart of the workbench follows; its venue, strategies and swap keep the workbench's own clock. Default puts the workbench's own zone (or its broker's) back. Answers the zone.
Declaration
client.zone
Json bench_set_display_zone(const BenchSetDisplayZoneArgs &args)Parameters
| Name | Type | What it is | |
|---|---|---|---|
bench | std::string | required | The workbench's uri, as get_state gives it. |
zone | std::string | required | A zone's code from zones_list, an IANA name, system (this computer's), or default (the workbench's own zone, or its broker's). |
Returns
Json — the tool’s answer as a Json value.
What it answers
Answers the zone.
Example
client.zone.bench_set_display_zone(ZoneApi::BenchSetDisplayZoneArgs(bench, "…"))chart_set_zone#
Set one chart's own time zone · tool chart_set_zone
Sets one chart's own time zone, as its settings' Time zone row does: its times read and its candles cut in it, a preview of that chart alone — the workbench's other charts and the clock as they were. Default reads it as its workbench again. Answers the chart's zone.
Declaration
client.zone
Json chart_set_zone(const ChartSetZoneArgs &args)Parameters
| Name | Type | What it is | |
|---|---|---|---|
chart | std::string | required | The chart's uri. |
zone | std::string | required | A zone's code from zones_list, an IANA name, system, or default (as its workbench). |
Returns
Json — the tool’s answer as a Json value.
What it answers
Answers the chart's zone.
Example
client.zone.chart_set_zone(ZoneApi::ChartSetZoneArgs(chart, "…"))clock_read#
Read the clock · tool clock_read
Answers the clock window as it reads the selected workbench: each clock it shows (market: the broker's or the laboratory's zone; computer: this computer's; charts: the workbench's display zone) with its time, region and offset; the workbench's display zone, chosen or default; and the clock's own settings (which clocks, face, hours, parts, sections, desks, band, glow window, close-together line).
Declaration
client.zone
Json clock_read()It takes no arguments.
Returns
Json — the tool’s answer as a Json value.
What it answers
Answers the clock window as it reads the selected workbench: each clock it shows (market: the broker's or the laboratory's zone; computer: this computer's; charts: the workbench's display zone) with its time, region and offset; the workbench's display zone, chosen or default; and the clock's own settings (which clocks, face, hours, parts, sections, desks, band, glow window, close-together line).
Example
client.zone.clock_read()clock_settings_set#
Change the clock's settings · tool clock_settings_set
Changes the clock window's own settings, as its gear's window does — the fields given laid over the rest. Answers the settings.
Declaration
client.zone
Json clock_settings_set(const ClockSettingsSetArgs &args)Parameters
| Name | Type | What it is | |
|---|---|---|---|
settings | Json | required | Fields of the clock's settings laid over what they are now (clock_read's settings): market, computer, charts, computer_time (replay_moment | real_now), face (analog | analog_and_digital | digital), hours (h24 | h12), seconds_hand, millis, date, week, zone_line, markets, candles, progress, holidays, desks (a bit each: Sydney 1, Tokyo 2, London 4, New York 8), band, warn (off | s10 | s30 | m1), together. |
Returns
Json — the tool’s answer as a Json value.
What it answers
Answers the settings.
Example
client.zone.clock_settings_set(ZoneApi::ClockSettingsSetArgs("…"))zones_list#
List every time zone · tool zones_list
Answers every time zone Bentrix offers, in the order its lists show them: system (this computer's), the important ones (UTC, New York close, New York, London, Tokyo, Chicago, Frankfurt, Eastern Europe, Dubai, Singapore, Hong Kong, Sydney), every zone of the IANA database and the fixed offsets — each its code (what the other zone tools take), label, region, offsets across the year and offset now. Search narrows them.
Declaration
client.zone
Json zones_list(const ZonesListArgs &args)Parameters
| Name | Type | What it is | |
|---|---|---|---|
search | std::string | optional | Only the zones whose code or name holds this text (case does not matter). |
Returns
Json — the tool’s answer as a Json value.
What it answers
Answers every time zone Bentrix offers, in the order its lists show them: system (this computer's), the important ones (UTC, New York close, New York, London, Tokyo, Chicago, Frankfurt, Eastern Europe, Dubai, Singapore, Hong Kong, Sydney), every zone of the IANA database and the fixed offsets — each its code (what the other zone tools take), label, region, offsets across the year and offset now.
Example
client.zone.zones_list(ZoneApi::ZonesListArgs())