Properties Reference
This page lists every property name accepted by set_candlestick_property / get_candlestick_property and set_annotation_property / get_annotation_property. Property names are dot-separated paths; sub-paths let you read or write individual fields of a bundle.
Value Types
PropertyValue variant | Rust type | Description |
|---|---|---|
Color(c) | navi_visuals::Color | RGBA color |
Float(v) | f64 | Floating-point number |
Bool(b) | bool | Toggle |
Int(i) | i32 | Integer (used for bitflags) |
Enum(i) | usize | Index into an ordered option list |
Stroke(s) | Stroke { color, width, style } | Line appearance bundle |
Enableable(e) | EnableableValue { enabled, value } | Optional sub-value with an on/off flag |
GroupItems(v) | Vec<GroupItemValue> | Ordered list (levels, color pairs) |
GroupItem(i) | GroupItemValue { enabled, number, value } | One item in a group |
TextStyle(s) | TextStyle { color, fontSize, bold, italic } | Text appearance bundle |
Text(s) | String | Editable text content |
Sub-Path Syntax
Bundles can be addressed as a whole or field-by-field:
Stroke
| Path | Type | Description |
|---|---|---|
stroke | Stroke | Whole bundle (color + width + style) |
stroke.color | Color | Line color |
stroke.width | Float | Line width in logical pixels |
stroke.style | Enum | 0 = Solid, 1 = Dashed, 2 = Dotted |
Some annotations expose a stroke under a named prefix (e.g. line, border, median, top, bottom). The sub-paths are identical: line.color, border.width, etc.
Fill
| Path | Type | Description |
|---|---|---|
fill or fill.color | Color | Fill color (RGBA, alpha controls opacity) |
TextStyle
| Path | Type | Description |
|---|---|---|
textStyle | TextStyle | Whole bundle |
textStyle.color | Color | Text color |
textStyle.fontSize | Float | Font size in logical pixels |
textStyle.bold | Bool | Bold weight |
textStyle.italic | Bool | Italic style |
text.color | Color | Alias for textStyle.color |
TextAlignment
| Path | Type | Description |
|---|---|---|
textAlignment.align | Enum | Horizontal: 0 = Left, 1 = Center, 2 = Right |
textAlignment.valign | Enum | Vertical: 0 = Top, 1 = Middle, 2 = Bottom |
Level Groups
Many annotations expose a list of styled levels (Fibonacci, Gann, channels, pitchfork):
| Path | Type | Description |
|---|---|---|
levels | GroupItems | All levels at once |
levels.N | GroupItem | One level (N = 0-based index) |
levels.N.enabled | Bool (via GroupItem.enabled) | Whether this level is visible |
levels.N.color | Color | Level stroke color |
levels.N.width | Float | Level stroke width |
levels.N.style | Enum | Level stroke style |
Candlestick Style Properties
Properties are scoped to the active style set by set_candlestick_style. Only the active style's properties are readable and writable.
Candlestick
| Property | Type | Description |
|---|---|---|
colorBasedOnPrevClose | Bool | Color bodies relative to previous close instead of open |
body | GroupItems[2] | Up / down body colors ([0] = up, [1] = down) |
border | GroupItems[2] | Up / down border colors |
wick | GroupItems[2] | Up / down wick colors |
HollowCandle / VolumeCandle
| Property | Type | Description |
|---|---|---|
body | GroupItems[2] | Up / down body colors |
border | GroupItems[2] | Up / down border colors |
wick | GroupItems[2] | Up / down wick colors |
HeikinAshi
| Property | Type | Description |
|---|---|---|
realPricesOnScale | Bool | Show real OHLC prices on the scale instead of Heikin Ashi values |
colorBasedOnPrevClose | Bool | Color bodies relative to previous close |
body | GroupItems[2] | Up / down body colors |
border | GroupItems[2] | Up / down border colors |
wick | GroupItems[2] | Up / down wick colors |
Bars
| Property | Type | Description |
|---|---|---|
colorBasedOnPrevClose | Bool | Color bars relative to previous close |
hlc | Bool | Render as HLC bars (omit the open tick) |
thin | Bool | Draw thin single-pixel bars |
color | GroupItems[2] | Up / down bar colors |
Line / LineWithMarkers / StepLine
| Property | Type | Description |
|---|---|---|
priceSource | Enum | 0=Close, 1=Open, 2=High, 3=Low, 4=HL2, 5=HLC3, 6=OHLC4 |
fillMode | Enum | 0 = Solid, 1 = Gradient |
stroke | Stroke | Line color, width, style (Solid mode only) |
gradientColor1 | Color | Gradient top color (Gradient mode only) |
gradientColor2 | Color | Gradient bottom color (Gradient mode only) |
lineWidth | Stroke | Width-only stroke (Gradient mode only — only .width is used) |
Area
| Property | Type | Description |
|---|---|---|
priceSource | Enum | 0=Close, 1=Open, 2=High, 3=Low, 4=HL2, 5=HLC3, 6=OHLC4 |
line | Stroke | Area line color, width, style |
fillColor1 | Color | Upper fill color (defaults to line color at 80% opacity) |
fillColor2 | Color | Lower fill color (defaults to line color at 0% opacity) |
HlcArea
| Property | Type | Description |
|---|---|---|
highLine | Enableable<Stroke> | High price line (toggleable) |
lowLine | Enableable<Stroke> | Low price line (toggleable) |
closeLine | Stroke | Close price line |
fillColor1 | Color | Upper band fill color |
fillColor2 | Color | Lower band fill color |
Baseline
| Property | Type | Description |
|---|---|---|
priceSource | Enum | 0=Close, 1=Open, 2=High, 3=Low, 4=HL2, 5=HLC3, 6=OHLC4 |
topLine | Enableable<Stroke> | Upper line (toggleable) |
bottomLine | Enableable<Stroke> | Lower line (toggleable) |
fillTop | GroupItems[2] | Above-baseline fill: [0] = near-line color, [1] = far color |
fillBottom | GroupItems[2] | Below-baseline fill: [0] = near-line color, [1] = far color |
level | Float | Baseline position as a fraction of the price axis (0.0–1.0) |
Columns
| Property | Type | Description |
|---|---|---|
priceSource | Enum | 0=Close, 1=Open, 2=High, 3=Low, 4=HL2, 5=HLC3, 6=OHLC4 |
colorBasedOnPrevClose | Bool | Color columns relative to previous close |
color | GroupItems[2] | Up / down column colors |
HighLow
| Property | Type | Description |
|---|---|---|
bodyColor | Color | Bar body color (defaults to theme text color) |
borderColor | Color | Bar border color (defaults to theme text color) |
labelColor | Color | High/low label color (defaults to theme dim text color) |
Annotation Properties
Lines
TrendLine / Ray
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Line color, width, style |
extend | Int (bitflags) | Extension: bit 0 = left, bit 1 = right |
textStyle | TextStyle | Label text appearance |
textAlignment.align | Enum | Label horizontal position |
textAlignment.valign | Enum | Label vertical position (0=Top, 1=Middle, 2=Bottom) |
ExtendedLine
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Line color, width, style |
textStyle | TextStyle | Label text appearance |
textAlignment.align | Enum | Label horizontal position |
textAlignment.valign | Enum | Label vertical position |
HorizontalLine / HorizontalRay
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Line color, width, style |
showPriceLabel | Bool | Show the price value at the line |
textStyle | TextStyle | Label text appearance |
textAlignment.align | Enum | Label horizontal position |
textAlignment.valign | Enum | Label vertical position |
VerticalLine
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Line color, width, style |
showTimeLabel | Bool | Show the timestamp at the line |
textStyle | TextStyle | Label text appearance |
textAlignment.align | Enum | Label horizontal position |
textAlignment.valign | Enum | Label vertical position |
CrossLine
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Line color, width, style |
Arrow
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Arrow line color, width, style |
textStyle | TextStyle | Label text appearance |
textAlignment.align | Enum | Label horizontal position |
textAlignment.valign | Enum | Label vertical position |
ArrowMarkUp / ArrowMarkDown
| Property | Type | Description |
|---|---|---|
color | Color | Arrow marker fill color |
textStyle | TextStyle | Label text appearance |
Shapes
Rectangle / RotatedRectangle
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Border color, width, style |
fill.color | Color | Fill color |
textStyle | TextStyle | Label text appearance |
textAlignment.align | Enum | Label horizontal position |
textAlignment.valign | Enum | Label vertical position |
Circle / Ellipse / Triangle / Polyline / Sector
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Border color, width, style |
fill.color | Color | Fill color |
Text & Symbols
Text
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Text box border |
fill.color | Color | Text box background fill |
textStyle | TextStyle | Text appearance (color, size, bold, italic) |
Emoji
| Property | Type | Description |
|---|---|---|
textStyle | TextStyle | Emoji appearance (size via textStyle.fontSize) |
textAlignment.align | Enum | Horizontal anchor |
Note / PriceNote
| Property | Type | Description |
|---|---|---|
line | Stroke | Leader line from anchor point to label |
border | Stroke | Label box border |
fill.color | Color | Label box background fill |
textStyle | TextStyle | Label text appearance |
textAlignment.align | Enum | Text horizontal alignment inside box |
textAlignment.valign | Enum | Text vertical alignment inside box |
Callout
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Callout border and leader line |
fill.color | Color | Callout background fill |
textStyle | TextStyle | Text appearance |
textAlignment.align | Enum | Text horizontal alignment |
textAlignment.valign | Enum | Text vertical alignment |
Channels
ParallelChannel
| Property | Type | Description |
|---|---|---|
levels | GroupItems[7] | Channel lines (indices 0, 2, 4, 6 = main lines; 1, 3, 5 = midlines) |
extend | Int (bitflags) | Extension: bit 0 = left, bit 1 = right |
fill.color | Color | Channel fill color |
textStyle | TextStyle | Label text appearance |
textAlignment.align | Enum | Label horizontal position |
textAlignment.valign | Enum | Label vertical position |
FlatTopBottom
| Property | Type | Description |
|---|---|---|
top | Stroke | Top boundary line |
bottom | Stroke | Bottom boundary line |
fill.color | Color | Channel fill color |
prices | Enableable<TextStyle> | Price label appearance (with on/off toggle) |
DisjointChannel
| Property | Type | Description |
|---|---|---|
lineA | Stroke | Upper boundary line |
lineB | Stroke | Lower boundary line |
fill.color | Color | Channel fill color |
prices | Enableable<TextStyle> | Price label appearance (with on/off toggle) |
RegressionTrend
| Property | Type | Description |
|---|---|---|
baseLine | Stroke | Regression center line |
upperLine | Stroke | Upper deviation line |
lowerLine | Stroke | Lower deviation line |
upperFill.color | Color | Upper band fill |
lowerFill.color | Color | Lower band fill |
Fibonacci Tools
All Fibonacci annotations share this core set; individual tools may omit some:
| Property | Type | Description |
|---|---|---|
levels | GroupItems[N] | Fibonacci levels (24 for FibRetracement; varies by type) |
levels.N.enabled | Bool | Whether level N is visible |
levels.N.color | Color | Level N stroke color |
levels.N.width | Float | Level N stroke width |
levels.N.style | Enum | Level N stroke style |
extend | Int (bitflags) | Extension: bit 0 = left, bit 1 = right |
trendLine | Enableable<Stroke> | Main trend line (FibRetracement, FibChannel) |
fillAlpha | Float | Fill opacity between levels (0.0–1.0) |
reverse | Bool | Flip level order (FibRetracement) |
showPrices | Bool | Show price labels at each level |
Gann Tools
GannSquare / GannSquareFixed
| Property | Type | Description |
|---|---|---|
levels | GroupItems[6] | Horizontal price grid lines |
fans | GroupItems[11] | Fan angle lines |
arcs | GroupItems[11] | Arc lines |
fillAlpha | Float | Fill opacity (0.0–1.0) |
reverse | Bool | Flip the square (GannSquare only) |
showLevelNumbers | Bool | Show numeric labels on grid lines |
textStyle | TextStyle | Label text appearance |
GannFan
| Property | Type | Description |
|---|---|---|
levels | GroupItems[9] | Fan angle lines |
fillAlpha | Float | Fill opacity |
labels | Enableable<TextStyle> | Fan label appearance |
GannBox
| Property | Type | Description |
|---|---|---|
priceLevels | GroupItems[7] | Horizontal price division lines |
timeLevels | GroupItems[7] | Vertical time division lines |
angles | Enableable<Stroke> | Diagonal angle lines |
fillAlpha | Float | Fill opacity |
reverse | Bool | Flip the box |
Pitchfork / Pitchfan
Pitchfork
| Property | Type | Description |
|---|---|---|
style | Enum | 0=Original, 1=Schiff, 2=Modified Schiff, 3=Inside |
extendLines | Bool | Extend all lines beyond the anchor point |
median | Stroke | Center (median) line |
levels | GroupItems[9] | Parallel handle lines (each Enableable) |
fillAlpha | Float | Fill opacity between lines |
Pitchfan
| Property | Type | Description |
|---|---|---|
median | Stroke | Center line |
levels | GroupItems[9] | Fan lines (each Enableable) |
fillAlpha | Float | Fill opacity |
Measurements
InfoLine
| Property | Type | Description |
|---|---|---|
stroke.color | Color | Line color |
stroke.width | Float | Line width |
stats | Int (bitflags) | Which statistics to display: bit 0=price range, 1=% change, 2=pips, 3=bars, 4=date/time range, 5=distance, 6=angle |
statsPos | Enum | Stats label position: 0=Auto, 1=Left, 2=Center, 3=Right |
alwaysShowStats | Bool | Show stats even when the annotation is not selected |
textStyle | TextStyle | Stats text appearance |
TrendAngle
| Property | Type | Description |
|---|---|---|
stroke.color | Color | Line color |
stroke.width | Float | Line width |
stats | Int (bitflags) | Statistics flags (same bit layout as InfoLine) |
statsPos | Enum | Stats label position |
alwaysShowStats | Bool | Show stats when not selected |
PriceRange / DateRange
| Property | Type | Description |
|---|---|---|
stroke.color | Color | Ruler line color |
stroke.width | Float | Ruler line width |
DateAndPriceRange
| Property | Type | Description |
|---|---|---|
stroke.color | Color | Ruler line color |
stroke.width | Float | Ruler line width |
fill.color | Color | Range box fill color |
Free-Draw Tools
Brush / Highlighter
| Property | Type | Description |
|---|---|---|
stroke.color | Color | Brush color |
stroke.width | Float | Brush width |
Volume & VWAP
VolumeProfileAnchored / VolumeProfileFixedRange
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Profile outline color, width, style |
AnchoredVwap
AnchoredVwap exposes both Inputs and Style tab properties.
Inputs tab (category = Inputs):
| Property | Type | Description |
|---|---|---|
source | Enum | Price source: 0=Close, 1=Open, 2=High, 3=Low, 4=HL2, 5=HLC3, 6=OHLC4 |
bandsMode | Enum | Band calculation mode: 0=Standard Deviation, 1=Percentage (multiplier of 1 means 1%) — has tooltip |
bands.0 | Enableable<Number> | Band 1 multiplier (min 0.01, step 0.5) |
bands.1 | Enableable<Number> | Band 2 multiplier |
bands.2 | Enableable<Number> | Band 3 multiplier |
Style tab (category = Style):
| Property | Type | Description |
|---|---|---|
stroke | Stroke | VWAP line color, width, style |
bandStyles.0.upper | Enableable<Stroke> | Band 1 upper line |
bandStyles.0.lower | Enableable<Stroke> | Band 1 lower line |
background | Enableable<Fill> | Band 1 background fill |
bandStyles.1.upper | Enableable<Stroke> | Band 2 upper line |
bandStyles.1.lower | Enableable<Stroke> | Band 2 lower line |
bandStyles.2.upper | Enableable<Stroke> | Band 3 upper line |
bandStyles.2.lower | Enableable<Stroke> | Band 3 lower line |
showPriceLabel | Bool | Show price label on the right axis |
Positions
LongPosition / ShortPosition
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Level line color, width, style |
fill.color | Color | Risk/reward box fill color |
Cyclic & Curve Tools
CyclicLines / SineLine / Curve / DoubleCurve / Arc / Path / GhostFeed
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Line color, width, style |
TimeCycles
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Line color, width, style |
fill.color | Color | Cycle region fill color |
Misc
PositionForecast / BarPattern / Sector
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Outline color, width, style |
fill.color | Color | Fill color |
Chart Patterns & Elliott Waves
All pattern and Elliott wave types (XabcdPattern, CypherPattern, AbcdPattern, HeadAndShoulders, TrianglePattern, ThreeDrivesPattern, ElliottImpulseWave, ElliottCorrectiveWave, ElliottTriangleWave, ElliottDoubleCombo, ElliottTripleCombo) expose only:
| Property | Type | Description |
|---|---|---|
stroke | Stroke | Pattern line color, width, style |