GMS: Candlestick Patterns with RSI FilterI wanted to apply an RSI filter to some of the new Candlestick Patterns (in the indicators tab) since some of them looked to be quite effective for picking reversals. Turns out it's a pretty good pairing.
You can modify the RSI length in addition to the upper and lower thresholds. I also added in check boxes to combine different bullish and bearish patterns.
The candlestick patterns included are:
1. Long Upper Shadow
2. Long Lower Shadow
3. Doji
4. Bullish Harami
5. Bearish Harami
6. Bullish Engulfing
7. Bearish Engulfing
Hope it helps!
Andre
Meanreversion
Hammer & Shooting Star IndicatorA hammer candle is defined here as 1) the lower shadow (wick) is at least twice the length of the main body and 2) the close is in the top half of the range.
A shooting star has the opposite conditions 1) the upper shadow is at least twice the size of the main body and 2) the close is in the lower half of the range.
These candles should not be used by themselves but used in context ie with Bollinger bands, RSI or other oscillators they can form part of a mean reversion system.
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.
GMS: Mean Reversion StrategyThis is based on my GMS: Mean Reversion Indicator ()
Features:
- % Based Profit Target and Stop Loss
- SMA Trend Filter
- Can choose trade exit based off a moving average or linear regression curve
- Filter for long only trades, short only trades, or both at the same time.
Source code is open, so feel free to take a look!
I hope it helps,
Andre
Data MeanCalculating the Mean, given a set of data.
I'd assume BTCUSD needs to touch this on the daily, as it hasn't yet.
"reverting to the mean" is essential in market dynamics.
GMS: Mean Reversion IndicatorThis is just the close represented as a standard deviation away from an "x" period linear regression. You can select the price source as well.
Trend Following or Mean RevertingThe strategy checks nature of the instruments. It Buys if the close is greater than yesterday's high, reverse the position if the close is lower than yesterday's low and repeat the process.
1. If it is trend following then the equity curve will be in uptrend
2. If it is mean reverting then the equity curve will be downtrend
Thanks to Rayner Teo.
ATR-ranged Donch on 15min// This is a simple Mean Reversion & Breakout Indicator.
// A Donchian Channel is plotted. A threshold equal to 0.25 of Daily ATR.
// If price reverses from this threshold, then it can be taken as possible Mean Reversion.
// If price crosses the previous Donchian levels, it can be taken as a possible breakout.
// Typical of such strategy is the whipsaw effect when price movement is just flat.
// I have marked the region where the lower and higher thresholds are closer to be an indicative of whipsaw.
// But it is not really effective to avoid whipsaw.
Mean Reversion Strategy by KrisWatersThis is a type of mean reversion strategy. It only generates long signals when the price is far away from the mean. It tries buy from the dip. Use it with BTC/USDT pair on 4 hour timeframe.
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.
Mean Street V1script for mean reversion conditions - tweak-able based on the volatility of the asset its used on, and the time frame
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.
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)
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.