TDR (Trend Direction & Risk) Indicator

The TDR (Trend Direction & Risk) Indicator combines two of my previous indicators into one. TDR helps to visually identify price trends and also measures the risk of entering a position during that trend. This indicator is a combination of Ichimoku cloud techniques, particularly the Kijun-Sen and the percentage price oscillator (PPO) to measure a risk score.
Using the TDR Indicator
There are two main indicator lines, the blue line represents a moving average which can act as support or resistance and the orange and red line is called the trend base. When price crosses the trend base and the moving average also crosses then a change in trend direction is confirmed. This is confirmed with either a Buy or Sell signal.
In between these signals there are also Dollar Cost Average and Take Profit signals based on the current trend direction. Each of these signals gives a warning, indicated with an x above or below the candle accompanied with a b for (buy) or an (s) for sell. The next candle will display a small triangle as confirmation of this signal. These signals are based on a cross of the Advance Signal Price which is show at the current price candle.
The future base level can be set to show a larger macro trend than the current timeframe. An example of this is the 3 day timeframe which I use to determine if Bitcoin is in either a bull or bear market.
The Dollar Cost Average and Take Profit signals recommend to buy or remove a percentage of your position at these points. This percentage is completely down to personal preference.
Risk & Information Box
At the bottom right of the chart there is an information box which contains some Information. It shows the current recommended position based on the signals mentioned above. It also shows a risk score which ranges from -100 to 100. This can be used in combination with the signals and trend above for additional entry points. There are three levels, Low, Neutral and High. Buying a percentage of a position at a low risk level and selling a percentage of a position at a high risk level in combination with the trend signals is recommended.
S/R and Base Percentage
These boxes show the price percentage distance from the blue S/R line and the Trend Base Line. These larger these percentages the more likely a snap back in price towards these lines is likely. In my testing once these get above 20% or -20% the chance the price will move back towards those lines is more likely.
Users who have access to my other scripts will be given access to this one and those old ones will no longer me maintained or updated.
Overview:
The TDR (Trend Direction & Risk) indicator is a comprehensive trend, risk, and trade management tool designed for active traders and portfolio managers. It combines advanced trend detection, dynamic risk zoning, and allocation-based trade simulation to help you identify optimal entry and exit points, manage risk, and track performance.
Key Features
Trend Detection:
Utilizes Donchian channel baselines and EMAs to identify trend direction and key support/resistance levels.
Main Baseline: User-configurable Donchian average (default 50).
Short Baseline: User-configurable Donchian average (default 26).
EMA S/R: 21-period EMA for dynamic support/resistance.
Risk Engine:
Choose between two risk models:
TDV Extremes: Detects high/low risk zones using rolling Donchian distance and hit counting.
Classic: Uses PPO (Percentage Price Oscillator) percent rank for momentum-based risk assessment.
Visual risk zones and buffer settings help you avoid trades in dangerous conditions.
Signal Generation:
Full Entry (Buy): Fires on confirmed EMA/baseline crossovers with trend and risk filters.
Pre-Entry (DCA): Allows partial allocation before a full entry, based on short-term baseline crossovers in value zones.
Take Profit (TP): Partial exits triggered by short-term weakness within an uptrend.
Full Exit (Sell): Closes remaining allocation on confirmed trend reversal or risk triggers.
High/Low Risk Zone Actions: Special logic for entering/exiting in extreme risk zones.
Trade Simulation & Allocation:
Simulates real-world allocation: pre-entries, full entries, partial TPs, and full exits.
Allocation caps and per-trade limits prevent overexposure.
Tracks average entry/exit prices, PnL, and trade statistics.
Exit Suppression:
Prevents premature exits when EMA, baseline, or price are rising, reducing whipsaws.
Performance Tracking:
Built-in tables for portfolio value, returns, Sharpe ratio, drawdown, win rates, and more.
Buy & Hold comparison and annualized return calculations.
Customizable Settings:
Adjustable baseline lengths, EMA length, risk thresholds, allocation sizes, and more.
Date range filtering for backtesting specific periods.
Visual options for displaying tables, risk zones, and key levels.
How to Use
Configure Baselines and Risk Engine:
Set your preferred baseline lengths and risk engine (TDV Extremes or Classic).
Adjust risk thresholds and buffer as needed for your asset/timeframe.
Set Allocation and Trade Management:
Define pre-entry, TP, and high/low risk allocation percentages.
Set maximum pre-entries and TPs per trade.
Monitor Signals and Zones:
Watch for buy/sell/pre-entry/TP signals on the chart.
Use risk zone markers to avoid trading in dangerous conditions.
Review Performance:
Analyze the built-in tables for trade stats, returns, and risk metrics.
Compare strategy performance to Buy & Hold.
Visuals
Baselines:
Main Baseline (color-coded by trend)
Short Baseline (purple)
EMA S/R (blue)
Future Baseline (orange, higher timeframe)
Risk Zones:
Green/red dots for low/high risk bars
Trade Markers:
Labels for pre-entries, full entries, TPs, and exits
Tables:
Portfolio, returns, entry/exit, trade stats, and market condition
Скрипт с ограниченным доступом
Только пользователи, одобренные автором, могут получить доступ к этому скрипту. Вам нужно отправить запрос и получить разрешение на его использование. Обычно доступ предоставляется после оплаты. Для получения подробной информации следуйте инструкциям автора ниже или свяжитесь с Cryptodontrading напрямую.
TradingView НЕ рекомендует платить за скрипт или использовать его, если вы не доверяете его автору и не понимаете, как скрипт работает. Вы всегда можете найти бесплатные скрипты с открытым исходным кодом в Скриптах сообщества.
Инструкции от автора
Внимание: перед тем как запрашивать доступ, прочитайте наши правила для скриптов с ограниченным доступом.
Check out the TDR & TDV Indicators for long term trades - cryptodontrading.com/cd-indicators
Отказ от ответственности
Скрипт с ограниченным доступом
Только пользователи, одобренные автором, могут получить доступ к этому скрипту. Вам нужно отправить запрос и получить разрешение на его использование. Обычно доступ предоставляется после оплаты. Для получения подробной информации следуйте инструкциям автора ниже или свяжитесь с Cryptodontrading напрямую.
TradingView НЕ рекомендует платить за скрипт или использовать его, если вы не доверяете его автору и не понимаете, как скрипт работает. Вы всегда можете найти бесплатные скрипты с открытым исходным кодом в Скриптах сообщества.
Инструкции от автора
Внимание: перед тем как запрашивать доступ, прочитайте наши правила для скриптов с ограниченным доступом.
Check out the TDR & TDV Indicators for long term trades - cryptodontrading.com/cd-indicators