Library "EMAFlow" Functions that manipulate a set of 5 MAs created within user-supplied maximum and minimum lengths. The MAs are spaced out (within the range) in a way that approximates how Fibonnaci numbers are spaced. Using MA flow, as opposed to simple crosses of the minimum and maximum lengths, gives more detail, and can result in faster changes and more...
Library "ta" Collection of all custom and enhanced TA indicators. Same as enhanced_ta. But, removed all the displays to make it faster. ma(source, maType, length) returns custom moving averages Parameters: source : Moving Average Source maType : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median ...
Library "CSMlibrary" TODO: Contains functions to simplify my scripts. Using code snippets in reference manual and elsewhere ..... CSMplot()
Library "Slope_TK" This library calculate the slope of a serie between two points The serie can be ta.ema(close,200) for example The size is the number of bars between the two points for the slope calculation, for example it can be 10 slope_of_ema200 = slope(t a.eam(close, 200) , 10 ) slope( float serie, int size )
Library "libcompress" numbers compressor for large output data compression compress_fp24() converts float to base64 (4 chars) | 24 bits: 1 sign + 5 exponent + 18 mantissa Returns: 4-character base64_1/5/18 representation of x compress_ufp18() converts unsigned float to base64 (3 chars) | 18 bits: 5 exponent + 13 mantissa Returns: 3-character...
Library "racille_arrayutils" The most used array utility functions func_sin() returns sin function as a parameter to calculate the function_array() func_cos() returns cos function as a parameter to calculate the function_array() func_tan() returns tan function as a parameter to calculate the function_array() func_cot() returns cot function...
Library "StringStringHashmap" A simple implementation of a key string-to-string value dictionary in pine script create_ss_dict() Create an empty string-string dictionary Returns: the indices and elements of the dict add_key_value(key, value, i, e) Add new key-value pair in the dictionary Parameters: key : string value : string i :...
Library "Hurst" hurst(length, samples, hi, lo) Estimate the Hurst Exponent using Dubuc's variation method Parameters: length : The length of the history window to use. Large values do not cause lag. samples : The number of scale samples to take within the window. These samples are then used for regression. The minimum value is 2 but 3+ is...
Library "NetLiquidityLibrary" The Net Liquidity Library provides daily values for net liquidity. Net liquidity is measured as Fed Balance Sheet - Treasury General Account - Reverse Repo. Time series for each individual component included too. get_net_liquidity_for_date(t) Function takes date in timestamp form and returns the Net Liquidity value for that...
Library "text_utils" a set of functions to handle placeholder in texts add_placeholder(list, key, value) add a placehodler key and value to a local list Parameters: list : - reference to a local string array containing all placeholders, add string list = array.new_string(0) to your code key : - a string representing the placeholder in a text,...
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 "String_Encoder_Decoder" String encoder and decoder to use in internal data tranfer in script calculations. In example, script encode 125 values once and then decode them every candle. encode(array or values (val1,val2,val3,val4,val5,val6) encode: encode some values into string Parameters: array : of values or values1, value2 (up to 6...
Library "fast_utils" This library contains my favourite functions. Will be updated frequently count_int_digits() Count int digits in number Returns: : number of int digits in number count_float_digits() Count float digits in number Returns: : number of float digits in number stringify() Convert values in array or matrix into string...
Library "fraction" Fraction Creation and Basic Operations. Cracked a tough problem in making this Polarity Agnostic Decimal without a cheating "abs * sign of input". it's quite fast, however still test for errors before production use. >> Big Neon Sign on 1/0 value. << Int Array (LOC 0/1).. To/From Decimal(float) Comparison ( < / == / >) Add /...
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 of economic events. Created to display events on the desired chart through the indicator. Countries: USA, China, Eurozone, Russia Importance: 3 stars Source: Investing Библиотека экономических событий. Создана для отображения событий на нужном графике через индикатор. Страны: США, Китай, Еврозона, Россия Важность: 3 звезды Источник: Investing
Library "Traders_Reality_Lib" This library contains common elements used in Traders Reality scripts calcPvsra(pvsraVolume, pvsraHigh, pvsraLow, pvsraClose, pvsraOpen, redVectorColor, greenVectorColor, violetVectorColor, blueVectorColor, darkGreyCandleColor, lightGrayCandleColor) calculate the pvsra candle color and return the color as well as an alert if a...
Library "strategy" Library containing few key calculations for strategy involving leveraged limit and stop orders getQty(entry, stop, riskPercentage) calculate qty and leverage based on entry and stop price for given risk percentage. Parameters: entry : Entry Price stop : Stop Price riskPercentage : risk percentage per trade Returns: -...