Styles

A printer object is a highly versatile custom-modified Pinescript table with numerous advanced features. By utilizing various categories of style objects, users can further personalize both the printer object and individual print statements according to their preferences.


cellStyle

The cellStyle object is similar to styling a table's cell while it targets the _printer's data cells. It has the following properties:

Properties

  • Name
    width
    Type
    float
    Description

    The width of the cell as a % of the indicator's visual space. Optional. The default is 0.

  • Name
    height
    Type
    float
    Description

    The height of the cell as a % of the indicator's visual space. Optional. The default is 3.

  • Name
    textHalign
    Type
    string
    Description

    The horizontal alignment of the cell's text. Possible values: text.align_left, text.align_center, text.align_right. Optional. The default is text.align_center.

  • Name
    textValign
    Type
    string
    Description

    The vertical alignment of the cell's text. Possible values: text.align_top, text.align_center, text.align_bottom. Optional. The default is text.align_center.

  • Name
    textColor
    Type
    color
    Description

    The color of the text. Optional. The default is #FFFFFF.

  • Name
    textSize
    Type
    string
    Description

    The size of the text. Possible values: size.auto, size.tiny, size.small, size.normal, size.large, size.huge. Optional. The default is size.auto.

  • Name
    bgColor
    Type
    color
    Description

    The background color of the text. Optional. The default is #3C465087.

  • Name
    textFontFamily
    Type
    string
    Description

    The font family of the text. Possible values: font.family_default, font.family_monospace. Optional. The default is font.family_default.

  • Name
    format
    Type
    string
    Description

    Format string targeting footer text. Optional. The default is na.

  • Name
    horizontal
    Type
    bool
    Description

    By defaul, array prints vertically (stacked). If horizontal is set to true, array will print horizontally (side to side). This effects arrays only. Optional. The default is false.


The footerStyle object is similar to styling a table's cell while it targets the _printer's footer cell. It has the following properties:

Properties

  • Name
    width
    Type
    float
    Description

    The width of the cell as a % of the indicator's visual space. Optional. The default is 0.

  • Name
    height
    Type
    float
    Description

    The height of the cell as a % of the indicator's visual space. Optional. The default is 3.

  • Name
    textHalign
    Type
    string
    Description

    The horizontal alignment of the cell's text. Possible values: text.align_left, text.align_center, text.align_right. Optional. The default is text.align_center.

  • Name
    textValign
    Type
    string
    Description

    The vertical alignment of the cell's text. Possible values: text.align_top, text.align_center, text.align_bottom. Optional. The default is text.align_center.

  • Name
    textColor
    Type
    color
    Description

    The color of the text. Optional. The default is #FFFFFF.

  • Name
    textSize
    Type
    string
    Description

    The size of the text. Possible values: size.auto, size.tiny, size.small, size.normal, size.large, size.huge. Optional. The default is size.auto.

  • Name
    bgColor
    Type
    color
    Description

    The background color of the text. Optional. The default is #3C465087.

  • Name
    textFontFamily
    Type
    string
    Description

    The font family of the text. Possible values: font.family_default, font.family_monospace. Optional. The default is font.family_default.

  • Name
    format
    Type
    string
    Description

    Format string targeting footer text. Optional. The default is na.


gutterStyle

The gutterStyle object is similar to styling a table's cell while it targets the _printer's cells between grouped data. It has the following properties:

Properties

  • Name
    gutter
    Type
    bool
    Description

    By default, gutter is active. It targets the cell space between grouped data. Optional. The default is true.

  • Name
    width
    Type
    float
    Description

    The width of the cell as a % of the indicator's visual space. Optional. The default is 0.01.

  • Name
    height
    Type
    float
    Description

    The height of the cell as a % of the indicator's visual space. Optional. The default is 0.01.


headerStyle

The headerStyle object is similar to styling a table's cell while it targets the _printer's header cell. It has the following properties:

Properties

  • Name
    width
    Type
    float
    Description

    The width of the cell as a % of the indicator's visual space. Optional. The default is 0.

  • Name
    height
    Type
    float
    Description

    The height of the cell as a % of the indicator's visual space. Optional. The default is 3.

  • Name
    textHalign
    Type
    string
    Description

    The horizontal alignment of the cell's text. Possible values: text.align_left, text.align_center, text.align_right. Optional. The default is text.align_center.

  • Name
    textValign
    Type
    string
    Description

    The vertical alignment of the cell's text. Possible values: text.align_top, text.align_center, text.align_bottom. Optional. The default is text.align_center.

  • Name
    textColor
    Type
    color
    Description

    The color of the text. Optional. The default is #FFFFFF.

  • Name
    textSize
    Type
    string
    Description

    The size of the text. Possible values: size.auto, size.tiny, size.small, size.normal, size.large, size.huge. Optional. The default is size.auto.

  • Name
    bgColor
    Type
    color
    Description

    The background color of the text. Optional. The default is #3C465087.

  • Name
    textFontFamily
    Type
    string
    Description

    The font family of the text. Possible values: font.family_default, font.family_monospace. Optional. The default is font.family_default.

  • Name
    format
    Type
    string
    Description

    Format string targeting header text. Optional. The default is na.


tableStyle

The tableStyle object is similar to styling a table. It has the following properties:

Properties

  • Name
    bgColor
    Type
    color
    Description

    The background color of the table. Optional. The default is #000000B3.

  • Name
    frameColor
    Type
    color
    Description

    The color of the outer frame of the table. Optional. The default is #3C465047.

  • Name
    frameWidth
    Type
    int
    Description

    The width of the outer frame of the table. Optional. The default is 1.

  • Name
    borderColor
    Type
    color
    Description

    The color of the borders of the cells (excluding the outer frame). Optional. The default is na.

  • Name
    borderWidth
    Type
    int
    Description

    The width of the borders of the cells (excluding the outer frame). Optional. The default is 2.


titleStyle

The titleStyle object is similar to styling a table's cell while it targets the _printer's title cells. It has the following properties:

Properties

  • Name
    top
    Type
    bool
    Description

    The location to place the title. If true, title is placed on top, else placed to the left. Optional. The default is true.

  • Name
    width
    Type
    float
    Description

    The width of the cell as a % of the indicator's visual space. Optional. The default is 0.

  • Name
    height
    Type
    float
    Description

    The height of the cell as a % of the indicator's visual space. Optional. The default is 3.

  • Name
    textHalign
    Type
    string
    Description

    The horizontal alignment of the cell's text. Possible values: text.align_left, text.align_center, text.align_right. Optional. The default is text.align_center.

  • Name
    textValign
    Type
    string
    Description

    The vertical alignment of the cell's text. Possible values: text.align_top, text.align_center, text.align_bottom. Optional. The default is text.align_center.

  • Name
    textColor
    Type
    color
    Description

    The color of the text. Optional. The default is #FFFFFF.

  • Name
    textSize
    Type
    string
    Description

    The size of the text. Possible values: size.auto, size.tiny, size.small, size.normal, size.large, size.huge. Optional. The default is size.auto.

  • Name
    bgColor
    Type
    color
    Description

    The background color of the text. Optional. The default is #3C465087.

  • Name
    textFontFamily
    Type
    string
    Description

    The font family of the text. Possible values: font.family_default, font.family_monospace. Optional. The default is font.family_default.

  • Name
    format
    Type
    string
    Description

    Format string targeting footer text. Optional. The default is na.