Library "CRCChars" arrow_up() : ▲ arrow_down() : ▼ warning() : ⚠ checkmark() : ✅ no_entry() : 🚫
Library "CRCPaint" black(trans) Parameters: trans : Transparency value (float) Returns: color -------------------------------------------------------------------------- // white() silver() gray() fuchsia() maroon() red() orange() yellow() blue() navy() aqua() purple() teal() green() lime() ...
Library "options_expiration_and_strike_price_calculator" TODO: add library description here fun() this is a library to help calculate options strike price and expiration that you can add to a script i use it mainly for symbol calulation to place orders to buy options on TD ameritrade so it will be set up to order options on TD ameritrade using json order...
Library "ConverterTF" I have found a bug Regarding the timeframe display, on the chart I have found that the display is numeric, for example 4Hr timeframe instead of '4H', but it turns out to be '240', which I want it to be displayed in abbreviated form. And in all other timeframes it's the same. So this library was created to solve those problems. It converts...
Library "TradingPortfolio" Simple functions for portfolio management. A portfolio is essentially a float array with 3 positions that gets passed around into these functions that ensure it gets properly updated as trading ensues. An example usage: import hugodanielcom/TradingPortfolio/XXXX as portfolio var float my_portfolio = portfolio.init(0.0,...
Library "lib_Indicators_v2_DTU" This library functions returns included Moving averages, indicators with factorization, functions candles, function heikinashi and more. Created it to feed as backend of my indicator/strategy "Indicators & Combinations Framework Advanced v2 " that will be released ASAP. This is replacement of my previous indicator...
Library "Last_Available_Bar_Info" getLastBarTimeStamp() getAvailableBars() This simple library is built with an aim of getting the last available bar information for the chart. This returns a constant value that doesn't change on bar change. For backtesting with accurate results on non standard charts, it will be helpful. (Especially if you are using...
Library "TypeMovingAverages" This library function returns a moving average. ma_fast ma_slow MA_selector() Example // This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org // © hapharmonic //@version=5 indicator("Test MATYPE", overlay=true) import hapharmonic/TypeMovingAverages/1 as MAType xprd1 =...
Quite recently TradingView added the possibility to create and use Libraries in PineScript. With this feature PineScript became higher quality of coding language overnight. Libraries enable splitting your code into multiple files, providing easier access to code reusability. I was working on a script which included 3000 lines of code, which was recompiling 1:30...
This library is used to convert Text type numbers are numbers. Library "StringtoNumber" str1 = '12340' , vv = numstrToNum(str1) numstrToNum() Example // This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org // © hapharmonic //@version=5 indicator("My Script") import hapharmonic/StringtoNumber/1 as CV TF =...
Library "PureRebalance" A rebalance function that is pure. Depends only on its arguments to perform the necessary calculations. rebalance(token_price, portfolio_token_amount, portfolio_fiat_amount, rebalance_ratio) Rebalances a portfolio made of tokens and fiat to a given ratio of tokens per fiat Parameters: token_price : The value of a single unit...
Library "SessionsInBoxesLib" Provides functions calculating the all-time high/low of values. get_positions() draw()
Library "FunctionZigZagMultipleMethods" ZigZag Multiple Methods. method(idx) Helper methods enumeration. Parameters: idx : int, index of method, range 0 to 4. Returns: string function(method, value_x, value_y) Multiple method ZigZag. Parameters: method : string, default='(MANUAL) Percent price move over X * Y', method for zigzag. ...
Library "MHCustomSpotTradingLibrary" HMA(float, float) Parameters: float : _src price data float : _length Period Returns: Hull Moving Average EHMA(float, float) Parameters: float : _src price data float : _length Period Returns: EHMA Moving Average THMA(float, float) Parameters: float : _src price data ...
Library "AwesomeColor" This library provides a variety of colors. The following functions all provide different sets of colors. The name of the function indicates the color scheme. The usage of arguments for all functions is the same. // @function {Color set name} // @param _color TODO: The name of the color group. // @returns TODO: Returns an array of colors.
Library "_arrayutils" Library contains utility functions using arrays. delete(arr, index) remove an item from array at specific index. Also deletes the item Parameters: arr : - array from which the item needs to be deleted index : - index of item to be deleted Returns: void pop(arr) remove the last item from array. Also deletes the...
Library "harmonicpatterns" harmonicpatterns: methods required for calculation of harmonic patterns. These are customised to be used in my scripts. But, also simple enough for others to make use of :) isGartleyPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max) isGartleyPattern: Checks for harmonic pattern Gartley Parameters: xabRatio :...
Library "Signal_Data_2021_09_09__2021_11_18" Functions to support my timing signals system import_start_time(harmonic) get the start time for each harmonic signal Parameters: harmonic : is an integer identifying the harmonic Returns: the starting timestamp of the harmonic data import_signal(index, harmonic) access point for pre-processed data...