logo
TradeSearcher

Dynamic Stop Loss Demo

Script from: TradingView

Swing

Trend following

Momentum

Volatility

This Pine Script tutorial demonstrates a Dynamic Stop Loss strategy that utilizes indicators like RSI for making trading decisions. Unlike traditional trailing stops, it conditions partial take-profits and full exits based on multiple factors, including ATR for dynamic stops. The script allows custom parameters, offers bug fixes, and improvements like optimized stop calculation and simplified quantity settings.

Mantle (MNTUSD)

+ Dynamic Stop Loss Demo

@ 4 h

1.68

Risk Reward

12.04 %

Total ROI

20

Total Trades

WIF / TetherUS (WIFUSDT)

+ Dynamic Stop Loss Demo

@ Daily

1.30

Risk Reward

41.64 %

Total ROI

18

Total Trades

Crypto.com Coin / United States Dollar (CROUSD)

+ Dynamic Stop Loss Demo

@ 5 min

1.28

Risk Reward

7.04 %

Total ROI

65

Total Trades

SciSparc Ltd. (SPRC)

+ Dynamic Stop Loss Demo

@ 2 h

1.70

Risk Reward

32.61 %

Total ROI

28

Total Trades

Newmont Corporation (NEM)

+ Dynamic Stop Loss Demo

@ 4 h

1.41

Risk Reward

134.69 %

Total ROI

268

Total Trades

Premium users only

Premium users can access all backtests with a Risk/Reward Ratio > 3

@ Daily

20.66

Risk Reward

473.28 %

Total ROI

18

Total Trades

Premium users only

Premium users can access all backtests with a Risk/Reward Ratio > 3

@ 1 h

13.90

Risk Reward

148.90 %

Total ROI

17

Total Trades

DISH Network Corporation (DISH)

+ Dynamic Stop Loss Demo

@ 2 h

1.29

Risk Reward

102.77 %

Total ROI

513

Total Trades

Alpine Immune Sciences, Inc. (ALPN)

+ Dynamic Stop Loss Demo

@ 2 h

1.29

Risk Reward

163.59 %

Total ROI

358

Total Trades
Create your account for free to see all 81+ backtests

Access filters, details, best timeframes, explore 100K+ backtests and more

Active Trades

Create your account  to see on which symbols Dynamic Stop Loss Demo is currently trading on.

Popular TradingView Strategies

Find the best trading strategy for your trading styte

Guide

How does the Dynamic Stop Loss Demo strategy work ?

The Dynamic Stop Loss Demo strategy utilizes a sophisticated approach to position management. Unlike a traditional trailing stop-loss which is based solely on maintaining a defined distance from the current price level, this strategy employs a dynamic element that adapts to market conditions. In particular, it utilizes the relative strength index (RSI) to determine optimal entry points, with buy signals on RSI crossovers and sell signals on crossunders.

When a trade is executed, the strategy calculates a stop price using a combination of the lowest low or highest high over a specific look-back period. Additionally, it sets a profit target based on a predefined risk-reward ratio, taking partial profits at a calculated level. This partial profit-taking removes 50% of the position upon reaching a defined first profit price.

The dynamic aspect comes into play when adjusting the remaining position. Using Average True Range (ATR), the strategy calculates a dynamic stop level, providing flexibility to secure profits in volatile markets. The remaining position is closed if the price reaches the initial stop price, returns to the open price, or if an opposite trade signal emerges, ensuring a structured exit strategy.

Recent updates to the script include a more compact code structure, a bug fix related to quantity calculations, and refined dynamic stop-loss computation methods for improved strategy optimization.

How to use the Dynamic Stop Loss Demo strategy ?

This trading strategy utilizes RSI to determine entry points, with entries made when RSI crosses over the oversold level for long positions and crosses under the overbought level for short positions. It applies an ATR-based dynamic trailing stop to manage risk and uses a reward-to-risk ratio to set take profit levels.

To trade this strategy manually on TradingView:

  • Set up RSI with a length of 14, oversold level at 30, and overbought level at 70.
  • Use the ATR indicator multiplied by 2 for the dynamic stop-loss calculation. The ATR length should be set to 14, the same as the back test length in the script.
  • Calculate the highest and lowest prices over the past 14 bars for stop placement on short and long entries respectively.
  • Enter a long position when RSI crosses above 30 (oversold), with the stop loss at the 14-bar low and take profit at 1.5 times the risk (entry price minus stop loss).
  • Enter a short position when RSI crosses below 70 (overbought), with the stop loss at the 14-bar high and take profit at 1.5 times the risk (stop loss minus entry price).
  • Adjust positions with a dynamic stop loss based on the current ATR value: if the price moves in your favor, trail the stop loss to maximize profits. For long positions, increase the stop loss only if the new calculation is higher than the previous; for short positions, decrease it only if the new calculation is lower.
  • Exit the trade if the price hits the dynamically adjusted stop loss, or at the static take profit level, whichever occurs first.

How to optimize the Dynamic Stop Loss Demo trading strategy ?

To enhance the "Dynamic Stop Loss Demo" strategy for manual trading on TradingView, consider the following plan:

  • Optimize Entry Conditions: Using RSI for entries is a solid starting point. However, consider validating these entry points with additional indicators such as the Moving Average Convergence Divergence (MACD) for trend confirmation or volume indicators such as On-Balance Volume (OBV) to ensure entries are backed by market momentum.
  • Fine-tuning the Dynamic Stop Loss: The ATR-based stop loss is dynamic and adjusts to market volatility. To further improve this, add a filter to account for market structure, such as recent support and resistance levels, so the dynamic stop does not result in a premature exit from a potentially profitable trend.
  • Implement Partial Profit Taking: While the script considers a 1.5 risk-reward ratio for taking profit, you can manually scale out of your trades. Take partial profits at key psychological levels or at pivot points to capture gains progressively while still allowing a portion of your position to capture extended trends.
  • Use Price Action for Complemented Decision Making: Incorporate classic price action signals—such as bullish or bearish candlestick patterns near entry points—to add a qualitative assessment to your trading decisions. This can improve the robustness of both entries and exits.
  • Adjusting Trading Times: Manually monitor market sessions to identify the most volatile and liquid times to trade. This enhancement can help avoid periods of low volatility where the ATR dynamic stop might not adequately reflect market conditions.
  • Regular Backtesting: Always backtest new modifications on historical data for a variety of market conditions. Manually review trades that would have been entered, managed, and exited with the adjusted strategy to refine your approach continuously.
  • Adding a Break-even Feature: Once a trade has moved significantly in favor, manually adjust the stop loss to the break-even point. This step secures your position from turning into a loss and lets profits run with reduced risk.
  • Diversify Currency Pairs: Apply the strategy across different currency pairs or asset classes to determine its effectiveness in various market conditions. This diversification can uncover strengths and weaknesses specific to certain assets, allowing for specialized strategy adjustments.
  • Monitoring Economic Releases: Manually track economic news releases that could impact your trades. Large price shifts caused by news events may warrant temporary strategy suspension or altered risk management measures.

For which kind of traders is the Dynamic Stop Loss Demo strategy suitable ?

This strategy is tailored for traders who are comfortable with technical analysis and programming in Pine Script. It's particularly well-suited for:

  • Intraday and Swing Traders: The dynamic stop-loss mechanism based on the ATR makes it versatile for those who trade on shorter time frames, seeking to capture quick market moves, as well as for swing traders looking for larger trends.
  • Active Market Participants: Given the reliance on RSI crossovers for entries, this strategy fits traders who are active in the markets and able to respond swiftly to signals.
  • Risk-Conscious Traders: The use of dynamic stop losses and a fixed risk-reward ratio appeals to traders who prioritize risk management over aggressive speculative gains.
  • Programmer Traders: Those with a programming background can customize the strategy further to their specific needs, making it ideal for tech-savvy market participants.

This style necessitates a mixture of analytical rigor and a proactive trading approach, making it most effective for individuals who can dedicate the time to monitor and adjust their positions as needed.

Key Takeaways of Dynamic Stop Loss Demo

  • Strategy Profile: Designed for technically adept traders proficient in Pine Script, suitable for intraday and swing trading.
  • Working Mechanism: Employs RSI for trade entries and ATR-based dynamic stops for exits, favoring precise risk management.
  • Usage: Can be automated on TradingView, enhanced with manual tactics or a combination of both for active engagement.
  • Improvement Approach: Include additional indicators, optimize entry points, use market structure for stop loss, take incremental profits, and incorporate price action signals.
  • Risk Management: Implement break-even adjustments, diversify across various instruments, and be mindful of economic news impacts.

An optimal mix of automated signals and hands-on trading can lead to a robust strategy. Customization and continuous backtesting cater to the active trader’s need for adaptability in fast-changing markets.

Explore the best Trading & TradingView strategies

Stop trading blindly. Explore the best strategies among 100K+ backtests and improve your trading skills with data.


logo

Trusted by more than 3200+ traders

Explore

Crypto

Forex

Bitcoin

AI Strategies

Day Trading

Swing Trading

Trading is a risky activity and the majority of traders lose money. This website and the products and services offered by TradeSearcher are for informational & educational purposes only. TradeSearcher does not guarantee the accuracy, relevance, timeliness, or completeness of any information on its website.

All Trading Strategies displayed on this website are simulated backtests and does not represent actual trading results. Past backtests results do not predict or guarantee future performance.

TradeSearcher uses public snapshot data sourced from third-party tools, including TradingView. While we strive to present accurate and timely information, TradeSearcher does not have control over these third-party tools and cannot verify, guarantee, or be held responsible for the accuracy or completeness of data sourced from them. Users acknowledge and agree that TradeSearcher is not affiliated with, endorsed by, or sponsored by TradingView or any other third-party data provider. Any reliance on data or tools sourced from third parties is at the user's own risk.

Backtests and Charts used on this site are by TradingView in which our backtests are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com.

Users of TradeSearcher are responsible for conducting their own due diligence and making their own investment decisions. Before making any investment, it is recommended that users consult with a qualified professional to ensure that the strategy or investment is suitable for their individual circumstances.

TradeSearcher and its affiliates, employees, agents, and licensors will not be held liable for any decisions made based on the information provided on the website or any damages or losses that may arise directly or indirectly from the use of the website or the information contained therein.

This does not represent our full Disclaimer. Please read our Full Disclaimer before using this site.

© 2023 TradeSearcher. All rights reserved.