MACD PlusMoving Average Convergence Divergence – MACD
The MACD is an extremely popular indicator used in technical analysis. It can be used to identify aspects of a security's overall trend. Most notably these aspects are momentum, as well as trend direction and duration. What makes the MACD so informative is that it is actually the combination of two different types of indicators. First, the MACD employs two Moving Averages of varying lengths (which are lagging indicators) to identify trend direction and duration. Then, it takes the difference in values between those two Moving Averages (MACD Line) and an EMA of those Moving Averages (Signal Line) and plots that difference between the two lines as a histogram which oscillates above and below a center Zero Line. The histogram is used as a good indication of a security's momentum.
Added Color Plots to Settings Pane.
Switched MTF Logic to turn ON/OFF automatically w/ TradingView's Built in Feature.
Added Ability to Turn ON/OFF Show MacD & Signal Line.
Added Ability to Turn ON/OFF Show Histogram.
Added Ability to Change MACD Line Colors Based on Trend.
Added Ability to Highlight Price Bars Based on Trend.
Added Alerts to Settings Pane.
Customized Alerts to Show Symbol, TimeFrame, Closing Price, MACD Crosses Up & MACD Crosses Down Signals in Alert.
Alerts are Pre-Set to only Alert on Bar Close.
Added ability to show Dots when MACD Crosses.
Added Ability to Change Plot Widths in Settings Pane.
Added in Alert Feature where Cross Up if above 0 or cross down if below 0 (OFF By Default).
Squeeze Pro
Traditionally, John Carter's version uses 20 period SMAs as the basis lines on both the BB and the KC.
In this version, I've given the freedom to change this and try out different types of moving averages.
The original squeeze indicator had only one Squeeze setting, though this new one has three.
The gray dot Squeeze, call it a "low squeeze" or an "early squeeze" - this is the easiest Squeeze to form based on its settings.
The orange dot Squeeze is the original from the first Squeeze indicator.
And finally, the yellow dot squeeze, call it a "high squeeze" or "power squeeze" - is the most difficult to form and suggests price is under extreme levels of compression.
Colored Directional Movement Index (CDMI) , a custom interpretation of J. Welles Wilder’s Directional Movement Index (DMI), where :
DMI is a collection of three separate indicators ( ADX , +DI , -DI ) combined into one and measures the trend’s strength as well as its direction
CDMI is a custom interpretation of DMI which presents ( ADX , +DI , -DI ) with a color scale - representing the trend’s strength, color density - representing momentum/slope of the trend’s strength, and triangle up/down shapes - representing the trend’s direction. CDMI provides all the information in a single line with colored triangle shapes plotted on the bottom. DMI can provide quality information and even trading signals but it is not an easy indicator to master, whereus CDMI simplifies its usage. The CDMI adds additional insight of verifying/confirming the trend as well as its strength
Label :
Displaying the trend strength and direction
Displaying adx and di+/di- values
Displaying adx's momentum (growing or falling)
Where tooltip label describes "howto read colored dmi line"
Ability to display historical values of DMI readings displayed in the label.
Added "Expert Trend Locator - XTL"
The XTL was developed by Tom Joseph (in his book Applying Technical Analysis ) to identify major trends, similar to Elliott Wave 3 type swings.
Blue bars are bullish and indicate a potential upwards impulse.
Red bars are bearish and indicate a potential downwards impulse.
White bars indicate no trend is detected at the moment.
Added "Williams Vix Fix" signal. The Vix is one of the most reliable indicators in history for finding market bottoms. The Williams Vix Fix is simply a code from Larry Williams creating almost identical results for creating the same ability the Vix has to all assets.
The VIX has always been much better at signaling bottoms than tops. Simple reason is when market falls retail traders panic and increase volatility , and professionals come in and capitalize on the situation. At market tops there is no one panicking... just liquidity drying up.
The FE green triangles are "Filtered Entries"
The AE green triangles are "Aggressive Filtered Entries"
DMI
DMI Trade Zone [Alorse]Through the DMI Trade Zone you can find safe areas to trade in the Spot market.
The logic behind the indicator is:
- If the Positive Directional Movement (+DI) is greater than the Negative Directional Movement (-DI) then the Average Directional Movement Index (ADX) will be green with an opaque white background.
- If the Positive Directional Movement (+DI) is less than the Negative Directional Movement (-DI) then the Average Directional Movement Index (ADX) will be red.
MACD + DMI Scalping with Volatility Stop by (Coinrule)Trend-following strategies are cool because they allow you to catch potential high returns.
The main limit of such strategies are:
False signals > the asset is not experiencing a strong trend. The strategy gets stuck with a sideways move or, worst, with the beginning of a downtrend.
The sell signal may come later than the actual top, leading in some cases to turn a trade in profit into a loss.
This strategy tries to address these limitations to develop a trading system that optimises the entry and closes trade once the profit achieves a pre-set level.
ENTRY
The trading system uses the MACD and the DMI to confirm when is the best time for buying. Combining these two indicators prevents trading during downtrends and reduces the likelihood of getting stuck in a market with low volatility.
The system confirms the entry when:
The MACD histogram turns bullish.
When the positive DMI is greater than the negative DMI, there are more chances that the asset is trading in a sustained uptrend.
EXIT
The strategy comes with a fixed take profit combined with a volatility stop, which acts as a trailing stop to adapt to the trend's strength. Depending on your long term confidence in the asset, you can edit the fixed take profit to be more conservative or aggressive.
The position is closed when:
The price increases by 3%
The price crosses below the volatility stop.
The best time frame for this strategy based on our backtest is the 3-hr . The 4-hr can work well. In general, this approach suits medium to long term strategies
The strategy assumes each order to trade 30% of the available capital to make the results more realistic. A trading fee of 0.1% is taken into account. The fee is aligned to the base fee applied on Binance, which is the largest cryptocurrency exchange.
DMI - VisualBasically, when the background is:
White = no defined direction
Light blue = up.
Dark blue = well defined up
Light red = down
Dark red = well defined down
Blue/red centered circle = change of direction
Red circle on top = possible short entry
Blue circle at the bottom = possible long entry
//Português
Basicamente, quando o fundo é:
Branco = sem direção definida
Azul claro = alta
Azul escuro = alta bem definida
Vermelho claro = baixa
Vermelho escuro = baixa bem definida
Círculo azul/vermelho centrado = mudança da direção
Círculo vermelho no topo = possível entrada de short
Círculo azul na parte inferior = possível entrada de long
ADX / RSI Strategy by Trade Rush (created by SirPoggy) This is one of many new strategies coming soon which were seen on Trade Rush
This one is the ADX / RSI Strategy seen here:
https:www.youtube.com/watch?v=uSkGE0ujyn4
While the strategy has been modified slightly to use the DMI instead of the ADX, the core of the strategy is essentially the same
Long signals are generated when the RSI is above 70, close is above the 200EMA, and the ADX is above 25 (added is the plus DMI over 25 and minus DMI below 20)
Stop loss is placed below /above the 21 EMA, however, there is a deviation required to ensure price is not too close to where a stop loss would be placed.
Short signals are generated when the RSI is below 30, close is below the 200EMA, and the ADX is above 25 (added is the minus DMI over 25 and plus DMI below 20)
I do not recommend using this strategy but I have provided this code for educational purposes.
Thanks!
Let me know which strategy you'd like coded next in the comments below.
VWMA with kNN Machine Learning: MFI/ADXThis is an experimental strategy that uses a Volume-weighted MA (VWMA) crossing together with Machine Learning kNN filter that uses ADX and MFI to predict, whether the signal is useful. k-nearest neighbours (kNN) is one of the simplest Machine Learning classification algorithms: it puts input parameters in a multidimensional space, and then when a new set of parameters are given, it makes a prediction based on plurality vote of its k neighbours.
Money Flow Index (MFI) is an oscillator similar to RSI, but with volume taken into account. Average Directional Index (ADX) is an indicator of trend strength. By putting them together on two-dimensional space and checking, whether nearby values have indicated a strong uptrend or downtrend, we hope to filter out bad signals from the MA crossing strategy.
This is an experiment, so any feedback would be appreciated. It was tested on BTC/USDT pair on 5 minute timeframe. I am planning to expand this strategy in the future to include more moving averages and filters.
DMI With Crosses (MyNewTrade)Directional Movement Indicator:
+DI and -DI
I changed the color of the bar bars according to the crossed of +DI and -DI . It helps us to have an idea of whether the trend is continuing or not.
+DI crossover to -DI barcolor is Aqua, if not bar color is Red.
It also helps us to find the lowest and highest points of the graph according to the positions of Adx +DI and -DI .
It gives warnings at the lowest and highest points, which helps us to detect the direction of the trend.
Squeeze Momentum [Plus]The "Momentum" in this indicator is smoothed out using linear regression. The Momentum is what is displayed on the indicator as a histogram, its purpose is obvious (to show momentum).
What is a Squeeze? A squeeze occurs when Bollinger Bands tighten up enough to slip inside of Keltner Channels .
This is interpreted as price is compressing and building up energy before releasing it and making a big move.
Traditionally, John Carter's version uses 20 period SMAs as the basis lines on both the BB and the KC.
In this version, I've given the freedom to change this and try out different types of moving averages.
The original squeeze indicator had only one Squeeze setting, though this new one has three.
The gray dot Squeeze, call it a "low squeeze" or an "early squeeze" - this is the easiest Squeeze to form based on its settings.
The orange dot Squeeze is the original from the first Squeeze indicator.
And finally, the yellow dot squeeze, call it a "high squeeze" or "power squeeze" - is the most difficult to form and suggests price is under extreme levels of compression.
Now to explain the parameters:
Squeeze Input - This is just the source for the Squeeze to use, default value is closing price.
Length - This is the length of time used to calculate the Bollinger Bands and Keltner Channels .
Bollinger Bands Calculation Type - Selects the type of moving average used to create the Bollinger Bands .
Keltner Channel Calculation Type - Selects the type of moving average used to create the Keltner Channel.
Color Format - you to choose one of 5 different color schemes.
Draw Divergence - Self explanatory here, this will auto-draw divergence on the indicator.
Gray Background for Dark Mode - to make them more visually appealing.
Added ADX (Average Directional Index) that measure a trend’s strength. The higher the ADX value, the stronger the trend. The ADX line is white when it has a positive slope, otherwise it is gray. When the ADX has a very large dispersion with respect to the momentum histogram, increase the scale number.
Added "H (Hull Moving Average) Signal". Hull is a extremely responsive and smooth moving average created by Alan Hull in 2005. Have option to chose between 3 Hull variations.
Added "Williams Vix Fix" signal. The Vix is one of the most reliable indicators in history for finding market bottoms. The Williams Vix Fix is simply a code from Larry Williams creating almost identical results for creating the same ability the Vix has to all assets.
The VIX has always been much better at signaling bottoms than tops. Simple reason is when market falls retail traders panic and increase volatility, and professionals come in and capitalize on the situation. At market tops there is no one panicking... just liquidity drying up.
The FE green triangles are "Filtered Entries"
The AE green triangles are "Aggressive Filtered Entries"
(JS) Triple StochasticSo I ended up adding a ton of stuff to my prior Double Stochastic script which you can see here .
The concept of the Double was to smooth out the existing Stochastic by applying a Stochastic to the existing Stochastic (hence the Double). My concept for the Triple Stochastic is much different. It combines a regular stochastic, stochastic RSI, and the double stochastic to get a smoothed output based on all 3.
Also - since I love being able to see a Squeeze (see my Squeeze Pro indicators - Squeeze Pro 2 & Squeeze Pro Overlays ) I added the Squeeze to the Stochastic (the dots). If you're unfamiliar with how a Squeeze works, or what it is, check out my links for explanation. A quick explanation however is that the Squeeze is an indicator that was invented by John Carter that detects price compression before a big move out of a range. This is done by using Bollinger Bands and Keltner Channels, the BB shrink inside the KC. The color of the dots represent the depth of the BB in the KC, white (or black) being the lightest squeeze, red being the standard squeeze, and yellow being the strongest squeeze. Now on to the indicator:
The first thing you'll notice is the options available for the type of Stochastic you'd like to use:
Standard : This is a regular Stochastic
Stochastic RSI : This is the standard Stochastic RSI
Double : This is the Stochastic on top of a Stochastic from the prior version
Triple : This is simply an average of all 3 of the above combined together
(Top indicator shows the Triple Stochastic)
The options "K", "D", and "Smooth" are the settings from a regular Stochastic used to set up the type of Stochastic you choose to use.
Now let's say you're not sure how one type performs compared to another, or you like the quickest momentum change but also like to see the smoothest trend, or you want to use the same types of Stochastic and watch for them to cross like moving averages - for these reasons I added the ability to add a second Stochastic for comparison.
(2nd indicator shows a fast and slow Triple Stochastic together)
Quite obviously, the "K 2", "D 2", and "Smooth 2" are what is used in order to set the parameters for the second Stochastic.
Now another thing I added was the option to replace the regular Stochastic and instead look at the distance between the K and D. By turning off "Use K% and D%" you get to see this in action. To put it simply, a cross above zero would indicate a positive Stochastic crossover, and a cross below zero would represent the opposite. There's also an option titled "SMA Length using Difference" which, to smooth this out a bit, allows you to apply a moving average to the distance. By setting it at 1 you'd see the actual distance between K and D.
(3rd indicator shows the K and D distance used as a plot)
Another thing I wanted to do was add a different type of background that wasn't based on the indicator itself. I decided to use ADX & DMI which is a great way to determine the trend. When you select "ADX/DMI BG" the BG colors will change from being based on the indicator to being based on ADX and DMI.
(The 3rd indicator also shows the ADX/DMI BG being used).
And now finally the last feature I decided to add takes us back to the Squeeze. Essentially it is just the Stochastic shown through the lens of Squeeze momentum, as I ended up plugging the Stochastic output into the Squeeze momentum formula to create an oscillator. By selecting "Use Oscillator" you will see this in action as well.
(Bottom indicator shows the oscillator addition)
Smoothed Directional Movement IndexThis indicator is a variation of the default DMI indicator, the main difference being that the signals are smoothed by SMAs.
It also has additional bullish (green) and bearish (red) background coloring which would be noisy on a standard DMI indicator.
If both lines converge it is bullish, otherwise bearish.
Increase / decrease the threshold should you want more conservative / optimistic background coloring.
RedK Trader Pressure Index (TPX v1.0) Quick Summary
---------------------
The RedK Trader Pressure Index (REDK_TPX) analyzes the changes in price bars to give the trader a clear visual insight that represents the ongoing fight between the bulls (buyers) and bears (sellers) in the market - to determine who is in control of the price action, which in turn can be helpful in a trader’s decision about how the price action may be unfolding, what type of trade and positions to take (or to close) and when is the ideal time to action.
How the TPX calculation works
---------------------------------------
The TPX uses a simple logic and that’s one of the things I like about it – there is no complex calculation or magic stuff - and the core idea makes sense to me, as well as being one of the ways I needed to analyze my price charts.
The underlying assumption is that the buyers and sellers are competing for control of the market at all time.
- if there’s more buyers than sellers in the market, and if the buyers’ (or bull) pressure is stronger (than the sellers’), they will be able pull the “price range” up – and that means that on the price chart we can expect to see an increase in value in both the “high” and the “low” of the next price bar.
- Similarly, if there’s more sellers than buyers in the market, and if the sellers’ (or bear) pressure is stronger (than the buyers’), they will be able push the “price range” down – on the price chart we can expect to see a decrease in value in both the “high” and the “low” of the next price bar.
So, we will use the change in high and low price, between 2 consecutive price bars, as a proxy for the bull and bear “pressures” – a (weighted) moving average of these “pressure” values are then calculated along with the “Net Pressure” – the final results are plotted.
The importance of the "Control Level"
-----------------------------------------------
As in similar price-action based indicators, there’s a certain threshold or “control level”, above which, the pressure becomes “dominant”
when the bull or bear pressure is above that threshold, they will dominate and control the price move – this level can be found around the 25 or 30. I have included the ability to plot and adjust that control level in the TPX’s settings – and I also show some examples in the chart above (weekly chart for MSFT)
The code is commented and the chart is annotated to explain how to “read” the TPX – and how to interpret the values on the price chart
Using the Trader Pressure Index (TPX) in trading
------------------------------------------------------------
TPX can be valuable in showing well-supported (up or down) price moves that may lead to a strong trend that we can ride (when the pressure value is above the control level) - see exampled above
TPX is also valuable in showing when there’s “lack of interest” from the buyers or the sellers (or both) – which is great in exploring chub or no-trade zones - so basically when to avoid trading.
As usual, it's always recommended to use these types of "price action insight" indicators in conjunction with other trend and momentum indicators (moving averages, MACD..etc), so the insight we gain from them can be properly placed within the broader "context" - and to receive additional confimtion signals to support the trading decision.
I will come back later to post something about how the TPX differs from my recently-posted Strength of Movement (SoM) because they wok completely differently but can be used together with great synergy – and also how the TPX compares to the classic DMI/ADX which uses a similar concept.
Please feel free to integrate in your trading – hope you find this useful - comments and feedback are always welcome
CHOP Zone Entry Strategy + DMI/PSAR ExitThis is a Strategy with associated visual indicators and Long/Short and Reverse/Close Position Alerts for the Choppiness Index (CHOP) . It is used to determine if the market is choppy (trading sideways) or not choppy (trading within a trend in either direction). CHOP is not directional, so a DMI script was ported into this strategy to allow for trend confirmation and direction determination; it consists of an Average Directional Index (ADX) , Plus Directional Indicator (+DI) and Minus Directional Indicator (-DI) . In addition, a Parabolic SAR is also included to act as a trailing stop during any strong trends.
Development Notes
---------------------------
This indicator, and most of the descriptions below, were derived largely from the TradingView reference manual. Feedback and suggestions for improvement are more than welcome, as well are recommended Input settings and best practices for use.
www.tradingview.com
www.tradingview.com
www.tradingview.com
Recommend using the below DMI and PSAR indicators in conjunction with this script to fully visualize and understand how entry and exit conditions are chosen. Variable inputs should correlate between the scripts for uniformity and visual compatibility.
THANKS to LazyBear and his Momentum Squeeze script for helping me quickly develop a momentum state model for coloring the Chop line by trend.
Strategy Description
---------------------------
CHOP produces values that determine whether the market is choppy or trending . The closer the value is to 100 , the higher the choppiness levels , while the closer it is to 0 , the stronger the market is trending . Territories for both levels, and their associated upper and lower thresholds, are popularly defined using the Fibonacci Retracements, 61.8 and 38.2.
Basic Use
---------------------------
CHOP is often used to confirm the market condition to help you stay out of sideways markets and only enter when there is movement or imminent explosions. When readings are above the upper threshold, continued sideways movement may be expected, while readings below the lower threshold are typically indicative of a continuing trend. It is also used to anticipate upcoming trendiness changes, with the general belief that extended periods of consolidation (sideways movement) are followed by extended periods of strong, trending, directional movement, and vice versa.
One limitation in this index is that you must be cautious in deciding whether the range or trend will likely continue, or if it will reverse.
Confidence in price action and trend is higher when two or more indicators are in agreement -- while this strategy combines CHOP with both DMI and PSAR, we would still recommend pairing with other indicators to determine entry or exit trade opportunities.
Recommend also choosing 'Once Per Bar Close' when creating alerts.
Inputs
---------------------------
Strategy Direction - an option to only trade Short, Long, Both, or only in the direction of the Trend (Follow Trend is the Default).
Sensitivity - an incremental variable to test whether the past n candles are in the same trend state before triggering a delayed long or short alert (1 is the Default). Can help filter out noise and reduces active alerts.
Show Chop Index - two visual styles are provided for user preference, a visible Chop line with a background overlay, or a compact column and label only view.
Chop Lookback Period - the time period to be used in calculating CHOP (14 is the Default).
Chop Offset - changing this number will move the CHOP either forwards or backwards relative to the current market (0 is the Default).
Smooth Chop Line and Length - if enabled, the entered time period will be used in calculating a smooth average of the index (Enabled and 4 are the Defaults).
Color Line to Trend Direction - toggles whether the index line is colored to visually depict the current trend direction (Enabled is the Default).
Color Background - toggles the visibility of a background color based on the index state (Enabled is the Default).
Enable DMI Option - if enabled, then entry will be confirmed by and dependent on the ADX Key Level, with any close or reversal confirmed by both ADX and +/-DI to determine whether there is a strong trend present or not (Enabled is the Default).
ADX Smoothing - the time period to be used in calculating the ADX which has a smoothing component (14 is the Default).
DI Length - the time period to be used in calculating the DI (14 is the Default).
ADX Key Level - any trade with the ADX above the key level is a strong indicator that it is trending (23 to 25 is the suggested setting).
Enable PSAR Option - enables trailing stop loss orders (Enabled is the Default).
PSAR Start - the starting value for the Acceleration Force (0.015 is our chosen Default, 0.02 is more common).
PSAR Increment - the increment in which the Acceleration Force will move (0.001 is our chosen Default, 0.02 is more common).
PSAR Max Value - the maximum value of the Acceleration Factor (0.2 is the Default).
Color Candles Option - an option to transpose the CHOP condition levels to the main candle bars. Note that the outer red and green border will still be distinguished by whether each individual candle is bearish or bullish during the specified timeframe.
Note too that if both DMI and PSAR are deselected, then close determinations will default to a CHOP reversal strategy (e.g., close long when below 38.2 and close short when above 61.8). Though if either DMI or PSAR are enabled, then the CHOP reversal for close determination will automatically be disabled.
Indicator Visuals
---------------------------
For the candle colors, black indicates tight chop (45 to 55), yellow is loose chop (38.2 to 45 and 55 to 61.8), dark purple is trending down (< 38.2), and dark blue is trending up (> 61.8).
The background color has additional shades to differentiate a wider range of more levels…
• < 30 is dark purple
• 30 to 38.2 is purple
• 38.2 to 45 is light purple
• 45 to 55 is black
• 55 to 61.8 is light blue
• 61.8 to 70 is blue
• > 70 is dark blue
Long, Short, Close, and Reverse labels are plotted on the Chop line, which itself can be colored based on the trend. The chop line can also be hidden for a clean and compact, columnar view, which is my preferred option (see example image below).
Visual cues are intended to improve analysis and decrease interpretation time during trading, as well as to aid in understanding the purpose of this strategy and how its inclusion can benefit a comprehensive trading plan.
DMI and Trend Strength
---------------------------
To analyze trend strength, the focus should be on the ADX line and not the +DI or -DI lines. An ADX reading above 25 indicates a strong trend , while a reading below 20 indicates a weak or non-existent trend . A reading between those two values would be considered indeterminable. Though what is truly a strong trend or a weak trend depends on the financial instrument being examined; historical analysis can assist in determining appropriate values.
DMI exits trade when ADX is below the user selected key level (e.g., default is 25) and when the +/- DI lines cross (e.g., -DI > +DI exits long position and +DI > -DI exits short position).
PSAR and Trailing Stop
---------------------------
PSAR is a time and price based indicator that excels at measuring direction and duration, though not the actual strength of a trend, which is why we use this in conjunction with DMI. It is also included in this script as a trailing stop option to maximize gains during strong trends and to mitigate any false ADX strengthening signals.
This creates a parabola that is located below the candle during a Bullish trend and above during a Bearish trend. A buy or reversal is signaled when the price crosses above or below the Parabolic SAR.
Long/Short Entry
---------------------------
1. CHOP must be over 61.8 (long) or under 38.2 (short).
2. If DMI is enabled, then the ADX signal line must be above the user selected Key Level (default is 25).
3. If Sensitivity is selected, then that past candle must meet the criteria in step 1, as well as all the intermediate candles in between.
4. If "Follow Trend" is selected and PSAR is enabled, then a long position can only open when the momentum and PSAR are in an uptrend, or short when both are in a downtrend, to include all intermediate candles if the Sensitivity option is set on a past candle.
Close/Reverse
---------------------------
1. If DMI is enabled, then a close flag will be raised when the ADX signal drops below the Key Level (of 25), and -DI crosses over +DI (if long), or +DI crosses over -DI (if short).
2. If PSAR is enabled, then a close flag will be raised when the current trend state is opposite the last state.
3. If both DMI and PSAR are disabled, then a close flag will be raised if the Chop line drops under 38.2 (if long) or goes over 61.8 (if short).
4. If a Long or Short Entry is triggered on the same candle as any of the above close flags, then the position will be reversed, else the position will be closed.
Strategy Alerts
---------------------------
1. Long Entry
2. Short Entry
3. Reverse
4. Close
The provided backtest result is based on a position sizing of 10% equity with 100k initial capital. When testing SPX, disabling the DMI performed the best, but EURUSD performed poorly without it enabled, and TSLA had a small reduction in net profit. Timeframe likewise differed between commodities with TSLA performing best at 30M, SPX at 15M, and EURUSD at 4H. I do not plan on using this as a standalone strategy, but I also was expecting better results with the inclusion of EMI and PSAR to compliment the CHOP. Key elements of this script will likely be included in future, more holistic strategies.
Disclaimer
---------------------------
Past performance may not be indicative of future results. Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting. This post and the script are not intended to provide any financial advice. Trade at your own risk.
No known repainting, though there may be if an offset is introduced in the Inputs. I did my best not to code any other variables that repaint, but cannot fully attest to this fact.
MrBS:Directional Movement Index [Trend Friend Strategy]This goes with my MrBS:DMI+ indicator. I originally combined them into one, but then you cannot set alerts based on what the ADX and DMI is doing, only strategy alerts, so separate ones have more flexibility and uses.
Indicator Version is found under "MrBS:Directional Movement Index " ()
//// THE IDEA
The majority of profits made in the market come from trending markets. Of course there are strategies that would say otherwise but for the majority of people, THE TREND IS YOUR FRIEND (until the end). The idea is to follow the trend, entering once it has established its self and exiting positions when the trend weakens. This strategy gives a rough idea of the returns produced from following purely the ADX signals. At first Heikin Ashi values were used for the calculation but the results show it's not that effective. The functionality to switch between calculation types has been left in, so we can uses HA candle data to generate signals from while looking at an OHLC chart, if we want to experiment. Due to the way strategies work, we are unable to get reliable results when running the strategy on the HA chart even if we are calculating the signals from the real OHLC values. It is best to always run strategies on standard charts.
When using this strategy, I look for confirmation of the signal based on stochastic (14:3:6) direction, reversal level of stochastic, and divergance, to add confidence and adjust position size accordingly. I am going to try and code some version of that in future updates, if anyone can help or has suggestions please drop me a message.
//// INDICATOR DETAILS
- The default settings are for optimized Daily charts, for 4 hour I would suggest a smoothing of 2.
- The default values used for calculation are the Real OHLC, we can change this to Heikin Ashi in the menu.
- The strategy enters a position when ADX crosses the threshold level, and closes the position when ADX starts to fall.
- There is a signal filter in the form of a 377 period Hull Moving Average, which the price must be above or bellow for long and short positions respectively.
- The strategy closes the position when a cross-under of the ADX and its 4 period EMA. This is an attempt to stay into positions longer as sometimes the ADX will fall for 1 bar and then keep rising, while the overall trend is strong. The downside to this is that we exit trades later and this affects our max drawdown.
DMI Modified StrategyAs promised a strategy of my DMI Modified indicator! (See link below for indicator).
=== How does it work? ===
Instead of plotting the positive direction of +DI and negative direction for -DI, we subtract the +DI with the -DI on scales of 100 to -100.
The result is plotted with a oscillator to identify the current trend.
DMI Modified supports multiple moving averages (default is EMA with length of 9). You can disable moving averages smoothing in settings.
//== About the Strategy ==
Buys when the line crosses over the Zero line.
Sells when the line crosses under the Zero line.
The DMI modified strategy is pretty much clean, without any filtering besides the DMI Modified and a moving average to smooth it.
Works best to catch a trend and more suitable for 1 hour and above time frame. Stay tuned for updates.
On sideways you will get more false signals. as i said , it's a clean version without much bells and whistles for you to experiment.
== Oscillator Colors ==
GREEN : Strong Up Trend as DMI Modified is above zero line and DMI modified is ascending.
LIGHT GREEN: Still up trend but weakening as DMI modified is above zero but descending.
RED: Strong Downtrend as DMI Modified is below zero line and DMI modified is descending.
LIGHT RED: Still down trending but weakening as DMI modified is below zero but ascending.
== Notes ==
Short is enabled by default.
Bar coloring is disabled by default.
== Links ==
DMI modified indicator:
Like if you like and Enjoy! Follow for more upcoming indicators/strategies: www.tradingview.com
MrBS:Directional Movement Index [Trend Friend]I started this project with the goal of making a DMI/ADX that was easy to read at a glance. Its since become a little more then just colouring the slopes. The majority of the time, the best returns come from trending markets (THE TREND IS YOUR FRIEND... until the end) and I hope this helps people become good friends with the trends.
----- Features
- A function to change the values used for calculation from real OHLC and Heikin Ashi. This allows us to look at different chart types but see the specific ADX we choose. Originally HA values were used for calculation since it is easier to see trend on HA charts. However when testing it was not as effective as the ADX calculated from the real values on normal charts. So the default function was flipped and real OHLC values are used as default.
- Two ADX plots so we can see two different smoothness's. With a smoothing of 2, a slight slow down in PA can cause a negative slope but the smoother ADX will stay trending unless its a major change. 2nd ADX is slightly transparent.
- There is an EMA of the main ADX that can be used as a exit signal filter. If the ADX starts going down but has not crossed the EMA we would stay in a trade.
- Plots (excluding EMA) are coloured based on positive or negative slopes.
- Fibonacci numbers have been used to create different trend levels, instead of the standard 25, 50, 100.
- Alerts for every useful situation to help save time and not have to manually enter levels or crosses each time.
- In the code there are 8 EMAs and 3 ADXs but it was too much so they have been slashed out, but are fully functional if you choose to activate and use them. To reactivate the 3rd ADX delete slashes on lines 50, 65, 78, 92-95, 165. The slashed out EMAs are much more obvious and easy to reactivate.
Colours:
ADX going up = Green
ADX going down = Red
DMI+ going up = Bright Aqua
DMI+ going down = Turquoise / Dark Aqua
DMI- going up = Bright Purple
DMI- going down = Dark Purple
EMA = White (50% transparent)
If there is anything that would be useful, let me know and I will add it in. I've already got some improvements/changes planned and some of my notes can be found in the code.
There is also a strategy to go with this indicator that will be uploaded very soon.
Crypto Directional Movement Index DMI/ADXCrypto ADX + DMI
This indicator is a customised version of the ADX + DMI by J. Welles Wilder in 1978, with default settings optimal for cryptocurrencies.
What is the DMI (ADX) Indicator?
According to Investopedia:
DMI (ADX) consists of three indicators that measure a trend’s strength and direction. Three lines compose the Direction Movement Index (DMI): ADX (black line), DI+ (green line), and DI- (red line). The Average Directional Index (ADX) line shows the strength of the trend. The higher the ADX value, the stronger the trend. The color of the lines can be altered, but black, green, and red are the default in most software.
The Plus Direction Indicator (DI+) and Minus Direction Indicator (DI-) show the current price direction. When the DI+ is above DI-, the current price momentum is up. When the DI- is above DI+, the current price momentum is down.
This Version
The ADX default value has been changed to from 14 to 2 (optimal for cryptocurrencies). The background flashes red when the –DMI goes above the HZ1 threshold and green when the +DMI does the same. There is an option to change it so that it’ll only flash when the ADX and the DMI are both above the threshold. The ADX changes color when above HZ1.
Red and green plotshapes appear at DMI crossovers and three horizontal lines have also been added.
Any suggestions are most welcome
DMI ModifiedThis is a Directional Movement Index (DMI) with a twist, instead of plotting the positive direction of +DI and negative direction for -DI, we subtract the +DI with the -DI on scales of 100 to -100.
The result is plotted with a oscillator to identify the current trend.
DMI Modified supports multiple moving averages (default is JMA with length of 3). You can disable moving averages smoothing in settings.
== About the indicator ==
The Directional Movement Index, or DMI, is an indicator developed by J. Welles Wilder in 1978 that identifies in which direction the price of an asset is moving.
The indicator does this by comparing prior highs and lows and drawing two lines: a positive directional movement line (+DI) and a negative directional movement line (-DI)
In our case we do not draw the two lines, but the result of the subtraction of the two.
== Oscillator Colors ==
GREEN : Asset is above zero line with a strong up trend.
LIGHT GREEN: Asset is above zero line but up trending might be weakening.
RED : Asset is below zero line with a strong downtrend.
LIGHT RED: Asset is below zero line but down trending might be weakening.
== Notes ==
Can also be used to find divergences.
Bar coloring is disabled by default
Like if you like and Enjoy!
There is an idea to make a new strategy combined with DMI Modified (this script) and another script, hench, Follow.
Simple Moving Average + ADX + DMI + Time Range Test
Use long and short moving average to look for a potential price in/out. (default as 14 and 7, bases on the history experience)
ADX and DMI to prevent the small volatility and tangling MA.
This script allows you to set the beginning & end time to test the bullish & bearish market.
If you want an indicator version, here is it.
Thanks.
DMI-ADX HistogramThe Average Direction Index (ADX) coupled with the Direction Movement Index (DMI), developed by J. Welles Wilder, is a popular indicator that measures trend direction and strength.
The AX line (blue) is used to show the strength of the current trend. It does not tell you the trend direction. The under laid histogram shows relative movements of the price with green showing positive momentum and red showing negative momentum. Use these ADX and DMI together to find trend strength and direction.
- ADX line below 20 indicates that the underlying is in accumulation/distribution.
- ADX line above 20 mean that the underlying is trending with over 60 being very strong.
*When the ADX line is below 20 it is likely to see many reversal signals on the DMI Histogram. It is best to use the DMI signals when the ADX line is above 20 or higher. This is also a good level to play around with.
Motivation
Normally the direction movements are plotted as lines with the DI+ being green and the DI- being red. When the DI+ (green) crosses over DI- (red) this may indicate a buy signal, and vice versa. I found this visual representation made it difficult to see signals as well as lacked the ability to easy see the relative strength of other moves.
I have also noticed that the histogram values will periodically cross the ADX line, but not for very long periods. This could be a useful signal to explore further in the future.
In this image the top indicator is using the normal DI+/- lines, where the bottom indicator is using an absolute histogram.
Support and Resistance levels - DMI - DI trailing stop linesThis can be used to compliment the Directional Movement Index if used as a standalone trading system. In addition to using the ADX and DI lines, a trailing stop can be used when the DI lines cross. If the plus line is above to show a buy signal, then the low of the price of when which the cross took place is used as a trailing stop. If the minus line is above to show a sell signal, then the high of the price of when which the cross took place is used as a trailing stop. This helps cut losses sooner whenever the price would end up going through these trailing stops or support/resistance levels yet the DMI system would show an upward or downward move.
[blackcat] L1 Composite RSI-DMI Reversal IndicatorLevel: 1
Background
The Relative Strength Index (RSI) developed by J. Welles Wilder is a pulse oscillator that measures the speed and change of price movements. The RSI hovers between zero and 100. Traditionally, the RSI is considered overbought when it is above 70 and oversold when below 30. Signals can be generated by looking for divergences and error fluctuations. RSI can also be used to identify the general trend.
The Directional Movement Index (DMI) is an indicator developed by J. Welles Wilder in 1978 that indicates the direction in which the price of an asset is moving. The indicator compares previous highs and lows and draws two lines: a positive directional movement line (+ DI) and a negative directional movement line (-DI). An optional third line called Directional Movement (DX) shows the difference between the lines. When + DI is above -DI there is more upward pressure than downward pressure in price. When -DI is above + DI, the price continues to fall. This indicator can help traders estimate the direction of the trend. Crossovers between the lines are also sometimes used as trading signals to buy or sell.
Function
L1 Composite RSI-DMI Reversal Indicator combines J. Welles Wilder's RSI and DMI indicators together to identify trend reversals.
Key Signal
swinglow --> swing signal
trend --> trend signal to identify top reversal
Pros and Cons
Pros:
1. it exhibit leading character
2. it can disclose top and bottom reversals
Cons:
1. noise exists
2. depends on market and trading pairs
Remarks
Composite J. Welles Wilder indicator
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
ADX + DI x Upgraded to Pine v4 x KingThiesAverage Directional Movement Index
Momentum based tool to measure trend strength on scale of 1-100
Similar to the aroon but incorporates a 3rd measure, while aroon uses two
The majority of these calculations were pre-existing in older pine scripts but have since been updated
signals are given when -DI and +DI cross, ADX illustrates corresponding strength at time of cross
Full Intro
ADX can help investors to identify trend strengths, as di - di determines the trend direction, while d - d is an impulse indicator. If the ADX is below 20, it can be considered impulsive, while it is above 25 on a trend line.
A trading signal can be generated when the di - DI line is switched to d - d and vice versa. If the di-line crosses and the ADX is above 20 (ideally 25), a potential buy signal could ebb away.
If the ADX is above 20, there is the possibility of potential short selling if the DI crosses over DI. You can also use crosses to get out of the current deal if you need it for a long time.
If the di-line is crossed and the Adx is below 20 (or 25), there may be opportunities to enter the potential for short trading, but only if di are above or below DI or if the price is trendy and may not prove to be the ideal time to start trading.