Printer

Let's see how the _printer object structure, and all its availble methods.

_printer

The _printer object is the core for the print method. It has the following properties:

Properties

  • Name
    header
    Type
    string
    Description

    A header for the _printer content. Optional. The default is na.

  • Name
    footer
    Type
    string
    Description

    A header for the _printer content. Optional. The default is na.

  • Name
    stack
    Type
    bool
    Description

    If true, each new grouped data are stacked under, if false, they are placed on right side. Optional. The default is true.

  • Name
    loc
    Type
    string
    Description

    The screen location to place the printer object. This is same as pinescripts table positions. Possible values are: position.top_left, position.top_center, position.top_right, position.middle_left, position.middle_center, position.middle_right, position.bottom_left, position.bottom_center, position.bottom_right. Optional. The default is position.middle_center.

  • Name
    debug
    Type
    bool
    Description

    If true, then print method will provide some basic debug info. Optional. The default is false.

  • Name
    tableStyle
    Type
    tableStyle
    Description

    A tableStyle object. Optional. The default is na.

  • Name
    headerStyle
    Type
    headerStyle
    Description

    A headerStyle object. Optional. The default is na.

  • Name
    footerStyle
    Type
    footerStyle
    Description

    A footerStyle object. Optional. The default is na.

  • Name
    titleStyle
    Type
    titleStyle
    Description

    A titleStyle object. Optional. The default is na.

  • Name
    cellStyle
    Type
    cellStyle
    Description

    A cellStyle object. Optional. The default is na.

  • Name
    gutterStyle
    Type
    gutterStyle
    Description

    A gutterStyle object. Optional. The default is na.

  • Name
    _table
    Type
    table
    Description

    A Table object. Optional. The default is na.

  • Name
    _cTotal
    Type
    int
    Description

    Column total. Optional. The default is 100.

  • Name
    _rTotal
    Type
    int
    Description

    Row total. Optional. The default is 100.

  • Name
    _slot
    Type
    string
    Description

    A comma separated string containing column and row number of last active cell used. Optional. The default is na.

  • Name
    _maxCol
    Type
    int
    Description

    Size counter of maximum column used. Optional. The default is 0.

  • Name
    _init
    Type
    bool
    Description

    A checker to see if _printer object has been initialized. Optional. The default is false.


cell()

Change the default array orientation.

Properties

  • Name
    this
    Type
    _printer
    Description

    A _printer object.

  • Name
    horizontal
    Type
    bool
    Description

    Array orientation. Use false for vertical, true for horizontal.

  • Name
    returns
    Type
    _printer
    Description

    The modified _printer object.


cell()

Set a cellStyle for all data cells (excludes: header, footer and titles).

Properties

  • Name
    this
    Type
    _printer
    Description

    A _printer object.

  • Name
    cellStyle
    Type
    cellStyle
    Description

    A cellStyle object.

  • Name
    returns
    Type
    _printer
    Description

    The modified _printer object.


debug()

Change the default debug value.

Properties

  • Name
    this
    Type
    _printer
    Description

    A _printer object.

  • Name
    debug
    Type
    bool
    Description

    Use true for debug on, false for debug off.

  • Name
    returns
    Type
    _printer
    Description

    The modified _printer object.


Set a footer text and footerStyle.

Properties

  • Name
    this
    Type
    _printer
    Description

    A _printer object.

  • Name
    val
    Type
    string
    Description

    Footer text.

  • Name
    footerStyle
    Type
    footerStyle
    Description

    A footerStyle object. Optional. The default is na.

  • Name
    returns
    Type
    _printer
    Description

    The modified _printer object.


gutter()

Turn gutter on/off.

Properties

  • Name
    this
    Type
    _printer
    Description

    A _printer object.

  • Name
    gutter
    Type
    bool
    Description

    Use true for gutter on, false for gutter off.

  • Name
    returns
    Type
    _printer
    Description

    The modified _printer object.


gutter()

Set a gutterStyle.

Properties

  • Name
    this
    Type
    _printer
    Description

    A _printer object.

  • Name
    gutterStyle
    Type
    gutterStyle
    Description

    A gutterStyle object.

  • Name
    returns
    Type
    _printer
    Description

    The modified _printer object.


Set a header text and headerStyle.

Properties

  • Name
    this
    Type
    _printer
    Description

    A _printer object.

  • Name
    val
    Type
    string
    Description

    Header text.

  • Name
    headerStyle
    Type
    headerStyle
    Description

    A headerStyle object. Optional. The default is na.

  • Name
    returns
    Type
    _printer
    Description

    The modified _printer object.


print()

Print data on screen.

Properties

  • Name
    this
    Type
    _printer
    Description

    A _printer object.

  • Name
    val
    Type
    object
    Description

    Any object of type string, integer, boolean, float, color, array<type>, or matrix<type>.

  • Name
    title
    Type
    string
    Description

    Title text. Optional. The default is na.

  • Name
    titleStyle
    Type
    titleStyle
    Description

    A titleStyle object. Optional. The default is na.

  • Name
    cellStyle
    Type
    cellStyle
    Description

    A cellStyle object. Optional. The default is na.

  • Name
    theme
    Type
    string
    Description

    The name of the color theme. Possible values are: blue, gray, green, orange, pink, purple, red, white, yellow. Optional. The default is na.

  • Name
    returns
    Type
    _printer
    Description

    The modified _printer object.


stack()

Turn on/off stack orientation for printer.

Properties

  • Name
    this
    Type
    _printer
    Description

    A _printer object.

  • Name
    stack
    Type
    bool
    Description

    Use true for stacking per grouped printed data, false for printing them side by side.

  • Name
    returns
    Type
    _printer
    Description

    The modified _printer object.


theme()

Set color theme.

Properties

  • Name
    this
    Type
    _printer
    Description

    A _printer object.

  • Name
    theme
    Type
    string
    Description

    The name of the color theme. Possible values are: blue, gray, green, orange, pink, purple, red, white, yellow.

  • Name
    returns
    Type
    _printer
    Description

    The modified _printer object.


title()

Change title position.

Properties

  • Name
    this
    Type
    _printer
    Description

    A _printer object.

  • Name
    top
    Type
    bool
    Description

    Use true for placing titles on top, false for placing title on left side.

  • Name
    returns
    Type
    _printer
    Description

    The modified _printer object.


title()

Set a titleStyle.

Properties

  • Name
    this
    Type
    _printer
    Description

    A _printer object.

  • Name
    titleStyle
    Type
    titleStyle
    Description

    A titleStyle object.

  • Name
    returns
    Type
    _printer
    Description

    The modified _printer object.