Library "regressionUtilities" get_linear_regression(bar_index_array, prices_array, stdDev_mult) : Generates the linear regression channel for an array of values. Parameters: bar_index_array (array) : (array): Array with bar indexes prices_array (array) : (array): Array with prices stdDev_mult (float) : (float): ...
Library "PubLibPattern" pattern conditions for indicator and strategy development bear_5_0(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol) bearish 5-0 harmonic pattern condition Parameters: ab_low_tol (float) ab_up_tol (float) bc_low_tol (float) bc_up_tol (float) cd_low_tol (float) cd_up_tol (float)...
Library "PubLibTrend" trend, multi-part trend, double trend and multi-part double trend conditions for indicator and strategy development rlut() return line uptrend condition Returns: bool dt() downtrend condition Returns: bool ut() uptrend condition Returns: bool rldt() return line downtrend condition Returns: bool dtop()...
Library "PubLibSwing" swing high and swing low conditions, prices, bar indices and range ratios for indicator and strategy development sh() swing high condition Returns: bool sl() swing low condition Returns: bool shbi(occ) swing high bar index, condition occurrence n Parameters: occ (simple int) Returns: int slbi(occ) swing...
Library "PubLibCandleTrend" candle trend, multi-part candle trend, multi-part green/red candle trend, double candle trend and multi-part double candle trend conditions for indicator and strategy development chh() candle higher high condition Returns: bool chl() candle higher low condition Returns: bool clh() candle lower high...
Library "VandelayIndicatorLib" Art Vandelay's Indicator library STC_VIL(EEEEEE, BBBB, BBBBB) Schaff Trend Cycle Calculations Parameters: EEEEEE (int) : = Slengt, BBBB = FALenght, BBBBB = SLOLenght BBBB (simple int) BBBBB (simple int) Returns: Long : mAAAAA > mAAAAA - Short : mAAAAA < mAAAAA stc(source, fast, slow, cycle, d1, d2)...
Library "MyLibrary" This library contains various trading strategies and utility functions for Pine Script. simple_moving_average(src, length) simple_moving_average @description Calculates the Simple Moving Average (SMA) of a given series. Parameters: src (float) : (series float) The input series (e.g., close prices). length (int) : (int) The...
Library "WebhookMessageLibrary" The webhook message library provides several functions for building JSON payloads method buildWebhookJson(msg, constants) Builds the final JSON payload from a webhookMessage type. Namespace types: webhookMessage Parameters: msg (webhookMessage) : (webhookMessage) A prepared webhookMessage. constants (CONSTANTS)...
This library is designed to aid traders and developers in calculating risk metrics efficiently across different asset types like equities, futures, and forex. It includes comprehensive functions that calculate the number of units or contracts to trade, the value at risk, and the total value of the position based on provided entry prices, stop levels, and risk...
Library "WebhookMessageDev" The webhook message library provides several functions for building JSON payloads method buildWebhookJson(msg) Builds the final JSON payload from a webhookMessage type. Namespace types: webhookMessage Parameters: msg (webhookMessage) : (webhookMessage) A prepared webhookMessage. Returns: A JSON Payload. method...
Library "AminioLibrary" : this is my personal library that is being used in different indicators and strategies calculateMA(source, len, maType) This fuction returns a moving average value based on the type Parameters: source (float) : Is the time series source to calculate average from len (simple int) : The length of the moving average, this...
Library "Adaptive Profit And Loss" Provide Take profit and Stop loss values depending on source. TakeProfitPriceTypes() Provides supported Take profit sources Returns: Supported Take profit sources StopLossPriceTypes() Provides supported Take profit sources Returns: Supported Take profit sources Price(type) Get price value by selected price...
Library "multi_conditions_matrices" : facilitate including multiple AND / OR conditions to a script such as two entry / exit inputs groups. method addConditions(conditions, conditionPair) Helper to append conditions to a matrix condition array Namespace types: matrix Parameters: conditions (matrix) conditionPair (array) : array A condition...
Library "lib_risk_management" a lib to help with dynamic position sizing position_size(risk, account_balance, entry_price, sl_price) calculate the position size required to meet the account size based risk given when the stop loss is triggered Parameters: risk (float) : percentage of account balance to risk (1-100) account_balance (float) :...
Library "simpletrade" Library with Simple Trade types and tracking mechanism method evaluate(this) Evaluate current trade and update status Namespace types: SimpleTrade Parameters: this (SimpleTrade) : SimpleTrade object that need to be evaluated Returns: current SimpleTrade object method erase(this) Erase SimpleTrade drawings Namespace...
Library "Holiday" - Full Control over Holidays and Daylight Savings Time (DLS) The Holiday Library is an essential tool for traders and analysts who engage in backtesting and live trading . This comprehensive library enables the incorporation of crucial calendar elements - specifically Daylight Savings Time (DLS) adjustments and public holidays - into...
Strategy Statistics This library will add a table with statistics from your strategy. With this library, you won't have to switch to your strategy tester tab to view your results and positions. Usage: You can choose whether to set the table by input fields by adding the below code to your strategy or replace the parameters with the ones you would like to use...
Library "two_ma_logic" The core logic for the two moving average strategy that is used as an example for the internal logic of the "Template Trailing Strategy" and the "Two MA Signal Indicator" ma(source, maType, length) ma - Calculate the moving average of the given source for the given length and type of the average Parameters: source (float) : -...