Prices With this library, you can easily manage prices such as stop loss, take profit, calculate differences, prices from a lower timeframe, and get the order size and commission from the strategy properties tab. Note that the order size and commission only work with strategies! Usage Take Profit & Stop Loss var bool open_trade = false open_trade :=...
Margin This library calculates margin liquidation prices and quantities for long and short positions in your strategies. Usage example // ############################################################ // # INVESTMENT SETTINGS / INPUT // ############################################################ // Get the investment capital from the properties tab of the...
Backtest Strategy Optimizer Adapter With this library, you will be able to run one or multiple backtests with different variables (combinations). For example, you can run 100 backtests of Supertrend at once with an increment factor of 0.1. This way, you can easily fetch the most profitable settings and apply them to your strategy. To get a better understanding...
Library "map_custom_value_usefull" makes it possible to create: 1.map with array value: for this purpose need: 1.create map with arrays type value 2.put your array in this map, overloaded put method itself will put the array based on the type into the required field 3.next you can get this array with help standard get function, which will...
Library "map_custom_value_full" makes it possible to create: 1.map with array value: for this purpose need: 1.create map with arrays type value 2.put your array in this map, overloaded put method itself will put the array based on the type into the required field 3.next you can get this array with help standard get function, by specifying the type...
Library "Table" This library provides an easy way to convert arrays and matrixes of data into tables. There are a few different implementations of each function so you can get more or less control over the appearance of the tables. The basic rule of thumb is that all matrix rows must have the same number of columns, and if you are providing multiple...
Library "Utils" A collection of convenience and helper functions for indicator and library authors on TradingView formatNumber(num) My version of format number that doesn't have so many decimal places... Parameters: num (float) : (float) the number to be formatted Returns: (string) The formatted number getDateString(timestamp) Convenience...
This library introduces the `PolylinePlus` type, which is an enhanced version of the built-in PineScript `polyline`. It enables two features that are absent from the built-in type: 1. Developers can now efficiently add or remove points from the polyline. In contrast, the built-in `polyline` type is immutable, requiring developers to create a new instance of the...
Finally getting around to releasing the library component to the SPTS indicator! This library is packed with a ton of great statistics functions to supplement SPTS, these functions add to the capabilities of SPTS including a forecast function. The library includes the following functions 1. Linear Regression (single independent and single dependent) ...
This is the library version of VAcc (Velocity & Acceleration), a momentum indicator published by Scott Cong in Stocks & Commodities V. 41:09 (8–15). It applies concepts from physics, namely velocity and acceleration, to financial markets. VAcc functions similarly to the popular MACD (Moving Average Convergence Divergence) indicator when using a longer lookback...
Library "X" a collection of 'special' methods/functions ('special' at the time of conception) Initial functions includes: • count of a given number in a given array • array.get() but option added to use negative index • sum of all digits until the output < 10 • slope/angle calculation of lines method count_num_in_array(arr, num) counts how many times a...
PineUnit by Guardian667 A comprehensive testing framework for Pine Script on TradingView. Built with well-known testing paradigms like Assertions, Units and Suites. It offers the ability to log test results in TradingView's built-in Pine Protocol view, as well as displaying them in a compact table directly on your chart, ensuring your scripts are both robust and...
Library "math" TODO: Math custom MA and more pine_ema(src, length) Parameters: src (float) length (int) pine_dema(src, length) Parameters: src (float) length (int) pine_tema(src, length) Parameters: src (float) length (int) pine_sma(src, length) Parameters: src (float) length (int) ...
Library "ZigLib" Calculate the points for ZigZag++. You can use custom data and resolution for your ZigZag++. Sample Usage import DevLucem/ZigLib/1 as ZigZag = ZigZag.zigzag(low, high) bgcolor(direction<0? color.rgb(255, 82, 82, 80): color.rgb(0, 230, 119, 80)) line zz = line.new(z1.time, z1.price, z2.time, z2.price, xloc.bar_time, width=3) if...
Library 'MTF_Drawings' This library helps with drawing indicators and candle charts on all timeframes. FEATURES CHART DRAWING : Library provides functions for drawing High Time Frame (HTF) and Low Time Frame (LTF) candles. INDICATOR DRAWING : Library provides functions for drawing various types of HTF and LTF indicators. CUSTOM COLOR DRAWING :...
Library "lib_retracement_patterns" types and functions for XABCD pattern detection and plotting method set_tolerances(this, tolerance_Bmin, tolerance_Bmax, tolerance_Cmin, tolerance_Cmax, tolerance_Dmin, tolerance_Dmax) sets tolerances for B, C and D retracements. This creates another Pattern instance that is set as tolerances field on the original and...
Library "AGbayLIB" Changes the timeframe period to the given period and returns the data matrix and sets the timeframe to the active time period getTimeFrameValues(active_period_, period_, max_bars_) : add function description here Parameters: active_period_ (string) : Current time frame period to be set after getting period_ data period_...
Library "Ephemeris" TODO: add library description here mercuryElements() mercuryRates() venusElements() venusRates() earthElements() earthRates() marsElements() marsRates() jupiterElements() jupiterRates() saturnElements() saturnRates() uranusElements() uranusRates() neptuneElements() neptuneRates() rev360(x)...