A collection of custom tools & utility functions commonly used with my scripts.
getDecimals() Calculates how many decimals are on the quote price of the current market
Returns: The current decimal places on the market quote price
truncate(float, float) Truncates (cuts) excess decimal places
float : _number The...
An utility function to parse session inputs. Extracts hours, minutes and weekdays (if defined) and returns a tuple as the result.
_parseSession(sessionString) => (hourStart, minuteStart, hourEnd, minuteEnd, weekdaysArray)
Examples presented on the chart.
When designing filters it can be interesting to have information about their characteristics, which can be obtained from the set of filter coefficients (weights). The following script analyzes the impulse response of a filter in order to return the following information:
Smoothness via the Herfindahl index
Percentage Of Positive...
Bands and trailing stops are important indicators in technical analysis, while we could think that both are different they can be in fact closely related, at least in the way they are made. Bands and trailing stops can be made from a simple central tendency estimator, like a moving average, and from a volatility estimator like standard deviation,...
This simple script checks for data gaps in an intra-day TradingView chart. I have found that BitMEX 1-minute data is coming in rather holey lately, so I wrote this just to see how prevalent the problem is. It should work on any intra-day timeframe, not just 1-minute.
V1: initial release.
This tool allows the user to manually keep track of how much of their account is currently exposed to each currency, and keep that information handy and organized on the chart as a table.
It is specialized for NNFX traders who are trading all the pairs among the 9 major currency crosses: AUD, CAD, CHF, EUR, GBP, JPY, NZD, SGD, USD.
HOW DO I USE...
Here I present to the community at large a collection of code comment blocks that I think will be useful, especially for larger script projects bordering on 2,000 lines or above of code.
█ PLANNED FUTURE UPDATES
Work with the community to expand this template to be even more useful with the inclusion of useful global colour sets,...
Hello! This little script tells you everything TradingView lets you access in a ticker's syminfo in Pine Script:
- type: crypto, economic, forex, fund, futures, index, spread, stock
- tickerid, such as AMEX:BLOK
- prefix, such as AMEX
- Ticker, such as BLOK
- root: for derivatives such as futures contracts
- currency, such as USD
- base currency:...
The library consists of three sections:
Technical Analysis Functions - A collection of tools commonly used by day traders
Trading Setup Filters Functions - A number of filters that help day traders to screen trading signals
Candlestick Pattern Detection Functions - To detect different candlestick patterns that are...
This library contains my favourite functions. Will be updated frequently
Count int digits in number
Returns: : number of int digits in number
Count float digits in number
Returns: : number of float digits in number
Convert values in array or matrix into string...
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 ...