Bentrix Docs
HomePricingDashboard

Line

One price per period joined into a line — by default the close. The clearest picture of where a market has been, with the period-by-period detail left out.

120 hourly bars

01What you see

A single line through one price of every period. With nothing but the line on screen, the eye follows the trend, the swings and the levels where price turned.

02How it is built

The point of period t is its applied price — the close unless you choose another:

Applied priceThe point
CloseC
OpenO
HighH
LowL
Median(H+L)/2
Typical(H+L+C)/3
Weighted(H+L+2C)/4

Consecutive points are joined with straight segments.

03Reading it

A line of closes is how many professionals look at a market first: each period's close is the price everyone agreed on as it ended, and joining them removes the intraday wicks that make a candle chart busy. Support and resistance stand out clearly where the line turned several times at the same level. What you lose is the range — a period that swung widely and closed unchanged looks like a quiet one.

04Settings

SettingChoicesNew chart
Applied priceClose, Open, High, Low, Median, Typical, WeightedClose
Colour and widthany colour; 1, 1.5, 2 or 3 pxthe Default look

Alt+3 switches a chart to a line.

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": "line",
    "style": {
      "line": {
        "colour": [
          226,
          229,
          234
        ],
        "thickness": "px1_5"
      }
    }
  }
}

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_="line")
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: "line" });
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: "line");
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]("line")}))
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("line"));
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("line"));
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_ = "line")
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 = "line")
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_("line"))?;
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