Library "cleanscreens"
Screener Panel.
Thanks @ PineCoders , and the Group members for setting the bar high.
# local setup for methods on our script
Pine Scriptยฎ
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ยฎ
โโNamespace types: panel
โโParameters:
โโโโp (panel)
โโโโ_name (string)
method Indicator(s, _tf, name, val)
โโ# Indicator - Create a new Indicator
### Example:
Pine Scriptยฎ
โโNamespace types: screener
โโParameters:
โโโโs (screener)
โโโโ_tf (string)
โโโโname (string)
โโโโval (float)
method display(p)
โโ# Display - Display the Panel
### Example:
Pine Scriptยฎ
โโ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)
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
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:
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:
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:
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)
Release Notes
v2Quick 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
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:
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:
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:
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
Release Notes
v3Dramatic speed increase.
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.