Mean reversion strategy, based upon the price deviation (%) from a chosen moving average (bars). Do note that the "gains" are always relative to your starting capital, so if you set a smaller starting capital (e.g. $10000) your gains will look bigger. Also when the strategy tester has finished calculating, check the "Open P/L", as there could still be open trades....
//Every spread & central tendency measure in 1 script with comfortable visualization, including scrips's status line.
- Standard deviation (for most cases);
- Average deviation (if there are extreme values);
- GstDev - Geometric Standard Deviation (exclusively for Geometric Mean);
- HstDev - Harmonic Deviation (exclusively for Harmonic...
This is a continuation of my series on forecasting techniques. The idea behind the Simple Mean method is to somehow extend historical mean to the future. In this case a forecast equals to last value plus average change.
Ok, Here we go - Version 1 of TTM Reversion Band goes live.
Link to TTM Reversion Band - www.tradethemarkets.com
Link to TTM Reversion Band Guide - kb.simplertrading.com
John Carters Mastering the trade - www.amazon.com
For the amount of...
This script shows the price development over the last year (default: green) and mean prices over the last three (default: light green), six (default: orange) and nine (default: red) years and is therefore at least some kind of approach towards true seasonality.
Thanks to user "apozdnyakov" for providing most of the code!
Dieses Skript zeigt...
The Bollinger Imbalance Oscillator is used for *mean reversion* purposes only.
It uses Double Bollinger deviation levels to determine each level of perceived imbalance.
When price start to revert to its mean after an imbalance, small char-type arrows appear to assist with direction.
This oscillator also includes a squeeze feature on the center-line, based on...
Simple MA's 20 and 50 are averaged to produce a mean MA line. I like the smoothness of it, and it can help you stay in a trade in the slow moving trends. Also if you start to see a large cloud in your favor, it could be a great time take the profits.
I'm publishing it for research purposes & welcome any ideas and/or explanations whether it's actually possible or nah to do what I'm doing right now.
Idea is simple - if we can do Harmonic Mean, can we do Harmonic Standard Deviations? It should be the same logic, the only difference is instead of actual datapoints we gotta use reciprocals.
In reality I've...
The following script is an application of the Z-Score (previous script).
Z-Scores can be used in place of standard deviation (sigma) in 'Bollinger Bands'.
The average of the sample (x-bar) over 21 days (N)
21 average trading days per month, fixed value
The average of the population (mu) over 63 days (n)
63 days per quarter, default is set to 63
Here is a nice little script that highlights areas of volume using standard deviation, you can choose the look back periods.
This script is based on the excellent script by: @SteynTrade -
I have simplified it a bit and made it readable to my taste using alpha to highlight high volume areas.
In this study, I present a method to expose NaN values to development environment.
This exposure allows NaN values to be used by methods in scripts.
I also show how to use values, even NaN values, as anchors from...
B3 Pendulums, quick little indicators that do change print inside the current bar, so beware. It is good for anticipation, but it is important to make sure the current and next bars follow through.
Ever wanted an indicator that really points out the micro term action in the form of a pendulum swing? This my attempt to show the market ups and downs in the...
For private peeps only
- Takes a modified version of the CCI formula into 2 parts
VCI - Volume Channel Index (Yellow Histogram)
- Measures accurate accumulation and distribution levels and times
MCI - Modified Channel Index
- Measures (when compared to VCI) levels where clearly buys are interested vs not interested.
If VCI > MCI
- Shows buyer's are...
The z-score is a way of counting the number of standard deviations between a given data value and the mean of the data set.
Z-score = (x̄ - μ) / (σ / √ n)
x̄ = sample mean (using the array.avg function = array(a,close ), where i = 1 to 21)
μ = population mean ( = avg(close, n))
σ = standard deviation of the population ( = stdev(close,n))
n = number of 'close'...