Bentrix Docs
HomePricingDashboard

Candlestick

The chart most traders start with — each period drawn as a body from its open to its close and thin wicks to its high and low. The default type of every new chart.

120 hourly bars

01What you see

Each candle is one period of the chart's interval: one hour on H1, one day on D1. It is made of four prices:

  • the body — the box between the open and the close;
  • the upper wick — the line from the top of the body to the period's high;
  • the lower wick — the line from the bottom of the body to the period's low.

A rising candle closed at or above its open; a falling one closed below it. New charts draw rising candles in teal and falling ones in red.

A rising candleclosed at or above its openHighCloseOpenLowbodyupper wicklower wickA falling candleclosed below its openHighOpenCloseLowStill formingthe close is the latest price
Four prices make a candle: where the period opened, the highest and lowest it traded, and where it closed. The body spans the open and the close; the wicks reach the high and the low.

02How it is built

Nothing is computed: each candle is the period's own four prices.

body=[min(O,C), max(O,C)]wick=[L, H]rising⟺C≥O
O, H, L, Cthe period's own open, high, low and close

The candle on the right edge is still forming: its close is the latest price and it changes until the period ends.

03Reading it

  • Long bodies — one side was in control for the whole period. A run of long rising bodies is a strong push up.
  • Long wicks — price went somewhere and was pushed back. A long lower wick on a falling day means buyers stepped in before the close.
  • Small bodies with wicks on both sides — indecision: neither side won the period.
  • Gaps between one close and the next open happen at weekends and after news.

Candle patterns — engulfing, hammer, doji and the rest — are read on this chart. The candlestick patterns section lists them, each found by Bentrix's own code.

04Settings

On the Chart type and price card, Style tab:

SettingChoicesNew chart
Coloursa swatch for rising and falling bodies, borders and wicks; presets Default, Classic, Soft, MonoClassic (teal and red)
BodiesFilled or Hollow, separately for rising and fallingFilled
WickAs border (the body's colour) or Own colourAs border
Width1, 1.5, 2 or 3 px1 px

Swap the rising and falling colours turns the pair around in one press.

05Good to know

  • Default is MetaTrader's black-and-white look, if you are used to it.
  • At a far zoom, when a candle is narrower than three pixels, only its wick is drawn, and below one pixel several candles share a column — the chart never draws a body you cannot see.

06From an agent or a program

Set it

chart_set_type turns a chart into this type, as the Chart type card does; style is laid over the chart’s own, field by field — these are its fields and a new chart’s values:

{
  "name": "chart_set_type",
  "arguments": {
    "chart": "<chart uri>",
    "type": "candlestick",
    "style": {
      "candles": {
        "bodies": "filled",
        "wick": "border"
      }
    }
  }
}

Read it

This type is drawn by time, so bars_get answers what it is built from: the candles of the chart’s market and interval up to the clock, oldest first, as rows of time_ms, open, high, low, close, tick_volume, spread_points, with last_forming saying whether the last one is still forming. this type is a way of drawing those candles, so what a program reads is the candles themselves.

In a program

The same two steps in each language — chart, bench and market as in the read the candles guide:

Python

client.chart.set_type(chart, type_="candlestick")
page = client.data.bars_get(bench, market, "H1", limit=20)
print("columns:", page["columns"])
print("last candle still forming:", page["last_forming"])

JSJavaScript

await client.chart.setType({ chart, type: "candlestick" });
const page = await client.data.barsGet({ bench, symbol: market, timeframe: "H1", limit: 20 });
console.log("columns:", page.columns);
console.log("last candle still forming:", page.last_forming);

C#C#

await client.Chart.SetType(chart, type: "candlestick");
var page = await client.Data.BarsGet(bench, market, "H1", limit: 20);
Console.WriteLine($"columns: {page!["columns"]!}");
Console.WriteLine($"last candle still forming: {page!["last_forming"]!}");

GOGo

_ = must(client.Chart.SetType(ctx, mcp.ChartSetTypeArgs{Chart: chart, Type: mcp.Ptr[string]("candlestick")}))
page := must(client.Data.BarsGet(ctx, mcp.DataBarsGetArgs{Bench: bench, Symbol: market, Timeframe: "H1", Limit: mcp.Ptr[int64](20)}))
fmt.Println("columns:", at(page, "columns"))
fmt.Println("last candle still forming:", at(page, "last_forming"))

Java

client.chart.setType(new Bentrix.ChartApi.SetTypeArgs(chart).type("candlestick"));
Object page = client.data.barsGet(new Bentrix.DataApi.BarsGetArgs(bench, market, "H1").limit(20L));
System.out.println("columns:" + " " + at(page, "columns"));
System.out.println("last candle still forming:" + " " + at(page, "last_forming"));

C++C++

client.chart.set_type(ChartApi::SetTypeArgs(chart).type("candlestick"));
auto page = client.data.bars_get(DataApi::BarsGetArgs(bench, market, "H1").limit(20));
std::cout << "columns:" << " " << page["columns"].dump() << std::endl;
std::cout << "last candle still forming:" << " " << page["last_forming"].dump() << std::endl;

Julia

client.chart.set_type(chart; type_ = "candlestick")
page = client.data.bars_get(bench, market, "H1"; limit = 20)
println("columns:", " ", page["columns"])
println("last candle still forming:", " ", page["last_forming"])

RR

client$chart$set_type(chart, type = "candlestick")
page <- client$data$bars_get(bench, market, "H1", limit = 20)
cat("columns:", format(page$columns), "\n")
cat("last candle still forming:", format(page$last_forming), "\n")

RRust

client.chart().set_type(mcp::ChartSetTypeArgs::new(chart.clone()).type_("candlestick"))?;
let page = client.data().bars_get(mcp::DataBarsGetArgs::new(bench.clone(), market.clone(), "H1").limit(20))?;
println!("columns: {}", page["columns"]);
println!("last candle still forming: {}", page["last_forming"]);

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