Library "PitchforkTypes" User Defined Types to be used for Pitchfork and Drawing elements of Pitchfork. Depends on DrawingTypes for Point, Line, and LineProperties objects PitchforkDrawingProperties Pitchfork Drawing Properties object Fields: extend : If set to true, forks are extended towards right. Default is true fill : Fill forklines with...
Library "ZigzagMethods" Object oriented implementation of Zigzag methods. Please refer to ZigzagTypes library for User defined types used in this library tostring(this, sortKeys, sortOrder, includeKeys) Converts ZigzagTypes/Pivot object to string representation Parameters: this : ZigzagTypes/Pivot sortKeys : If set to true, string output is...
Library "ZigzagTypes" Zigzag related user defined types. Depends on DrawingTypes library for basic types Indicator Indicator is collection of indicator values applied on high, low and close Fields: indicatorHigh : Indicator Value applied on High indicatorLow : Indicator Value applied on Low PivotCandle PivotCandle represents data of the...
Library "DrawingMethods" tostring(this, sortKeys, sortOrder, includeKeys) Converts DrawingTypes/Point object to string representation Parameters: this : DrawingTypes/Point object sortKeys : If set to true, string output is sorted by keys. sortOrder : Applicable only if sortKeys is set to true. Positive number will sort them in ascending...
Library "DrawingTypes" User Defined Types for basic drawing structure. Other types and methods will be built on these. Point Point refers to point on chart Fields: price : pivot price bar : pivot bar bartime : pivot bar time LineProperties Properties of line object Fields: xloc : X Reference - can be either xloc.bar_index or...
Library "eHarmonicpatternsLogScale" Library provides functions to scan harmonic patterns both or normal and log scale getSupportedPatterns() get_prz_range(x, a, b, c, patternArray, errorPercent, start_adj, end_adj, logScale) Provides PRZ range based on BCD and XAD ranges Parameters: x : X coordinate value a : A coordinate value b : B...
Library "MyLibrary" TODO: add library description here init(value) Parameters: value set(source, value) Parameters: source value get(source) Parameters: source
Hello everyone, Here is a perfectly replicated TradingView backtesting engine condensed into a single library function calculated with arrays. It includes TradingView's calculations for Net profit, Total Trades, Percent of Trades Profitable, Profit Factor, Max Drawdown (absolute and percent), and Average Trade (absolute and percent). Here's how TradingView...
Library "json" JSON Easy Object Create/stringiffy Functions to add/write JSON new (name , kind) -> object set (_item , _obj , _key ) -> key index for parent object's array add (_obj , _key , _item ) -> key index for parent object's array write (object , kind ) -> stringified object // (enter kind to cut off key...
Library "BinaryInsertionSort" Library containing functions which can help create sorted array based on binary insertion sort. This sorting will be quicker than array.sort function if the sorting needs to be done on every bar and the size of the array is comparatively big. This is created with the intention of using this to solve a bigger problem posted by...
Library "datTable" Dynamic Array Table.... Configurable Shape/Size Table from Arrays Allows for any data in any size combination of arrays to join together with: all possible orientations! filling all cells contiguously and/or flipping at boundaries vertical or horizontal rotation x/y axis direction swapping all types array inputs for data. ...
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 "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 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 "columns" Error Tolerant Matrix Setter/Getter Operations. Easy ways to add/remove items into start and end of Columns as well as arrays to grow and shrink matrix. if mismatched sizes occur the typified NA value will be there to prevent catastrophic crashing. Rows and Columns are split into 2 libraries due to limitations on number of exports as well ...