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...
This library is a Pine Script™ programmer’s tool containing calcs for my oscillators and some helper functions.
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 OHLC
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...
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...
Extract a clean symbol from a composite ticker. E.g., (BINANCE:BTCUSD+KRAKEN:BTCUSD)/2 as input will return BTCUSD or BINANCE:BTCUSD
Extract the first symbol out of the supplied string (usually ticker.standard(syminfo.tickerid) )
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.
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
source : Value to be used
length : Number of bars to...
This is a simplest example of user-defined types (UDT) or objects , which simplify as alternative to hello world.
These are the types used during initializations, commonly variables.
export type Settings
Example of library function to print out label.
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...
Simple example how to encode some values into float number and then decode it back to original values
Returns: encoded value
Returns: decoded value
Returns: encoded value
convert literals by type,
Same-types left in for bulk reasons.
TODO: Expand Types
Convert string to bool.
string : val A string value.
Convert Float (True if exists and not 0)
float : val A...
This library is a data provider for important dates and times from the Economic Calendar.
Returns the list of dates supported by this library as a string array.
Returns: array : Names of events supported by this library
Gets the FOMC Meeting Dates. The FOMC meets eight times a year to determine the...