📕 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...
Commission-aware Trade Labels Description: This library provides an easy way to visualize take-profit and stop-loss levels on your chart, taking into account trading commissions. The library calculates and displays the net profit or loss, along with other useful information such as risk/reward ratio, shares, and position size. Features: Configurable...
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...
Library "catchChecks" Type Check for Function Builders to allow Single item to be passed in, and determine what to do with the item, ie: need an x value? function that allows label, line, box, float, or even a string.. check item type? string ? 'str.tonumber(_item)' can be in the same switch as a 'line.get_price(_item, bar_index)' both outputting float or for...
█ OVERVIEW This library is complementary for Cyclic RSI High Low With Noise Filter. █ CREDITS LoneSomeTheBlue WhenToTrade AlertFrequency() : AlertFrequency Parameters: : : _string Returns: : _freq CyclicRSI() : CyclicRSI Parameters: : : _source, _length, _expression Returns: : osc Credits to WhenToTrade AddToZigzag() :...
Library "srcCalc" Provides functions for converting input strings 'open','high','low','close','hl2','hlc3','ohlc4','hlcc4' to corresponding source values. get_src(src) Converts string to source float value Parameters: src : String to use (`close` is used if no argument is supplied). Returns: Returns the float value of the string