A line split by a level — shaded one colour above it and another below — so you see at once whether price is above or below the level that matters to you.
01What you see
A line of one applied price per period, a dashed horizontal baseline, and two fills: the part of the line above the baseline shaded in the rising colour, the part below in the falling colour.
02How it is built
The line is the applied price, the close by default. The baseline stands at one of three levels:
| Level | Where it stands |
|---|---|
| Mean | the average of the values the line draws on screen: |
| Last close | the newest candle's close, up to the clock |
| Level | a price you type |
Each period's distance from the baseline is filled toward it: above in the rising colour, below in the falling colour.
03Reading it
- Mean answers is price high or low compared with what I am looking at? — it moves as you scroll and zoom.
- Last close answers where were we compared with now? — every earlier period above the line was higher than the current price.
- Level answers a question of your own: above or below an entry price, a round number, yesterday's close.
04Settings
| Setting | Choices | New chart |
|---|---|---|
| Level | Mean, Last close, Level | Mean |
| Fill | 15, 30, 45 or 60 % opacity | 30 % |
| Colours | above and below | rising and falling colours |
| Applied price, width | as on Line | Close |
05From 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": "baseline",
"style": {
"line": {
"above": [
226,
229,
234
],
"baseline": "mean_of_shown",
"baseline_fill": 30,
"below": [
226,
229,
234
]
}
}
}
}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_="baseline")
page = client.data.bars_get(bench, market, "H1", limit=20)
print("columns:", page["columns"])
print("last candle still forming:", page["last_forming"])JavaScript
await client.chart.setType({ chart, type: "baseline" });
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#
await client.Chart.SetType(chart, type: "baseline");
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"]!}");Go
_ = must(client.Chart.SetType(ctx, mcp.ChartSetTypeArgs{Chart: chart, Type: mcp.Ptr[string]("baseline")}))
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("baseline"));
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++
client.chart.set_type(ChartApi::SetTypeArgs(chart).type("baseline"));
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_ = "baseline")
page = client.data.bars_get(bench, market, "H1"; limit = 20)
println("columns:", " ", page["columns"])
println("last candle still forming:", " ", page["last_forming"])R
client$chart$set_type(chart, type = "baseline")
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")Rust
client.chart().set_type(mcp::ChartSetTypeArgs::new(chart.clone()).type_("baseline"))?;
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"]);