In Finance, people usually assume the price follows a random walk or more precisely geometric Brownian motion. In 1988, Lo and MacKinlay came up with the variance ratio test to refute the random walk hypothesis and efficient market hypothesis. The variance ratio test is a simple test for market efficiency, autocorrelation, and whether price follows a random walk....
Example execution of Monte Carlo Simulation applied to the markets(this is my interpretation of the algo so inconsistencys may appear).
the algorithm is very demanding so performance is limited.
These are my "Pseudo-Random Number Generators via Pine Script", having uniform distribution between 0 and 1. In my quest for sequential pseudo-random numbers in Pine, tinkering with mathematical chaos, I have come up with these three simple yet handy generators. I believe these may be useful in the future by developers of the Tradingview community.
This script lets you separate alerts into batches, and trigger each batch in either sequential order or (pseudo)random order. You can also specify the number of batches being used.
This is helpful when you have alerts to be triggered on every candle, but the number of alerts causes API errors if they are all executed at once.
Smoothed Random Walk Index.
It gives slightly slower but less false signal than stochastic.
If it draws double bottom with higher low, long entry is considered.
If it draws double with lower high, short entry is considered.
For more accuracy, another smoothed RWI with slower setting is needed.
If fast setting RWI draws lower high AND slower setting RWI is also...
This is a moving average with a customizable random kernel. You can shape your kernel by selecting your parameters in the settings window. This is not something that is immediately ready to mess with by just applying it on the chart, it is very useful for people who are researching indicators and developing new tools. To see the shape of your kernel you can plug...
Understanding the Random Walk Simulation
This indicator randomly generates alternative price outcomes derived from the price movements of the underlying security. Monte Carlo methods rely on repeated random sampling to create a data set that has the same characteristics as the sample source, representing examples of alternate outcomes. The data set created using...
This is my first attempt at a psuedo-random number generator in Pine. It is, as you can see, a failed attempt thus far. I began by trying to implement the random color generator as described here: www.tradingcode.net in version 3 Pine (Not sure which version he was using). As you can see, the color isn't random.
For my friends at cryptopolis.chat - especially those that believe in numerology, astrology and the power of the random number generators.
This script generates numbers above and below the candles. They are somewhat random but not really, as they come in order - 1, 2, 3 and so on.
(Cryptopolis is a free group on discord for exchanging cryptocurrency trading ideas)