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.
Wskaźniki i strategie
One Trading Setup for Life ICT [TradingFinder] Sweep Session FVG🔵 Introduction
ICT One Trading Setup for Life is a trading strategy based on liquidity and market structure shifts, utilizing the PM Session Sweep to determine price direction. In this strategy, the market first forms a price range during the PM Session (from 13:30 to 16:00 EST), which includes the highest high (PM Session High) and lowest low (PM Session Low).
In the next session, the price first touches one of these levels to trigger a Liquidity Hunt before confirming its trend by breaking the Change in State of Delivery (CISD) Level. After this confirmation, the price retraces toward a Fair Value Gap (FVG) or Order Block (OB), which serve as the best entry points in alignment with liquidity.
In financial markets, liquidity is the primary driver of price movement, and major market participants such as institutional investors and banks are constantly seeking liquidity at key levels. This process, known as Liquidity Hunt or Liquidity Sweep, occurs when the price reaches an area with a high concentration of orders, absorbs liquidity, and then reverses direction.
In this setup, the PM Session range acts as a trading framework, where its highs and lows function as key liquidity zones that influence the next session’s price movement. After the New York market opens at 9:30 EST, the price initially breaks one of these levels to capture liquidity.
However, for a trend shift to be confirmed, the CISD Level must be broken.
Once the CISD Level is breached, the price retraces toward an FVG or OB, which serve as optimal trade entry points.
Bullish Setup :
Bearish Setup :
🔵 How to Use
In this strategy, the PM Session range is first identified, which includes the highest high (PM Session High) and lowest low (PM Session Low) between 13:30 and 16:00 EST. In the following session, the price touches one of these levels for a Liquidity Hunt, followed by a break of the Change in State of Delivery (CISD) Level. The price then retraces toward a Fair Value Gap (FVG) or Order Block (OB), creating a trading opportunity.
This process can occur in two scenarios : bearish and bullish setups.
🟣 Bullish Setup
In a bullish scenario, the PM Session High and PM Session Low are identified. In the following session, the price first breaks the PM Session Low, absorbing liquidity. This process results in a Fake Breakout to the downside, misleading retail traders into taking short positions.
After the Liquidity Hunt, the CISD Level is broken, confirming a trend reversal. The price then retraces toward an FVG or OB, offering an optimal long entry opportunity.
The initial take-profit target is the PM Session High, but if higher timeframe liquidity levels exist, extended targets can be set.
The stop-loss should be placed below the Fake Breakout low or the first candle of the FVG.
🟣 Bearish Setup
In a bearish scenario, the market first defines its PM Session High and PM Session Low. In the next session, the price initially breaks the PM Session High, triggering a Liquidity Hunt. This movement often causes a Fake Breakout, misleading retail traders into taking incorrect positions.
After absorbing liquidity, the CISD Level breaks, indicating a shift in market structure. The price then retraces toward an FVG or OB, offering the best short entry opportunity.
The initial take-profit target is the PM Session Low, but if additional liquidity exists on higher timeframes, lower targets can be considered.
The stop-loss should be placed above the Fake Breakout high or the first candle of the FVG.
🔵 Setting
CISD Bar Back Check : The Bar Back Check option enables traders to specify the number of past candles checked for identifying the CISD Level, enhancing CISD Level accuracy on the chart.
Order Block Validity : The number of candles that determine the validity of an Order Block.
FVG Validity : The duration for which a Fair Value Gap remains valid.
CISD Level Validity : The duration for which a CISD Level remains valid after being broken.
New York PM Session : Defines the PM Session range from 13:30 to 16:00 EST.
New York AM Session : Defines the AM Session range from 9:30 to 16:00 EST.
Refine Order Block : Enables finer adjustments to Order Block levels for more accurate price responses.
Mitigation Level OB : Allows users to set specific reaction points within an Order Block, including: Proximal: Closest level to the current price. 50% OB: Midpoint of the Order Block. Distal: Farthest level from the current price.
FVG Filter : The Judas Swing indicator includes a filter for Fair Value Gap (FVG), allowing different filtering based on FVG width: FVG Filter Type: Can be set to "Very Aggressive," "Aggressive," "Defensive," or "Very Defensive." Higher defensiveness narrows the FVG width, focusing on narrower gaps.
Mitigation Level FVG : Like the Order Block, you can set price reaction levels for FVG with options such as Proximal, 50% OB, and Distal.
Demand Order Block : Enables or disables bullish Order Block.
Supply Order Block : Enables or disables bearish Order Blocks.
Demand FVG : Enables or disables bullish FVG.
Supply FVG : Enables or disables bearish FVGs.
Show All CISD : Enables or disables the display of all CISD Levels.
Show High CISD : Enables or disables high CISD levels.
Show Low CISD : Enables or disables low CISD levels.
🔵 Conclusion
The ICT One Trading Setup for Life is a liquidity-based strategy that leverages market structure shifts and precise entry points to identify high-probability trade opportunities. By focusing on PM Session High and PM Session Low, this setup first captures liquidity at these levels and then confirms trend shifts with a break of the Change in State of Delivery (CISD) Level.
Entering a trade after a retracement to an FVG or OB allows traders to position themselves at optimal liquidity levels, ensuring high reward-to-risk trades. When used in conjunction with higher timeframe bias, order flow, and liquidity analysis, this strategy can become one of the most effective trading methods within the ICT Concept framework.
Successful execution of this setup requires risk management, patience, and a deep understanding of liquidity dynamics. Traders can enhance their confidence in this strategy by conducting extensive backtesting and analyzing past market data to optimize their approach for different assets.
[EmreKb] MTF FTRDescription
Multi time frame version of "Failed to Return by EmreKb" indicator.
What is FTR?
There is no definitive, fixed perspective on FTR. Some sources may choose the FTR zone differently. I will use the single bearish candle in an uptrend (or the single bullish candle in a downtrend) as the FTR in this indicator.
Settings
Update Last: Number of how many boxes will be updated in the new candle
Timeframes: Presets for timeframe option
Use Custom: For use custom timeframes
Custom Timeframes: Text area for write custom timeframes without space and separate with comma.
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!** 😊
[EmreKb] Pinbar AnalysisDescription
The Pinbar Analyzer tool will count how many ltf candles are inside the wick and the total volume inside the wick.
How it works?
Calculate candle count of inside wick and volumes. Than display like below image
T/iW: Total Candle / Total inside Wick
ROiW: Rate of inside wick candle count
TV/WV: Total volume / Wick volume
Dynamic Trend Line Pro📌 Detailed Explanation of the TradingView Indicator Code**
This **Pine Script v6** indicator dynamically **draws trend lines** based on pivot highs and pivot lows, helping traders visualize market trends in real-time.
---
## **🔹 How the Indicator Works**
This script detects key **pivot points** (local highs and lows) in the price chart and connects them to draw **trend lines**. Here's a breakdown of the process:
1. **Detects Pivot Highs and Lows**:
- **Pivot High:** A local maximum where the price is higher than surrounding bars.
- **Pivot Low:** A local minimum where the price is lower than surrounding bars.
2. **Stores the Last Pivot Points**:
- The script remembers the **last pivot high** and **last pivot low** points to **draw dynamic trend lines**.
3. **Draws Trend Lines**:
- The **uptrend** (support) line is drawn from two **pivot lows**.
- The **downtrend** (resistance) line is drawn from two **pivot highs**.
- Trend lines are continuously updated and extended.
---
## **🔹 Code Breakdown**
### **1️⃣ Inputs for User Customization**
```pinescript
leftLen = input.int(2, 'Left Pivots')
rightLen = input.int(2, 'Right Pivots')
lineThickness = input.int(3, 'Trend Line Thickness')
lineTransparency = input.int(20, 'Line Transparency')
```
- **leftLen & rightLen:** Set the number of bars on the left and right of the pivot point to confirm its validity.
- **lineThickness:** Controls the **thickness** of the trend line.
- **lineTransparency:** Adjusts the **opacity** of the trend line (0 = fully opaque, 100 = fully transparent).
---
### **2️⃣ Detect Pivot Highs and Lows**
```pinescript
pivotHigh = ta.pivothigh(leftLen, rightLen)
pivotLow = ta.pivotlow(leftLen, rightLen)
```
- **ta.pivothigh(leftLen, rightLen):** Identifies a **pivot high**, where the price is higher than the surrounding bars.
- **ta.pivotlow(leftLen, rightLen):** Identifies a **pivot low**, where the price is lower than the surrounding bars.
---
### **3️⃣ Store the Last Pivot Points**
#### **Storing the Last Pivot High (Resistance)**
```pinescript
var float lastHP = na
var int lastHPIndex = na
```
- These variables store the most recent **pivot high** (`lastHP`) and its **bar index** (`lastHPIndex`).
#### **Storing the Last Pivot Low (Support)**
```pinescript
var float lastLP = na
var int lastLPIndex = na
```
- These variables store the most recent **pivot low** (`lastLP`) and its **bar index** (`lastLPIndex`).
---
### **4️⃣ Update Pivot Points When New Ones Are Found**
#### **Updating Pivot Highs (Resistance)**
```pinescript
if not na(pivotHigh)
lastHP := pivotHigh
lastHPIndex := bar_index - rightLen
```
- If a new **pivot high** is found:
- Update `lastHP` with the new pivot high.
- Update `lastHPIndex` with the current bar index.
#### **Updating Pivot Lows (Support)**
```pinescript
if not na(pivotLow)
lastLP := pivotLow
lastLPIndex := bar_index - rightLen
```
- Similarly, if a new **pivot low** is found:
- Update `lastLP` with the new pivot low.
- Update `lastLPIndex` with the current bar index.
---
### **5️⃣ Detect Trend Direction**
```pinescript
trendUp = lastLP > lastLP and not na(lastLP )
trendDown = lastHP < lastHP and not na(lastHP )
```
- **Uptrend Condition:** If the most recent pivot low (`lastLP`) is higher than the previous one, it indicates an uptrend.
- **Downtrend Condition:** If the most recent pivot high (`lastHP`) is lower than the previous one, it indicates a downtrend.
---
### **6️⃣ Drawing Trend Lines**
#### **Drawing the Uptrend (Support) Line**
```pinescript
if trendUp
if na(trendLine)
trendLine := line.new(lastLPIndex , lastLP , lastLPIndex, lastLP, color=color.new(color.green, lineTransparency), width=lineThickness, extend=extend.right)
else
line.set_xy1(trendLine, lastLPIndex , lastLP )
line.set_xy2(trendLine, lastLPIndex, lastLP)
line.set_color(trendLine, color.new(color.green, lineTransparency))
line.set_width(trendLine, lineThickness)
```
- **Uptrend Line:** If the uptrend is detected (`trendUp`), the script either creates a new **green trend line** connecting the last two pivot lows or updates the existing one with the latest points.
#### **Drawing the Downtrend (Resistance) Line**
```pinescript
if trendDown
if na(trendLine)
trendLine := line.new(lastHPIndex , lastHP , lastHPIndex, lastHP, color=color.new(color.red, lineTransparency), width=lineThickness, extend=extend.right)
else
line.set_xy1(trendLine, lastHPIndex , lastHP )
line.set_xy2(trendLine, lastHPIndex, lastHP)
line.set_color(trendLine, color.new(color.red, lineTransparency))
line.set_width(trendLine, lineThickness)
```
- **Downtrend Line:** If the downtrend is detected (`trendDown`), the script either creates a new **red trend line** connecting the last two pivot highs or updates the existing one with the latest points.
---
## **🔹 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 Trend Lines**:
- **Green Line (Support):** Indicates potential support levels. Price may **bounce** off this line.
- **Red Line (Resistance):** Indicates potential resistance levels. Price may **struggle** to break above this line.
3. **Trading Strategy**:
- **Breakout Strategy:**
- If the price **breaks resistance** (red line), it may signal a **bullish** move.
- If the price **breaks support** (green line), it may signal a **bearish** move.
- **Reversal Strategy:**
- Look for **bounces** off support or resistance for potential reversals.
---
## **🔹 Key Features of This Indicator**
✅ **Automatically detects pivot highs and lows.**
✅ **Real-time updates** as new pivot points form.
✅ **Customizable settings** for line thickness and transparency.
✅ Helps traders visualize key **support** and **resistance** levels.
This indicator is perfect for **trend traders**, **support/resistance traders**, and anyone interested in **breakout** or **reversal strategies**. 🚀
Discount/Premium OTE LevelsThis indicator is created to identify discount/premium areas to provide additional confluence to trades taken. The underlying theory is that the trades taken in discounted areas are likely to have less risk due to a smaller stop loss and a higher reward/risk ratio.
The indicator operates by first identifying a zone between the last major swing high and low. These highs and lows are determined as price points that at the extremes within the number of bars to the left, as defined by the "Swing Sensitivity" setting.
Once a price zone is established, the indicator verifies that the zone meets the minimum size in points as configured via the "Minimum size" setting to be considered tradable. Zones that are too small may not provide a sufficient range even for scalping. The default value is 42 points based on Nasdaq, which means that the distance between inner most OTE levels (0.382 and 0.618) is at least 10 points.
When a valid zone is identified, it is then subdivided into areas of interest based on OTE levels, which can be configured/adjusted via the "Levels to Draw" setting. These levels represent the midpoint (50%), which distinguishes between premium and discount, and the three OTE levels 0.79, 0.705, 0.618, above the 50% for discount and below the 50% for premium.
For example, if a zone is formed initially by a swing low followed by a swing high with the assumption that the draw is higher, the indicator can be used to formulate long positions from below the 50% level starting at 0.38 OTE level, or ideally at 0.295 OTE level using 0 as a stop loss. Alternatively, if the 50% level is not yet tapped, short scalp positions can be made from 0.79-0.618 OTE levels with 50% as a partial or TP target.
See for long/short example
Typically, the indicator will show only a single zone. However, there may be cases with two zones: one larger parent zone containing a smaller, valid price zone within itself.
The indicator will automatically invalidate and remove the zone once the high/low of the zone is invalidated.
Configuration:
The indicator provides several visualization options for customization, including:
Color settings for OTE levels, with separate settings for edge/50% color, premium, and discount levels.
Settings for line style for OTE levels.
Settings to determine whether to show prices on level labels.
Settings to decide if lines should be extended to the right.
AE - ATR Exhaustion ChannelAE - ATR Exhaustion Channel
📈 Overview
Identify Exhaustion Zones & Trend Breakouts with ATR Precision!
The AE - ATR Exhaustion Channel is a powerful volatility-based trading tool that combines an averaged SMA with ATR bands to dynamically highlight potential trend exhaustion zones. It provides real-time breakout detection by marking when price moves beyond key volatility bands, helping traders spot overextensions and reversals with ease.
🔑 Key Features
✔️ ATR-SMA Hybrid Channel: Uses an averaged SMA as the core trend filter while incorporating adaptive ATR-based bands for precise volatility tracking.
✔️ Dynamic Exhaustion Markers: Marks red crosses when price exceeds the upper band and green crosses when price drops below the lower band.
✔️ Customizable ATR Sensitivity: Adjust the ATR multiplier and length settings to fine-tune band sensitivity based on market conditions.
✔️ Clear Channel Visualization: A gray SMA midpoint and a blue-filled ATR band zone make it easy to track market structure.
📚 How It Works
1️⃣ Averaged SMA Calculation: The script calculates an averaged SMA over a user-defined range (min/max period). This smooths out short-term fluctuations while preserving trend direction.
2️⃣ ATR Band Construction: The ATR value (adjusted by a multiplier) is added to/subtracted from the SMA to form dynamic upper and lower volatility bands.
3️⃣ Exhaustion Detection:
If high > upper ATR band, a red cross is plotted (potential overextension).
If low < lower ATR band, a green cross is plotted (potential reversal zone).
4️⃣ Filled ATR Channel: The area between the upper and lower bands is shaded blue, providing a visual trading range.
🎨 Customization & Settings
⚙️ ATR Length – Adjusts the ATR calculation period (default: 14).
⚙️ ATR Multiplier – Scales the ATR bands for tighter or wider volatility tracking (default: 0.8, adjustable in 0.1 steps).
⚙️ SMA Range (Min/Max Length) – Defines the period range for calculating the averaged SMA (default: 5-20).
⚙️ Rolling Lookback Length – Controls how far back the high/low comparison is calculated (default: 50 bars).
🚀 Practical Usage
📌 Spotting Exhaustion Zones – Look for red/green markers appearing outside the ATR bands, signaling potential trend exhaustion and possible reversal opportunities.
📌 Breakout Confirmation – Price consistently breaching the upper band with momentum could indicate continuation, while repeated touches without strong closes may hint at reversal zones.
📌 Trend Reversal Signals – Watch for green markers below the lower band in uptrends (buy signals) and red markers above the upper band in downtrends (sell signals).
🔔 Alerts & Notifications
📢 Set Alerts for Exhaustion Signals!
Traders can configure alerts to trigger when price breaches the ATR bands, allowing for instant notifications when volatility-based exhaustion is detected.
📊 Example Scenarios
✔ Trend Exhaustion in Overextended Moves – A series of red crosses near resistance may indicate a short opportunity.
✔ Trend Exhaustion in Overextended Moves – A series of red crosses near resistance may indicate an opportunity to open a short trade.
✔ Volatility Compression Breakouts – If price consolidates within the ATR bands and suddenly breaks out, it could signify a momentum shift.
✔ Reversal Catching in Trending Markets – Spot potential trend reversals by looking for green markers below the ATR bands in bullish markets.
🌟 Why Choose AE - ATR Exhaustion Channel?
Trade with Confidence. Spot Volatility. Catch Breakouts.
The AE - ATR Exhaustion Channel is an essential tool for traders looking to identify trend exhaustion, detect breakouts, and manage volatility effectively. Whether you're trading stocks, crypto, or forex, this ATR-SMA hybrid system provides clear visual cues to help you stay ahead of market moves.
✅ Customizable to Fit Any Market
✅ Combines Volatility & Trend Analysis
✅ Easy-to-Use with Instant Breakout Detection
Scalping Tool with Dynamic Take Profit & Stop Loss### **Scalping Indicator: Summary and User Guide**
The **Scalping Indicator** is a powerful tool designed for traders who focus on short-term price movements. It combines **Exponential Moving Averages (EMA)** for trend identification and **Average True Range (ATR)** for dynamic stop loss and take profit levels. The indicator is highly customizable, allowing traders to adapt it to their specific trading style and risk tolerance.
---
### **Key Features**
1. **Trend Identification**:
- Uses two EMAs (Fast and Slow) to identify trend direction.
- Generates **Buy Signals** when the Fast EMA crosses above the Slow EMA.
- Generates **Sell Signals** when the Fast EMA crosses below the Slow EMA.
2. **Dynamic Take Profit (TP) and Stop Loss (SL)**:
- **Take Profit (TP)**:
- TP levels are calculated as a percentage above (for long trades) or below (for short trades) the entry price.
- TP levels are **dynamically recalculated** when the price reaches the initial target, allowing for multiple TP levels during a single trade.
- **Stop Loss (SL)**:
- SL levels are calculated using the ATR multiplier, providing a volatility-based buffer to protect against adverse price movements.
3. **Separate Settings for Long and Short Trades**:
- Users can independently enable/disable and configure TP and SL for **Buy** and **Sell** orders.
- This flexibility ensures that the indicator can be tailored to different market conditions and trading strategies.
4. **Visual Signals and Levels**:
- **Buy/Sell Signals**: Clearly marked on the chart with labels ("BUY" or "SELL").
- **TP and SL Levels**: Plotted on the chart for both long and short trades, making it easy to visualize risk and reward.
---
### **How to Use the Scalping Indicator**
#### **1. Setting Up the Indicator**
- Apply the indicator to your chart in TradingView.
- Configure the input parameters based on your trading preferences:
- **Fast Length**: The period for the Fast EMA (default: 5).
- **Slow Length**: The period for the Slow EMA (default: 13).
- **ATR Length**: The period for the ATR calculation (default: 14).
- **Buy/Sell TP and SL**: Enable/disable and set the percentage or ATR multiplier for TP and SL levels.
#### **2. Interpreting the Signals**
- **Buy Signal**:
- When the Fast EMA crosses above the Slow EMA, a "BUY" label appears below the price bar.
- The TP and SL levels for the long trade are plotted on the chart.
- **Sell Signal**:
- When the Fast EMA crosses below the Slow EMA, a "SELL" label appears above the price bar.
- The TP and SL levels for the short trade are plotted on the chart.
#### **3. Managing Trades**
- **Take Profit (TP)**:
- When the price reaches the initial TP level, the indicator automatically recalculates the next TP level based on the new close price.
- This allows traders to capture additional profits as the trend continues.
- **Stop Loss (SL)**:
- The SL level is based on the ATR multiplier, providing a dynamic buffer against market volatility.
- If the price hits the SL level, the trade is considered closed, and the indicator resets.
#### **4. Customization**
- Adjust the **Fast Length** and **Slow Length** to suit your trading timeframe (e.g., shorter lengths for scalping, longer lengths for swing trading).
- Modify the **ATR Multiplier** and **TP Percentage** to align with your risk-reward ratio.
- Enable/disable TP and SL for long and short trades based on your trading strategy.
---
### **Tips for Getting the Best Results**
1. **Combine with Price Action**:
- Use the Scalping Indicator in conjunction with support/resistance levels, candlestick patterns, or other technical analysis tools to confirm signals.
2. **Optimize for Your Timeframe**:
- For **scalping**, use shorter EMA lengths (e.g., Fast: 5, Slow: 13).
- For **swing trading**, use longer EMA lengths (e.g., Fast: 10, Slow: 20).
3. **Adjust Risk Management**:
- Use a smaller **ATR Multiplier** for tighter stop losses in low-volatility markets.
- Increase the **TP Percentage** to allow for larger price movements in high-volatility markets.
4. **Backtest and Practice**:
- Test the indicator on historical data to understand its performance in different market conditions.
- Use a demo account to practice trading with the indicator before applying it to live trading.
---
### **Conclusion**
The **Scalping Indicator** is a versatile and user-friendly tool for traders who want to capitalize on short-term price movements. By combining trend-following EMAs with dynamic TP and SL levels, it provides a clear and systematic approach to trading. Whether you're a scalper or a swing trader, this indicator can help you identify high-probability setups and manage risk effectively. Customize it to fit your strategy, and always remember to combine it with sound risk management principles for the best results.
Hybrid Moving Average - Market TrendHybrid Moving Average Market Trend System - , designed to visualize market trends using a combination of three moving averages: FRAMA (Fractal Adaptive Moving Average), VIDYA (Variable Index Dynamic Average), and a Hamming windowed Volume-Weighted Moving Average (VWMA).
Key Features:
FRAMA Calculation:
FRAMA adapts to market volatility by dynamically adjusting its smoothing factor based on the fractal dimension of price movement. This allows it to be more responsive during trending periods while filtering out noise in sideways markets. The FRAMA is calculated for both short and long periods
VIDYA with CMO:
The VIDYA (Variable Index Dynamic Average) is based on a Chande Momentum Oscillator (CMO), which adjusts the smoothing factor dynamically depending on the momentum of the market. Higher momentum periods result in more responsive averages, while low momentum periods lead to smoother averages. Like FRAMA, VIDYA is calculated for both short and long periods.
Hamming Windowed VWMA:
This VWMA variation applies a Hamming window to smooth the weighting of volume across the calculation period. This method emphasizes central data points and reduces noise, making the VWMA more adaptive to volume fluctuations. The Hamming VWMA is calculated for short and long periods, offering another layer of adaptability to the hybrid moving average.
Hybrid Moving Averages:
Dynamic Coloring and Filling:
The script uses dynamic color transitions to visually distinguish between bullish and bearish conditions:
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!
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.
5-Min Trendline Breakout Based on H1 S/R [ABU SETTS]Trail, just wrote and still doing tuning.
What Changed?
Fixed plotshape Size Argument:- Added a switch statement to convert the input string (breakout_label_size) into a const string (label_size).
This ensures the size argument in plotshape receives a valid const string.
Improved Flexibility: - The breakout_label_size input now works correctly with plotshape and label.new.
How to Use
Adjust the Pivot Length, Slope Multiplier, and other inputs to customize the script.
Use the Breakout Label Size dropdown to select the size of the breakout labels (tiny, small, or normal).
Toggle Show Only Confirmed Breakouts to filter out unconfirmed signals.
Volume-price divergence -faterAn indicator used to identify abnormal volume-price relationships within a certain period. When prices hit new highs, but volume decreases significantly, this often means that the trend is unsustainable. The indicator will mark the k-bars where prices hit new highs or lows, but volume is less than a certain percentage of the maximum volume in the specified period, which can provide a reference for adjusting positions.
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.
[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.
KDJ J Value Strategy (Weekly)This strategy is based on the KDJ indicator at the weekly level, using the changes in the J value to generate buy and sell signals. When the J value drops below -5, it is considered a buy signal; when the J value rises above 90, it is considered a sell signal.
Kess EMA MagicKess EMA Magic - Indicator Description
The Kess EMA Magic indicator is a powerful tool designed to enhance trend analysis by plotting four key Exponential Moving Averages (EMAs): 8, 21, 50, and 200. These EMAs help traders identify short-term, medium-term, and long-term trends with clarity.
- 8 EMA (Blue): Represents short-term price movement, often used for quick trend shifts.
- 21 EMA (Purple): Acts as a dynamic support/resistance level and a key trend-following indicator.
- 50 EMA (Orange): A widely-used medium-term trend filter, helping traders confirm trend strength.
- 200 EMA (Red): A crucial long-term trend indicator, often defining bullish or bearish market conditions.
This indicator is ideal for traders looking to refine their trend-following strategies by visually identifying confluence zones where multiple EMAs interact. By integrating the Kess EMA Magic, users can improve their market timing, optimize trade entries/exits, and gain deeper insights into price momentum. 🚀
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.
Sideways Scalper Peak and BottomUnderstanding the Indicator
This indicator is designed to identify potential peaks (tops) and bottoms (bottoms) within a market, which can be particularly useful in a sideways or range-bound market where price oscillates between support and resistance levels without a clear trend. Here's how it works:
RSI (Relative Strength Index): Measures the speed and change of price movements to identify overbought (above 70) and oversold (below 30) conditions. In a sideways market, RSI can help signal when the price might be due for a reversal within its range.
Moving Averages (MAs): The Fast MA and Slow MA provide a sense of the short-term and longer-term average price movements. In a sideways market, these can help confirm if the price is at the upper or lower extremes of its range.
Volume Spike: Looks for significant increases in trading volume, which might indicate a stronger move or a potential reversal point when combined with other conditions.
Divergence: RSI divergence occurs when the price makes a new high or low, but the RSI does not, suggesting momentum is weakening, which can be a precursor to a reversal.
How to Use in a Sideways Market
Identify the Range: First, visually identify the upper resistance and lower support levels of the sideways market on your chart. This indicator can help you spot these levels more precisely by signaling potential peaks and bottoms.
Peak Signal :
When to Look: When the price approaches the upper part of the range.
Conditions: The indicator will give a 'Peak' signal when:
RSI is over 70, indicating overbought conditions.
There's bearish divergence (price makes a higher high, but RSI doesn't).
Volume spikes, suggesting strong selling interest.
Price is above both Fast MA and Slow MA, indicating it's at a potentially high point in the range.
Action: This signal suggests that the price might be at or near the top of its range and could reverse downwards. A trader might consider selling or shorting here, expecting the price to move towards the lower part of the range.
Bottom Signal:
When to Look: When the price approaches the lower part of the range.
Conditions: The indicator will give a 'Bottom' signal when:
RSI is below 30, indicating oversold conditions.
There's bullish divergence (price makes a lower low, but RSI doesn't).
Volume spikes, suggesting strong buying interest.
Price is below both Fast MA and Slow MA, indicating it's at a potentially low point in the range.
Action: This signal suggests that the price might be at or near the bottom of its range and could reverse upwards. A trader might consider buying here, expecting the price to move towards the upper part of the range.
Confirmation: In a sideways market, false signals can occur due to the lack of a strong trend. Always look for confirmation:
Volume Confirmation: A significant volume spike can add confidence to the signal.
Price Action: Look for price action like candlestick patterns (e.g., doji, engulfing patterns) that confirm the reversal.
Time Frame: Consider using this indicator on multiple time frames. A signal on a shorter time frame (like 15m or 1h) might be confirmed by similar conditions on a longer time frame (4h or daily).
Risk Management: Since this is designed for scalping in a sideways market:
Set Tight Stop-Losses: Due to the quick nature of reversals in range-bound markets, place stop-losses close to your entry to minimize loss.
Take Profit Levels: Set profit targets near the opposite end of the range or use a trailing stop to capture as much of the move as possible before it reverses again.
Practice: Before trading with real money, practice with this indicator on historical data or in a paper trading environment to understand how it behaves in different sideways market scenarios.
Key Points for New Traders
Patience: Wait for all conditions to align before taking a trade. Sideways markets require patience as the price might hover around these levels for a while.
Not All Signals Are Equal: Sometimes, even with all conditions met, the market might not reverse immediately. Look for additional context or confirmation.
Continuous Learning: Understand that this indicator, like any tool, isn't foolproof. Learn from each trade, whether it's a win or a loss, and adjust your strategy accordingly.
By following these guidelines
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.
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!**
Whale Supertrend (V1.2)The script "Whale Supertrend (V1.2)" is an advanced trend indicator that uses multiple Supertrends with different factors to determine entry and exit points in the market. The Supertrend is a popular indicator that combines price and volatility to help identify trend direction. The script displays buy and sell signals based on the confluence of Supertrends.
How the script works
Configuring Supertrends
The script configures six Supertrends with different factors (factor, factor1, factor2, factor3, factor4, factor5) while using the same ATR period (atrPeriod = 10).
Supertrend 1: factor = 3
Supertrend 2: factor1 = 4
Supertrend 3: factor2 = 6
Supertrend 4: factor3 = 9
Supertrend 5: factor4 = 13
Supertrend 6: factor5 = 18
For each Supertrend, the bullish (blue) and bearish (purple) trend conditions are plotted on the chart.
Signal Calculation
The script calculates the number of Supertrends in bullish and bearish trend:
bullishCount: Number of Supertrends indicating a bullish trend.
bearishCount: Number of Supertrends indicating a bearish trend.
Signal Detection
The script triggers a buy or sell signal when at least three of the six Supertrends indicate the same trend:
Buy Signal (buySignal): Triggers when bullishCount is greater than or equal to 3.
Sell Signal (sellSignal): Triggers when bearishCount is greater than or equal to 3.
To avoid repetition, signals are only displayed when the state changes:
triggerBuy: Buy signal only when buySignal becomes true for the first time.
triggerSell: Sell signal only when sellSignal becomes true for the first time.
Candle Coloring:
Candles now change color based on signals:
Green: When a Buy Signal is active.
Red: When a Sell Signal is active.
This provides a clearer visualization of market trends directly on the chart.
Dynamic Settings for Supertrends:
You can customize the ATR Period and Factor for each of the 6 Supertrends via the settings panel.
Each Supertrend has independent parameters:
ATR Period: Controls the ATR calculation period.
Factor: Adjusts the Supertrend sensitivity.
Benefits:
Enhanced Readability: Candle colors help identify buy and sell zones at a glance.
Greater Customization: Tailor Supertrend settings to your trading strategy or market conditions.