Library "CRCHud" 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...
Library "ThangeVault" Thange Vault is a collection of utility functions required by the Thange Woodwind Playbook. debug(msg) Print debug information Parameters: msg : message to be logged on console Returns: nothing tickFormat() Create a string template to restrict stop-loss, take-profit level precision to ticks. Returns: A string format template
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...
Library "ConverterTF" I have found a bug Regarding the timeframe display, on the chart I have found that the display is numeric, for example 4Hr timeframe instead of '4H', but it turns out to be '240', which I want it to be displayed in abbreviated form. And in all other timeframes it's the same. So this library was created to solve those problems. It converts...
This library is used to convert Text type numbers are numbers. Library "StringtoNumber" str1 = '12340' , vv = numstrToNum(str1) numstrToNum() Example // This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org // © hapharmonic //@version=5 indicator("My Script") import hapharmonic/StringtoNumber/1 as CV TF =...
Library "DiscordWebhookFunction" discordMarkdown(_str, _italic, _bold, _code, _strike, _under) Convert string to markdown formatting User can combine any function at the same time. Parameters: _str : String input _italic : Italic _bold : Bold _code : Code markdown _strike : Strikethrough _under : Underline Returns: string...
Library "DrawIndicatorOnTheChart" 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...
Library "ZenLibrary" 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 Parameters: float : _number The...
Library "FunctionDaysInMonth" Method to find the number of days in a given month of year. days_in_month(year, month) Method to find the number of days in a given month of year. Parameters: year : int, year of month, so we know if year is a leap year or not. month : int, month number. Returns: int
Library "SignificantFigures" sigFig(float _float, int _figures) @description Takes a floating-point number - one that can, but doesn't have to, include a decimal point - and converts it to a floating-point number with only a certain number of digits left. For example, say you want to display a variable from your script to the user and it comes out to...
Library "FunctionDatestring" Methods to stringify date/time, altho there is already builtin support for it. datetime(unixtime) a stringified date stamp at specified unix time. Parameters: unixtime : int unix timestamp. Returns: string date_(unixtime) a stringified date stamp at specified unix time. Parameters: unixtime : int unix timestamp....