What's this all about? Ever since 1D arrays were added to Pine Script, many wonderful new opportunities have opened up. There has been a few implementations of matrices and matrix math (most notably by TradingView-user tbiktag in his recent Moving Regression script: ). However, so far, no comprehensive libraries for matrix math and linear algebra has been...
This is an experimental study designed to forecast the range of price movement from a specified starting point using a Monte Carlo simulation. Monte Carlo experiments are a broad class of computational algorithms that utilize random sampling to derive real world numerical results. These types of algorithms have a number of applications in numerous fields of study...
Hello All, Monte Carlo Simulation is a model used to predict the probability of different outcomes when the intervention of random variables is present. it is used by professionals in such widely disparate fields as finance, project management etc. You can find many articles about Monte Carlo Simulation on the net. In this script I tried to make Monte Carlo...
Hello Traders, This is my second Multi Time Frame Candles script but with this new one, you will have some new features such volume info, remaining time to close of higher time frame candle and also developed using new features of Pine such array of lines. also I tried to make it 3D for better visualization ;) also it shows new highs/lows / breakouts. I...
The following indicator returns a line bouncing of the extremities of a Donchian channel, with the aim of replicating a "zig-zag" indicator. The indicator can both be lagging or lagging depending on the settings user uses. Various extended lines are displayed in order to see if the peaks and troughs made by the Donchian zig-zag can act as potential...
====== ABOUT THIS INDICATOR - A simple but highly customisable display of previous higher time-frame OHLC values, drawn using line.new and label.new. Nothing fancy but... - Customised resolution input which excludes time frames lower than 1 hour while extending the common higher reference inputs to include: • 6, and 12 Hour • 5...
This script generates pseudo-random asset data . Due to the nature of the random generator, it is impossible to use this indicator as input for other indicators because the instance of the script that the indicator is applied to will automatically be different from the instance that is plotted on the chart. Therefore, the idea is to use this script in other...
Add MTF capabilities to "seconds" timeframes!! This script is not intended to be used as an indicator but gives you a workaround to solve the missing seconds MTF capabilities. The "resolution" function in Pinescript doesn't allow for seconds values to be put in MTF So I wrote a little helper code with arrays to get MTF on seconds timeframes. If you want...
Introducing the Moving Regression Prediction Bands indicator. Here I aimed to combine the principles of traditional band indicators (such as Bollinger Bands), regression channel and outlier detection methods. Its upper and lower bands define an interval in which the current price was expected to fall with a prescribed probability, as predicted by the...
FINALLY! As everyone who tried to create, understand, or even find the Buff Pelz Dormeier Anti-volume stop-loss indicator knows that - it's not easy. Personally, I have partially, or perhaps completely figured out, the tips Buff had given in Investing with Volume Analysis book. AVSL now is ready. Please do some test and give me a feedback how it works in your...
Volume swings are defined as increasing volume and higher highs/lower lows over a minimum of three bars. This script tracks volume swings over an intraday chart and stores the final lowest low swing / highest high swing over the course of the day. The final high swing and low swing are then plotted over the following day as possible retracement / support &...
Maximum Drawdown and Maximum Relative Drawdown% calculating functions. I needed a way to calculate the maxDD% of a serie of datas from an array (the different values of my balance account). I didn't find any builtin pinescript way to do it, so here it is. There are 2 algorithms to calculate maxDD and relative maxDD%, one non optimized needs n*(n - 1)/2...
Delta-RSI Oscillator Strategy: This strategy illustrates the use of the recently published Delta-RSI Oscillator as a stand-alone indicator. Delta-RSI represents a smoothed time derivative of the RSI, plotted as a histogram and serving as a momentum indicator. There are three optional conditions to generate trading signals (set separately for Buy, Sell and Exit...
The indicator calculates Triangularity over Stoch RSI Overbought and Oversold Conditions So Ever wondered how a overbought and oversold condition looks if the values are triangualrised The indicator plots auto band levels on top of price Enjoy!
You don't need loops to get the rolling correlation between an input series and a linear sequence of values, this can be obtained from the normalized difference between a WMA and an SMA of the input series. The closed-form solutions for the moving average and standard deviation of a linear sequence can be easily calculated, while the same rolling statistics for...
NOTE The non-repainting technique in this publication that relies on bar states is now deprecated, as we have identified inconsistencies that undermine its credibility as a universal solution. The outputs that use the technique are still available for reference in this publication. However, we do not endorse its usage. See this publication for more information...
This indicator was invented in 2001 by Konstantin Kopyrkin. The name "Nick Rypock" is derived from his surname reading in the opposite direction: Kopyrkin -> Kopyr Kin -> Kin Kopyr -> Nik Rypok The idea of the indicator is similar to the Chandelier Exit, but doesn't involve ATR component and uses a percentage instead. A dynamic price channel is used to...
Multi-timeframe Strategy based on Logistic Regression algorithm Description: This strategy uses a classic machine learning algorithm that came from statistics - Logistic Regression (LR). The first and most important thing about logistic regression is that it is not a 'Regression' but a 'Classification' algorithm. The name itself is somewhat misleading....