Library "tts_convention" This library can convert the start, end, cancel start, cancel end deal conditions that are used in the "Template Trailing Strategy" script into a signal value and vice versa. The "two channels mod div" convention is unsed internaly and the signal value can be composed/decomposed into two channels that contain the afforementioned...
The purpose of this library is to split and merge an integer into useful pieces of information that can easily handled and plotted. The basic piece of information is one word. Depending on the underlying numerical system a word can be a bit, octal, digit, nibble, or byte. The user can define channels. Channels are named groups of words. Multiple words can be...
Library "STOCKS_LIST" TODO: extract stocks into the screener only_symbol(List) Parameters: List (string) roundn(x, n) Parameters: x (int) n (int)
Library "ta_m" This library is a Pine Script™ programmer’s tool containing calcs for my oscillators and some helper functions. upDnIntrabarVolumesByPolarity() Determines if the volume for an intrabar is up or down. Returns: ( ) A tuple of two values, one of which contains the bar's volume. `upVol` is the positive volume of up bars. `dnVol` is the...
Library "LibrarySupertrend" selective_ma(condition, source, length) Parameters: condition (bool) source (float) length (int) trendUp(source) Parameters: source (float) smoothrng(source, sampling_period, range_mult) Parameters: source (float) sampling_period (simple int) range_mult (float) ...
📕 LIBRARY OHLC 🔷 Introduction This library is a custom library designed to work with real-time bars. It allows to easily calculate OHLC values for any source. Personally, I use this library to accurately display the highest and lowest values on visual indicators such as my progress bars. 🔷 How to Use ◼ 1. Import the OHLC library into your TradingView...
Library "f_maSelect" Easy to use drop-in facade function to lots of different moving average calculations, including some that are not natively available in PineScript v5 such as Zero-Lag EMA. Simply call f_maSelect(series float serie, simple string ma_type="sma", ma_length=14) instead of a ta.*ma() call and you get access to all MAs offered by PineScript and...
Library "composite_ticker_cleaner" Extract a clean symbol from a composite ticker. E.g., (BINANCE:BTCUSD+KRAKEN:BTCUSD)/2 as input will return BTCUSD or BINANCE:BTCUSD composite_ticker_cleaner_extract_first(symbol, keepexchange) Extract the first symbol out of the supplied string (usually ticker.standard(syminfo.tickerid) ) Parameters: symbol :...
Library "string_utils" Collection of string utilities that can be used to replace sub-strings in a string and string functions that are not part of the standard library. This a more simple replacement of my previous string_variables library since it uses types for better performance due to data locality and methods that give a more intuitive API.
Library "SessionInBoxesPro" get_time_by_bar(bar_count) Parameters: bar_count get_positions_func(sessiontime_, duration_) Parameters: sessiontime_ duration_ get_period(_session, _start, _lookback) Parameters: _session _start _lookback is_start(_session) Parameters: _session is_end(_session)...
Library "TurntLibrary" Collection of functions created for simplification/easy referencing. Includes variations of moving averages, length value oscillators, and a few other simple functions based upon HH/LL values. ma(source, length, type) Apply a moving average to a float value Parameters: source : Value to be used length : Number of bars to...
█ OVERVIEW This is a simplest example of user-defined types (UDT) or objects , which simplify as alternative to hello world. █ CREDITS Tradingview █ USAGE These are the types used during initializations, commonly variables. export type Settings int bar float price string phrase ... Example of library function to print out label. ...
Library "ReduceSecurityCalls" This library allows you to reduce the number of request.security calls to 1 per symbol per timeframe. Script provides example how to use it with request.security and possible optimisation applied to htf data call. This data can be used to calculate everything you need and more than that (for example you can calculate 4 emas with...
Library "EncoderDecoder" Simple example how to encode some values into float number and then decode it back to original values f_calctype() Encode parameter Returns: encoded value f_calctype() Decode parameter Returns: decoded value f_srctype() Encode parameter Returns: encoded value f_srctype() Decode parameter Returns:...
Library "into" convert literals by type, Same-types left in for bulk reasons. TODO: Expand Types b(string) Convert string to bool. Parameters: string : val A string value. Returns: Bool. b(bool) Pass Bool/bool Parameters: bool : Returns: Bool. b(float) Convert Float (True if exists and not 0) Parameters: float : val A...
A library that exposes a method to translate strings to numbers. Adapted from MichelT 's String to Number indicator.
Library "EconomicCalendar" This library is a data provider for important dates and times from the Economic Calendar. events() Returns the list of dates supported by this library as a string array. Returns: array : Names of events supported by this library fomcMeetings() Gets the FOMC Meeting Dates. The FOMC meets eight times a year to determine the...
Library "LibBacktestingDayRange" TODO: add library description here import Nut_Satit/CalulateWinLoss/version as backtest rangdate(startDate, finishDate) TODO: add function description here Parameters: startDate : TODO: add parameter startDate description here finishDate : TODO: add parameter finishDate description...