Donchian Trend Ranges [AlgoAlpha]🚀🔗 Donchian Trend Ranges 🔗🚀
Elevate your trading game with the Donchian Trend Ranges indicator from AlgoAlpha! 🌟📈 This advanced tool helps you visualize market trends and potential reversal points using Donchian channels, volatility measures, and average true range (ATR).
Key Features
⚙️ Customizable Parameters: Adjust the lookback period and range multiplier to fit your trading style.
🎨 Color-Coded Trends: Easily distinguish between uptrends and downtrends with customizable colors.
📊 Dynamic Channels: Visualize multiple dynamic channels based on Donchian ranges and volatility.
☁️ Trend Clouds: See market strength and weakness with upper and lower trend clouds.
🔔 Signal Alerts: Get notified of potential trend shifts and take profit points.
How to Use
🛠 Add the Indicator: Add the indicator to favorites. Customize settings such as the lookback period and range multiplier to match your trading needs.
🔍 Analyze Trends: The indicator calculates the highest and lowest prices over a specified period to create dynamic channels. It then uses standard deviation and ATR to adjust these channels for market volatility, plotting upper and lower ranges. Green bars indicate an up trend and red bars for a down trend.
🔔 Set Alerts: Enable notifications for bullish and bearish trend shifts, as well as weak and strong take profit points, ensuring you never miss an opportunity.
How it Works
The Donchian Trend Ranges indicator calculates the highest and lowest prices over a specified period to create a basis line. It creates a range around the basis based on standard deviations and the clouds' width is determined by a 14 period ATR. The basis line and bar colors changes based on whether the closing price is above or below it, indicating trends. Clouds around these lines represent market reversal zones that can be used as entry levels when used in confluence with momentum indicators, visual signals ("X" and "◆") marking strong and weak take profit points are also printed when the prices revert from the clouds towards the basis. Integrated alerts notify you of significant events like trend shifts and take profit signals, keeping you informed without constant monitoring.
Unleash the power of the Donchian Trend Ranges in your trading strategy! 🌐📈✨
Donchain
Donchian Channels StrengthTL;DR - A different approach calculating strength based on Donchain channels
My approach calculating strength by using the difference between price and donchain average. It is possible to use the highest/lowest value of a given source (like close) or to use the highest high/lowest low (by using the option 'include wicks') for the strength calculation
I added multiple moving averages which can be used in the calculations incl. SMMA (RMA) which is used in RSI calculation and works best for me.
Usage is similar to RSI: DC Strength oscillates between 0 and 100. Low values (<20) indicate a bearish situation while high values (>80) indicate bullish ones. Center line (50) crossings can also indicate a possible trend change.
Donchian Channels [Gu5]█ OVERVIEW
I changed the design of the classic indicator "Donchian Channels", for easy reading.
█ CONCEPTS
Donchian Channels is an indicator made up of upper and lower bands around a mid-band or Basis.
The upper band marks the highest price of a security for N periods, while the lower band marks the lowest price of a security for N periods. The area between the upper and lower bands.
In this version, when there are new Higher High (HH), the trend is Bullish and the channel is painted green.
When there are new Lower Low (LL), the trend is Bearish and the channel is painted Red
█ OTHER SECTIONS
A plus in this script: When there are no new highs or new lows, there is no certain trend
The channel is painted yellow
www.tradingview.com
• HOW TO USE
Menu "Display"
• '■ Basis On/Off': Shows the midline Basis
• '■ Alert On/Off': Shows alerts labels
• '■ Fill On/Off': Paint the entire channel the color of the trend
• '■ Bar Color On/Off': Paint the candle the color of the trend
• '■ Close Alert On/Off': Shows alerts end of trend
• NOTES:
This code was written using the recommendations from the Pine Script™ User Manual's Style Guide
• RAMBLINGS:
You can use the "Basis" line as Trailing Stop.
• THANKS:
Donchian Channels developed by Richard Donchian
and many MANY thanks to @PineCoders
Donchian Channels+Standard Donchian Channels, this includes a Trend EMA which can be configured and the channels will use to give buy and sell signals. The channels are also colored in such a way to indicate a trend reversals. My favorite part that sets this apart from others is, if using the bClose option (which I recommend you do) the trend will not reverse until there is a close above/below the previous channel high/low. i.e. a reversal into an uptrend requires the current bar to close above the previous upper channel rather than just a new high.
The coloring of the current trend allows for a quick read of current market conditions and I use this on any timeframe across all forms of charts (forex stock, futures , crypto, etc). When taking one of the signals I use the opposite channel as the stop loss (when buying use bottom, and selling use top channel)
Update 1:
- Added my name to the code
- Updated the picture to show off the indicator better
- Raised the brightness of the fill color a bit, looks nicer I think
As a warning: I have obviously hand picked this picture to really show off this indicator's power to work in a trending market. Donchian Channels are a trending indicator and work best in trending markets with decent pull backs. If there are multiple signals going in each direction, it is a choppy market and you should stay out until it starts trending again. I generally use a 1:1.5 risk to reward ratio but sometimes will stretch it to 1:2 if it is a nice trade and I feel the market is in my favor as you can see from the trades placed in the picture (and I use that method for any commodity / chart and timeframe). I use the close of the white candle and then (since they are trades going short) I use the upper Donchian Channel as my stop loss.
I personally like to have the lines and labels turned off and enable all other options. Labels are just there to really stand out so you don't miss the white candle indication for a trade. OH! Also, I've had comments from friends that the white candles are hard to see, I turn off my candle borders in settings; makes it super easy to see them then. I turn lines off as the fill does the job well enough and it seems cleaner in my eyes.
If you'd like to see this picture on your chart, it is Micro E-Mini S&P 500 Futures from July 10, 2022 @ 18:00 on the 1-min chart.
just now
Update 2:
- Added day trading time highlights
- Added ranging market indicator (This I'm still working on so use at your own discretion, it's intended purpose is to tell when the Donchian Channels are not going to give great signals and to use a ranging indicator instead)
- Added multi-timeframe trend screener (handy if you want to quickly see the trend direction (based on the Trend EMA you set) of several time frames without having to change charts). It will draw in the bottom right of the chart.
Donchian Channel Strategy IdeaThis strategy idea is a variation of the "Donchian Channel" trading strategy. It is built with a highest-high band, a lowest-low band, and a baseline which is average the highest-high and the lowest-low bands. This strategy is very useful in trending instruments on 1W and 1D timeframes. This is the implementation used in the QuantCT app.
You can set the operation mode to be Long/Short or long-only.
You also can set a fixed stop-loss or ignore it so that the strategy acts solely based on entry and exit signals.
Trade Idea
When the close price breaks up the previous highest-high, it is a long signal, the market is considered rising (bullish), and the plotted indicator becomes green. Long positions are held until the close price crosses under the baseline.
When the close price breaks down the previous lowest-low, it is a short signal, the market is considered falling (bearish), and the plotted indicator becomes red. Short positions are held until the close price crosses above the baseline.
Otherwise, if we have no position in the market, the market is considered ranging, and the plotted indicator becomes orange.
Entry/Exit rules
Enter LONG if the close price breaks up the previous highest-high (i.e. when the plotted indicator becomes green).
Exit LONG if the close price crosses under the baseline (i.e. when the plotted indicator becomes orange).
Enter SHORT if the close price breaks down the previous lowest-low (i.e. when the plotted indicator becomes red).
Exit SHORT if the close price crosses above the baseline (i.e. when the plotted indicator becomes orange).
CAUTION
It's just a bare trading idea - a profitable one. However, you can enhance this idea and turn it into a full trading strategy with enhanced risk/money management and optimizing it, and you ABSOLUTELY should do this!
DON'T insist on using Long/Short mode on all instruments! This strategy performs much better in Long-Only mode on many (NOT All) trending instruments (Like BTC, ETH, etc.).
Stochastic ChannelsDonchain trend following system with overbought/ oversold areas inspired by stochastic. Multiplier to get non repainting HTF capability. features a smoothed price as well as moving average of the smoothed price, also inspired by the stochastic indicators %K and %D. This and slow stochastics compliment each other nicely.
%D line colored by direction.
Filled color areas represent overbought/oversold.
Shows breakouts as well as giving targets and entries in rangebound markets.
donchain support&resistance levels [LM]Hello Traders,
I would like to introduce you donchain support&resistance levels. The idea is to look for important levels that are identified by donchain line, where donchain usualy spents a lot of time without any move usualy turns out to be good level for bounces.
Also note that when there is a big spread between first line and second line it usually leads to some pullback.
Here you have an example of big spread:
You are also able to show donchain lines and not only horizontals this you can find in settings:
Enjoy!
Donchian Channels Strategy by KrisWatersDoncian Channels is a trend tracking indicator developed by Richard Doncian. The upper line of the channel is determined by the highest value seen by the price in the defined period, the lower line of the channel is determined by the lowest value seen by the price in the defined period. The middle line takes the average value of the lower and upper channels.
Strategy Settings:
- Can apply only LONG positions.
- Can apply only SHORT positions.
- Use LONG/SHORT both.
- You can use ATR as a second exit condition. If ATR stop disabled, Donchian upper or lower channel value is use for the exit rule to long and short positions.
Strategy can be able to optimize by changing channel lengths and timeframe.
TrendLine ChannelsAbstract
This script provides a set of Trendline Channels which can be tighter than Donchian Channels.
This script computes the most suitable active upper and lower trendlines and updates them as soon as possible.
We can use it for breakout signals earlier than Donchian Channels.
Introduction
Channels are tools which can mark area of values of ranging markets.
Once the price leaves the original region, range traders may start admitting they are wrong and trigger trend.
Donchian Channels (misheard as Dungeon Channels) use the highest and the lowest price to define area of values.
When the price breakouts, it just like it got released from a dungeon.
However, waiting for the price making even higher or lower may be too late and risk reward ratio may be lower.
Trendlines can make the channels tighter and we can find earlier breakout signals.
Computing Trendline Channels
(1) Find the most active trendlines
In this script, a valid trendline connects two high values or two low values.
A high value means the highest value in a trading day.
A low value means the lowest value in a trading day.
In this script, every trendline does not crossover any bar but can exactly touch them.
The most flat trendline is taken. (one for upper and one for lower)
(2) Continue to use or Change a trendline
If there is a tighter trendline available, this script changes to use it.
If the previous active trendline is broken, this script re-computes the trendline available.
When this case happens, this script display with an another color.
Otherwise, this script continues using the previous trendline.
(3) Middle line
The middle line indicates the middle value between the upper and the lower.
Parameters
Length : how many days are used for computation. The default value is 16 just because 16=4*4, using binary characteristic.
x_go_on : If the previous trendline is not breakout and there are no tighter trendlines available, we continue use it.
Color Options
(1) Upper trendline (no update or tighter)
(2) Upper trendline (changed due to breakout)
(3) Middle line
(4) Lower trendline (no update or tighter)
(5) Lower trendline (changed due to breakout)
Conclusion
Trendline Channels can be tighter than Donchian Channels and evaluate earlier breakout signals.
Comparing to known auto trendline scripts, Trendline Channels is continuous.
Once a trendline is broken, Trendline Channels can instantly point out the next available one.
If you think the price movement is boring or you cannot have good risk reward ratio, you can go to an another timeframe.
Reference
How to trade with Donchian Channels
How to trade with Trendlines
VPCI MA cross [LM]Hello guys,
I would like to introduce you a script that combines two indicators: VPCI( volume price confirmation indicator) and donchian MAs
VPCI:
Fundamentally, the VPCI reveals the proportional imbalances between price trends and volume-adjusted price
trends. An uptrend with increasing volume is a market characterized by greed supported by the fuel needed to
grow. An uptrend without volume is complacent and reveals greed deprived of the fuel needed to sustain itself.
Investors without the influx of other investors ( volume ) will eventually lose interest and the uptrend should
eventually breakdown.
A falling price trend reveals a market driven by fear. A falling price trend without volume reveals apathy, fear
without increasing energy. Unlike greed, fear is self-sustaining, and may endure for long time periods without
increasing fuel or energy. Adding energy to fear can be likened to adding fuel to a fire and is generally bearish
until the VPCI reverses. In such cases, weak-minded investor's, overcome by fear, are becoming irrationally
fearful until the selling climax reaches a state of maximum homogeneity. At this point, ownership held by weak
investor’s has been purged, producing a type of heat death capitulation. These occurrences may be visualized by
the VPCI falling below the lower standard deviation of a Bollinger Band of the VPCI, and then rising above the
lower band, and forming a 'V' bottom.
I have used MA's on top of VPCI and looking for crosses. Percatage that is shown in label is calculation of difference between previous cross and current close price. So you know if you would be flipping what % you would gain or loose, all is rounded with precission of two
DONCHIAN
I took donchain calculation from ichimoku to calculate conversion line and base line(both are giving me information about whether it's trending or not and distance from the mean)
There are various sections in setting:
VPCI - setting of MA lengths(for smaller timeframes I recommend using bigger MA length)
DONCHAIN - setting length for conversion and base line
Any suggestions are welcome
Donchian Channel Strategy [for free bot]
I present to you a script for testing the Donchian channel breakout strategy for the Binance_exchange.
This strategy is trending, and is especially effective for trading cryptocurrency futures.
This strategy is very flexible, and you can configure virtually all possible parameters, moreover, separately for longs and separately for shorts.
In the script, you can configure the parameters of the channel for entry and exit, the exit method, enable or disable purchases / sales, specify take profit and stop loss, and more.
On the example of optimization, only 20% of the deposit is used. This is done for diversification, since there are 37 contracts on binance_futures (at the time of writing the script description). That is, by optimizing the parameters for different currencies, you can very well reduce risks.
Представляю Вам скрипт для тестирования стратегии пробоя канала Дончиана для биржи Бинанс.
Данная стратегия относится к трендовым, и особенно эффективная на торговли криптовалютных фьючерсов.
Данная стратегия очень гибкая, и можно настроить фактически все возможные параметры, при чем, отдельно для покупок и отдельно для продаж.
В скрипте можно настроить параметры канала на вход и на выход, метод выхода, разрешить или запретить покупки/проаджи, указать тейк-профит и стоп-лосс и другое.
На примере оптимизации используется всего 20% от депозита. Это сделано для диверсификации, так как на фьючерсах бинансе присутсвует 37 контрактов (на момент написания описания скрипта). Т.е., оптимизировав параметры под разные валюты, можно очень хорошо снизить риски.
Donchian Channel CloudsFor this indicator, I got inspired by this paragraph in an article on Investopedia:
"Donchian channels also make natural partners with another moving average indicator for a crossover strategy. The Donchian moving average middle line is likely to form the short-term average in these situations, although some have used a 20-day Donchian channel in conjunction with a five- or 10-day channel to exit a position before a consolidation eats into short-term profits."
The default is a 20-period Donchian channel with the middle line from a 10-period channel superimposed on it. Red for 20, green for 10. When 10 is over 20, the cloud between them is green; the cloud is red when 20 is over 10.
Combo Strategy 123 Reversal & Donchian Channel WidthThis is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
The Donchian Channel was developed by Richard Donchian and it could be compared
to the Bollinger Bands. When it comes to volatility analysis, the Donchian Channel
Width was created in the same way as the Bollinger Bandwidth technical indicator was.
As was mentioned above the Donchian Channel Width is used in technical analysis to measure
volatility. Volatility is one of the most important parameters in technical analysis.
A price trend is not just about a price change. It is also about volume traded during this
price change and volatility of a this price change. When a technical analyst focuses his/her
attention solely on price analysis by ignoring volume and volatility, he/she only sees a part
of a complete picture only. This could lead to a situation when a trader may miss something and
lose money. Lets take a look at a simple example how volatility may help a trader:
Most of the price based technical indicators are lagging indicators.
When price moves on low volatility, it takes time for a price trend to change its direction and
it could be ok to have some lag in an indicator.
When price moves on high volatility, a price trend changes its direction faster and stronger.
An indicator's lag acceptable under low volatility could be financially suicidal now - Buy/Sell signals could be generated when it is already too late.
Another use of volatility - very popular one - it is to adapt a stop loss strategy to it:
Smaller stop-loss recommended in low volatility periods. If it is not done, a stop-loss could
be generated when it is too late.
Bigger stop-loss recommended in high volatility periods. If it is not done, a stop-loss could
be triggered too often and you may miss good trades.
WARNING:
- For purpose educate only
- This script to change bars colors.
Donchian Cloud - evoA cloud based on the highest high and lowest low of a given period (Donchian), same lines used in Ichimoku Cloud (Conversion line or Base line).
Short term line is based on current time frame, long term line is based on your given multiple of current time frame.
The color of the lines is based on up or down movement.
I stole a piece of code from PineCoders for the multiple time frame:
I have not used this in my trades (yet) so I don't know how good it is, just posting because it looks nice :)
Feel free to share your settings if you can find good ones.
Real TurtleThere are a few different attempts at the turtle strategy on here, but none that I have seen thus far correctly follow the strategy as I know it. This version uses a stop order to trail out of the position by moving the stop order to match the exit channel or stoploss as the N*2( ema of True Range * 2). This version of turtle strategy also uses stop orders for entry on either side in order to enter at optimal time. The ability to specify a backtest period was borrowed from another script, I grabbed it so long ago I no longer remember from whom i borrowed it, if it was yours I will credit you if you PM me.
This version unlike others also allows you to specify a risk % so you only risk that percentage of your equity in a trade, as calculated from your stoploss.
Disclaimer: I have published several scripts in the past when i was first learning pinescript and they are all horrible please ignore those. I would delete them, but TV doesn't allow you to delete.