Colour Coded Bollinger BandsBollinger Bands coloured to more clearly show periods of contraction and expansion. Green filled bands indicate expansion/increasing bandwidth, and red fill indicates contraction/decreasing bandwidth.
Meanreversion
Mean Street V1script for mean reversion conditions - tweak-able based on the volatility of the asset its used on, and the time frame
Global Market Signals: Is the Trend Your Friend? AlgorithmWelcome!
This is a fully customizable strategy to help generate great trade signals as well as provide basic analysis on any market of your choice. All the trades occur at the open of a candle.
Settings:
1. Long or Short
2. Look back length
3. New Highs or New Lows?
4. Trade Duration
5. Trend SMA Length
6. Above or Below Trend SMA
Example:
Using a Daily SPY chart.
The Default Settings are:
1. Long
2. 10
3. New Lows
4. 5
5. 200
6. Above
What this means is that you will be going long when there is a new 10 day lowest close, you'll hold the trade for 5 days, and the trades only occur above the 200 day simple moving average.
**When you test your settings, make sure that in the Properties tab, you have the "Order Size" set at 100 and in the drop down menu to the right, make sure "% of equity" is selected.**
Bollinger Band Strategy (Basic) Version 1 This strategy is for learning purposes only. Pay special attention to these strategies on longer aggregation periods (like 1 hr chart or more). Don't expect accurate results when you set a limit to 10 cents above your entry to be accurate. For example if you set the chart to 1 day, the price may move down and hit a stop 10 times then tag your limit. If this doesn't make sense, just don't use strategies here. Learn more first. That being said, I don't have specific recommendations for each aggregation period, backtesting isn't always perfect.
Now then, this strategy can be used as the traditional BB method by setting the "Stop" and "Limit Out" to like 10000, check "Reversal Entry" and uncheck "Limit Time of Day" This will keep the strategy running just reverse your position when price crosses outside each band.
INPUTS:
Length - length of WMA that I used for mean of Bollinger Band (this may suppose to be SMA, too bad)
Source - O-H-L-C basis for WMA
Deviation - normal Standard deviation that would be set when using Bollinger Band
Trailing stop check box - your stop value will be either a hard stop or trailing stop for an exit
Stop - the stop value - remember you can set this really high and it won't stop out
Limit Out - the limit value for exit
Reversal Entry check box - This changes each entry from a reversal (traditional idea of BB) to enter a trend trade - hopefully version 2 will have choice to trend one direction and reversal in the other.
Limit Time of Day - Especially when trading futures, you may want to only trade a specific time of day, when this box is checked, you can set the entry times below, exit will still only occur based on limit/stop or a flip entry order (the opposite entry condition is met)
Tips:
when I don't know a thing about a price range, like gold. I can set the limit out to 10000 and play with a trailing stop to get a better idea of what is even possible before tuning further.
Escape VelocityThis script is meant to calculate the Escape Velocity from the mean. According to Investopedia "Mean reversion is theory used in finance that suggests that asset prices and historical returns eventually return back to the long-run mean or average level of the entire data set."
Escape Velocity is the lowest velocity which a body must have in order to escape the gravitational attraction of a particular planet or other object, in this case the mean. It is recommended that you use a moving average with the same length as the ones that you decide to use for this indicator.
Escape Velocity= sqrt((2*Gravitational Constant * Mass)/Distance from the mean)
The Escape Velocity is in red and the velocity of price is in green. When price velocity (green) is positive and greater and than escape velocity (red) and price is above the mean, this would indicate that price is breaking away from the mean (bullish). When price velocity is negative and less than escape velocity and price is below the mean, this would indicate that price is breaking away from the mean (bearish).
Fibonacci Camarilla Pivot Points Strategy Prototype
Camarilla pivot points with level 5 and another level 3 based on 1.618 added
Option to toggle regular Camarilla or Fibonacci based Camarilla pivot points
Option to toggle labels, candle overlay, levels, and more
Camarilla pivot points have greatly interested me due to the extremely choppy nature of the cryptocurrency market when it isn't going through a bull run. Camarilla pivot points aren't traditional pivots; the hlc3 of the previous candle close is the basis for each level, as the inventor felt that mean reversion to that previous value was likely.
Farooq: Bollinger Bands StrategyBollinger Band Strategy developed as a service and published for customer verification and acceptance.
If you are interested in development sevices, please either DM me or visit the Backtest Rookies webiste. If you are looking for free and open source scripts, there are some avaible both on the site and our Tradingview profile.
Overview
Bollinger Strategy base
Added additional, customizable 2nd and 3rd deviation levels
Added ability to switch between long only, short only or long & short strategies
Added option to select which deviation level to buy at
Added option to select which deviation level to sell at
OB/OS Highlighter Mean-RevBar colors:
Red = lower low
Green = higher high
Yellow = Extreme, potential reversal upcoming
***Ignore when price breakout\trends, as this is for Mean-Reversion***
Mean-Reversion Swing Trading Strategy v1A port of the TradeStation EasyLanguage code for a mean-revision strategy described at
traders.com
"In “Mean-Reversion Swing Trading,” which appeared in the December 2016 issue of STOCKS & COMMODITIES, author Ken Calhoun
describes a trading methodology where the trader attempts to enter an existing trend after there has been a pullback.
He suggests looking for 50% pullbacks in strong trends and waiting for price to move back in the direction of the trend
before entering the trade."
See Also:
- 9 Mistakes Quants Make that Cause Backtests to Lie (blog.quantopian.com)
- When Backtests Meet Reality (financial-hacker.com)
- Why MT4 backtesting does not work (www.stevehopwoodforex.com)
Impulse ReverseMark the candles that should be used to star a Impulse Reverse trade. A the Impulse Reverse trade is a counter-trend type of trading that uses the mean reversion concept.
A mean reversion trade is a type of trade that looks for price that has moved away significantly from its mean (average) price. Every stock has its unique combination of parameters that best fit the mean reversion, the default parameters of this script is the best fit for the WIN1! (IBOV Mini Future) when used on the 30m timeframe
EMA, SMA Mean ReversionInvite Only: But everyone will be accepted
Invite-only in order to understand demand and interest in this type of strategy. All requests are welcome and will be accepted.
Full Source is available
A blog post containing full source code and commentary of the strategy is available on the backtest-rookies website. To comply with house rules, I cannot post a direct link here. (Hint add ".com" to backtest-rookies)
Overview
The strategy uses two moving averages to represent the historical mean and a slightly smoothed version of the current price action. It will place long or short trades when the fast EMA moves far away from the historical mean (the slow SMA).
Features
Set Backtest Date ranges
Enter when EMA is x% away from the mean
Independent inputs for the long and short side
Only enter when the EMA has started to reverse. (Input)
Optional Stop loss
Limit trades to a single direction to "Buy the dip" or "Sell the top"
ST_TopHatLiteDisplays high probability signals for mean reversion trades based on multiple time frame analysis. This "Lite" version of the indicator is available to those who purchased the full version for TOS or TradeStation upon request.
Kovach ReversalsWith the Kovach Reversals indicator, we automate the process of scanning for technical candlestick reversal patterns. A bearish reversal is shown by a red triangle above the high of the most recent candlestick in the pattern, a green triangle indicates a bullish reversal. To mitigate false positives, we filter for the reversal patterns at the extrema of the price range, where a reversal is highly likely to occur. While many indicators are susceptible to time lag, the reversals are drawn instantaneously as the bar forms, giving you the ability to get in on a trade as the setup develops.
This indicator works best with the Kovach Momentum, Kovach Chande, or Kovach OBV indicators, where we can leverage the strengths of both to increase our probability of success.
Forex Master v4.0 (EUR/USD Mean-Reversion Algorithm)DESCRIPTION
Forex Master v4.0 is a mean-reversion algorithm currently optimized for trading the EUR/USD pair on the 5M chart interval. All indicator inputs use the period's closing price and all trades are executed at the open of the period following the period where the trade signal was generated.
There are 3 main components that make up Forex Master v4.0:
I. Trend Filter
The algorithm uses a version of the ADX indicator as a trend filter to trade only in certain time periods where price is more likely to be range-bound (i.e., mean-reverting). This indicator is composed of a Fast ADX and a Slow ADX, both using the same look-back period of 50. However, the Fast ADX is smoothed with a 6-period EMA and the Slow ADX is smoothed with a 12-period EMA. When the Fast ADX is above the Slow ADX, the algorithm does not trade because this indicates that price is likelier to trend, which is bad for a mean-reversion system. Conversely, when the Fast ADX is below the Slow ADX, price is likelier to be ranging so this is the only time when the algorithm is allowed to trade.
II. Bollinger Bands
When allowed to trade by the Trend Filter, the algorithm uses the Bollinger Bands indicator to enter long and short positions. The Bolliger Bands indicator has a look-back period of 20 and a standard deviation of 1.5 for both upper and lower bands. When price crosses over the lower band, a Long Signal is generated and a long position is entered. When price crosses under the upper band, a Short Signal is generated and a short position is entered.
III. Money Management
Rule 1 - Each trade will use a limit order for a fixed quantity of 50,000 contracts (0.50 lot). The only exception is Rule
Rule 2 - Order pyramiding is enabled and up to 10 consecutive orders of the same signal can be executed (for example: 14 consecutive Long Signals are generated over 8 hours and the algorithm sends in 10 different buy orders at various prices for a total of 350,000 contracts).
Rule 3 - Every order will include a bracket with both TP and SL set at 50 pips (note: the algorithm only closes the current open position and does not enter the opposite trade once a TP or SL has been hit).
Rule 4 - When a new opposite trade signal is generated, the algorithm sends in a larger order to close the current open position as well as open a new one (for example: 14 consecutive Long Signals are generated over 8 hours and the algorithm sends in 10 different buy orders at various prices for a total of 350,000 contracts. A Short Signal is generated shortly after the 14th Long Signal. The algorithm then sends in a sell order for 400,000 contracts to close the 350,000 contracts long position and open a new short position of 50,000 contracts).
UCS_TTM - Reversion BandsOk, 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 information this has, the price tag is not hefty.
John's RTM Chapter Synopsis - www.tradethemarkets.com
What did I modify?
1. Automated the Daily + and Intraday settings. So Switching to intraday will change the setting automatically.
2. Added text callouts for RTM condition
a. John Carter's Indicator
b. Slope Based (my addition).
Future Improvement Planned.
1. Will Convert this into a system based on John's Indicator from TS.
2. Custom Options for Slope and MA setting for Trade filter.