Mean Reversion w/ Bollinger BandsThis is a more advanced version of my original mean reversion script.
It employs the famous Bollinger Bands.
This robot will buy when price falls below the lower Bollinger Band, and sell when price moves above the upper Bollinger Band.
I've only tested it on the S&P 500, though you could try it out on other assets to see the backtest performance.
During the recent COVID-19 bear market drop, it produced several buy signals on the S&P which I followed, and made some nice gains so far.
I still think this would make a better investing strategy (buy undervalued / sell over-valued), rather than a trading strategy.
I use this robot for my long term portfolio.
Mean-reversion
Bars above/below EMACount of previous bars above or below a chosen Exponential Moving Average. Typically price reconnects with well defined EMAs regularly. If the price has been above/below an EMA for too long, you can expect a reconnect in a short order and bet on mean reversion strategies.
YJ Mean ReversionMean 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.
Some Tips:
- Was designed firstly to work on an index like the S&P 500 , which over time tends to go up in value.
- Avoid trading too frequently (e.g. Daily, Weekly), to avoid getting eaten by fees.
- If you change the underlying asset, or time frame, tweaking the moving average may be necessary.
- Can work with a starting capital of just $1000, optimise the settings as necessary.
- Accepts floating point values for the amount of units to purchase (e.g. Bitcoin ).
- If price of units exceeds available capital, script will cancel the buy.
- Adjusted the input parameters to be more intuitive.
Mean Street V1script for mean reversion conditions - tweak-able based on the volatility of the asset its used on, and the time frame
Mean Reversion IndicatorThis is a mean reversion indicator that anticipates a local trend reversion. Basically, it is a channel with the mid-line serving as a moving mean baseline. Each of the two curves run up and down within this channel bouncing off from the top and bottom bounds. Touching the bounds serves as an indication of a local trend reversal. The reversal signal is stronger when there exists a resonance (symmetry) in the two curves. The background histogram shows a Karobein oscillator that contributes support or resistance for the signal.
Mean Reversion and Momentum - Updated with gaussiana smoothingMean Reversion and Momentum
Interpretation:
- Divergence means trend reversal
- Parallel movement means trend continuation
Squares above serve as a confirming signal
Mean Reversion and Momentum - Indicator versionMean Reversion and Momentum
Interpretation:
- Divergence means trend reversal
- Parallel movement means trend continuation
Squares above serve as a confirming signal
Moving Average Mean Reversion StrategyA basic mean-reversion strategy. Shorts when the close is 10% above the MA, and goes long when it's 10% below the MA.
B3 ALMA PendulumB3 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 smallest amount of lag possible. This indicator is designed to bounce back and forth from 100 to -100 as it shows you the price's relationship to ALMA. Really its just a simple deviance from mean study made to amplify the quick ups and downs, and kind of the neatest on Heikin Ashi setups. It looks like Arabic language at first glance, lol.
This should be easy to template out to your own MA's. ~I hope you are enjoying the B3 scripts, that is now 9 open source shares and a couple protected ones. I still plan on a few more give-a-ways, as I prepare some of the algorithmic things I do for subscription. Feel free to comment about things you would like to see! ~B3