trade29.sc.ChartDrawing#

class trade29.sc.ChartDrawing(drawing_type: ~trade29.sc.constants.ChartDrawingType = ChartDrawingType.UNSET, region: int = -1, add_as_user_drawn_drawing: bool = False, primary_color: ~trade29.sc.color.Color = <trade29.sc.color.Color object>, secondary_color: ~trade29.sc.color.Color = <trade29.sc.color.Color object>, text: str = '', font_size: int = -1, text_alignment: int = -1, line_width: int = -1, line_style: ~trade29.sc.constants.ChartDrawingLineStyle = ChartDrawingLineStyle.UNSET, use_relative_vertical_values: bool = False, first_anchor_vertical: float = -1, second_anchor_vertical: float = -1, third_anchor_vertical: float = -1, first_anchor_horizontal: ~datetime.datetime | int = -1, second_anchor_horizontal: ~datetime.datetime | int = -1, third_anchor_horizontal: ~datetime.datetime | int = -1, transparency_level: int = -1, extend_right: bool = -1, extend_left: bool = -1, chart_number: int = -1, square_edge: bool = -1, display_horizontal_line_value: bool = -1, font_back_color: ~trade29.sc.color.Color = <trade29.sc.color.Color object>, font_face: str = '', font_bold: bool = -1, font_italic: bool = -1, reverse_text_color: ~trade29.sc.color.Color = <trade29.sc.color.Color object>, marker_type: ~trade29.sc.constants.ChartDrawingMarkerType = ChartDrawingMarkerType.UNSET, marker_size: int = -1, use_bar_spacing_for_marker_size: bool = -1, show_volume: bool = -1, show_ask_bid_diff_volume: bool = -1, show_price_difference: bool = -1, show_tick_difference: bool = -1, show_currency_value: bool = -1, show_percent_change: bool = -1, show_time_difference: bool = -1, show_number_of_bars: bool = -1, show_angle: bool = -1, show_end_point_price: bool = -1, show_end_point_date_time: bool = -1, show_end_point_date: bool = -1, show_end_point_time: bool = -1, multi_line_label: bool = -1, show_percent: bool = -1, show_price: bool = -1, round_to_tick_size: bool = -1, time_exp_verticals: ~trade29.sc.constants.TimeExpansionLineType = TimeExpansionLineType.UNSET, time_exp_top_label_1: ~trade29.sc.constants.TimeExpansionLabelType = TimeExpansionLabelType.UNSET, time_exp_top_label_2: ~trade29.sc.constants.TimeExpansionLabelType = TimeExpansionLabelType.UNSET, time_exp_bottom_label_1: ~trade29.sc.constants.TimeExpansionLabelType = TimeExpansionLabelType.UNSET, time_exp_bottom_label_2: ~trade29.sc.constants.TimeExpansionLabelType = TimeExpansionLabelType.UNSET, time_exp_based_on_time: bool = -1, transparent_label_background: bool = -1, fixed_size_arrowhead: bool = -1, retracement_levels: list[~trade29.sc.drawing.RetracementLevel] = [], draw_underneath_main_graph: bool = -1, use_tool_config_num: bool = -1, flat_edge: bool = -1, draw_within_region: bool = -1, center_price_labels: bool = -1, no_vertical_outline: bool = -1, allow_save_to_chartbook: bool = -1, show_begin_mark: bool = -1, show_end_mark: bool = -1, associated_study_id: int = -1, hide_drawing: bool = -1, lock_drawing: bool = -1, draw_outline_only: bool = -1, num_cycles: int = -1, extend_multiplier: float = -1, draw_midline: bool = -1, allow_copy_to_other_charts: bool = -1)#

Represents a chart drawing.

These parameters are based off of the Sierra Chart API for managing drawings, for more detail into how the parameters work, see the Sierra Chart docs.

Parameters:
drawing_typeconstants.ChartDrawingType, default UNSET

The type of drawing to add.

regionint, default -1

Chart region to add drawing in.

user_drawn_drawingbool, default False

Whether or not to add as a user drawn drawing. If the drawing is added as a user drawn drawing it will be modifiable through Sierra Chart’s tools and the Manage Drawing window.

primary_colorcolor.Color, default color.UNSET

The primary color of the drawing.

secondary_colorcolor.Color, default color.UNSET

The secondary color of the drawing.

textstr, default “”

Text to display with the drawing.

font_sizeint, default -1

The size font to use for text.

text_alignmentconstants.ChartDrawingAlignment, default -1

All possible text alignments can be accessed as static properties of constants.ChartDrawingAlignment. Alignments can be combined using the OR operator |.

line_widthint, default -1

Width of lines (or outlines) for shapes that have them.

line_styleconstants.ChartDrawingLineStyle, default UNSET

Style of lines (or outlines) for shapes that have them.

use_relative_vertical_valuesbool, default False

When this is true, instead of being based on chart region scale values, begin/end_value represent percentage heights in the region where 0 is the bottom of the chart region and 100 is the top of the chart region.

first_anchor_verticalfloat, default -1

The vertical position of the first anchor.

second_anchor_verticalfloat, default -1

The vertical position of the second anchor.

third_anchor_verticalfloat, default -1

The vertical position of the third anchor.

first_anchor_horizontalint | datetime.datetime | pandas.TimeStamp, default -1,

The horizontal position of the first anchor as a bar index or a datetime.

second_anchor_horizontalint | datetime.datetime | pandas.TimeStamp, default -1,

The horizontal position of the second anchor as a bar index or a datetime.

third_anchor_horizontalint | datetime.datetime | pandas.TimeStamp, default -1,

The horizontal position of the third anchor as a bar index or a datetime.

transparency_levelint, default -1

The transparency of the drawing, where 0 is fully opaque and 100 is not visible.

extend_rightbool, default -1

See the Sierra Chart docs.

extend_leftbool, default -1

See the Sierra Chart docs.

chart_numberint, default -1
square_edgebool, default -1
display_horizontal_line_valuebool, default -1
font_back_colorcolor.Color, default color.UNSET
font_facestr, default “”
font_boldbool, default -1
font_italicbool, default -1
reverse_text_colorcolor.Color, default color.UNSET
marker_typeconstants.ChartDrawingMarkerType, default UNSET
marker_sizeint, default -1
use_bar_spacing_for_marker_sizebool, default -1
show_volumebool, default -1
show_ask_bid_diff_volumebool, default -1
show_price_differecebool, default -1
show_tick_differencebool, default -1
show_currency_valuebool, default -1
show_percent_changebool, default -1
show_time_differecebool, default -1
show_number_of_barsbool, default -1
show_anglebool, default -1
show_end_point_pricebool, default -1
show_end_point_date_timebool, default -1
show_end_point_datebool, default -1
show_end_point_timebool, default -1
multi_line_labelbool, default -1
show_pricebool, default -1
show_percentbool, default -1
time_expansion_verticalsconstants.TimeExpansionLineType, default UNSET
time_expansion_top_label_1constants.TimeExpansionLabelType, default UNSET
time_expansion_top_label_2constants.TimeExpansionLabelType, default UNSET
time_expansion_bottom_label_1constants.TimeExpansionLabelType, default UNSET
time_expansion_bottom_label_2constants.TimeExpansionLabelType, default UNSET
time_exp_based_on_timebool, default -1
transparent_label_backgroundbool, default -1
fixed_size_arrowheadbool, default -1
retracement_levelslist[trade29.sc.RetracementLevel], default []
draw_underneath_main_graphbool, default -1
use_tool_config_numbool, default -1
flat_edgebool, default -1
draw_within_regionbool, default -1
center_price_labelsbool, default -1
no_vertical_outlinebool, default -1
allow_save_to_chartbookbool, default -1
show_begin_markbool, default -1
show_end_markbool, default -1
associated_study_idint, default -1
hide_drawingbool, default -1
lock_drawingbool, default -1
draw_outline_onlybool, default -1
num_cyclesint, default -1
extend_multiplierfloat, default -1
draw_midlinebool, default -1
allow_copy_to_other_chartsbool, default -1