New Indie®: Build Custom Scripts with Labels, Lines, and More

Programmatically create, update, and remove chart visuals — all from within your indicator logic

Why this matters

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.

How custom visual rendering works in Indie®

Indie now supports three distinct methods for visual output:

1. Series plotting

The traditional way of showing indicator values:

  • A value is returned and plotted on every bar
  • What was drawn on past bars cannot be removed or updated
  • Useful for signal generation, alerts, and chart overlays
  • Supports multiple visual styles:
    • lines
    • steps
    • histograms
    • columns
    • markers (cross, circle, label with optional text)
@indicator('Plotting example')def Main(self):    return self.close[0] # example of a price plot

2. Plotting helpers

UI-only enhancements like background fills or levels:

  • Declarative
  • Not tied to logic or execution
  • Good for visual separation or structure
@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

3. Custom visual objects from code

Dynamic drawing objects you control fully from script logic:

  • Do not require a value per bar
  • Can appear conditionally (e.g. once every 50 bars)
  • Can be erased, updated, or moved
  • Can appear in chart coordinates (time/price) or UI-relative positions (e.g. screen corners)

Example: Drawing a label and a vertical arrow from code

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)

What’s currently supported

You can now draw:

  • LabelAbs / LabelRel — labels placed on the chart or in the UI
  • LineSegment — straight lines, arrows, or connectors

More visual types including rectangles, icons, and shapes are on the way. You can follow progress in the Indie Changelog.

Explore in action

Want to see how these visuals work in live indicators? Try built-in examples on
 the platform such as:

  • Pivots High/Low
  • ZigZag
  • Pivots Points Standard

These indicators show how chart logic can be visualized clearly — all directly editable in Indie code.

Summary

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.

takeprofit-updates
indie

Comments
Not authorized user image
No Comments yet image

Be the first to comment

Publish your first comment to unleash the wisdom of crowd.