Package for drawing non-series data like labels and lines.
Types
AbsolutePosition
type
Position defined in absolute chart coordinates (time and price values).
Fields
Time coordinate of the absolute position.
Price coordinate of the absolute position.
Offset adjustment for the absolute position.
Methods
__init__
(time, price, offset) -> None
Initializes an absolute position with time and price coordinates.
Time coordinate of the position on the chart.
Price coordinate of the position on the chart.
Optional offset adjustment for the position.
Chart
type
Chart class for drawing and managing non-series visual elements on the chart.
Methods
Adds or updates a drawing element on the chart.
obj
indie.drawings.IDrawingItem
requiredDrawing object to add or update on the chart.
Removes a drawing element from the chart.
obj
indie.drawings.IDrawingItem
requiredDrawing object to remove from the chart.
Removes all drawing elements from the chart.
Label[T]
type
Base class for text labels that can be positioned on the chart.
Aliases
LabelAbs = Label[AbsolutePosition]
LabelRel = Label[RelativePosition]
Fields
Text content displayed by the label.
Position of the label on the chart (absolute or relative).
Font size of the label text.
Background color of the label.
callout_position
indie.drawings.callout_position
Position of the label relative to its specified coordinates.
Methods
__init__
(text, position, font_size, text_color, bg_color, callout_position) -> None
Initializes a new label with text, position and optional styling parameters.
Text content to display in the label.
Position of the label on the chart (AbsolutePosition
or RelativePosition
).
Font size of the label text in pixels.
text_color
indie.Color
default:indie.color.BLACK
bg_color
indie.Color
default:indie.color.YELLOW
Background color of the label.
callout_position
indie.drawings.callout_position
default:indie.drawings.callout_position.TOP_RIGHT
Position of the label relative to its specified coordinates.
LineSegment
type
Drawable line segment between two points with customizable style and endpoints.
Fields
point_a
indie.drawings.AbsolutePosition
Starting point of the line segment.
point_b
indie.drawings.AbsolutePosition
Ending point of the line segment.
a_end
indie.drawings.line_ending_style
Style of the line ending at point A.
b_end
indie.drawings.line_ending_style
Style of the line ending at point B.
extend_type
indie.drawings.extend_type
How the line should be extended beyond its endpoints.
Color of the line segment.
line_style
indie.drawings.line_segment_style
Visual style of the line (solid, dashed, dotted).
Width of the line segment in pixels.
Methods
__init__
(point_a, point_b, a_end, b_end, extend_type, color, line_style, line_width) -> None
Initializes a new line segment between two points with optional styling parameters.
point_a
indie.drawings.AbsolutePosition
requiredStarting point of the line segment.
point_b
indie.drawings.AbsolutePosition
requiredEnding point of the line segment.
a_end
indie.drawings.line_ending_style
default:indie.drawings.line_ending_style.NONE
Style of the line ending at the starting point.
b_end
indie.drawings.line_ending_style
default:indie.drawings.line_ending_style.NONE
Style of the line ending at the ending point.
extend_type
indie.drawings.extend_type
default:indie.drawings.extend_type.NONE
How the line should be extended beyond its endpoints.
color
indie.Color
default:indie.color.YELLOW
Color of the line segment.
line_style
indie.drawings.line_segment_style
default:indie.drawings.line_segment_style.SOLID
Visual style of the line (solid, dashed, dotted).
Width of the line segment in pixels.
RelativePosition
type
Position defined relative to chart boundaries using percentage ratios.
Fields
vertical_anchor
indie.drawings.vertical_anchor
Vertical anchor point (top, middle, bottom) for the relative position.
horizontal_anchor
indie.drawings.horizontal_anchor
Horizontal anchor point (left, center, right) for the relative position.
Vertical position ratio from 0.0 (top) to 1.0 (bottom) of the chart.
Horizontal position ratio from 0.0 (left) to 1.0 (right) of the chart.
Methods
__init__
(vertical_anchor, horizontal_anchor, top_bottom_ratio, left_right_ratio) -> None
Initializes a relative position with anchor points and ratio values.
vertical_anchor
indie.drawings.vertical_anchor
requiredVertical anchor point (top, middle, bottom) for positioning.
horizontal_anchor
indie.drawings.horizontal_anchor
requiredHorizontal anchor point (left, center, right) for positioning.
Vertical position ratio from 0.0 (top) to 1.0 (bottom) of the chart.
Horizontal position ratio from 0.0 (left) to 1.0 (right) of the chart.
Enums
callout_position
enum
Position of the label relative to its specified coordinates.
Static fields
TOP_RIGHT
indie.drawings.callout_position
Position of the label relative to its specified coordinates.
TOP_LEFT
indie.drawings.callout_position
Position of the label relative to its specified coordinates.
BOTTOM_RIGHT
indie.drawings.callout_position
Position of the label relative to its specified coordinates.
BOTTOM_LEFT
indie.drawings.callout_position
Position of the label relative to its specified coordinates.
extend_type
enum
Defines how line segments should be extended beyond their endpoints.
Static fields
NONE
indie.drawings.extend_type
Defines how line segments should be extended beyond their endpoints.
LEFT
indie.drawings.extend_type
Defines how line segments should be extended beyond their endpoints.
RIGHT
indie.drawings.extend_type
Defines how line segments should be extended beyond their endpoints.
BOTH
indie.drawings.extend_type
Defines how line segments should be extended beyond their endpoints.
horizontal_anchor
enum
Horizontal anchor point for relative positioning.
Static fields
LEFT
indie.drawings.horizontal_anchor
Horizontal anchor point for relative positioning.
CENTER
indie.drawings.horizontal_anchor
Horizontal anchor point for relative positioning.
RIGHT
indie.drawings.horizontal_anchor
Horizontal anchor point for relative positioning.
line_ending_style
enum
Style of line segment endpoints (arrows, circles, etc.).
Static fields
NONE
indie.drawings.line_ending_style
Style of line segment endpoints (arrows, circles, etc.).
ARROW
indie.drawings.line_ending_style
Style of line segment endpoints (arrows, circles, etc.).
TRIANGLE
indie.drawings.line_ending_style
Style of line segment endpoints (arrows, circles, etc.).
CIRCLE
indie.drawings.line_ending_style
Style of line segment endpoints (arrows, circles, etc.).
DIAMOND
indie.drawings.line_ending_style
Style of line segment endpoints (arrows, circles, etc.).
line_segment_style
enum
Visual style of line segments (solid, dashed, dotted).
Static fields
SOLID
indie.drawings.line_segment_style
Visual style of line segments (solid, dashed, dotted).
DOTTED
indie.drawings.line_segment_style
Visual style of line segments (solid, dashed, dotted).
DASHED
indie.drawings.line_segment_style
Visual style of line segments (solid, dashed, dotted).
relative_position
enum
Predefined relative positions on the chart for placing elements.
Static fields
TOP_LEFT
indie.drawings.RelativePosition
Predefined relative positions on the chart for placing elements.
TOP_CENTER
indie.drawings.RelativePosition
Predefined relative positions on the chart for placing elements.
TOP_RIGHT
indie.drawings.RelativePosition
Predefined relative positions on the chart for placing elements.
MIDDLE_LEFT
indie.drawings.RelativePosition
Predefined relative positions on the chart for placing elements.
MIDDLE_CENTER
indie.drawings.RelativePosition
Predefined relative positions on the chart for placing elements.
MIDDLE_RIGHT
indie.drawings.RelativePosition
Predefined relative positions on the chart for placing elements.
BOTTOM_LEFT
indie.drawings.RelativePosition
Predefined relative positions on the chart for placing elements.
BOTTOM_CENTER
indie.drawings.RelativePosition
Predefined relative positions on the chart for placing elements.
BOTTOM_RIGHT
indie.drawings.RelativePosition
Predefined relative positions on the chart for placing elements.
vertical_anchor
enum
Vertical anchor point for relative positioning.
Static fields
TOP
indie.drawings.vertical_anchor
Vertical anchor point for relative positioning.
MIDDLE
indie.drawings.vertical_anchor
Vertical anchor point for relative positioning.
BOTTOM
indie.drawings.vertical_anchor
Vertical anchor point for relative positioning.