Kelly criterion methods.
the kelly criterion helps with the decision of how much one should invest in
a asset as long as you know the odds and expected return of said asset.
simplified version of the kelly criterion formula.
win_p : float, probability of winning.
rr : float,...
Provides a data set of the monthly mean air temperature (°C) for the city of Tokyo in Japan.
this was just for fun, no financial implications in this.
TOKYO WMO Station ID:47662 Lat 35o41.5'N Lon 139o45.0'E
the years of the data set.
Returns: array : year values.
"In time series analysis, dynamic time warping (DTW) is an algorithm for
measuring similarity between two temporal sequences, which may vary in
speed. For instance, similarities in walking could be detected using DTW,
even if one person was walking faster than the other, or if there were
accelerations and decelerations...
Counts the word or integer number pattern frequency on a array.
counts the number a pattern is repeated.
pattern : : array : array with patterns to be counted.
array : list of unique patterns.
array : list of counters per...
Library "LinearRegressionLibrary" contains functions for fitting a regression line to the time series by means of different models, as well as functions for estimating the accuracy of the fit.
Linear regression algorithms:
RepeatedMedian(y, n, lastBar) applies repeated median regression (robust linear regression algorithm) to the input time series...
Calculates a divergence between 2 series
bullish(_src, _low, depth) Calculates bullish divergence
_src : Main series
_low : Comparison series (`low` is used if no argument is supplied)
depth : Fractal Depth (`2` is used if no argument is supplied)
Returns: 2 boolean values for regular and hidden...
Performs Polynomial Regression fit to data.
In statistics, polynomial regression is a form of regression analysis in which
the relationship between the independent variable x and the dependent variable
y is modelled as an nth degree polynomial in x.
gauss_elimination(A, m, n) ...
Fourier Transform for Traders By John Ehlers, slightly modified to allow to inspect other than the 8-50 frequency spectrum.
high_pass_filter(source) Detrended version of the data by High Pass Filtering with a 40 Period cutoff
source : float, data source.
This library holds technical analysis functions calculating values for which no Pine built-in exists.
cagr(entryTime, entryPrice, exitTime, exitPrice)
It calculates the "Compound Annual Growth Rate" between two points in time. The CAGR is a notional, annualized growth rate that assumes all profits are reinvested....
This library is a Pine programmer's tool that provides functions to access Commitment of Traders (COT) data for futures. Four of our scripts use it:
• Commitment of Traders: Legacy Metrics
• Commitment of Traders: Disaggregated Metrics
• Commitment of Traders: Financial Metrics
• Commitment of Traders: Total
If you do not program in...
Feel free to contribute for an extended version. 😊 Still in development.
We hope you enjoy it! 🎉
CRYPTOLINX - jango_blockchained 😊👍
*** MORE EXAMPLE WILL COMING UP SOON ***
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon...
this is a work in progress (WIP) and prone to have some errors, so use at your own risk...
let me know if you find any issues..
Method for a generalized Neural Network.
network(x) Generalized Neural Network Method.
x : TODO: add parameter x description here
Returns: TODO: add what function returns
Functions for determining if volatility (true range) is within or exceeds normal.
The "True Range" (ta.tr) is used for measuring volatility.
Values are normalized by the volume adjusted weighted moving average (VAWMA) to be more like percent moves than price.
current(len) Returns the current price adjusted volatitlity...
Library contains methods which can help build custom strategy for continuous investment plans and also compare it with systematic buy and hold.
sip(startYear, initialDeposit, depositFrequency, recurringDeposit, buyPrice) Depicts systematic buy and hold over period of time
startYear : Year on which SIP is started
This is a public library that include the functions explained below. The libraries are considered public domain code and permission is not required from the author if you reuse these functions in your open-source scripts
Library "FFTLibrary" contains a function for performing Fast Fourier Transform (FFT) along with a few helper functions. In general, FFT is defined for complex inputs and outputs. The real and imaginary parts of formally complex data are treated as separate arrays (denoted as x and y). For real-valued data, the array of imaginary parts should be filled with...