Pilihan Editor
PINE LIBRARY
Telah dikemas kini

Cleaner Screeners Library

7โ€ฏ262
Library "cleanscreens"

Screener Panel.
  • This indicator displays a panel with a list of symbols and their indications.
  • It can be used as a screener for multiple timess and symbols
  • in any timeframe and with any indication in any combination.
    #### Features
  • Multiple timeframes
  • Multiple symbols
  • Multiple indications per group
  • Vertical or horizontal layouts
  • Acceepts External Inputs
  • Customizable colors with 170 presets included (dark and light)
  • Customizable icons
  • Customizable text size and font
  • Customizable cell size width and height
  • Customizable frame width and border width
  • Customizable position
  • Customizable strong and weak values
  • Accepts any indicator as input
  • Only 4 functions to call, easy to use
    #### Usage
  • Initialize the panel with _paneel = cleanscreens.init()
  • Add groupd with _screener = cleanscreens.Screener(_paneel, "Group Name")
  • Add indicators to screeener groups with cleanscreens.Indicator(_screener, "Indicator Name", _source)
  • Update the panel with cleanscreens.display(_paneel)


Thanks @ PineCoders , and the Group members for setting the bar high.

# local setup for methods on our script
Pine Scriptยฎ
import kaigouthro/cleanscreen/1
method Screener  ( panel p, string _name) => cleanscreens.Screener  ( p,  _name) 
method Indicator ( screener s , string _tf, string name, float val) => cleanscreens.Indicator ( s , _tf, name, val) 
method display   ( panel p ) => cleanscreens.display   (  p )


init(_themein, loc)
โ€ƒโ€ƒ# Panel init
> init a panel for all the screens

โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒ_themein (string): string: Theme Preset Name
โ€ƒโ€ƒโ€ƒโ€ƒloc (int): int :
1 = left top,
2 = middle top,
3 = right top,
4 = left middle,
5 = middle middle,
6 = right middle,
7 = left bottom,
8 = middle bottom,
9 = right bottom
โ€ƒโ€ƒReturns: panel

method Screener(p, _name)
โ€ƒโ€ƒ# Screener - Create a new screener
### Example:
Pine Scriptยฎ
cleanscreens.new(panel, 'Crpyto Screeners')


โ€ƒโ€ƒNamespace types: panel
โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒp (panel)
โ€ƒโ€ƒโ€ƒโ€ƒ_name (string)

method Indicator(s, _tf, name, val)
โ€ƒโ€ƒ# Indicator - Create a new Indicator
### Example:
Pine Scriptยฎ
cleanscreens.Inidcator('1h', 'RSI', ta.rsi(close, 14))


โ€ƒโ€ƒNamespace types: screener
โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒs (screener)
โ€ƒโ€ƒโ€ƒโ€ƒ_tf (string)
โ€ƒโ€ƒโ€ƒโ€ƒname (string)
โ€ƒโ€ƒโ€ƒโ€ƒval (float)

method display(p)
โ€ƒโ€ƒ# Display - Display the Panel
### Example:
Pine Scriptยฎ
cleanscreens.display(panel)


โ€ƒโ€ƒNamespace types: panel
โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒp (panel)

indication
โ€ƒโ€ƒsingle indication for a symbol screener
โ€ƒโ€ƒFields:
โ€ƒโ€ƒโ€ƒโ€ƒname (series string)
โ€ƒโ€ƒโ€ƒโ€ƒicon (series string)
โ€ƒโ€ƒโ€ƒโ€ƒrating (series string)
โ€ƒโ€ƒโ€ƒโ€ƒvalue (series float)
โ€ƒโ€ƒโ€ƒโ€ƒcol (series color)
โ€ƒโ€ƒโ€ƒโ€ƒtf (series string)
โ€ƒโ€ƒโ€ƒโ€ƒtooltip (series string)
โ€ƒโ€ƒโ€ƒโ€ƒnormalized (series float)
โ€ƒโ€ƒโ€ƒโ€ƒinit (series bool)

screener
โ€ƒโ€ƒsingle symbol screener
โ€ƒโ€ƒFields:
โ€ƒโ€ƒโ€ƒโ€ƒticker (series string)
โ€ƒโ€ƒโ€ƒโ€ƒicon (series string)
โ€ƒโ€ƒโ€ƒโ€ƒrating (series string)
โ€ƒโ€ƒโ€ƒโ€ƒvalue (series float)
โ€ƒโ€ƒโ€ƒโ€ƒbg (series color)
โ€ƒโ€ƒโ€ƒโ€ƒfg (series color)
โ€ƒโ€ƒโ€ƒโ€ƒitems (indication[])
โ€ƒโ€ƒโ€ƒโ€ƒinit (series bool)

config
โ€ƒโ€ƒscreener configuration
โ€ƒโ€ƒFields:
โ€ƒโ€ƒโ€ƒโ€ƒstrong (series float)
โ€ƒโ€ƒโ€ƒโ€ƒweak (series float)
โ€ƒโ€ƒโ€ƒโ€ƒtheme (series string)
โ€ƒโ€ƒโ€ƒโ€ƒvert (series bool)
โ€ƒโ€ƒโ€ƒโ€ƒcellwidth (series float)
โ€ƒโ€ƒโ€ƒโ€ƒcellheight (series float)
โ€ƒโ€ƒโ€ƒโ€ƒtextsize (series string)
โ€ƒโ€ƒโ€ƒโ€ƒfont (series int)
โ€ƒโ€ƒโ€ƒโ€ƒframewidth (series int)
โ€ƒโ€ƒโ€ƒโ€ƒborders (series int)
โ€ƒโ€ƒโ€ƒโ€ƒposition (series string)

icons
โ€ƒโ€ƒscreener Icons
โ€ƒโ€ƒFields:
โ€ƒโ€ƒโ€ƒโ€ƒbuy (series string)
โ€ƒโ€ƒโ€ƒโ€ƒsell (series string)
โ€ƒโ€ƒโ€ƒโ€ƒstrong (series string)

panel
โ€ƒโ€ƒscreener panel object
โ€ƒโ€ƒFields:
โ€ƒโ€ƒโ€ƒโ€ƒitems (screener[])
โ€ƒโ€ƒโ€ƒโ€ƒtable (series table)
โ€ƒโ€ƒโ€ƒโ€ƒconfig (config)
โ€ƒโ€ƒโ€ƒโ€ƒtheme (theme type from kaigouthro/theme_engine/1)
โ€ƒโ€ƒโ€ƒโ€ƒicons (icons)
Nota Keluaran
v2

Quick fixed the markdown shortcuts or local use, and an error in screener descript


Added:
method decorate(p, t)
โ€ƒโ€ƒNamespace types: panel
โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒp (panel)
โ€ƒโ€ƒโ€ƒโ€ƒt (varient type from kaigouthro/theme_engine/1)

Updated:
init(_themein, loc)
โ€ƒโ€ƒ# Panel init
> init a panel for all the screens

Pine Scriptยฎ
import kaigouthro/cleanscreen/2
method Screener  ( cleanscreen.panel      p , string _name                       ) => cleanscreens.Screener  ( p,  _name) 
method Indicator ( cleanscreen.screener   s , string _tf, string name, float val ) => cleanscreens.Indicator ( s , _tf, name, val) 
method display   ( cleanscreen.panel      p                                      ) => cleanscreens.display   ( p ) 
// Theme names for the theme input a botom (place here)
string  GRP1 = "Settings"
// init panel with theme and location
var loc      = input.int(9, ' Table loc (1-9)', 1, 9)
var _panel   = init(input.string(SILK, 'Theme Choice', 
               options = ["SEE ANNOTATION"]),
loc)
var tfInput  = input.timeframe("",  "Higher timeframe",         group = GRP1)

if barstate.isfirst  
    panel.config.theme      := input.string           ( 'light'   , "Theme Variewnt" , options=['light' , 'dark']             , inline='ic'    , group='Icons' )
    panel.config.cellwidth  := input.float            ( 7.5       , 'cellwidth'      , step=0.5         , inline = "Cellsize" , group=GRP1     )
    panel.config.cellheight := input.float            ( 7.5       , 'cellheight'     , step=0.5         , inline = "Cellsize" , group=GRP1     )
    panel.config.textsize   := input.string           ( size.auto , 'Textsize'       , options=[size.auto, size.small, size.normal, size.large, size.huge] , inline = "set" , group=GRP1    )
    panel.config.font       := input.int              ( 15        , 'Font'           , 1                , 17                  , inline = "set" , group=GRP1    )
    panel.config.framewidth := input.int              ( 10        , 'Framewidth'     , 0                , 20                  , inline = "set" , group=GRP1    )
    panel.config.borders    := input.int              ( 1         , 'Borders'        , -1               , 10                  , inline = "set" , group=GRP1    )
    panel.config.vert       := input.bool             ( true      , 'vert'           ) //int            ( 1                   , 'Borders'      , -1            , 10          )
    // Icons
    panel.icons.strong      := input.string('๐Ÿ’ธ', 'Strong โœผ', inline='ic', group='Icons')
    panel.icons.buy         := input.string('๐Ÿ’ฐ', 'Buy  โ‡ก', inline='ic', group='Icons')
    panel.icons.sell        := input.string('๐Ÿ”ฅ', 'Sell โ‡ฃ', inline='ic', group='Icons')

// Add groupd with                              _screener  = _paneel.Screener("Group Name")  
// Add indicartors to screeener groups with     _screener.Indication( "Indicator Name", _source)
// Update the panel with                        _paneel.display(_paneel)

โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒ_themein (string): string: Theme Preset Name
โ€ƒโ€ƒโ€ƒโ€ƒloc (int): int :
1 = left top,
2 = middle top,
3 = right top,
4 = left middle,
5 = middle middle,
6 = right middle,
7 = left bottom,
8 = middle bottom,
9 = right bottom
โ€ƒโ€ƒReturns: panel

method Screener(p, _name)
โ€ƒโ€ƒ# Screener - Create a new screener

Example:
Pine Scriptยฎ
cleanscreen.Screeneer(panel, 'Crpyto Screeners')

โ€ƒโ€ƒNamespace types: panel
โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒp (panel)
โ€ƒโ€ƒโ€ƒโ€ƒ_name (string)

method Indicator(s, _tf, name, val)
โ€ƒโ€ƒ# Indicator - Create a new Indicator

Example:
Pine Scriptยฎ
cleanscreen.Inidcator('1h', 'RSI', ta.rsi(close, 14))

โ€ƒโ€ƒNamespace types: screener
โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒs (screener)
โ€ƒโ€ƒโ€ƒโ€ƒ_tf (string)
โ€ƒโ€ƒโ€ƒโ€ƒname (string)
โ€ƒโ€ƒโ€ƒโ€ƒval (float)

method display(p)
โ€ƒโ€ƒ# Display - Display the Panel

Example:
Pine Scriptยฎ
cleanscreen.display(panel)

โ€ƒโ€ƒNamespace types: panel
โ€ƒโ€ƒParameters:
โ€ƒโ€ƒโ€ƒโ€ƒp (panel)

indication
โ€ƒโ€ƒsingle indication for a symbol screener
โ€ƒโ€ƒFields:
โ€ƒโ€ƒโ€ƒโ€ƒname (series string): name of the indication
โ€ƒโ€ƒโ€ƒโ€ƒicon (series string): icon name
โ€ƒโ€ƒโ€ƒโ€ƒrating (series string): rating
โ€ƒโ€ƒโ€ƒโ€ƒvalue (series float): value
โ€ƒโ€ƒโ€ƒโ€ƒcol (series color): color of the indication
โ€ƒโ€ƒโ€ƒโ€ƒtf (series string): timeframe
โ€ƒโ€ƒโ€ƒโ€ƒtooltip (series string): tooltip text
โ€ƒโ€ƒโ€ƒโ€ƒnormalized (series float): color value
โ€ƒโ€ƒโ€ƒโ€ƒinit (series bool): init

screener
โ€ƒโ€ƒsingle symbol screener
โ€ƒโ€ƒFields:
โ€ƒโ€ƒโ€ƒโ€ƒticker (series string): ticker name
โ€ƒโ€ƒโ€ƒโ€ƒicon (series string): icon name
โ€ƒโ€ƒโ€ƒโ€ƒrating (series string): rating
โ€ƒโ€ƒโ€ƒโ€ƒvalue (series float): value
โ€ƒโ€ƒโ€ƒโ€ƒbg (series color): background color
โ€ƒโ€ƒโ€ƒโ€ƒfg (series color): foreground color
โ€ƒโ€ƒโ€ƒโ€ƒitems (indication[]): list of indications
โ€ƒโ€ƒโ€ƒโ€ƒinit (series bool): init

config
โ€ƒโ€ƒscreener configuration
โ€ƒโ€ƒFields:
โ€ƒโ€ƒโ€ƒโ€ƒstrong (series float): strong value
โ€ƒโ€ƒโ€ƒโ€ƒweak (series float): weak value
โ€ƒโ€ƒโ€ƒโ€ƒtheme (series string): theme name
โ€ƒโ€ƒโ€ƒโ€ƒvert (series bool): vertical layout
โ€ƒโ€ƒโ€ƒโ€ƒcellwidth (series float): cell width
โ€ƒโ€ƒโ€ƒโ€ƒcellheight (series float): cell height
โ€ƒโ€ƒโ€ƒโ€ƒtextsize (series string): text size
โ€ƒโ€ƒโ€ƒโ€ƒfont (series int): font index
โ€ƒโ€ƒโ€ƒโ€ƒframewidth (series int): frame width
โ€ƒโ€ƒโ€ƒโ€ƒborders (series int): border width
โ€ƒโ€ƒโ€ƒโ€ƒposition (series string): position

icons
โ€ƒโ€ƒscreener Icons
โ€ƒโ€ƒFields:
โ€ƒโ€ƒโ€ƒโ€ƒbuy (series string): buy icon
โ€ƒโ€ƒโ€ƒโ€ƒsell (series string): sell icon
โ€ƒโ€ƒโ€ƒโ€ƒstrong (series string): strong icon

panel
โ€ƒโ€ƒscreener panel object
โ€ƒโ€ƒFields:
โ€ƒโ€ƒโ€ƒโ€ƒitems (screener[]): list of symbols
โ€ƒโ€ƒโ€ƒโ€ƒtable (series table): table object
โ€ƒโ€ƒโ€ƒโ€ƒconfig (config): config object
โ€ƒโ€ƒโ€ƒโ€ƒtheme (theme type from kaigouthro/theme_engine/1)
โ€ƒโ€ƒโ€ƒโ€ƒicons (icons): icons object
Nota Keluaran
v3

Dramatic speed increase.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.