[COG] Adaptive Squeeze Intensity 📊 Adaptive Squeeze Intensity (ASI) Indicator
🎯 Overview
The Adaptive Squeeze Intensity (ASI) indicator is an advanced technical analysis tool that combines the power of volatility compression analysis with momentum, volume, and trend confirmation to identify high-probability trading opportunities. It quantifies the degree of price compression using a sophisticated scoring system and provides clear entry signals for both long and short positions.
⭐ Key Features
- 📈 Comprehensive squeeze intensity scoring system (0-100)
- 📏 Multiple Keltner Channel compression zones
- 📊 Volume analysis integration
- 🎯 EMA-based trend confirmation
- 🎨 Proximity-based entry validation
- 📱 Visual status monitoring
- 🎨 Customizable color schemes
- ⚡ Clear entry signals with directional indicators
🔧 Components
1. 📐 Squeeze Intensity Score (0-100)
The indicator calculates a total squeeze intensity score based on four components:
- 📊 Band Convergence (0-40 points): Measures the relationship between Bollinger Bands and Keltner Channels
- 📍 Price Position (0-20 points): Evaluates price location relative to the base channels
- 📈 Volume Intensity (0-20 points): Analyzes volume patterns and thresholds
- ⚡ Momentum (0-20 points): Assesses price momentum and direction
2. 🎨 Compression Zones
Visual representation of squeeze intensity levels:
- 🔴 Extreme Squeeze (80-100): Red zone
- 🟠 Strong Squeeze (60-80): Orange zone
- 🟡 Moderate Squeeze (40-60): Yellow zone
- 🟢 Light Squeeze (20-40): Green zone
- ⚪ No Squeeze (0-20): Base zone
3. 🎯 Entry Signals
The indicator generates entry signals based on:
- ✨ Squeeze release confirmation
- ➡️ Momentum direction
- 📊 Candlestick pattern confirmation
- 📈 Optional EMA trend alignment
- 🎯 Customizable EMA proximity validation
⚙️ Settings
🔧 Main Settings
- Base Length: Determines the calculation period for main indicators
- BB Multiplier: Sets the Bollinger Bands deviation multiplier
- Keltner Channel Multipliers: Three separate multipliers for different compression zones
📈 Trend Confirmation
- Four customizable EMA periods (default: 21, 34, 55, 89)
- Optional trend requirement for entry signals
- Adjustable EMA proximity threshold
📊 Volume Analysis
- Customizable volume MA length
- Adjustable volume threshold for signal confirmation
- Option to enable/disable volume analysis
🎨 Visualization
- Customizable bullish/bearish colors
- Optional intensity zones display
- Status monitor with real-time score and state information
- Clear entry arrows and background highlights
💻 Technical Code Breakdown
1. Core Calculations
// Base calculations for EMAs
ema_1 = ta.ema(close, ema_length_1)
ema_2 = ta.ema(close, ema_length_2)
ema_3 = ta.ema(close, ema_length_3)
ema_4 = ta.ema(close, ema_length_4)
// Proximity calculation for entry validation
ema_prox_raw = math.abs(close - ema_1) / ema_1 * 100
is_close_to_ema_long = close > ema_1 and ema_prox_raw <= prox_percent
```
### 2. Squeeze Detection System
```pine
// Bollinger Bands setup
BB_basis = ta.sma(close, length)
BB_dev = ta.stdev(close, length)
BB_upper = BB_basis + BB_mult * BB_dev
BB_lower = BB_basis - BB_mult * BB_dev
// Keltner Channels setup
KC_basis = ta.sma(close, length)
KC_range = ta.sma(ta.tr, length)
KC_upper_high = KC_basis + KC_range * KC_mult_high
KC_lower_high = KC_basis - KC_range * KC_mult_high
```
### 3. Scoring System Implementation
```pine
// Band Convergence Score
band_ratio = BB_width / KC_width
convergence_score = math.max(0, 40 * (1 - band_ratio))
// Price Position Score
price_range = math.abs(close - KC_basis) / (KC_upper_low - KC_lower_low)
position_score = 20 * (1 - price_range)
// Final Score Calculation
squeeze_score = convergence_score + position_score + vol_score + mom_score
```
### 4. Signal Generation
```pine
// Entry Signal Logic
long_signal = squeeze_release and
is_momentum_positive and
(not use_ema_trend or (bullish_trend and is_close_to_ema_long)) and
is_bullish_candle
short_signal = squeeze_release and
is_momentum_negative and
(not use_ema_trend or (bearish_trend and is_close_to_ema_short)) and
is_bearish_candle
```
📈 Trading Signals
🚀 Long Entry Conditions
- Squeeze release detected
- Positive momentum
- Bullish candlestick
- Price above relevant EMAs (if enabled)
- Within EMA proximity threshold (if enabled)
- Sufficient volume confirmation (if enabled)
🔻 Short Entry Conditions
- Squeeze release detected
- Negative momentum
- Bearish candlestick
- Price below relevant EMAs (if enabled)
- Within EMA proximity threshold (if enabled)
- Sufficient volume confirmation (if enabled)
⚠️ Alert Conditions
- 🔔 Extreme squeeze level reached (score crosses above 80)
- 🚀 Long squeeze release signal
- 🔻 Short squeeze release signal
💡 Tips for Usage
1. 📱 Use the status monitor to track real-time squeeze intensity and state
2. 🎨 Pay attention to the color gradient for trend direction and strength
3. ⏰ Consider using multiple timeframes for confirmation
4. ⚙️ Adjust EMA and proximity settings based on your trading style
5. 📊 Use volume analysis for additional confirmation in liquid markets
📝 Notes
- 🔧 The indicator combines multiple technical analysis concepts for robust signal generation
- 📈 Suitable for all tradable markets and timeframes
- ⭐ Best results typically achieved in trending markets with clear volatility cycles
- 🎯 Consider using in conjunction with other technical analysis tools for confirmation
⚠️ Disclaimer
This technical indicator is designed to assist in analysis but should not be considered as financial advice. Always perform your own analysis and risk management when trading.
Индикаторы и стратегии
Trend Lines by Pivots (Enhanced)### **📌 Detailed Explanation of the TradingView Indicator Code**
This **Pine Script v5** indicator automatically **detects trend lines** based on pivot highs and pivot lows. It helps traders visualize **support and resistance levels** using dynamic trend lines.
---
## **🔹 How the Indicator Works**
The indicator identifies **key pivot points** in price action and then **draws trend lines** connecting them. It works as follows:
1. **Detects Pivot Highs and Lows**:
- A **pivot high** is a local maximum where the price is higher than surrounding bars.
- A **pivot low** is a local minimum where the price is lower than surrounding bars.
2. **Stores the Last Two Pivot Points**:
- The script remembers the last **two pivot highs** and **two pivot lows**.
- These points are used to **draw resistance and support lines** dynamically.
3. **Plots Resistance and Support Lines**:
- The script continuously **updates** and **extends** the trend lines to the right as new pivots are found.
- **Red Line (Resistance):** Connects the last two pivot highs.
- **Green Line (Support):** Connects the last two pivot lows.
---
## **🔹 Code Breakdown**
### **1️⃣ Inputs for User Customization**
```pinescript
leftLen = input.int(2, "Left Pivot Length")
rightLen = input.int(2, "Right Pivot Length")
highLineColor = input.color(color.red, "Resistance Line Color")
lowLineColor = input.color(color.green, "Support Line Color")
```
- **leftLen & rightLen:** Define how many bars on the left and right should be used to confirm a pivot.
- **highLineColor:** Sets the color of the resistance trend line (default: **red**).
- **lowLineColor:** Sets the color of the support trend line (default: **green**).
---
### **2️⃣ Detect Pivot Highs & Lows**
```pinescript
pivotHigh = ta.pivothigh(leftLen, rightLen)
pivotLow = ta.pivotlow(leftLen, rightLen)
```
- `ta.pivothigh(leftLen, rightLen)`: Detects a **pivot high** if it's the highest price in a certain range.
- `ta.pivotlow(leftLen, rightLen)`: Detects a **pivot low** if it's the lowest price in a certain range.
---
### **3️⃣ Store the Last Two Pivot Points**
#### **🔺 Storing Resistance (Pivot Highs)**
```pinescript
var float lastPivotHigh1 = na
var int lastPivotHighIndex1 = na
var float lastPivotHigh2 = na
var int lastPivotHighIndex2 = na
```
- These variables store **the last two pivot highs** and their **bar indices** (position on the chart).
#### **🔻 Storing Support (Pivot Lows)**
```pinescript
var float lastPivotLow1 = na
var int lastPivotLowIndex1 = na
var float lastPivotLow2 = na
var int lastPivotLowIndex2 = na
```
- These variables store **the last two pivot lows** and their **bar indices**.
---
### **4️⃣ Update Pivot Points When New Ones Are Found**
#### **Updating Resistance (Pivot Highs)**
```pinescript
if not na(pivotHigh)
lastPivotHigh2 := lastPivotHigh1
lastPivotHighIndex2 := lastPivotHighIndex1
lastPivotHigh1 := pivotHigh
lastPivotHighIndex1 := bar_index - rightLen
```
- If a new **pivot high** is found:
- The **previous pivot** becomes `lastPivotHigh2`.
- The **new pivot** becomes `lastPivotHigh1`.
- The index (`bar_index - rightLen`) marks where the pivot occurred.
#### **Updating Support (Pivot Lows)**
```pinescript
if not na(pivotLow)
lastPivotLow2 := lastPivotLow1
lastPivotLowIndex2 := lastPivotLowIndex1
lastPivotLow1 := pivotLow
lastPivotLowIndex1 := bar_index - rightLen
```
- Similar to pivot highs, this section updates **pivot lows** dynamically.
---
### **5️⃣ Create and Update Trend Lines**
#### **🔺 Drawing the Resistance Line**
```pinescript
var line highLine = na
if not na(lastPivotHigh2) and not na(lastPivotHigh1)
if na(highLine)
highLine := line.new(lastPivotHighIndex2, lastPivotHigh2, lastPivotHighIndex1, lastPivotHigh1, color=highLineColor, extend=extend.right)
else
line.set_xy1(highLine, lastPivotHighIndex2, lastPivotHigh2)
line.set_xy2(highLine, lastPivotHighIndex1, lastPivotHigh1)
line.set_color(highLine, highLineColor)
```
- If **two pivot highs** exist:
- **First time:** Creates a new **resistance line** connecting them.
- **Updates dynamically:** Adjusts the line when a new pivot appears.
#### **🔻 Drawing the Support Line**
```pinescript
var line lowLine = na
if not na(lastPivotLow2) and not na(lastPivotLow1)
if na(lowLine)
lowLine := line.new(lastPivotLowIndex2, lastPivotLow2, lastPivotLowIndex1, lastPivotLow1, color=lowLineColor, extend=extend.right)
else
line.set_xy1(lowLine, lastPivotLowIndex2, lastPivotLow2)
line.set_xy2(lowLine, lastPivotLowIndex1, lastPivotLow1)
line.set_color(lowLine, lowLineColor)
```
- Same logic applies for **support levels**, creating or updating a **green trend line**.
---
## **🔹 How to Use This Indicator**
1. **Apply the script in TradingView**:
- Open **Pine Script Editor** → Paste the code → Click **"Add to Chart"**.
2. **Interpret the Lines**:
- **Red line (Resistance):** Price may struggle to break above it.
- **Green line (Support):** Price may bounce off it.
3. **Trading Strategy**:
- **Breakout Strategy:**
- If the price **breaks resistance**, expect a bullish move.
- If the price **breaks support**, expect a bearish move.
- **Reversal Trading:**
- Look for **bounces off support/resistance** for potential reversals.
---
## **🔹 Key Features of This Indicator**
✅ **Automatically detects pivot highs and lows.**
✅ **Draws real-time trend lines for support and resistance.**
✅ **Updates dynamically with new price action.**
✅ **Customizable settings for pivot sensitivity and colors.**
This indicator is useful for **trend traders, breakout traders, and support/resistance traders**. 🚀
Let me know if you need **further improvements or additional features!** 😊
Opening ScoreOverview:
The Composite Open Strategy Indicator is designed to provide traders with a unified, early-session directional bias by aggregating multiple non-correlated signals. By combining diverse analytical methods—spanning price action, volume, volatility, and time—the indicator helps you gauge whether the market is leaning bullish or bearish during the critical opening hours.
How It Works:
• Open Range Breakout (ORB) Signal:
The indicator captures the opening range (defined up to a user-specified time, e.g., 9:45 AM ET) and assigns a bullish signal when the price breaks above the high of that range, and a bearish signal when it drops below the low.
• VWAP Signal:
It compares the current price to the Volume Weighted Average Price (VWAP). A price above VWAP suggests buying pressure, while below indicates selling pressure.
• Trend Signal:
Using a simple moving average (with an adjustable period, typically around 20 bars), the indicator determines the prevailing trend. Price above the MA contributes a bullish bias, and price below contributes a bearish bias.
• Volatility Signal:
A volatility filter is applied via the Average True Range (ATR). An increasing ATR relative to the previous bar suggests rising volatility (bullish if combined with upward moves), whereas a decreasing ATR indicates the opposite.
Each of these four signals is assigned an equal weight (modifiable as needed), and their sum forms the composite score.
Display and Timing:
• Separate Panel:
The composite score is plotted as a histogram in its own indicator panel, ensuring your main price chart remains uncluttered.
• Session Filter:
The indicator is active only during the early session—from 9:30 AM to 12:30 PM Eastern Time—when the initial directional move is most relevant. Outside this time window, the indicator remains inactive.
Trading Insights:
• A positive composite score suggests a bullish bias, indicating that the aggregated signals lean toward an upward trend.
• A negative composite score points to a bearish bias, indicating a downward directional outlook.
Usage:
Ideal for traders looking to capture the market’s early trend direction, this indicator can be used as part of a broader strategy. Its design encourages consistency by combining multiple perspectives (price, volume, volatility, time) into one clear signal, allowing you to focus on setups that align with the dominant early-session move.
Before fully automating your trading approach, you can test and refine this composite method on TradingView using the built-in manual review process. Once confident in its performance, further automation can help integrate this directional bias seamlessly into your overall trading strategy.
Waldo's RSI Color Trend Candles
TradingView Description for Waldo's RSI Color Trend Candles
Title: Waldo's RSI Color Trend Candles
Short Title: Waldo RSI CTC
Overview:
Waldo's RSI Color Trend Candles is a visually intuitive indicator designed to enhance your trading experience by color-coding candlesticks based on the integration of Relative Strength Index (RSI) momentum and moving average trend analysis. This innovative tool overlays directly on your price chart, providing a clear, color-based representation of market sentiment and trend direction.
What is it?
This indicator combines the power of RSI with the simplicity of moving averages to offer traders a unique way to visualize market conditions:
RSI Integration: The RSI is computed with customizable parameters, allowing traders to adjust how momentum is interpreted. The RSI values influence the primary color of the candles, indicating overbought or oversold market states.
Moving Averages: Utilizing two Simple Moving Averages (SMAs) with user-defined lengths, the indicator helps in identifying trend directions through their crossovers. The fast MA and slow MA can be toggled on/off for visual clarity.
Color Trend Candles: The 'Color Trend Candles' feature uses a dynamic color scheme to reflect different market conditions:
Purple for overbought conditions when RSI exceeds the set threshold (default 70).
Blue for oversold conditions when RSI falls below the set threshold (default 44).
Green indicates a bullish trend, confirmed by both price action and RSI being bullish (fast MA crossing above slow MA, with price above the slow MA).
Red signals a bearish trend, when both price and RSI are bearish (fast MA crossing below slow MA, with price below the slow MA).
Gray for neutral or mixed market sentiment, where signals are less clear or contradictory.
How to Use It:
Waldo's RSI Color Trend Candles is tailored for traders who appreciate visual cues in their trading strategy:
Trend and Momentum Insight: The color of each candle gives an immediate visual representation of both the trend (via MA crossovers) and momentum (via RSI). Green and red candles align with bullish or bearish trends, respectively, providing a quick reference for market direction.
Identifying Extreme Conditions: Purple and blue candles highlight potential reversal zones or areas where the market might be overstretched, offering opportunities for contrarian trades or to anticipate market corrections.
Customization: Users can adjust the RSI length, overbought/oversold levels, and the lengths of the moving averages to align with their trading style or the specific characteristics of the asset they're trading.
This customization ensures the indicator can be tailored to various market conditions.
Simplified Decision Making: Designed for traders who prefer a visual approach, this indicator simplifies the decision-making process by encoding complex market data into an easy-to-understand color system.
However, for a robust trading strategy, it's recommended to use it alongside other analytical tools.
Control Over Display: The option to show or hide moving averages and to enable or disable the color-coding of candles provides users with control over how information is presented, allowing for a cleaner chart or more detailed analysis as preferred.
Conclusion:
Waldo's RSI Color Trend Candles offers a fresh, visually appealing method to interpret market trends and momentum through the color of candlesticks. It's ideal for traders looking for a straightforward way to gauge market sentiment at a glance. While this indicator can significantly enhance your trading setup, remember to incorporate it within a broader strategy, using additional confirmation from other indicators or analysis methods to manage risk and validate trading decisions. Dive into the colorful world of trading with Waldo's RSI Color Trend Candles and let the market's mood guide your trades with clarity and ease.
Dynamic RSI Bollinger Bands with Waldo Cloud
TradingView Indicator Description: Dynamic RSI Bollinger Bands with Waldo Cloud
Title: Dynamic RSI Bollinger Bands with Waldo Cloud
Short Title: Dynamic RSI BB Waldo
Overview:
Introducing an experimental indicator, the Dynamic RSI Bollinger Bands with Waldo Cloud, designed for adventurous traders looking to explore new dimensions in technical analysis. This indicator overlays on your chart, providing a unique perspective by integrating the Relative Strength Index (RSI) with Bollinger Bands, creating a dynamic trading tool that adapts to market conditions through the lens of momentum and volatility.
What is it?
This innovative indicator combines the traditional Bollinger Bands with the RSI in a way that hasn't been commonly explored. Here's a breakdown:
RSI Integration: The RSI is calculated with customizable length settings, and its values are used not just for momentum analysis but as the basis for the Bollinger Bands. This means the position and width of the bands are directly influenced by the RSI, offering a visual representation of momentum within the context of price volatility.
Dynamic Bollinger Bands: Instead of using price directly, the Bollinger Bands are calculated using a scaled version of the RSI. This scaling is done to fit the RSI values into the price range, ensuring the bands are relevant to the actual price movement. The standard deviation for these bands is also scaled accordingly, providing a unique volatility measure that's momentum-driven.
Waldo Cloud: Named after a visual representation concept, the 'Waldo Cloud' refers to the colored area between the Bollinger Bands, which changes based on various conditions:
Purple when RSI is overbought.
Blue when RSI is oversold.
Green for bullish conditions, defined by the fast-moving average crossing above the slow one, RSI is bullish, and the price is above the slow MA.
Red for bearish conditions, when the fast MA crosses below the slow MA, the RSI is bearish, and the price is below the slow MA.
Gray for neutral market conditions.
Moving Averages: Two simple moving averages (Fast MA and Slow MA) are included, which can be toggled on or off, offering additional trend analysis through crossovers.
How to Use It:
Given its experimental nature, this indicator should be used with caution and in conjunction with other analysis methods:
Identifying Market Conditions: Use the color of the Waldo Cloud to gauge market sentiment. A green cloud might suggest a good time to consider long positions, while a red cloud could indicate potential shorting opportunities. Purple and blue clouds highlight extreme conditions that might precede reversals.
Volatility and Momentum: The dynamic nature of the Bollinger Bands based on RSI provides insight into how momentum is affecting price volatility. When the bands are wide, it might indicate high momentum and potential trend continuation or reversal, depending on the RSI's position relative to its overbought/oversold levels.
Trend Confirmation: The moving average crossovers can act as confirmation signals. For instance, a bullish crossover (fast MA over slow MA) within a green cloud might strengthen a buy signal, whereas a bearish crossover in a red cloud might reinforce a sell decision.
Customization: Adjust the RSI length, overbought/oversold levels, and moving average lengths to suit different trading styles or market conditions. Experiment with these settings to find what works best for your strategy.
Combining with Other Indicators: Since this is an experimental tool, it's advisable to use it alongside established indicators like traditional Bollinger Bands, MACD, or trend lines to validate signals.
Conclusion:
The Dynamic RSI Bollinger Bands with Waldo Cloud is an experimental venture into combining momentum with volatility visually and interactively. It's designed for traders who are open to exploring new methods of market analysis.
Remember, due to its experimental status, this indicator should be part of a broader trading strategy, and backtesting or paper trading is recommended before applying it in live trading scenarios. Keep an eye on how the market reacts to the signals provided by this indicator and always consider risk management practices.
Daily Bias IndicatorBasic ICT Daily Bias Indicator
When yesterday's price breaks above and closes above the high of the day before yesterday, it indicates a bullish bias.
When yesterday's price tests the low of the day before yesterday but does not break below it, it indicates a bullish bias.
When yesterday's price breaks below and closes below the low of the day before yesterday, it indicates a bearish bias.
When yesterday's price tests the high of the day before yesterday but does not break above it, it indicates a bearish bias.
Waldo Cloud Bollinger Bands
Waldo Cloud Bollinger Bands Indicator Description for TradingView
Title: Waldo Cloud Bollinger Bands
Short Title: Waldo Cloud BB
Overview:
The Waldo Cloud Bollinger Bands indicator is a sophisticated tool designed for traders looking to combine the volatility analysis of Bollinger Bands with the momentum insights of the Relative Strength Index (RSI) and moving average crossovers. This indicator overlays on your chart, providing a visual representation that helps in identifying potential trading opportunities based on price action, momentum, and trend direction.
Concept:
This indicator merges three key technical analysis concepts:
Bollinger Bands: These are used to measure market volatility. The bands consist of a central moving average (basis) with an upper and lower band that are standard deviations away from this average. In this indicator, you can customize the type of moving average used for the basis (SMA, EMA, SMMA, WMA, VWMA), the length of the period, the source price, and the standard deviation multiplier, offering flexibility to adapt to different market conditions.
Relative Strength Index (RSI): The RSI is incorporated to provide insight into the momentum of price movements. Users can adjust the RSI length and overbought/oversold levels and even choose the price source for RSI calculation, allowing for tailored momentum analysis. The RSI values influence the cloud color between the Bollinger Bands, signaling market conditions.
Moving Average Crossovers: Two moving averages with customizable lengths and types are used to identify trend direction through crossovers. A fast MA (default 20 periods) and a slow MA (default 50 periods) are plotted when enabled, helping to signal potential bullish or bearish market conditions when they cross over each other.
Functionality:
Bollinger Bands Calculation: The basis of the Bollinger Bands is calculated using a user-defined moving average type, with a customizable length, source, and standard deviation multiplier. The upper and lower bands are then plotted around this basis.
RSI Calculation: The RSI is computed using a user-specified source, length, and overbought/oversold levels. This RSI value is used to determine the color of the cloud between the Bollinger Bands, which visually represents market sentiment:
Purple when RSI is overbought.
Blue when RSI is oversold.
Green for bullish conditions (when the fast MA crosses above the slow MA, RSI is bullish, and the price is above the slow MA).
Red for bearish conditions (when the fast MA crosses below the slow MA, RSI is bearish, and the price is below the slow MA).
Gray for neutral conditions.
Trend Analysis: The indicator uses two moving averages to help determine the trend direction.
When the fast MA crosses over the slow MA, it suggests a potential change in trend direction, which, combined with RSI conditions, provides a more comprehensive trading signal.
Customization:
Users can select the type of moving average for all calculations through the "Global MA Type" setting, ensuring consistency in how trends and volatility are interpreted.
The Bollinger Bands settings allow for adjustments in length, source, standard deviation, and offset, giving traders control over how volatility is measured.
RSI settings include the ability to change the RSI source, length, and overbought/oversold thresholds, which can be fine-tuned to match trading strategies.
The option to show or hide moving averages provides clarity on the chart, focusing on either the Bollinger Bands or including the MA crossovers for trend analysis.
Usage:
This indicator is ideal for traders who incorporate both volatility and momentum in their trading decisions.
By observing the color changes in the cloud, along with the position of the price relative to the moving averages, traders can gauge potential entry and exit points.
For instance, a green cloud with a price above the slow MA might suggest a strong buying opportunity, while a red cloud with a price below might indicate selling pressure.
Conclusion:
The Waldo Cloud Bollinger Bands indicator offers a unique blend of volatility, momentum, and trend analysis, providing traders with a multi-faceted view of market conditions. Its customization options make it adaptable to various trading styles and market environments, making it a valuable addition to any trader's toolkit on Trading View.
Averaged Stochastic RSI by TenozenSimplicity beats everything! Averaged Stochastic RSi is calculated using the 2 points of stochastic of the RSI, where the difference is by 2 (larger), and averaged out the stochastic's values. In result it is less noisy and more responsive towards the market's momentum.
I hope you guys find this indicator useful! So far this is the best indicator I ever had! And I also learned that simplicity is better than complex blurry/abstract problems. Ciao!
Bracket IndicatorThis is an indicator that shows tick target above and below the chart. Allows for visualizing continual bracket target moving with price before getting into trade.
So, for example, if you are watching price and wanting to target 10 points above or below. You can set this bracket indicator on the chart and you will be able to in real time see 10 points above/below the current price.
AMD Session Structure Levels# Market Structure & Manipulation Probability Indicator
## Overview
This advanced indicator is designed for traders who want a systematic approach to analyzing market structure, identifying manipulation, and assessing probability-based trade setups. It incorporates four core components:
### 1. Session Price Action Analysis
- Tracks **OHLC (Open, High, Low, Close)** within defined sessions.
- Implements a **dual tracking system**:
- **Official session levels** (fixed from the session open to close).
- **Real-time max/min tracking** to differentiate between temporary spikes and real price acceptance.
### 2. Market Manipulation Detection
- Identifies **manipulative price action** using the relationship between the open and close:
- If **price closes below open** → assumes **upward manipulation**, followed by **downward distribution**.
- If **price closes above open** → assumes **downward manipulation**, followed by **upward distribution**.
- Normalized using **ATR**, ensuring adaptability across different volatility conditions.
### 3. Probability Engine
- Tracks **historical wick ratios** to assess trend vs. reversal conditions.
- Calculates **conditional probabilities** for price moves.
- Uses a **special threshold system (0.45 and 0.03)** for reversal signals.
- Provides **real-time probability updates** to enhance trade decision-making.
### 4. Market Condition Classification
- Classifies market conditions using a **wick-to-body ratio**:
```pine
wick_to_body_ratio = open > close ? upper_wick / (high - low) : lower_wick / (high - low)
```
- **Low ratio (<0.25)** → Likely a **trend day**.
- **High ratio (>0.25)** → Likely a **range day**.
---
## Why This Indicator Stands Out
### ✅ Smarter Level Detection
- Uses **ATR-based dynamic levels** instead of static support/resistance.
- Differentiates **manipulation from distribution** for better decision-making.
- Updates probabilities **in real-time**.
### ✅ Memory-Efficient Design
- Implements **circular buffers** to maintain efficiency:
```pine
var float manipUp = array.new_float(lookbackPeriod, 0.0)
var float manipDown = array.new_float(lookbackPeriod, 0.0)
```
- Ensures **constant memory usage**, even over extended trading sessions.
### ✅ Advanced Probability Calculation
- Utilizes **conditional probabilities** instead of simple averages.
- Incorporates **market context** through wick analysis.
- Provides **actionable signals** via a probability table.
---
## Trading Strategy Guide
### **Best Entry Setups**
✅ Wait for **price to approach manipulation levels**.
✅ Confirm using the **probability table**.
✅ Check the **wick ratio for context**.
✅ Enter when **conditional probability aligns**.
### **Smart Exit Management**
✅ Use **distribution levels** as **profit targets**.
✅ Scale out **when probabilities shift**.
✅ Monitor **wick percentiles** for confirmation.
### **Risk Management**
✅ Size positions based on **probability readings**.
✅ Place stops at **manipulation levels**.
✅ Adjust position size based on **trend vs. range classification**.
---
## Configuration Tips
### **Session Settings**
```pine
sessionTime = input.session("0830-1500", "Session Hours")
weekDays = input.string("23456", "Active Days")
```
- Match these to your **primary trading session**.
- Adjust for different **market opens** if needed.
### **Analysis Parameters**
```pine
lookbackPeriod = input.int(50, "Lookback Period")
low_threshold = input.float(0.25, "Trend/Range Threshold")
```
- **50 periods** is a good starting point but can be optimized per instrument.
- The **0.25 threshold** is ideal for most markets but may need adjustments.
---
## Market Structure Breakdown
### **Trend/Continuation Days**
- **Characteristics:**
✅ Small **opposing wicks** (minimal counter-pressure).
✅ Clean, **directional price movement**.
- **Bullish Trend Day Example:**
✅ Small **lower wicks** (minimal downward pressure).
✅ Strong **closes near the highs** → **Buyers in control**.
- **Bearish Trend Day Example:**
✅ Small **upper wicks** (minimal upward pressure).
✅ Strong **closes near the lows** → **Sellers in control**.
### **Reversal Days**
- **Characteristics:**
✅ **Large opposing wicks** → Failed momentum in the initial direction.
- **Bullish Reversal Example:**
✅ **Large upper wick early**.
✅ **Strong close from the lows** → **Sellers failed to maintain control**.
- **Bearish Reversal Example:**
✅ **Large lower wick early**.
✅ **Weak close from the highs** → **Buyers failed to maintain control**.
---
## Summary
This indicator systematically quantifies market structure by measuring **manipulation, distribution, and probability-driven trade setups**. Unlike traditional indicators, it adapts dynamically using **ATR, historical probabilities, and real-time tracking** to offer a structured, data-driven approach to trading.
🚀 **Use this tool to enhance your decision-making and gain an objective edge in the market!**
ROC with closed based coloring & info table [DB]Rate of Change (ROC) Basics
The Rate of Change (ROC) is a momentum oscillator measuring the percentage price change between the current close and the close from N periods ago.
Calculated as: ROC = * 100
Traders use ROC to:
Identify overbought/oversold conditions
Spot momentum shifts
Confirm trend strength
My improvements:
Visual Clarity
Color-Coded Direction: ROC line changes color (green/red/yellow) based on intra-candle momentum shifts.
Direction Table: Instant view of the last change in ROC with the candle close (▲ UP / ▼ DOWN / ▶ FLAT).
Cells for current value and previous change between timeframe bar period.
What you can benefit with this over the regular ROC:
Faster Analysis: The visual cues make direction and strength instantly obvious and it allows for faster decision making while preserving more mental capital.
Quarterly Performance█ OVERVIEW
The Quarterly Performance indicator is designed to visualise and compare the performance of different Quarters of the year. This indicator explores one of the many calendar based anomalies that exist in financial markets.
In the context of financial analysis, a calendar based anomaly refers to patterns or tendencies that are linked to specific time periods, such as days of the week, weeks of the month, or months of the year. This indicator helps explore whether such a calendar based anomaly exists between quarters.
By calculating cumulative quarterly performance and counting the number of quarters with positive returns, it provides a clear snapshot of whether one set of quarters tends to outperform the others, potentially highlighting a calendar based anomaly if a significant difference is observed.
█ FEATURES
Customisable time window through input settings.
Tracks cumulative returns for each quarter separately.
Easily adjust table settings like position and font size via input options.
Clear visual distinction between quarterly performance using different colours.
Built-in error checks to ensure the indicator is applied to the correct timeframe.
█ HOW TO USE
Add the indicator to a chart with a 3 Month (Quarterly) timeframe.
Choose your start and end dates in the Time Settings.
Enable or disable the performance table in the Table Settings as needed.
View the cumulative performance, with Q1 in blue, Q2 in red, Q3 in green and Q4 in purple.
USDT.D + USDT.C ALL TIMEFRAMESThis indicator combines the dominance of USDT (USDT.D) and USDC (USDC.D) to track total stablecoin market share across all timeframes. It displays the combined dominance as candlesticks, providing a clearer view of market liquidity shifts and investor sentiment.
📌 How to Use:
Green candles indicate rising stablecoin dominance (potential risk-off sentiment).
Red candles indicate declining stablecoin dominance (potential risk-on sentiment).
Works on all timeframes, from intraday scalping to macro trend analysis.
This tool is essential for traders looking to analyze stablecoin liquidity flow, identify market turning points, and refine trading strategies based on stablecoin dominance behavior. 🚀
Machine Learning: kNN Trend PredictorThe kNN Trend Predictor is a machine learning-based indicator that uses the k-Nearest Neighbors (kNN) algorithm for price prediction in trading. By analyzing historical price movements and computing Euclidean distances, the script identifies the closest past price patterns and forecasts potential trends. It provides color-coded trend signals, optional trade entry labels, and alerts for long and short signals.
Share SizeA helpful tool that estimates the amount of times you can trade at your current share size in a small account.
You can adjust the numbers in the settings page!
Moving Averages With Continuous Periods [macp]This script reimagines traditional moving averages by introducing floating-point period calculations, allowing for fractional lengths rather than being constrained to whole numbers. At its core, it provides SMA, WMA, and HMA variants that can work with any decimal length, which proves especially valuable when creating dynamic indicators or fine-tuning existing strategies.
The most significant improvement lies in the Hull Moving Average implementation. By properly handling floating-point mathematics throughout the calculation chain, this version reduces the overshoot tendencies that often plague integer-based HMAs. The result is a more responsive yet controlled indicator that better captures price action without excessive whipsaw.
The visual aspect incorporates a trend gradient system that can adapt to different trading styles. Rather than using fixed coloring, it offers several modes ranging from simple solid colors to more nuanced three-tone gradients that help identify trend transitions. These gradients are normalized against ATR to provide context-aware visual feedback about trend strength.
From a practical standpoint, the floating-point approach eliminates the subtle discontinuities that occur when integer-based moving averages switch periods. This makes the indicator particularly useful in systems where the MA period itself is calculated from market conditions, as it can smoothly transition between different lengths without artificial jumps.
At the heart of this implementation lies the concept of continuous weights rather than discrete summation. Traditional moving averages treat each period as a distinct unit with integer indexing. However, when we move to floating-point periods, we need to consider how fractional periods should behave. This leads us to some interesting mathematical considerations.
Consider the Weighted Moving Average kernel. The weight function is fundamentally a slope: -x + length where x represents the position in the averaging window. The normalization constant is calculated by integrating (in our discrete case, summing) this slope across the window. What makes this implementation special is how it handles the fractional component - when the length isn't a whole number, the final period gets weighted proportionally to its fractional part.
For the Hull Moving Average, the mathematics become particularly intriguing. The standard HMA formula HMA = WMA(2*WMA(price, n/2) - WMA(price, n), sqrt(n)) is preserved, but now each WMA calculation operates in continuous space. This creates a smoother cascade of weights that better preserves the original intent of the Hull design - to reduce lag while maintaining smoothness.
The Simple Moving Average's treatment of fractional periods is perhaps the most elegant. For a length like 9.7, it weights the first 9 periods fully and the 10th period at 0.7 of its value. This creates a natural transition between integer periods that traditional implementations miss entirely.
The Gradient Mathematics
The trend gradient system employs normalized angular calculations to determine color transitions. By taking the arctangent of price changes normalized by ATR, we create a bounded space between 0 and 1 that represents trend intensity. The formula (arctan(Δprice/ATR) + 90°)/180° maps trend angles to this normalized space, allowing for smooth color transitions that respect market volatility context.
This mathematical framework creates a more theoretically sound foundation for moving averages, one that better reflects the continuous nature of price movement in financial markets. The implementation recognizes that time in markets isn't truly discrete - our sampling might be, but the underlying process we're trying to measure is continuous. By allowing for fractional periods, we're creating a better approximation of this continuous reality.
This floating-point moving average implementation offers tangible benefits for traders and analysts who need precise control over their indicators. The ability to fine-tune periods and create smooth transitions makes it particularly valuable for automated systems where moving average lengths are dynamically calculated from market conditions. The Hull Moving Average calculation now accurately reflects its mathematical formula while maintaining responsiveness, making it a practical choice for both systematic and discretionary trading approaches. Whether you're building dynamic indicators, optimizing existing strategies, or simply want more precise control over your moving averages, this implementation provides the mathematical foundation to do so effectively.
EMA Crossover Backtest [BarScripts]This indicator lets you backtest an EMA crossover strategy with built-in risk management and trade tracking. It simulates long and short trades based on EMA crossovers, allowing you to fine-tune entry conditions, stop-loss placement, and reward/risk settings.
🔹 How It Works:
Long Entry: Fast EMA crosses above Slow EMA, and price closes above Fast EMA.
Short Entry: Fast EMA crosses below Slow EMA, and price closes below Fast EMA.
Stop Loss: Set based on previous bars or a fixed amount.
Take Profit: Adjustable reward/risk ratio.
Higher Timeframe Confluence: Confirms trades based on a larger timeframe.
Trade Hours Filter: Limits trades to specific time windows.
🔹 Key Features:
✅ Shows Entry & Exit Points with visual trade lines.
✅ Customizable EMA Lengths to fit any strategy.
✅ P&L Tracking & Statistics to measure performance.
✅ Position Sizing Options: Fixed position, fixed risk, or percentage of balance.
✅ Commissions Tracking (based on total trades, not contracts).
Use this tool to fine-tune your EMA crossover strategy and see how it performs over time! 🚀
💬 Let me know your feedback—suggest improvements, report issues, or request new features!
RVMM IndicatorRVMM Indicator
RVMM Indicator combines four indicators: RSI, VWAP, MFI, and Momentum to provide comprehensive technical analysis. This indicator helps traders identify potential market conditions based on the interaction of these indicators.
Components of the RVMM Indicator
1. RSI (Relative Strength Index)
RSI is a momentum indicator that measures the speed and change of price movements. RSI oscillates between 0 and 100 and is used to identify overbought and oversold conditions in the market.
Buy Level: Set at 30. When RSI falls below 30, the market is considered oversold, which may suggest a potential upward trend reversal.
Sell Level: Set at 70. When RSI rises above 70, the market is considered overbought, which may suggest a potential downward trend reversal.
2. VWAP (Volume Weighted Average Price)
VWAP is an indicator that combines price and volume to calculate the average price weighted by volume. VWAP is used to identify support and resistance areas and assess the strength of price movements.
Interpretation: If the price is above the VWAP line, the market is likely in an uptrend. If the price is below the VWAP line, the market is in a downtrend.
3. MFI (Money Flow Index)
MFI is a momentum indicator that considers both price and volume. MFI oscillates between 0 and 100 and is used to identify overbought and oversold conditions in the market.
Oversold Level: Set at 20. When MFI falls below 20, the market is considered oversold.
Overbought Level: Set at 80. When MFI rises above 80, the market is considered overbought.
4. Momentum
Momentum is an indicator that measures the speed of price changes. This indicator is used to identify the strength of a trend.
Interpretation: High momentum values indicate a strong uptrend, while low momentum values indicate a strong downtrend.
How to Use the RVMM Indicator
Interpreting Market Conditions:
RSI : Check RSI values below 30 to identify oversold conditions, and above 70 to identify overbought conditions.
VWAP : Observe whether the price is above or below the VWAP line to determine if the market is in an uptrend or downtrend.
MFI : Check if MFI is below 20 to identify oversold conditions, and above 80 to identify overbought conditions.
Momentum : Analyze momentum values to gauge the strength of the current trend.
Confirming Market Conditions:
Use VWAP, MFI, and Momentum to confirm market conditions identified by RSI.
If the price is above the VWAP line, and MFI and Momentum indicate the strength of the uptrend, the market may be in a bullish phase.
If the price is below the VWAP line, and MFI and Momentum indicate the strength of the downtrend, the market may be in a bearish phase.
Risk Management:
Set stop-loss and take-profit levels based on technical analysis and your trading preferences.
Monitor the market and adjust stop-loss and take-profit levels as market conditions change.
Example of Application
Here is an example of how to use the RVMM Indicator in practice:
Bullish Phase: When the price is above the VWAP line, RSI is below 30, and MFI and Momentum indicate the strength of the uptrend, the market is likely in a bullish phase.
Bearish Phase: When the price is below the VWAP line, RSI is above 70, and MFI and Momentum indicate the strength of the downtrend, the market is likely in a bearish phase.
Zanger Volume Ratio (ZVR)Zanger Volume Ratio (ZVR)
Credits:
Most of the underlying code and logic in this script have been adapted from the work originally published by The_Peaceful_Lizard
Overview
The Zanger Volume Ratio (ZVR) is a powerful indicator designed to reveal market dynamics by comparing current cumulative volume to an average determined over a historical look-back period. It uses the concept of relative volume to not only highlight unusual volume spikes, but also uses color to illustrate how today's trading compares to typical levels. This unique method of volume analysis was popularized by Dan Zanger - a trader known for turning $10,775 into $18,000,000 in less than two years - by identifying key shifts in market interest and volume behavior.
Key Features
Volume Pacing Analysis:
The script calculates a volume delta by comparing the cumulative volume at any given moment to an average derived over a user-defined lookback period (Default 20-day). The resulting percentage difference offers a clear visualization and insight into unusual volume activity.
Dynamic Visual Representation:
Choose between either “Columns” or “Area” plot styles to display the percent difference. Additionally, you have the option to switch between a standard plot or a background color display, with customizable transparency, ensuring the indicator fits seamlessly with your chart’s aesthetics.
Dashboard Integration:
A simple dashboard table is displayed on the chart, showcasing the current ZVR value in real-time. With user-configurable position, text size, alignment, and color options, this feature ensures that the key metric is always visible and easy to interpret.
Why Use the Zanger Volume Ratio?
The ZVR is more than just a volume indicator. It acts as a window into market sentiment by highlighting days when trading interest intensifies. Many traders believe that an unusually high volume ratio may confirm trend strength or signal a reversal, making the indicator a valuable tool when used in conjunction with other technical analysis methods.
Whether you’re monitoring stocks, commodities, or forex markets, the Zanger Volume Ratio offers an accessible yet sophisticated method to decode volume dynamics. Its practical design and real-time visual feedback provide traders of all experience levels with critical data to spot high-potential setups.
Chart Description
First Pane: normal Volume Indicator on the foreground, ZVR as Background colors
Second Pane: ZVR Indicator with Column Style (default)
First panel: normal volume indicator in foreground, ZVR as background colors
Second panel: ZVR indicator with column style (default)
Note: This indicator is intended for use on intraday charts only!
Liquidity ZonesLiquidity Zones Indicator
The Liquidity Zones indicator is a custom Pine Script™ tool designed to identify significant price levels where high trading volume has occurred. These zones often act as support or resistance levels, providing valuable insights for traders.
Key Features:
Window Size: The number of bars to consider for calculating the moving averages and identifying peaks.
Tolerance: The allowable percentage difference to consider peaks as unique.
Number of Peaks: The maximum number of significant peaks to identify.
Minimum Volume: The minimum volume threshold relative to the average volume to consider a peak.
Minimum Range: The minimum price range to consider a peak.
How It Works:
Input Parameters: The user can customize the window size, tolerance, number of peaks, minimum volume, and minimum range.
Moving Averages: The script calculates the simple moving average (SMA) of the volume and closing prices over the specified window.
Peak Identification:
For each bar, the script identifies the bar with the highest volume within the window.
It checks if the volume exceeds the minimum volume threshold.
It determines the peak price based on whether the bar closed higher or lower than it opened.
It ensures the price range of the bar exceeds the minimum range.
It checks if the peak is above the SMA of the closing prices.
It verifies the peak is unique within the specified tolerance.
Plotting Peaks: The identified peaks are plotted on the chart with lines and labels, color-coded based on whether the bar closed higher (green) or lower (red).
This indicator helps traders visualize key liquidity zones, aiding in making informed trading decisions.
Naive Bayes Candlestick Pattern Classifier v1.1 BETAAn intermezzo on why i made this script publication..
A : Candlestick Pattern took hours to backtest, why not using Machine Learning techniques?
B : Machine Learning, no that's gonna be really heavy bro!
A : Not really, because we use Naive Bayes.
B : The simplest, yet powerful machine learning algorithm to separate (a.k.a classify) multivariate data.
----------------------------------------------------------------------------------------------------------------------
Hello, everyone!
After deep research in extracting meaningful information from the market, I ended up building this powerful machine learning indicator based on the evolution of Bayesian Statistics. This indicator not only leverages the simplicity of Naive Bayes but also extends its application to candlestick pattern analysis, making it an invaluable tool for traders who are looking to enhance their technical analysis without spending countless hours manually backtesting each pattern on each market!.
What most interesting part is actually after learning all of likely useless methods like fibonacci, supply and demand, volume profile, etc. We always ended up back to basic like support and resistance and candlestick patterns, but with a slight twist on strategy algorithm design and statistical approach. Thus, the only reason why i made this, because i exactly know that you guys will ended up in this position as time goes by.
The essence of this indicator lies in its ability to automate the recognition and statistical evaluation of various candlestick patterns. Traditionally, traders have relied on visual inspection and manual backtesting to determine the effectiveness of patterns like Bullish Engulfing, Bearish Engulfing, Harami variations, Hammer formations, and even more complex multi-candle patterns such as Three White Soldiers, Three Black Crows, Dark Cloud Cover, and Piercing Pattern. However, these conventional methods are both time-consuming and prone to subjective bias.
To address these challenges, I employed Naive Bayes—a probabilistic classifier that, despite its simplicity, offers robust performance in various domains. Naive Bayes assumes that each feature is independent of the others given the class label, which, although a strong assumption, works remarkably well in practice, especially when the dataset is large like market data and the feature space is high-dimensional. In our case, each candlestick pattern acts as a feature that can be statistically evaluated based on its historical performance. The indicator calculates a probability that a given pattern will lead to a price reversal, by comparing the pattern’s close price to the highest or lowest price achieved in a lookahead window.
One of the standout features of this script is its flexibility. Each candlestick pattern is not only coded into the system but also comes with individual toggles to enable or disable them based on your trading strategy. This means you can choose to focus on single-candle patterns like Bullish Engulfing or more complex multi-candle formations such as Three White Soldiers, without modifying the core code. The built-in customization options allow you to adjust colors and labels for each pattern, giving you the freedom to tailor the visual output to your preference. This level of customization ensures that the indicator integrates seamlessly into your existing TradingView setup.
Moreover, the indicator isn’t just about pattern recognition—it also incorporates outcome-based learning. Every time a pattern is detected, it looks ahead a predefined number of bars to evaluate if the expected reversal actually materialized. This outcome is then stored in arrays, and over time, the script dynamically calculates the probability of success for each pattern. These probabilities are presented in a real-time updating table on your chart, which shows not only the percentage probability but also the count of historical occurrences. With this information at your fingertips, you can quickly gauge the reliability of each pattern in your chosen market and timeframe.
Another significant advantage of this approach is its speed and efficiency. While more complex machine learning models like neural networks might require heavy computational resources and longer training times, the Naive Bayes classifier in this script is lightweight, instantaneous and can be updated on the fly with each new bar. This real-time capability is essential for modern traders who need to make quick decisions in fast-paced markets.
Furthermore, by automating the process of backtesting, the indicator frees up your time to focus on other aspects of trading strategy development. Instead of manually analyzing hundreds or even thousands of candles, you can rely on the statistical power of Naive Bayes to provide you with insights on which patterns are most likely to result in profitable moves. This not only enhances your efficiency but also helps to eliminate the cognitive biases that often plague manual analysis.
In summary, this indicator represents a fusion of traditional candlestick analysis with modern machine learning techniques. It harnesses the simplicity and effectiveness of Naive Bayes to deliver a dynamic, real-time evaluation of various candlestick patterns. Whether you are a seasoned trader looking to refine your technical analysis or a beginner eager to understand market dynamics, this tool offers a powerful, customizable, and efficient solution. Welcome to a new era where advanced statistical methods meet practical trading insights—happy trading and may your patterns always be in your favor!
Note : On this current released beta version, you must manually adjust reversal percentage move based on each market. Further updates may include automated best range detection and probability.
Optimized Dynamic SupertrendDetailed Explanation of the Optimized Dynamic Supertrend Script
This Supertrend script is designed to dynamically adapt to different market conditions using ATR expansion, volume confirmation, and trend filtering. Below is a step-by-step breakdown of how it works and its functions.
1 ATR-Based Supertrend Calculation
📌 Key Purpose:
The script calculates an adaptive ATR-based Supertrend line, which acts as a dynamic support or resistance level for trend direction.
📌 How it Works:
ATR (Average True Range) is used to measure market volatility.
A dynamic ATR multiplier is applied based on price standard deviation (instead of a fixed value).
The Supertrend is calculated as:
Upper Band: SMA(close, ATR length) + (ATR Multiplier * ATR Value)
Lower Band: SMA(close, ATR length) - (ATR Multiplier * ATR Value)
The Supertrend flips when price crosses and holds beyond the Supertrend line.
🔹 Dynamic Adjustment:
Instead of using a fixed ATR multiplier, the script adjusts it using:
pinescript
Copy
Edit
dynamicFactor = ta.stdev(close, atrLength) / ta.sma(close, atrLength)
atrMultiplier = input(1.5, title="Base ATR Multiplier") * dynamicFactor
High volatility → Wider Supertrend bands (to avoid false signals).
Low volatility → Tighter Supertrend bands (for faster detection).
2 Trend Detection Logic
📌 Key Purpose:
Determines if the market is in a bullish or bearish trend based on price action.
Uses volume sensitivity and ATR expansion to reduce false signals.
📌 How it Works:
pinescript
Copy
Edit
var float supertrend = na
supertrend := close > nz(supertrend , lowerBand) ? lowerBand : upperBand
The Supertrend value updates dynamically.
If price is above the Supertrend line, the trend is bullish (green).
If price is below the Supertrend line, the trend is bearish (red).
3 Volume Sensitivity Confirmation
📌 Key Purpose:
Avoid false trend flips by confirming with volume (approximated using a CVD proxy).
📌 How it Works:
pinescript
Copy
Edit
priceChange = close - close
volumeWeightedTrend = priceChange * volume // Approximate CVD Behavior
trendConfirmed = volumeWeightedTrend > 0 ? close > supertrend : close < supertrend
Positive price change + High volume → Confirms bullish momentum.
Negative price change + High volume → Confirms bearish momentum.
If there’s low volume, the trend change is ignored to avoid false breakouts.
4 Noise Reduction (Final Trend Confirmation)
📌 Key Purpose:
Filter out weak or choppy price movements using ATR expansion.
📌 How it Works:
pinescript
Copy
Edit
trendUp = trendConfirmed and ta.atr(atrLength) > ta.atr(atrLength)
trendDown = not trendUp
Trend only flips when confirmed by volume + ATR expansion.
If ATR is not expanding, the script ignores weak price movements.
This ensures Supertrend signals align with strong market moves.
5 Can This Be Used on All Timeframes?
✅ YES! This Supertrend is adaptive, meaning it adjusts dynamically based on:
Volatility: Uses ATR expansion to adjust for different market conditions.
Timeframe Sensitivity: Works on any timeframe (1M, 5M, 15M, 1H, 4H, 1D, 1W).
Market Structure: Confirms trend flips using volume & price movement strength.
🚀 Best Timeframes for Trading:
For Scalping (1M - 15M) → Quick execution, best with order flow confirmation.
For Swing Trading (1H - 4H - 1D) → Stronger trend signals, reduced noise.
For High Timeframes (3D - 1W) → Identifies major market shifts.
🔥 Advantages & Disadvantages in Your Trading Setup
✅ Advantages:
✔ Fully Dynamic & Adaptive → Adjusts to different timeframes & volatility.
✔ Reduces False Signals → Uses ATR expansion & volume confirmation.
✔ Precise Trend Reversals → Labels LONG & SHORT entries clearly.
✔ Works on Any Market → Crypto, Forex, Stocks, Commodities.
✔ No Extra Indicators → Pure Supertrend-based (fits your setup).
❌ Disadvantages:
⚠ Lagging Indicator → ATR & volume confirmation add slight delay.
⚠ Needs High Volume to Confirm → Weak volume → no trend flip.
⚠ Choppy Market = Late Entries → Sideways movement can cause delays.
🚀 Final Thoughts:
It’s fully dynamic & adaptive (unlike traditional static Supertrends).
No extra indicators → Uses only Supertrend logic
Refines entry points using volume & ATR confirmation (removes noise).
This ensures you get high-probability trend signals while filtering out weak breakouts! 🎯
Live Portfolio P<his script calculates live P&L (Profit & Loss) for up to 40 instruments — stocks, ETFs, options, futures, and Forex pairs supported by TradingView. Instead of juggling numerous inputs, you paste your portfolio in CSV format into a single text field, and the script handles the rest. It parses each position and displays a comprehensive table showing the symbol, current price, position value, total P&L, and today’s P&L—all updated in real time.
Key Features
CSV Portfolio Input – Effortlessly import all your positions at once without filling in multiple fields. You can export the position from your broker, save it in the required format, and paste it into this script.
Supports Various Asset Classes – Works with any instrument that TradingView provides data for, including futures, options, and Forex.
Up to 40 Instruments – Track a broad and diverse set of holdings in one place.
Real-Time Updates – Get immediate feedback on live price changes, total value, and current P&L.
Today’s P&L – Monitor your daily performance to gauge short-term trends.
CSV is consumed in the following format:
Symbol (supported TradingView instruments)
Entry Price
Quantity (negative for short position)
Lot Size (for futures/options, it might not be one)
For example:
AAPL,237,100,1
TSLA,400,-150,1
ESM2025,6000,5,50
Planned Enhancements
Multi-Currency Support – Automatically convert and display your positions’ values in different currencies.
Advanced Metrics – Get deeper insights with calculations for drawdown, Sharpe ratio, and more.
Risk Management Tools – Set stop-loss and take-profit levels and receive alerts when thresholds are hit.
Option Greeks & Margin Calculations – Manage complex option strategies and track margin requirements.
Questions for You
What additional features would you like to see?
Are there any specific metrics or analytics you’d find especially valuable?
How might this script fit into your current trading workflow?
Feel free to share your thoughts and suggestions. Your feedback will help shape future updates and make this tool even more helpful for traders like you!
Disclaimer
Please remember that 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 don’t provide any financial advice.