ChartArea.BarIndexToX
method · ChartArea · cAlgo.API
DesktopCLICloud
Converts Bar Index to X coordinate.
Environment behaviour
CLI — not supported. Always returns 0; no conversion is done.
Cloud — not supported. Always returns 0; no conversion is done.
Definition
double BarIndexToX(double barIndex)
chartArea.BarIndexToX(barIndex: float) -> float
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
barIndex | double | float | Bar Index |
Returns double — X Coordinate
Examples
var x = Chart.BarIndexToX(Chart.LastVisibleBarIndex);
Print("Last visible bar is at X: {0}", x);
x = api.Chart.BarIndexToX(api.Chart.LastVisibleBarIndex)
api.Print(f"Last visible bar is at X: {x}")