Job's Tears - V6This strategy is based on Heikin Ashi + supertrend + DMI + RSI .
Fully functional with placing a new order, taking partial profit at the target price, taking partial profit when hit the take profit, and closing an order.
I wrote this strategy mostly in 5min timeframe.
The commission is default at 0.02% and slippage is 1.
InitCapital is 100 USD, place every new order with 20 USD, close 10 USD when hitting the target price and close 2 USD for every take profits.
No leverage is applied.
I use Heikin Ashi candle patterns to identify the buy/sell signal and supertrend to back my signal. Then I use dmi and rsi to filter out the noises.
My target is to catch a big trend, so I use a lot of take profits to maximize the potential profit.
New Short/New Long: Place a market order for a new position of 20 USD.
Target Price: Place a limited order of 10 USD at that price as soon as a new position is ordered as a basic profit in the pocket.
Take Profit: Place a market order to reduce the position by 2 USD each time.
TaoBao: Place a market order to close all remaining positions. It will only show up after hitting the target price as a way to protect our capital.
Close Short/Long: Place a market order to close all remaining positions.
Directional Movement Index (DMI)
Ichimoku Cloud and ADX with Trailing Stop Loss (by Coinrule)The Ichimoku Cloud is a collection of technical indicators that show support and resistance levels, as well as momentum and trend direction. It does this by taking multiple averages and plotting them on a chart. It also uses these figures to compute a “cloud” that attempts to forecast where the price may find support or resistance in the future.
The Ichimoku Cloud was developed by Goichi Hosoda, a Japanese journalist, and published in the late 1960s. It provides more data points than the standard candlestick chart. While it seems complicated at first glance, those familiar with how to read the charts often find it easy to understand with well-defined trading signals.
The Ichimoku Cloud is composed of five lines or calculations, two of which comprise a cloud where the difference between the two lines is shaded in.
The lines include a nine-period average, a 26-period average, an average of those two averages, a 52-period average, and a lagging closing price line.
The cloud is a key part of the indicator. When the price is below the cloud, the trend is down. When the price is above the cloud, the trend is up.
The above trend signals are strengthened if the cloud is moving in the same direction as the price. For example, during an uptrend, the top of the cloud is moving up, or during a downtrend, the bottom of the cloud is moving down.
DMI is simple to interpret. When +DI > - DI, it means the price is trending up. On the other hand, when -DI > +DI , the trend is weak or moving on the downside. The ADX does not give an indication about the direction but about the strength of the trend.
Typically values of ADX above 25 mean that the trend is steeply moving up or down, based on the -DI and +D positioning. This script aims to capture swings in the DMI, and thus, in the trend of the asset, using a contrarian approach.
Trading on high values of ADX, the strategy tries to spot extremely oversold and overbought conditions. Values of ADX above 45 may suggest that the trend has overextended and is may be about to reverse.
This strategy combines the Ichimoku Cloud with the ADX indicator to better enter trades.
Long orders are placed when these basic signals are triggered.
Long Position:
Tenkan-Sen is above the Kijun-Sen
Chikou-Span is above the close of 26 bars ago
Close is above the Kumo Cloud
MACD line crosses over the signal line
-DI is greater than +DI
ADX is greater than 45
Close Position:
3% increase trailing
3% decrease trailing
The script is backtested from 1 January 2018 and provides good returns.
The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
This script also works well on MATIC (1d timeframe), ETH (1d timeframe), and SOL (1d timeframe).
Gators Oscillator - Bitcoin Scalp Trader(T&M/e V3!!)Gator's Oscillator:
**For reference, all numbers, and settings displayed on the input screen are only what I HAVE FOUND to be profitable for my own strategy, Yours will differ. This is not financial advice and I am not a financial advisor. Please do your due diligence and own research before considering taking entries based on this strategy and indicator. I am not advertising investing, trading, or skills untaught, this is simply to help incorporate into your own strategy and improve your trading journey!**
INPUTS:
EV: This is an integer value set to default at 55. This value is equated to the lead value, volatility measurement, and standard deviation between averages
EV 2: This integer is used as the base value and is meant to always be GREATER THEN EV, the default is set at 163. There should be at least a 90+ integer difference between EVs for data accuracy.
EV TYPE & EV TYPE 2: This option only affects the output for the moving average histograms. (and data inserted for strategy)
Volatility Smoothing: This is the smoothness of the custom-made volatility oscillator. I have this default at 1 to show time-worthy-term (3.9%+) moves or significant trends to correspond with the standard deviation declination between EVMA and EVMA2.
Directional Length: This is the amount of data observed per candle in the bull versus bear indicator.
Take Profit: Pre-set takes profit level that is set to 4 but can be adjusted for user experience.
Style:
Base Length: Columns equated using a custom-made statistical equation derived from EV TYPE 2+EV2 to determine a range of differential in historic averages to a micro-scale.
Lead Length: Columns equated using a custom-made statistical equation derived from EV TYPE+EV to determine a range of differential in historic averages to a micro-scale.
Weighted EMA Differential: Equation expressing the differences between exponential and simple averages derived from EV+EV Type 2. Default is displaying none, but optional for use if found helpful.
Volatility: Represents volatility from multiple data sets spanning from Bollinger bands to HPV and translated through smoothing.
Bull Strength: The strength of Bulls in the current trend is derived from a DMI+RSI+MACD equation to represent where the trend lies.
Bear Strength: The strength of Bears in the current trend is derived from a DMI+RSI+MACD equation to represent where the trend lies.
(NEW) Standard Deviation between Moving Averages: Use this logarithmic indicator depicted as circles to help determine whether a move is a fake out or not. Compare the circles with the volatility line, if you see them deviating away, it is either a bull/bear trap or trend continuation is imminent until they correlate back together.
CHEAT CODE'S NOTES:
Do not use this indicator on high leverage. I have personally used this indicator for a week and faced a max of 8% drawdown, albeit painful I was on low leverage and still closed on my take profit level.
85% is not 100% do not overtrade using this indicator's entry conditions if you have made 4 consecutive profitable trades.
Mess around with the input values and let me know if you find an even BETTER hit rate, 30+ entries, and a good drawdown!!
V2 UPGRADES:
*Increased Opacity on Bull Bear Columns
*Removed the Stop Loss Input option
*Decreased EV2 to a default of 143 for accuracy
*Added additional disclaimers in the description
* Removed Bull/Bear offset values for accuracy
V3 UPGRADES:
*ADDED THE EMA DIFFERENTIAL FROM SMA STANDARD DEVIATION INDICATOR. REPRESENTED BY PURPLE BARS THAT PLOT BRIGHT AT EXTREME LEVELS (Translate this to the EMA's and SMA's are very far apart) This is a fantastic way to resolve volatility and momentum in one indicator!!
*Line Width increased for volatility
*plot's for Oversold Alma reduced to 3, also adjusted the plot shape to arrows corresponding to 'overbought/oversold values. Look for a cross-over from green/red plot to transparent for best signals.
*Histograms for bull/bear strength correspond to an increase or decrease in value
*Input screen converted into groups, with bull/bear color inline
*Converted base/lead length value's into areas with breaks. IF YOU SEE WHITE (Short/Lead Length), IT IS A SHORT TERM MOVE AND SCALPING OPPORTUNITY. IF YOU SEE BLUE(Long/Base Length) IT MEANS IT IS A MACRO MOVE, WHICH MAY LAST LONGER
-Cheat Code
BINANCE:BTCUSDT BYBIT:BTCUSDT COINBASE:BTCUSD
Inverse MACD + DMI Scalping with Volatility Stop (By Coinrule)This script is focused on shorting during downtrends and utilises two strength based indicators to provide confluence that the start of a short-term downtrend has occurred - catching the opportunity as soon as possible.
This script can work well on coins you are planning to hodl for long-term and works especially well whilst using an automated bot that can execute your trades for you. It allows you to hedge your investment by allocating a % of your coins to trade with, whilst not risking your entire holding. This mitigates unrealised losses from hodling as it provides additional cash from the profits made. You can then choose to hodl this cash, or use it to reinvest when the market reaches attractive buying levels.
Alternatively, you can use this when trading contracts on futures markets where there is no need to already own the underlying asset prior to shorting it.
ENTRY
The trading system uses the Momentum Average Convergence Divergence (MACD) indicator and the Directional Movement Index (DMI) indicator to confirm when the best time is for selling. Combining these two indicators prevents trading during uptrends and reduces the likelihood of getting stuck in a market with low volatility.
The MACD is a trend following momentum indicator and provides identification of short-term trend direction. In this variation it utilises the 12-period as the fast and 26-period as the slow length EMAs, with signal smoothing set at 9.
The DMI indicates what way price is trending and compares prior lows and highs with two lines drawn between each - the positive directional movement line (+DI) and the negative directional movement line (-DI). The trend can be interpreted by comparing the two lines and what line is greater. When the negative DMI is greater than the positive DMI, there are more chances that the asset is trading in a sustained downtrend, and vice versa.
The system will enter trades when two conditions are met:
1) The MACD histogram turns bearish.
2) When the negative DMI is greater than the positive DMI.
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:
Take-Profit Exit: +8% price decrease from entry price.
OR
Stop-Loss Exit: Price crosses above the volatility stop.
In general, this approach suits medium to long term strategies. The backtesting for this strategy begins on 1 April 2022 to 18 July 2022 in order to demonstrate its results in a bear market. Back testing it further from the beginning of 2022 onwards further also produces good returns.
Pairs that produce very strong results include SOLUSDT on the 45m timeframe, MATICUSDT on the 2h timeframe, and AVAUSDT on the 1h timeframe. Generally, the back testing suggests that it works best on the 45m/1h timeframe across most pairs.
A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
Sideways Strategy DMI + Bollinger Bands (by Coinrule)Markets don’t always trade in a clear direction. At a closer look, most of the time, they move sideways. Relying on trend-following strategies all the time can thus lead to repeated false signals in such conditions.
However, before you can safely trade sideways, you have to identify the most suitable market conditions.
The main features of such strategies are:
Short-term trades, with quick entries and quick exits
Slightly contrarian and mean-reversionary
Require some indicator that tells you it’s a sideways market
This Sideways DMI + Bollinger Bands strategy incorporates such features to bring you a profitable alternative when the regular trend-following systems stop working.
ENTRY
1. The trading system requires confirmation for a sideways market from the Directional Movement Index (DMI) before you can start opening any trades. For this purpose, the strategy uses the absolute difference between positive and negative DMI, which must be lower than 20.
2. To pick the right moment to buy, the strategy looks at the Bollinger Bands (BB). It enters the trade when the price crosses over the lower BB.
EXIT
The strategy then exits when the move has been exhausted. Generally, in sideways markets, the price should revert lower. The position is closed when the price crosses back down below the upper BB.
The best time frame for this strategy based on our backtest is the 1-hr. Shorter timeframes can also work well on certain coins that are more volatile and trade sideways more often. However, as expected, these exhibit larger volatility in their returns. In general, this approach suits medium timeframes. 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.
Relative Strength Index - MayurRSI backtesting long only portfolio builder.
only for investing at cheap valuations
ADX+BB %B+AO+EMA Strategy [PineMyths] #2Indicator List
ADX (14,14)
Bollinger Bands %B (20,close,2)
Awesome Oscillator
EMA(5), EMA(21), EMA(50), EMA(200)
Strategy Rules and Conditions
LONG Side
EMA(5) > EMA(21)
EMA(50) > EMA(200)
BB %B > 0.75
ADX > 15
Awesome Oscillator > 2
SHORT Side
EMA(5) < EMA(21)
EMA(50) < EMA(200)
BB %B < 0.25
ADX > 15
Awesome Oscillator < -2
Stop: Fixed %2
Take Profit: Fixed %1
The MACDMI T/SLThis is a combined MACD and DMI strategy script with multiple options for targets and stoploss.
Stoploss and targets sizes are ATR based calculations.
Each of these contains a sets an initial ATR based that will close the entire position if hit. From there, differences between them are as follows:
Trailing stop - immediately begins trailing stoploss from your entry. Entire position is closed when hit.
Single Target - closes entire position once target is hit
T1 + Trail - closes half of the position when first target is hit and then begins trailing stop on the remaining position.
T1 + Trail/T2 + Trail - closes a third of the position at T1 and begins trailing a stop on the rest. Will close another third at T2, continue the trailing stop, and close the final third when the stop is hit.
DMI (Multi timeframe) DI Strategy [KL]Directional Movement Index Strategy
Entry conditions:
- (a) when DI+ > DI- on timeframe #1, and
- (b) Confirmation: when DI+ > DI- on timeframe #2
In the shown example, timeframe1 was same as the chart (1H) and timeframe2 was 1D.
Stop Loss: ATR based trailing stop
About DMI
Can refer to Investopedia for general understanding.
Applications of DMI in this strategy:
- Assumes uptrend when DI+ is above DI- (when green DI+ lines above red DI-), vice versa for downtrend. This is checked in two different timeframes that can be set by user in settings.
- DX is ignored, it doesn't give a direction of the trend. But if DX was applied, it would be a good indicator for quantifying the strength of uptrend/downtrend. This measurement would typically be read along a threshold (i.e. if below 20, then market is likely consolidating). All of these have been commented out (ignored by pinescript's interpreter via //) in the codes, as said; we are not using DX for sake of simplicity.
Visualizations
To make the chart look cleaner, DMI plots have been simplified to just down/up arrows placed at bottom of the chart.
Referring to the example chart:
- Green arrows : when DI+ > DI- for both timeframes, implies uptrend
- Red arrows: other way around (DI+ < DI-), implies downtrend
CryptoNite - Machine Learning Strategy (15Min Timeframe)Greeting Traders! I am back with another ML strategy. :D I kept my word with combining my machine learning algorithms from Python and integrating them into Tradingview. Thanks to Tradingview's new release of Pinescript v5 it is now possible. This strategy respects the Sortino Ratio and was created using 2 years of data for 50 different cryptocurrencies. That is a total of 100 years of data and 44,849 trades to create this strategy. Now let me tell you, my computer and I are exhausted. We both been at it non-stop for about two months everyday. I refine the strategy, and the computer runs 24/7 for a few days to spit out the best results into the terminal. It's been a good run so my computer will finally get some sleep tonight.
So let's talk a little about the features of the strategy. In the settings window, you'll see the Stoploss, Take Profit Parameters, and Date Range. You can change the Date Range, but I recommend to leave the SL/TP parameters how they are because the machine learning algo chose those input. If you wish to change them you are always welcome to do so but backtest results will change. For the Take Profit parameters you'll see on the left side you something labeled time duration(displayed in minutes) and on the right side you'll see take profit values. Let's talk a little bit how they work.
TP_values = {
"0": 0.102,
"133": 0.051,
"431": 0.039,
"963": 0
}
In python, the table looks like this but it is quite easy to understand in Tradingview.
From 0-133 minutes, the strategy is looking to the reach target point 1 at 10.2% profit.
From 133-431 minutes, the strategy is looking to the reach target point 2 at 5.1% profit.
From 431-963 minutes, the strategy is looking to the reach target point 3 at 3.9% profit.
From 963+ minutes, the strategy is looking to break even at 0% profit on target point 4.
Through each target point a sell trigger is active. It will look for the best time to sell even if TP has not been reached.
This helps the trade not stay open too long.
The last thing I need to mention is the textbox displayed on the right side of your chart. This textbox displays the current Take Profit value in dollar amount. So when you're in a trade you'll know what TP target has to be reached when the open trade is active. Throughout time, the target price changes depending how long the trade has been open. If you have any questions feel free to comment down below, and enjoy this strategy!
DMI Swings (by Coinrule)The Directional Movement Index is a handy indicator that helps catch the direction in which the price of an asset is moving. It compares the prior highs and lows to draw three lines:
Positive directional line (+DI)
Negative directional line (-DI)
Average direction index (ADX)
DMI is simple to interpret. When +DI > - DI, it means the price is trending up. On the other hand, when -DI > +DI, the trend is weak or moving on the downside.
The ADX does not give an indication about the direction but about the strength of the trend.
Typically values of ADX above 25 mean that the trend is steeply moving up or down, based on the -DI and +D positioning. This script aims to capture swings in the DMI, and thus, in the trend of the asset, using a contrarian approach.
ENTRY
-DI is greater than +DI
ADX is greater than 45
EXIT
+DI is greater than -DI
ADX is greater than 45
Trading on high values of ADX, the strategy tries to spot extremely oversold and overbought conditions. Values of ADX above 45 may suggest that the trend has overextended and is may be about to reverse.
Our backtests suggest that this script performs well for very short-term scalping strategies on low time frames, such as the 1-minute.
The script considers a 0.1% trading fee to make results more realistic to those you can expect from live market conditions. So realistically, live results should be similar to backtested results.
You can plug this script directly into your crypto exchange using TradingView Signals on Coinrule.
Trade Safely!
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.
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
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.
ADX | DMI Trend StrategyThis strategy takes the ADX Indicator I wrote and applies it to a strategy for back testing purposes.
I've also applied a date filter so you can back test specific date ranges and a moving average filter so you can choose whether to filter your longs/shorts based on a moving average.
Ichimoku Cloud & ADX & DMI & MACD [tg1]Hi There! Sharing my strategy that is mainly build on Ichimoku Kinko Hyo and its Tenkan and Kijun crosses.
In addition, I added a few other indicators to have less false breakout signals. See more details below:
Long conditions :
1) Tenkan crosses over Kijun
2) Tenkan & Kijun > Kumo
3) Close > Kumo
4) Chikou > Kumo (-n periods)
5) ADX > Custom value
6) DI+ > DI-
7) MACD > Signal
8) SMA > 200
Short conditions are simply the other way around. This indicator has been mainly tested and tuned for BTCUSDT.
E-Z Hai Cloud v0.01Very Early version of a new script I am working on. Currently setup for one hour but I want it to work well on multiple time frames.
Options for ADX aren't working atm.
Wanting to add take profits and stop losses in the future, as well as the ability for the script to check multiple time frames so it knows to hodl or dump.
Please let me know if you run into any issues.
Contender 2
Directional movement indicator for assessing price direction and strength. DMI tells you when to be long or short, differentiating between strong &weak trends. DMI works on all time frames and applicable to any asset.
DMI is a moving average of range expansion over an input period. The positive directional movement indicator ( +DMI ) measures how strongly price moves upward; the negative directional movement indicator ( -DMI ) measures how strongly price moves downward. The two lines reflect the respective strength of the bulls versus the bears. Which DMI lines is on top is the dominant DMI. The dominant DMI is stronger and more likely to predict the direction of price. For the buyers and sellers to change dominance, the lines must cross over.
Added feature is Bollinger Bands to moderate signals.
Contender 1Directional movement indicator for assessing price direction and strength. DMI tells you when to be long or short, differentiating between strong &weak trends. DMI works on all time frames and applicable to any asset.
DMI is a moving average of range expansion over an input period. The positive directional movement indicator ( +DMI ) measures how strongly price moves upward; the negative directional movement indicator ( -DMI ) measures how strongly price moves downward. The two lines reflect the respective strength of the bulls versus the bears. Which DMI lines is on top is the dominant DMI. The dominant DMI is stronger and more likely to predict the direction of price. For the buyers and sellers to change dominance, the lines must cross over.
Added feature is Bollinger Bands to moderate signals.
DMI strategy(lirshah)The Directional Movement Index indicator, or DMI, is a trend trading indicator developed by Welles Wilder, which also invented one of the most popular overbought and oversold indicator " RSI indicator".
DMI is based on a scale from 0 to 100 that identifies the price direction and the strength of the trend.
The DMI indicator is composed of three lines:
ADX, which is non-directional, so it will quantify the strength of the trend regardless if it’s bullish or bearish.The ADX line is derived from the relationship of the DMI+ and DMI- lines
DMI+, which measures the strength of the upward price movement.
DMI-, which measures the strength of the downward price movement.
this strategy gives signals according to movements of these three lines and has the best result on xrpusd M15 chart.
EmaCross + Adx Strategylong = ema fast > ema slow, dmi+ > dmi- , dmi+ > 20, adx > 20
short = opposite of the first 3
Cheers!