This library is a Pine Script™ programmer’s tool containing a variety of time related functions to calculate or measure time, or format time into string variables.
`formattedTime()`, `formattedDate()` and `formattedDay()`
Pine Script™, like many other programming languages, uses timestamps in UNIX format, expressed as the...
A collection of custom tools & utility functions commonly used with my scripts.
getDecimals() Calculates how many decimals are on the quote price of the current market
Returns: The current decimal places on the market quote price
truncate(float, float) Truncates (cuts) excess decimal places
float : _number The...
This library is a client script for making a webhook signal formatted string to TradingHook webhook server.
buy_message(password, amount, order_name) Make a buy Message for TradingHook.
password : (string) password that you set in .env file.
amount : (float) amount. If not set, your strategy qty will be...
This Library is aimed to mitigate the limitation of Pinescript having only one structured data type which is only arrays.
It lacks data types like Dictionaries(in Python) or Object (in JS) that are standard for other languages. Tuples do exist, but it hardly solves any problem.
Working only with Arrays could be overwhelming if your codebase is large. I looked for...
pta_plot: This library will help you to plot different value. I will keep updating with your requirement
Display array element as a table.
array_id : Id of your array.
border_color : Color for border (`color.black` is used if no argument is supplied).
Returns: Display array...
this library is used to show an indicator (such RSI, CCI, MOM etc) on the main chart with indicator's horizontal lines in a window. Location of the window is calculated dynamically by last price movemements
drawIndicator(indicatorName, indicator, indicatorcolor, period, indimax_, indimin_, levels, precision, xlocation) draws...
Provides functions for converting input strings 'open','high','low','close','hl2','hlc3','ohlc4','hlcc4' to corresponding source values.
Converts string to source float value
src : String to use (`close` is used if no argument is supplied).
Returns: Returns the float value of the string
Library of functions which will contain functions that allow reusable HUD (Heads up Display) components to used from within other scripts
add_cell_change() - Adds a new cell to designated table which displays the data source value, the line color, data title, and automatically calculated %percent change stats based on lookback value...
Methods to stringify date/time, altho there is already builtin support for it.
datetime(unixtime) a stringified date stamp at specified unix time.
unixtime : int unix timestamp.
date_(unixtime) a stringified date stamp at specified unix time.
unixtime : int unix timestamp....
Provides functions for chart markup, such as indicating recession bands.
markRecessionBands(showBands, lineY, labelY)
Mark vertical bands and show recession band labels if argument showBands is true. Example "markRecessionBands(bar_index ,3.0"
showBands : - show vertical recession bands when true. Functionally...
A collection of functions used for trade automation
Gets the base currency for the chart's ticker. Supported trade pairs are USD, USDT, USDC, BTC, and PERP.
Returns: Base currency as a string
Get the current chart's symbol without the base currency appended to it....
Splits the ticker and generates best configs for FP and PP
splitter(x) Splits the ticker and found the configuration regarding to name.
Returns: Fib and Profit percent values
- Splitter had been added.
- USDTPERP coins on Binance had been added
- timeFrameMultiplier() timeframe multiplier had been added to the...
Hex String Utility
helper Binary half octet to hex character
_n : Digits to convert
Digits to Hex String output
_input : Integer Input
_buffer : Number of 0's to pad Hex with
Returns: string output hex character value buffered to desired length (00-ff default)
Matrix Global Registry.
Get, Set, automatic growing, universal get/set,
multi-matrix dictionaries, multi-dictionary matrixes..
add slice matrixes of any type, share one common global key registry
pull up an item from a category, and item name ie a table of info.
same cell needs a color, a size, a string, a value, etc..
all of which can be...
Hash map's in Pinescript?? Absolutely
This Library is the first step towards bringing a much needed data structure to the Pine Script community.
"Object" allows Pine coders to finally create objects full or unique key:value pairs, which are converted to strings and stored in an array. Data can be stored and accessed using dedicated get and set methods.