Library "CalculatePercentageSlTp" This Library calculate the sl and tp amount in percentage sl_percentage(entry_price, sl_price) this function calculates the sl value in percentage Parameters: entry_price : indicates the entry level sl_price : indicates the stop loss level Returns: stop loss in percentage tp_percentage(entry_price,...
Library "AdxCalcHourly" getBars() getBars: Returns the number of bars to use in the historical lookback period Returns: simple int directionDown() directionDown: Calculates the direction down for bar_index Returns: series float directionUp() directionUp: Calculates the direction up for bar_index Returns: series float ...
Library "swap" Side / Boundary Based All Types Swapper - three automagical types for Arrays, Matrixes, and Variables -- no signal : Long/ Short position autoswap -- true / false : Boolean based side choice -- Src / Thresh : if source is above or below the threshold - two operating modes for variables, Holding mode only for arrays/matrixes -- with two ...
Library "RouterOrdersIron" Library for routing orders to the Binance exchange. MsgDoLongMKT(id, symbol, balance) Returns json for Iron to buy a symbol for the amount of the balance with market order. Parameters: id : ID of your Iron router. symbol : Symbol for a trade, BTC example balance : The amount for which to carry out the...
Library "Moving_Averages" This library contains majority important moving average functions with int series support. Which means that they can be used with variable length input. For conventional use, please use tradingview built-in ta functions for moving averages as they are more precise. I'll use functions in this library for my other scripts with dynamic...
Library "bullratio" Calculate the profit/loss ratio of a permabull for configurable time range bullratio(len) calculates the profit/loss ratio for a permabull of age len Parameters: len : the number of candles to include in the running bull ratio - 0 for all time Returns: series float of profit/loss percentage
Library "TimeFunctions" Utility functions to handle time in Pine Script TimeframetoInt() Returns an int that corresponds to a timeframe string: "1" => 1 "5" => 5 "10" => 10 "15" => 15 "30" => 30 "60" => 60 "H1" => 60 "H4" => 240 "1D" => 1440 BarsSinceOpen() Returns the number of bars...
Library "ArrayMatrixHUD" Show Array or Matrix Elements In Table For Arrays: Set the number of rows you want the data displayed in and it will generate a table, calculating the columns based on the size of the array being displayed. For Matrix: It will automatically match the Rows and Columns to the values in the matrix. Note: On the left, the table shows the...
Library "RecursiveAlerts" The library provides options to run alert() calls in loop without worrying about limitations of frequency options. When an alert statement is called within a loop, it will fire just once per bar irrespective of how many iterations allowed when fequency is set to alert.freq_once_per_bar or alert.freq_once_per_bar_close it will fire...
Library "CarlLib" LastLowRedHighGreen(open, close, high, close, reqChangePerc) returns values representing the high of the most recent green and the low of the most recent red Parameters: open : open series close : close series high : high series close : close series reqChangePerc : the minimum require change percentage for the...
Library "TradingHook" This library is a client script for making a webhook signal formatted string to TradingHook webhook server. buy_message(password, amount, order_name) Make a buy Message for TradingHook. Parameters: password : (string) password that you set in .env file. amount : (float) amount. If not set, your strategy qty will be...
Library "PlurexSignalIntegration" Provides tools for integrating Strategies and Alerts into plurex.io signals. plurexMarket() Build a Plurex market from a base and quote asset symbol. Returns: A market string that can be used in Plurex Signal messages. tickerToPlurexMarket() Builds simple Plurex market string from the syminfo Returns: A market string...
Library "fontilab" Provides function's indicators for pivot - trend - resistance. pivots(src, lenght, isHigh) Detecting pivot points (and returning price + bar index. Parameters: src : The chart we analyse. lenght : Used for the calcul. isHigh : lookging for high if true, low otherwise. Returns: The bar index and the price of the pivot. ...
Library "ColorArray" Simple color array gradient tool. makeGradient(size, _col1, _col2, _col3, _col4, _col5) Color Gradient Array from 5 colors. Parameters: size : : default 10 _col1 : : default #ff0000 _col2 : : default #ffff00 _col3 : : default #00ff00 _col4 : : default #00ffff _col5 : : default #0000ff Returns: array of...
Library "WpProbabilisticLib" Library that contains functions to calculate probabilistic based on historical candle analysis CandleType(open, close) This function check what type of candle is, based on its close and open prices Parameters: open : series float (open price) close : series float (close price) Returns: This function return the...
Library "external_input_utils" Collection of external input utilities for conversion and other hacky functions str_to_src(value) str_to_src - Convert the string value to the coresponding source series. It can be used to limit the "input.source" choices provided to the end user. The most interesting part is that it can be used to overcome the "one...
A Magical little helper friend for Candle Math. When composing scripts, it is often necessary to manipulate the math around the OHLC. At times, you want a scalar (absolute) value others you want a vector (+/-). Sometimes you want the open - close and sometimes you want just the positive number of the body size. You might want it in ticks or you might want it in...
Library "SizeAndPlace" size and location shortcuts posYtoInt(string) posYtoInt as titled.. Parameters: string : _inp posXtoInt(string) posXtoInt as titled.. Parameters: string : _inp sizeToInt(string) sizeToInt as titled.. Parameters: string : size sizeToString(int) sizeToString as titled.. Parameters: int : size ...