Until now, custom visuals like labels or lines could only be displayed in Indie® through standard plotting — one value per bar, rendered automatically.
This update changes that. Indie® now supports programmatic visual objects inside your indicator code. You can place labels, lines, and other elements on the chart based on any logic you define — only when needed, and with full control to update or remove them dynamically.
These visuals are not tied to series data. Instead, they let your indicator highlight structure, display stats, or annotate price action exactly when and where it matters.
Indie now supports three distinct methods for visual output:
The traditional way of showing indicator values:
@indicator('Plotting example')
def Main(self):
return self.close[0] # example of a price plot
UI-only enhancements like background fills or levels:
@indicator('Plotting Helpers Example', overlay_main_pane=False)
@band(0, 30, fill_color=color.RED(0.1)) # Oversold zone
@band(70, 100, fill_color=color.GREEN(0.1)) # Overbought zone
@band(30, 70, fill_color=color.GRAY(0.05)) # Neutral zone
@level(30)
@level(70)
def Main(self):
# Simulated indicator value in 0–100 range
value = (self.bar_index % 100) * 1.0
return value
Dynamic drawing objects you control fully from script logic:
Here’s a simple indicator that draws a stats panel in the top-right corner and adds a vertical arrow every 50 bars:
@indicator('Drawings example', overlay_main_pane=True)
def Main(self):
stats_label = Var[LabelRel].new(LabelRel(
"text",
RelativePosition(
vertical_anchor=va.TOP,
horizontal_anchor=ha.RIGHT,
top_bottom_ratio=0.1,
left_right_ratio=0.9,
),
bg_color=color.NAVY(0.5),
text_color=color.YELLOW,
))
stats_label.get().text = (
"Bar count: " + str(self.bar_count) +
"\nCurrent price: " + str(self.close[0])
)
self.chart.draw(stats_label.get())
if self.bar_count % 50 == 0:
self.chart.draw(LineSegment(
AbsolutePosition(self.time[0], 2*self.high[0]-self.low[0]),
AbsolutePosition(self.time[0], self.low[0]),
b_end=les.ARROW,
color=color.OLIVE,
))
This example highlights two key principles:
RelativePosition
allows you to pin elements to the UI (e.g. corners)AbsolutePosition
aligns objects with chart data (e.g. time and price)You can now draw:
LabelAbs
/ LabelRel
— labels placed on the chart or in the UILineSegment
— straight lines, arrows, or connectorsMore visual types including rectangles, icons, and shapes are on the way. You can follow progress in the Indie Changelog.
Want to see how these visuals work in live indicators? Try built-in examples on
the platform such as:
These indicators show how chart logic can be visualized clearly — all directly editable in Indie code.
Custom visual objects in Indie give you full control over how your indicator logic is presented — going beyond simple value plots. Draw conditionally, erase dynamically, and place visuals exactly where they make the most sense.
This is just the beginning. As we continue expanding visual object support, your creative toolkit will keep growing.
If you have any questions or want to explore use cases, feel free to reach out in our Discord community. We’re always happy to help.
Be the first to comment
Publish your first comment to unleash the wisdom of crowd.