Enhanced RSI Divergence StrategyCore Strategy Logic
1. Higher Timeframe (HTF) Context
Purpose: Align with the dominant trend (e.g., "bullish made new highs").
Tools:
Price action (breakouts, key support/resistance levels).
Trend confirmation (e.g., 50EMA on 1H/4H charts).
2. Lower Timeframe (LTF) Entry Triggers
Momentum Breakdown (Short Example):
Signal: Price makes "high of the day" + reversal candlestick (e.g., bearish engulfing).
Confirmation: RSI divergence or volume spike.
Support Reversion (Long/Short):
Signal: False breakout (e.g., "faked bullish breakout and reversed").
Confirmation: Wick rejection at HTF support/resistance.
3. Trade Execution
Entry: On 5-minute close after trigger.
Stop Loss (SL):
Current: Fixed ticks (e.g., 7-13 pts) → Issue: Too tight for US100 volatility.
Improved: 1.5x ATR(14) or beyond recent swing high/low.
Take Profit (TP):
Current: Fixed price levels (e.g., 21523).
Improved: Tiered exits (50% at 1:1 RR, trail rest).
4. Position Sizing
Fixed contracts (e.g., 10 per trade).
Better Approach: Risk 1-2% of capital per trade (adjust size based on SL distance).
Key Strengths
HTF+LTF Alignment: Avoids counter-trend traps by trading in HTF direction.
Flexibility: Adapts to momentum and mean-reversion setups.
Journaling: Tracks emotions/mistakes (critical for improvement).
Göstergeler ve stratejiler
Range Bar Gaps DetectorRange Bar Gaps Detector
Overview
The Range Bar Gaps Detector identifies price gaps across multiple range bar sizes (12, 24, 60, and 120) on any trading instrument, helping traders spot potential support/resistance zones or breakout opportunities. Designed for Pine Script v6, this indicator detects gaps on range bars and exports data for use in companion scripts like Range Bar Gaps Overlap, making it ideal for multi-timeframe gap analysis.
Key Features
Multi-Range Gap Detection: Identifies gaps on 12, 24, 60, and 120-range bars, capturing both bullish (gap up) and bearish (gap down) price movements.
Customizable Sensitivity: Includes a user-defined minimum deviation (default: 10% of 14-period SMA) for 12-range gaps to filter out noise.
7-Day Lookback: Automatically prunes gaps older than 7 days to focus on recent, relevant price levels.
Data Export: Serializes up to 10 gaps per range (tops, bottoms, start bars, highest/lowest prices, and age) for seamless integration with overlap analysis scripts.
Debugging Support: Plots gap counts and aggregation data in the Data Window for easy verification of detected gaps.
How It Works
The indicator aggregates price movements to simulate higher range bars (24, 60, 120) from a base range bar chart. It detects gaps when the price jumps significantly between bars, ensuring gaps meet the minimum deviation threshold for 12-range bars. Gaps are stored in arrays, serialized for external use, and pruned after 7 days to maintain efficiency.
Usage
Add to your range bar chart (e.g., 12-range) to detect gaps across multiple ranges.
Use alongside the Range Bar Gaps Overlap indicator to visualize gaps and their overlaps as boxes on the chart.
Check the Data Window to confirm gap counts and sizes for each range (12, 24, 60, 120).
Adjust the "Minimal Deviation (%) for 12-Range" input to control gap detection sensitivity.
Settings
Minimal Deviation (%) for 12-Range: Set the minimum gap size for 12-range bars (default: 10% of 14-period SMA).
Range Sizes: Fixed at 24, 60, and 120 for higher range bar aggregation.
Notes
Ensure the script is published under your TradingView username (e.g., GreenArrow2005) for use with companion scripts.
Best used on range bar charts to maintain consistent gap detection.
For advanced overlap analysis, pair with the Range Bar Gaps Overlap indicator to highlight zones where gaps from different ranges align.
Ideal For
Traders seeking to identify key price levels for support/resistance or breakout strategies.
Multi-timeframe analysts combining gap data across various range bar sizes.
Developers building custom indicators that leverage gap data for advanced charting.
H turnoverTrading Value refers to the total monetary amount of all transactions for a particular stock or the entire market over a specific period. It is calculated by multiplying the trading volume (the number of shares traded) by the price at which they were traded. For example, if 10,000 shares of a stock are traded in a day at an average price of 50,000 KRW, the trading value for that day would be 500,000,000 KRW.
Key points about trading value:
Market Activity and Liquidity: A high trading value indicates an active and liquid market.
Flow of Investment Funds: Increasing trading value suggests more money is flowing into the market or a particular stock.
Relationship with Price Movements: When both trading value and price rise together, it often signals strong buying interest. Conversely, significant price changes with low trading value may be less reliable.
Market Sentiment Indicator: Changes in trading value can reflect shifts in investor interest and sentiment.
In summary, trading value is the total amount of money exchanged in trades and serves as an important indicator of market activity, liquidity, and investor sentiment.
H IchimokuIchimoku Kinko Hyo (commonly called the Ichimoku Cloud) is a comprehensive technical analysis indicator developed by Japanese journalist Goichi Hosoda in the 1960s. Its name translates to “one glance equilibrium chart,” reflecting the tool’s purpose: to provide a quick, holistic view of market trend, momentum, and support/resistance levels.
The Ichimoku Cloud consists of five main components:
Tenkan-sen (Conversion Line): The average of the highest high and lowest low over the past 9 periods.
Kijun-sen (Base Line): The average of the highest high and lowest low over the past 26 periods.
Senkou Span A (Leading Span A): The average of the Tenkan-sen and Kijun-sen, plotted 26 periods ahead.
Senkou Span B (Leading Span B): The average of the highest high and lowest low over the past 52 periods, plotted 26 periods ahead.
Chikou Span (Lagging Span): The current closing price plotted 26 periods back.
The area between Senkou Span A and B forms the “cloud” (Kumo), which visually highlights key support and resistance zones. Prices above the cloud indicate an uptrend, below the cloud a downtrend, and within the cloud a consolidating or neutral market.
Ichimoku is valued for its ability to provide a broad, forward-looking perspective on price action, helping traders identify trends, momentum, and potential reversal points at a glance.
H BollingerBollinger Bands are a widely used technical analysis indicator that helps spot relative price highs and lows. The tool comprises three lines: a central band representing the 20-period simple moving average (SMA), and upper and lower bands usually placed two standard deviations above and below the SMA. These bands adjust with market volatility, offering insights into price fluctuations and trading conditions.
How this indicator works
Bollinger Bands helps traders assess price volatility and potential price reversals. They consist of three bands: the middle band, the upper band, and the lower band. Here's how Bollinger Bands work:
Middle band: This is typically a simple moving average (SMA) of the asset's price over a specified period. The most common period used is 20 days.
Upper band: This is calculated by adding a specified number of standard deviations to the middle band. The standard deviation measures the asset's price volatility. Commonly, two standard deviations are added to the middle band.
Lower band: Similar to the upper band, it is calculated by subtracting a specified number of standard deviations from the middle band.
What do Bollinger Bands tell you?
Bollinger bands primarily indicate the level of market volatility and trading opportunities. Narrow bands indicate low market volatility, while wide bands suggest high market volatility. Bollinger bands indicators can be used by traders to assess potential buy or sell signals. For instance, a sell signal may be interpreted or generated if the asset’s price moves closer or crosses the upper band, as it may indicate that the asset is overbought. Alternatively, a buy signal may be interpreted or generated if the price moves closer to the lower band, as it may signify that the asset is oversold.
However, traders should be cautious when using Bollinger Bands as standalone indicators when making trading decisions. Experienced traders refrain from confirming signals based on one indicator. Instead, they generally combine various technical indicators and fundamental analysis methods to make informed trading decisions. Basing trading decisions on only one indicator can result in misinterpretation of signals and heavy losses.
Bollinger Bands assist in identifying whether prices are relatively high or low. They are applied as a pair—upper and lower bands—alongside a moving average. However, these bands are not designed to be used in isolation. Instead, they should be used to validate signals generated by other technical indicators.
Calculation of Bollinger Band
Auto-Length Anchored Multiple EMA (Hour-Based)# Auto-Length Anchored Multiple EMA (Hour-Based)
## Overview
This advanced EMA indicator automatically calculates Exponential Moving Average lengths based on the time elapsed since user-defined anchor dates. Unlike traditional fixed-length EMAs, this indicator dynamically adjusts EMA periods based on actual trading hours, making it ideal for event-based analysis and time-sensitive trading strategies.
## Key Features
### 🎯 **Dual Mode Operation**
- **Auto Mode**: EMA length automatically calculated from anchor date to current time
- **Manual Mode**: Traditional fixed-length EMA calculation
- Switch between modes independently for each EMA
### 📊 **Multiple EMA Support**
- Up to 4 independent EMAs with individual configurations
- Each EMA can have its own anchor date and settings
- Individual enable/disable controls for each EMA
### ⏰ **Smart Time Calculation**
- Accounts for actual trading hours (customizable)
- Weekend exclusion with Saturday trading option (for markets like NSE/BSE)
- Hour multiplier for fine-tuning EMA sensitivity
- Minimum EMA length protection to prevent calculation errors
### 🎨 **Visual Enhancements**
- **Dynamic Fill Colors**: Fill between EMA1 and EMA3 changes color based on price position
- **Customizable Colors**: Individual color settings for each EMA
- **Anchor Visualization**: Optional vertical lines and labels at anchor dates
- **Real-time Table**: Shows current EMA lengths, modes, and values
## Configuration Options
### Trading Session Settings
- **Trading Hours Per Day**: Set your market's trading hours (1-24)
- **Trading Days Per Week**: Configure for different markets (5 for Mon-Fri, 6 for Mon-Sat)
- **Include Saturday**: Enable for markets that trade on Saturday
- **Hour Multiplier**: Fine-tune EMA sensitivity (0.1x to 10x)
### EMA Configuration
- **Anchor Dates**: Set specific start dates for each EMA calculation
- **Manual Lengths**: Override with traditional fixed periods when needed
- **Enable/Disable**: Individual control for each EMA
- **Color Customization**: Personalize appearance for each EMA
### Visual Options
- **Fill Settings**: Toggle and customize fill colors between EMAs
- **Anchor Lines**: Show vertical lines at anchor dates
- **Anchor Labels**: Display formatted anchor date information
- **Length Table**: Real-time display of current EMA parameters
## Use Cases
### 📈 **Event-Based Analysis**
- Anchor EMAs to earnings announcements, policy decisions, or market events
- Track price behavior relative to specific time periods
- Analyze momentum changes from key market catalysts
### 🕐 **Time-Sensitive Trading**
- Perfect for intraday strategies where timing is crucial
- Automatically adjusts to market hours and trading sessions
- Eliminates manual EMA length recalculation
### 🌍 **Multi-Market Support**
- Configurable for different global markets
- Saturday trading support for Asian markets
- Flexible trading hour settings
## Technical Details
### Calculation Method
The indicator calculates trading bars elapsed since anchor date using:
```
Total Trading Bars = (Days Since Anchor × Trading Days Per Week ÷ 7) × Trading Hours Per Day × Hour Multiplier
```
### EMA Formula
Uses standard EMA calculation with dynamically calculated alpha:
```
Alpha = 2 ÷ (Current Length + 1)
EMA = Alpha × Current Price + (1 - Alpha) × Previous EMA
```
### Weekend Handling
- Automatically excludes weekends from calculation
- Optional Saturday inclusion for specific markets
- Accurate trading day counting
## Installation & Setup
1. **Add to Chart**: Apply the indicator to your desired timeframe
2. **Set Anchor Dates**: Configure anchor dates for each EMA you want to use
3. **Adjust Trading Hours**: Set your market's trading session parameters
4. **Customize Appearance**: Choose colors and visual options
5. **Enable Features**: Turn on fills, anchor lines, and information table as needed
## Best Practices
- **Anchor Selection**: Choose significant market events or technical breakouts as anchor points
- **Multiple Timeframes**: Use different anchor dates for short, medium, and long-term analysis
- **Hour Multiplier**: Start with 1.0 and adjust based on market volatility and your trading style
- **Visual Clarity**: Use contrasting colors for different EMAs to improve readability
## Compatibility
- **Pine Script Version**: v6
- **Chart Types**: All chart types supported
- **Timeframes**: Works on all timeframes (optimal on intraday charts)
- **Markets**: Suitable for stocks, forex, crypto, and commodities
## Notes
- Indicator starts calculation from the anchor date forward
- Minimum EMA length prevents calculation errors with very recent anchor dates
- Table display updates in real-time showing current EMA parameters
- Fill colors dynamically change based on price position relative to EMA1
---
*This indicator is perfect for traders who want to combine the power of EMAs with event-driven analysis and precise time-based calculations.*
Enhanced Gann Time-Price SquaresEnhanced Gann Time-Price Squares Indicator
A comprehensive Pine Script indicator that identifies and visualizes W.D. Gann's time-price square formations on your charts. This tool helps traders spot potential market turning points where time and price movements align according to Gann's legendary market theories.
Key Features:
Automatic Square Detection - Identifies completed squares where price movement equals time movement
Future Projections - Shows forming squares with projected completion points
Pivot Integration - Automatically detects pivot highs/lows as square starting points
Visual Clarity - Clean box outlines with customizable colors and styles
Smart Filtering - Prevents overlapping squares and includes minimum move thresholds
Real-time Status - Information table showing current square formations
How to Use:
The indicator draws boxes when price moves from pivot points equal the time elapsed (number of bars). Green squares indicate upward movements, red squares show downward movements. Dashed lines show forming squares, while dotted lines project where they might complete.
Settings:
Adjust pivot sensitivity and minimum price moves
Customize tolerance for time-price matching
Toggle projections, labels, and visual elements
Fine-tune colors and line styles
Perfect for Gann theory practitioners and traders looking for time-based market analysis. The squares often coincide with significant support/resistance levels and potential reversal points.
Compatible with all timeframes and instruments.
More updates to follow
Weekly Volume USDT## Description
This Pine Script indicator displays the trading volume for each day of the current week (Monday through Sunday) in a clean table format on your TradingView chart. The volume is calculated in USDT equivalent and displayed in the top-right corner of the chart.
## Features
- **Weekly Volume Breakdown**: Shows individual daily volumes from Monday to Sunday
- **USDT Conversion**: Automatically converts volume to USDT using the average price (open + close / 2)
- **Smart Formatting**:
- Large numbers are formatted with K (thousands) and M (millions) suffixes
- Example: 1,234,567 → 1.23M USDT
- **Clean Table Display**: Fixed position table in the top-right corner
- **Current Week Focus**: Displays volumes for the current week only
- **Future Days Handling**: Days that haven't occurred yet in the current week show as "-"
## How It Works
1. The indicator calculates the average price for each day using (Open + Close) / 2
2. Multiplies the daily volume by the average price to get USDT-equivalent volume
3. Displays the results in an easy-to-read table format
## Use Cases
- **Volume Analysis**: Quickly identify which days of the week have the highest trading activity
- **Pattern Recognition**: Spot weekly volume patterns and trends
- **Trading Decisions**: Use volume information to inform your trading strategies
- **Market Activity Monitoring**: Keep track of market participation throughout the week
## Installation
Simply add this indicator to your TradingView chart and it will automatically display the weekly volume table in the top-right corner.
## Tags
#volume #weekly #USDT #table #analysis #trading #cryptocurrency
Fear and Greed Index [DunesIsland]The Fear and Greed Index is a sentiment indicator designed to measure the emotions driving the stock market, specifically investor fear and greed. Fear represents pessimism and caution, while greed reflects optimism and risk-taking. This indicator aggregates multiple market metrics to provide a comprehensive view of market sentiment, helping traders and investors gauge whether the market is overly fearful or excessively greedy.How It WorksThe Fear and Greed Index is calculated using four key market indicators, each capturing a different aspect of market sentiment:
Market Momentum (30% weight)
Measures how the S&P 500 (SPX) is performing relative to its 125-day simple moving average (SMA).
A higher value indicates that the market is trading well above its moving average, signaling greed.
Stock Price Strength (20% weight)
Calculates the net number of stocks hitting 52-week highs minus those hitting 52-week lows on the NYSE.
A greater number of net highs suggests strong market breadth and greed.
Put/Call Options (30% weight)
Uses the 5-day average of the put/call ratio.
A lower ratio (more call options being bought) indicates greed, as investors are betting on rising prices.
Market Volatility (20% weight)
Utilizes the VIX index, which measures market volatility.
Lower volatility is associated with greed, as investors are less fearful of large market swings.
Each component is normalized using a z-score over a 252-day lookback period (approximately one trading year) and scaled to a range of 0 to 100. The final Fear and Greed Index is a weighted average of these four components, with the weights specified above.Key FeaturesIndex Range: The index value ranges from 0 to 100:
0–25: Extreme Fear (red)
25–50: Fear (orange)
50–75: Neutral (yellow)
75–100: Greed (green)
Dynamic Plot Color: The plot line changes color based on the index value, visually indicating the current sentiment zone.
Reference Lines: Horizontal lines are plotted at 0, 25, 50, 75, and 100 to represent the different sentiment levels: Extreme Fear, Fear, Neutral, Greed, and Extreme Greed.
How to Interpret
Low Values (0–25): Indicate extreme fear, which may suggest that the market is oversold and could be due for a rebound.
High Values (75–100): Indicate greed, which may signal that the market is overbought and could be at risk of a correction.
Neutral Range (25–75): Suggests a balanced market sentiment, neither overly fearful nor greedy.
This indicator is a valuable tool for contrarian investors, as extreme readings often precede market reversals. However, it should be used in conjunction with other technical and fundamental analysis tools for a well-rounded view of the market.
Hybrid: RSI + Breakout + Dashboard95% of traders lose, then i developped a bot that can go over those rules.
MTF_MA RibbonThis script plots a ribbon of Moving Averages for Daily, Weekly and Monthly timeframes and helps in Multi-timeframe analysis of securities for swing & positional trades. once applied to chart, the moving averages change automatically according to the selected timeframe.
Following are the default moving averages :
Daily TF EMAs: 5D, 10D, 20D
Daily TF SMAs: 50D, 100D, 150D, 200D
Weekly TF SMAs: 10W, 20W, 30W, 40W
Monthly TF SMAs: 3M, 5M, 8M, 11M
CME Crude Oil 15-Min Multi-Unified Entry Zones (Dot Signals)//@version=6
indicator("CME Crude Oil 15-Min Multi-Unified Entry Zones (Dot Signals)", overlay=true)
// --- Input Parameters ---
emaLength = input.int(11, title="EMA Length", minval=1)
// Ichimoku Cloud Inputs (Adjusted for higher sensitivity)
conversionLineLength = input.int(7, title="Ichimoku Conversion Line Length (Sensitive)", minval=1)
baseLineLength = input.int(20, title="Ichimoku Base Line Length (Sensitive)", minval=1)
laggingSpanLength = input.int(40, title="Ichimoku Lagging Span Length (Sensitive)", minval=1)
displacement = input.int(26, title="Ichimoku Displacement", minval=1)
// MACD Inputs (Adjusted for higher sensitivity)
fastLength = input.int(9, title="MACD Fast Length (Sensitive)", minval=1)
slowLength = input.int(21, title="MACD Slow Length (Sensitive)", minval=1)
signalLength = input.int(6, title="MACD Signal Length (Sensitive)", minval=1)
// RSI Inputs
rsiLength = input.int(8, title="RSI Length", minval=1)
rsiOverbought = input.int(70, title="RSI Overbought Level", minval=50, maxval=90)
rsiOversold = input.int(30, title="RSI Oversold Level", minval=10, maxval=50)
// ADX Inputs
adxLength = input.int(14, title="ADX Length", minval=1)
adxTrendStrengthThreshold = input.int(20, title="ADX Trend Strength Threshold", minval=10, maxval=50)
// Weak Entry Threshold (50 ticks for Crude Oil, where 1 tick = $0.01)
// 50 ticks = $0.50
weakEntryTickThreshold = input.float(0.50, title="Weak Entry Threshold (in $)", minval=0.01)
// --- Indicator Calculations ---
// 1. EMA 11
ema11 = ta.ema(close, emaLength)
// 2. Ichimoku Cloud
donchian(len) => math.avg(ta.lowest(len), ta.highest(len))
tenkanSen = donchian(conversionLineLength)
kijunSen = donchian(baseLineLength)
senkouSpanA = math.avg(tenkanSen, kijunSen)
senkouSpanB = donchian(laggingSpanLength)
// Shifted for plotting (future projection)
senkouSpanA_plot = senkouSpanA
senkouSpanB_plot = senkouSpanB
// Chikou Span (lagging span, plotted 26 periods back)
chikouSpan = close
// 3. MACD
= ta.macd(close, fastLength, slowLength, signalLength)
// 4. RSI
rsi = ta.rsi(close, rsiLength)
// 5. ADX
= ta.dmi(adxLength, adxLength)
// --- Price Volume Pattern Logic ---
// Simplified volume confirmation:
isVolumeIncreasing = volume > volume
isVolumeDecreasing = volume < volume
isPriceUp = close > close
isPriceDown = close < close
bullishVolumeConfirmation = (isPriceUp and isVolumeIncreasing) or (isPriceDown and isVolumeDecreasing)
bearishVolumeConfirmation = (isPriceDown and isVolumeIncreasing) or (isPriceUp and isVolumeDecreasing)
// --- Daily Pivot Point Calculation (Critical Support/Resistance) ---
// Request daily High, Low, Close for pivot calculation
= request.security(syminfo.tickerid, "D", [high , low , close ])
// Classic Pivot Point Formula
dailyPP = (dailyHigh + dailyLow + dailyClose) / 3
dailyR1 = (2 * dailyPP) - dailyLow
dailyS1 = (2 * dailyPP) - dailyHigh
dailyR2 = dailyPP + (dailyHigh - dailyLow)
dailyS2 = dailyPP - (dailyHigh - dailyLow)
// --- Crosses and States for Unified Entry 1 (EMA & MACD) ---
// Moved ta.cross() calls outside of conditional blocks for consistent calculation.
emaGoldenCrossCondition = ta.cross(close, ema11)
emaDeathCrossCondition = ta.cross(ema11, close)
macdGoldenCrossCondition = ta.cross(macdLine, signalLine)
macdDeathCrossCondition = ta.cross(signalLine, macdLine)
emaIsBullish = close > ema11
emaIsBearish = close < ema11
macdIsBullishStrong = macdLine > signalLine and macdLine > 0
macdIsBearishStrong = macdLine < signalLine and macdLine < 0
// --- Unified Entry 1 Logic (EMA & MACD) ---
unifiedLongEntry1 = false
unifiedShortEntry1 = false
if (emaGoldenCrossCondition and macdIsBullishStrong )
unifiedLongEntry1 := true
else if (macdGoldenCrossCondition and emaIsBullish )
unifiedLongEntry1 := true
if (emaDeathCrossCondition and macdIsBearishStrong )
unifiedShortEntry1 := true
else if (macdDeathCrossCondition and emaIsBearish )
unifiedShortEntry1 := true
// --- Unified Entry 2 Logic (Ichimoku & EMA/Volume) ---
unifiedLongEntry2 = false
unifiedShortEntry2 = false
ichimokuCloudBullish = close > senkouSpanA_plot and close > senkouSpanB_plot and
senkouSpanA_plot > senkouSpanB_plot and
tenkanSen > kijunSen and
chikouSpan > close
ichimokuCloudBearish = close < senkouSpanA_plot and close < senkouSpanB_plot and
senkouSpanB_plot > senkouSpanA_plot and
tenkanSen < kijunSen and
chikouSpan < close
// Moved ta.cross() calls outside of conditional blocks for consistent calculation.
ichimokuBullishTriggerCondition = ta.cross(tenkanSen, kijunSen)
ichimokuBearishTriggerCondition = ta.cross(kijunSen, tenkanSen)
priceCrossAboveSenkouA = ta.cross(close, senkouSpanA_plot)
priceCrossBelowSenkouA = ta.cross(senkouSpanA_plot, close)
if (ichimokuBullishTriggerCondition or (priceCrossAboveSenkouA and close > senkouSpanB_plot)) and
emaIsBullish and
bullishVolumeConfirmation
unifiedLongEntry2 := true
if (ichimokuBearishTriggerCondition or (priceCrossBelowSenkouA and close < senkouSpanB_plot)) and
emaIsBearish and
bearishVolumeConfirmation
unifiedShortEntry2 := true
// --- Weak Entry Logic ---
weakLongEntry = false
weakShortEntry = false
// Function to check for weak long entry
// Checks if the distance to the nearest resistance (R1 or R2) is less than the threshold
f_isWeakLongEntry(currentPrice) =>
bool isWeak = false
// Check R1 if it's above current price and within threshold
if dailyR1 > currentPrice and (dailyR1 - currentPrice < weakEntryTickThreshold)
isWeak := true
// Check R2 if it's above current price and within threshold (only if not already weak by R1)
else if dailyR2 > currentPrice and (dailyR2 - currentPrice < weakEntryTickThreshold)
isWeak := true
isWeak
// Function to check for weak short entry
// Checks if the distance to the nearest support (S1 or S2) is less than the threshold
f_isWeakShortEntry(currentPrice) =>
bool isWeak = false
// Check S1 if it's below current price and within threshold
if dailyS1 < currentPrice and (currentPrice - dailyS1 < weakEntryTickThreshold)
isWeak := true
// Check S2 if it's below current price and within threshold (only if not already weak by S1)
else if dailyS2 < currentPrice and (currentPrice - dailyS2 < weakEntryTickThreshold)
isWeak := true
isWeak
// Apply weak entry check to Unified Entry 1
if unifiedLongEntry1 and f_isWeakLongEntry(close)
weakLongEntry := true
if unifiedShortEntry1 and f_isWeakShortEntry(close)
weakShortEntry := true
// Apply weak entry check to Unified Entry 2
if unifiedLongEntry2 and f_isWeakLongEntry(close)
weakLongEntry := true
if unifiedShortEntry2 and f_isWeakShortEntry(close)
weakShortEntry := true
// --- Enhanced Entry Conditions with RSI and ADX ---
// Removed candlestick pattern requirement.
// Only consider an entry if RSI is not overbought/oversold AND ADX indicates trend strength.
// Enhanced Long Entry Condition
enhancedLongEntry = (unifiedLongEntry1 or unifiedLongEntry2) and
(rsi < rsiOverbought) and // RSI not overbought
(adx > adxTrendStrengthThreshold) // ADX shows trend strength
// Enhanced Short Entry Condition
enhancedShortEntry = (unifiedShortEntry1 or unifiedShortEntry2) and
(rsi > rsiOversold) and // RSI not oversold
(adx > adxTrendStrengthThreshold) // ADX shows trend strength
// --- Define colors as variables for clarity and to potentially resolve parsing issues ---
// Changed named color constants to hexadecimal values
var color strongBuyDotColor = #FFD700 // Gold
var color weakBuyDotColor = #008000 // Green
var color strongSellDotColor = #FFFFFF // White
var color weakSellDotColor = #FF0000 // Red
// --- Plotting Entry Dots on Candlesticks ---
// Define conditions for plotting only on the *first* occurrence of a signal
isNewStrongBuy = enhancedLongEntry and not weakLongEntry and not (enhancedLongEntry and not weakLongEntry )
isNewWeakBuy = enhancedLongEntry and weakLongEntry and not (enhancedLongEntry and weakLongEntry )
isNewStrongSell = enhancedShortEntry and not weakShortEntry and not (enhancedShortEntry and not weakShortEntry )
isNewWeakSell = enhancedShortEntry and weakShortEntry and not (enhancedShortEntry and weakShortEntry )
// Helper functions to check candlestick type
isCurrentCandleBullish = close > open
isCurrentCandleBearish = close < open
// Strong Buy: Gold dot (only on bullish candles)
plotshape(isNewStrongBuy and isCurrentCandleBullish ? close : na, title="Strong B", location=location.absolute, color=strongBuyDotColor, style=shape.circle, size=size.tiny)
// Weak Buy: Solid Green dot (no candlestick filter for weak buys)
// Changed text to "" and style to shape.triangleup for symbol only
plotshape(isNewWeakBuy ? close : na, title="Weak B", location=location.absolute, color=weakBuyDotColor, style=shape.triangleup, size=size.tiny)
// Strong Sell: White dot (only on bearish candles)
plotshape(isNewStrongSell and isCurrentCandleBearish ? close : na, title="Strong S", location=location.absolute, color=strongSellDotColor, style=shape.circle, size=size.tiny)
// Weak Sell: Red dot (no candlestick filter for weak sells)
// Changed text to "" and style to shape.triangledown for symbol only
plotshape(isNewWeakSell ? close : na, title="Weak S", location=location.absolute, color=weakSellDotColor, style=shape.triangledown, size=size.tiny)
// --- Plotting Indicators (Optional, for visual confirmation) ---
// All indicator plots have been removed as requested.
// plot(ema11, title="EMA 11", color=emaColor)
// plot(tenkanSen, title="Tenkan-Sen", color=tenkanColor)
// plot(kijunSen, title="Kijun-Sen", color=kijunColor)
// plot(senkouSpanA_plot, title="Senkou Span A", color=senkouAColor, offset=displacement)
// plot(senkouSpanB_plot, title="Senkou Span B", color=senkouBColor, offset=displacement)
// fill(plot(senkouSpanA_plot, offset=displacement), plot(senkouSpanB_plot, offset=displacement), color=cloudFillBullishColor, title="Cloud Fill Bullish")
// fill(plot(senkouSpanA_plot, offset=displacement), plot(senkouSpanB_plot, offset=displacement), color=cloudFillBearishColor, title="Cloud Fill Bearish")
// plot(chikouSpan, title="Chikou Span", color=chikouColor, offset=-displacement)
// plot(macdLine, title="MACD Line", color=macdLineColor, display=display.pane)
// plot(signalLine, title="Signal Line", color=signalLineColor, display=display.pane)
// plot(hist, title="Histogram", color=hist >= 0 ? histGreenColor : histRedColor, style=plot.style_columns, display=display.pane)
// plot(rsi, title="RSI", color=rsiPlotColor, display=display.pane)
// hline(rsiOverbought, "RSI Overbought", color=rsiHlineRedColor, linestyle=hline.style_dashed, display=display.all)
// hline(rsiOversold, "RSI Oversold", color=rsiHlineGreenColor, linestyle=hline.style_dashed, display=display.all)
// plot(adx, title="ADX", color=adxPlotColor, display=display.pane)
// hline(adxTrendStrengthThreshold, "ADX Threshold", color=adxHlineColor, linestyle=hline.style_dashed, display=display.all)
// plot(diPlus, title="+DI", color=diPlusColor, display=display.pane)
// plot(diMinus, title="-DI", color=diMinusColor, display=display.pane)
// plot(dailyPP, title="Daily PP", color=dailyPPColor, style=plot.style_line, linewidth=1)
// plot(dailyR1, title="Daily R1", color=dailyRColor, style=plot.style_line, linewidth=1)
// plot(dailyR2, title="Daily R2", color=dailyRColor, style=plot.style_line, linewidth=1)
// plot(dailyS1, title="Daily S1", color=dailySColor, style=plot.style_line, linewidth=1)
// plot(dailyS2, title="Daily S2", color=dailySColor, style=plot.style_line, linewidth=1)
// --- Alerts (Optional) ---
alertcondition(enhancedLongEntry and not weakLongEntry, title="Strong Buy Alert", message="CME Crude Oil: Strong Buy Entry!")
alertcondition(enhancedLongEntry and weakLongEntry, title="Weak Buy Alert", message="CME Crude Oil: Weak Buy Entry Detected!")
alertcondition(enhancedShortEntry and not weakShortEntry, title="Strong Sell Alert", message="CME Crude Oil: Strong Sell Entry!")
alertcondition(enhancedShortEntry and weakShortEntry, title="Weak Sell Alert", message="CME Crude Oil: Weak Sell Entry Detected!")
WT-FLOW: MTF WaveTrend Trend-Follower📘 Strategy Introduction: WT-FLOW (WaveTrend Trend-Follower)
WT-FLOW is a multi-timeframe trend-following strategy specifically **optimized for the 15-minute timeframe** on the BTC/USDT trading pair. It is designed to help professional users follow buy/sell trends with high precision.
The strategy utilizes a three-tiered time alignment:
- **240min WaveTrend**: Macro trend filter (determines high-timeframe direction)
- **30min WaveTrend**: Momentum confirmation (validates trend continuation)
- **15min WaveTrend**: Signal generation (entries and exits are executed here)
It features an advanced **Trailing Stop** mechanism that includes maximum gain-based tracking logic and percentage-based fallback tolerance. Entry and exit points are marked on the chart with colored labels (🟢🔴❅❄), including bar index information.
⚙️ Technical Features:
- Compatible with Pine Script v5
- Backtestable via the `strategy()` block
- Supports both Long and Short position tracking
- Trailing Stop and Marginal Stop systems work in tandem
⚠️ Disclaimer:
This strategy is based on historical data. It should not be used in live markets without manual confirmation and appropriate risk management. Use is at your own risk.
Price x Vol RSIAn enhanced RSI indicator that integrates the RSI of volume as a conviction amplifier.
This script modifies the RSI to range from −1 to +1, allowing it to express directional momentum. Volume RSI remains in the range of 0 to +1, serving as a direction-neutral amplifier.
The result is a bi-directional composite RSI that:
>> Emphasizes congruent signals (e.g., strong price direction with strong volume).
>> Minimizes misleading signals from high volume paired with neutral or conflicting price movement.
Ideal for identifying high-conviction breakouts and momentum divergences with volume support.
the plot fill increases in color when the plot approaches zero, then reverses away from zero, and resets on a zero-cross.
check out my other script, the PXVS, which is what this RSI script was based on. it uses similar logic as this script, but with FSTO %K instead of RSI
Quarterly Revenue & Growthinspired by TrendSpider. Monitoring a company's earning revenue quarter by quarter.
Zonas de Soporte EURUSD Multi-Timeframe//@version=5
indicator("Zonas de Soporte EURUSD Multi-Timeframe", overlay=true)
// Configuraciones
lookback = input.int(200, "Velas a analizar", minval=50)
tolerance = input.float(0.5, "Tolerancia %", minval=0.1)
touchesMin = input.int(3, "Toques mínimos para validar soporte", minval=2)
// Función para encontrar zonas de soporte
f_findSupportZones(_low, _label) =>
var float zones = na
var int found = 0
for i = 0 to lookback - 1
float base = _low
int touches = 0
for j = i + 1 to lookback - 1
if math.abs(_low - base) <= base * (tolerance / 100)
touches := touches + 1
if touches >= touchesMin
label.new(bar_index , base, text="Zona " + _label + " " + str.tostring(base, format.mintick),
style=label.style_label_up, color=color.green, textcolor=color.white, size=size.small)
found := found + 1
found
// Múltiples temporalidades
low_h1 = request.security("EURUSD", "60", low)
low_h4 = request.security("EURUSD", "240", low)
low_d1 = request.security("EURUSD", "D", low)
low_w1 = request.security("EURUSD", "W", low)
low_mn1 = request.security("EURUSD", "M", low)
// Llamadas a la función
zonesH1 = f_findSupportZones(low_h1, "H1")
zonesH4 = f_findSupportZones(low_h4, "H4")
zonesD1 = f_findSupportZones(low_d1, "D1")
zonesW1 = f_findSupportZones(low_w1, "W1")
zonesMN1 = f_findSupportZones(low_mn1, "MN1")
// Reporte
if bar_index % 50 == 0
label.new(bar_index, high, text="Reporte Zonas Soporte H1: "+str.tostring(zonesH1)+" H4: "+str.tostring(zonesH4)+" D1: "+str.tostring(zonesD1)+" W1: "+str.tostring(zonesW1)+" MN1: "+str.tostring(zonesMN1),
style=label.style_label_down, yloc=yloc.abovebar, size=size.normal,
textcolor=color.black, color=color.new(color.white, 80))
Multi-Time Period Charts with Wicks - ENEXSLWe wanted to see the candle wicks on the official Multi-Time Period Charts indicator.
This version has wick calculations added. Please see www.tradingview.com for the original indicator breakdown.
In short, this indicator will reference larger time periods and draw a candle with the wick around a smaller timeframe chart..
SMA Crossing Background Color (Multi-Timeframe)When day trading or scalping on lower timeframes, it’s often difficult to determine whether the broader market trend is moving upward or downward. To address this, I usually check higher timeframes. However, splitting the layout makes the charts too small and hard to read.
To solve this issue, I created an indicator that uses the background color to show whether the current price is above or below a moving average from a higher timeframe.
For example, if you set the SMA Length to 200 and the MT Timeframe to 5 minutes, the indicator will display a red background on the 1-minute chart when the price drops below the 200 SMA on the 5-minute chart. This helps you quickly recognize that the trend on the higher timeframe has turned bearish—without having to open a separate chart.
デイトレード、スキャルピングで短いタイムフレームでトレードをするときに、大きな動きは上に向いているのか下に向いているのかトレンドがわからなくなることがあります。
その時に上位足を確認するのですが、レイアウトをスプリットすると画面が小さくて見えにくくなるので、バックグラウンドの色で上位足の移動平均線では価格が上なのか下なのかを表示させるインジケーターを作りました。
例えば、SMA Length で200を選び、MT Timeframeで5分を選べば、1分足タイムフレームでトレードしていて雲行きが怪しくなってくるとBGが赤になり、5分足では200線以下に突入しているようだと把握することができます。
EMA Shadow Trading_TixThis TradingView indicator, named "EMA Shadow Trading_Tix", combines Exponential Moving Averages (EMAs) with VWAP (Volume-Weighted Average Price) and a shadow fill between EMAs to help traders identify trends, momentum, and potential reversal zones. Below is a breakdown of its key functions:
1. EMA (Exponential Moving Average) Settings
The indicator allows customization of four EMAs with different lengths and colors:
EMA 1 (Default: 9, Green) – Short-term trend filter.
EMA 2 (Default: 21, Red) – Medium-term trend filter.
EMA 3 (Default: 50, Blue) – Mid-to-long-term trend filter.
EMA 4 (Default: 200, Orange) – Long-term trend filter (often used as a "bull/bear market" indicator).
Key Features:
Global EMA Source: All EMAs use the same source (default: close), ensuring consistency.
Toggle Visibility: Each EMA can be independently shown/hidden.
Precision Calculation: EMAs are rounded to the minimum tick size for accuracy.
Customizable Colors & Widths: Helps in distinguishing different EMAs easily.
How Traders Use EMAs:
Trend Identification:
If price is above all EMAs, the trend is bullish.
If price is below all EMAs, the trend is bearish.
Crossovers:
A shorter EMA crossing above a longer EMA (e.g., EMA 9 > EMA 21) suggests bullish momentum.
A shorter EMA crossing below a longer EMA (e.g., EMA 9 < EMA 21) suggests bearish momentum.
Dynamic Support/Resistance:
EMAs often act as support in uptrends and resistance in downtrends.
2. Shadow Fill Between EMA 1 & EMA 2
The indicator includes a colored fill (shadow) between EMA 1 (9-period) and EMA 2 (21-period) to enhance trend visualization.
How It Works:
Bullish Shadow (Green): Applies when EMA 1 > EMA 2, indicating a bullish trend.
Bearish Shadow (Red): Applies when EMA 1 < EMA 2, indicating a bearish trend.
Why It’s Useful:
Trend Confirmation: The shadow helps traders quickly assess whether the short-term trend is bullish or bearish.
Visual Clarity: The fill makes it easier to spot EMA crossovers and trend shifts.
3. VWAP (Volume-Weighted Average Price) Integration
The indicator includes an optional VWAP overlay, which is useful for intraday traders.
Key Features:
Customizable Anchor Periods: Options include Session, Week, Month, Quarter, Year, Decade, Century, Earnings, Dividends, Splits.
Hide on Higher Timeframes: Can be disabled on 1D or higher charts to avoid clutter.
Adjustable Color & Width: Default is purple, but users can change it.
How Traders Use VWAP:
Mean Reversion: Price tends to revert to VWAP.
Trend Confirmation:
Price above VWAP = Bullish bias.
Price below VWAP = Bearish bias.
Breakout/Rejection Signals: Strong moves away from VWAP may indicate continuation or exhaustion.
4. Practical Trading Applications
Trend-Following Strategy:
Long Entry: Price above all EMAs + EMA 1 > EMA 2 (green shadow). Optional: Price above VWAP for intraday trades.
Short Entry: Price below all EMAs + EMA 1 < EMA 2 (red shadow). Optional: Price below VWAP for intraday trades.
Mean Reversion Strategy:
Pullback to EMA 9/21/VWAP: Look for bounces near EMAs or VWAP in a strong trend.
Multi-Timeframe Confirmation:
Higher timeframe EMAs (50, 200) can be used to filter trades (e.g., only trade longs if price is above EMA 200).
Conclusion
This EMA Shadow Trading Indicator is a versatile tool that combines:
✔ Multiple EMAs for trend analysis
✔ Shadow fill for quick trend visualization
✔ VWAP integration for intraday trading
It is useful for swing traders, day traders, and investors looking for trend confirmation, momentum shifts, and dynamic support/resistance levels.
Volume MAs Oscillator | Lyro RSVolume MAs Oscillator | Lyro RS
Overview
The Volume MAs Oscillator is a powerful volume‑adjusted momentum tool that combines custom‑weighted moving averages on volume‑weighted price with smoothed deviation bands. It offers dynamic insights into trend direction, overbought/oversold conditions, and relative valuation — all within a single indicator
Key Features
Volume‑Adjusted Moving Averages: Moving averages can be volume‑weighted using the following formula: a moving average of (Price × Volume) divided by a moving average of Volume. This formula is applied across more than 14 different moving averages; however, it is not used with the VWMA, as VWMA is inherently a volume-weighted moving average.
Percentage Oscillator: Displays the normalized difference: (source – MA) / MA * 100, centered around zero for easy interpretation of strength and direction.
Deviation Bands: Builds upper and lower bands from standard deviation of the oscillator over a selected lookback, with distinct positive/negative multipliers and optional smoothing to reduce noise.
Inputs: Band Length, Band Smoothing, Positive Band Multiplier, Negative Band Multiplier.
Multi‑Mode Signal System:
1. Trend Mode – Colors oscillator according to breaks above (bullish) or below (bearish) respective bands.
2. Reversion Mode – Inverses color logic: signals overextensions beyond bands as reversion opportunities, greys inside the bands.
3. Valuation Mode – Applies a gradient color scale (UpC ⇄ DnC) to reflect relative valuation strength.
Customizable Visuals: Select from 5 pre‑set palettes—Classic, Mystic, Major Themes, Accented, Royal—or define your own custom bullish/bearish colors.
Chart enhancements include color‑coded oscillator line, deviation bands, glow‑effect midline at zero, background shading and candlestick/bar coloring aligned to signal mode.
Built‑In Signals: Automatically plots ▲ oversold and ▼ overbought markers upon crosses of lower/upper bands (in trend or reversion modes), enhancing signal clarity.
How It Works
MA Calculation – Applies the selected MA type to price × volume (normalized by MA of volume) or direct VWMA.
Oscillator Output – Calculates the % difference of source vs. derived MA.
Band Construction – Computes rolling standard deviation; applies user‑defined multipliers; smooths bands with exponential blending.
Mode-Dependent Coloring & Signals –
• Trend: Highlights strength trends via band cross coloring.
• Reversion: Flags extremes beyond bands as potential pullbacks.
• Valuation: Uses gradient to reflect oscillator’s position relative to recent range.
Signal Markers – Deploys arrows and color rules to flag overbought (▼) or oversold (▲) conditions when bands are breached.
Practical Use
Trend Confirmation – In Trend Mode, use upward price_diff cross above upper band as bullish; downward cross below lower band as bearish.
Mean Reversion – In Reversion Mode, fading extremes beyond bands may precede a retracement.
Relative Valuation – Valuation Mode shines when assessing how extended price_diff is, with gradient colors indicating valuation zones.
Bars/candles color‑coded to oscillator state boosts clarity of market tone and allows for rapid visual scanning.
Customization
Adjust MA type/length to tune responsiveness vs. smoothing.
Configure band settings for volatility sensitivity.
Toggle between signal modes for trend-following or reversion strategies.
Stylish visuals: pick or customize color schemes to match your chart setup.
⚠️Disclaimer
This indicator is a tool for technical analysis and does not provide guaranteed results. It should be used in conjunction with other analysis methods and proper risk management practices. The creators of this indicator are not responsible for any financial decisions made based on its signals.
Heiken Ashi Candles - CustomizableHeiken Ashi Candles – Customizable Overlay
This TradingView indicator displays accurate Heiken Ashi candles directly on your price chart, perfectly synced with TradingView’s built-in Heiken Ashi source. It’s ideal for traders who want to backtest or analyze Heiken Ashi structure without switching chart types. The indicator also includes full customization of candle body and wick colors for both bullish and bearish candles—perfect for tailoring your chart visuals to your preferences.