True Single Line Fusion [by TitikSona]🧠 Full Description
True Single Line Fusion by TitikSona is an open-source oscillator that unifies Fast Stochastic, Slow Stochastic, and RSI into a single smooth momentum line.
It simplifies multi-oscillator analysis into one clear visual — helping traders recognize potential momentum shifts, exhaustion, and reversal zones.
⚙️ Core Logic
The indicator calculates:
Fast Stochastic (12,3,3) → short-term swing sensitivity
Slow Stochastic (100,8,8) → broad trend context
RSI (26) → overall strength and directional bias
All three are normalized (0–100) and averaged to form the Fusion Line, creating a single unified momentum curve.
A Signal Line (SMA-9) and Histogram are added to highlight short-term acceleration or deceleration.
Formula: Fusion = (FastK + SlowK + RSI) / 3
🔍 Interpretation
Fusion Line rising → momentum strengthening upward
Fusion Line falling → momentum weakening
Histogram color (green/red) shows the direction and intensity of the move
Background highlights identify potential extremes:
🟩 Green = potential oversold region
🟥 Red = potential overbought region
💡 How to Use
Works on any symbol and timeframe.
Use the Fusion Line’s direction and slope as momentum context, not as direct buy/sell signals.
Combine with price structure, support/resistance, or volume analysis to confirm potential reversals.
Example:
Fusion Line turning upward from green zone → possible bullish momentum shift
Fusion Line turning downward from red zone → possible bearish exhaustion
📘 Notes
Ideal for identifying turning points in ranging or consolidating markets.
Does not generate automated signals or predictions.
Open-source for learning, modification, and educational use.
Designed for clarity, low lag, and clean visualization.
🧩 Developed and shared by TitikSona — made to unify oscillators into one adaptive momentum tool.
在脚本中搜索"12月1æ—¥ç»™æµ·æ°æ‰«ç 手ç»è´¹"
Seasonality Heatmap [QuantAlgo]🟢 Overview
The Seasonality Heatmap analyzes years of historical data to reveal which months and weekdays have consistently produced gains or losses, displaying results through color-coded tables with statistical metrics like consistency scores (1-10 rating) and positive occurrence rates. By calculating average returns for each calendar month and day-of-week combination, it identifies recognizable seasonal patterns (such as which months or weekdays tend to rally versus decline) and synthesizes this into actionable buy low/sell high timing possibilities for strategic entries and exits. This helps traders and investors spot high-probability seasonal windows where assets have historically shown strength or weakness, enabling them to align positions with recurring bull and bear market patterns.
🟢 How It Works
1. Monthly Heatmap
How % Return is Calculated:
The indicator fetches monthly closing prices (or Open/High/Low based on user selection) and calculates the percentage change from the previous month:
(Current Month Price - Previous Month Price) / Previous Month Price × 100
Each cell in the heatmap represents one month's return in a specific year, creating a multi-year historical view
Colors indicate performance intensity: greener/brighter shades for higher positive returns, redder/brighter shades for larger negative returns
What Averages Mean:
The "Avg %" row displays the arithmetic mean of all historical returns for each calendar month (e.g., averaging all Januaries together, all Februaries together, etc.)
This metric identifies historically recurring patterns by showing which months have tended to rise or fall on average
Positive averages indicate months that have typically trended upward; negative averages indicate historically weaker months
Example: If April shows +18.56% average, it means April has averaged a 18.56% gain across all years analyzed
What Months Up % Mean:
Shows the percentage of historical occurrences where that month had a positive return (closed higher than the previous month)
Calculated as:
(Number of Months with Positive Returns / Total Months) × 100
Values above 50% indicate the month has been positive more often than negative; below 50% indicates more frequent negative months
Example: If October shows "64%", then 64% of all historical Octobers had positive returns
What Consistency Score Means:
A 1-10 rating that measures how predictable and stable a month's returns have been
Calculated using the coefficient of variation (standard deviation / mean) - lower variation = higher consistency
High scores (8-10, green): The month has shown relatively stable behavior with similar outcomes year-to-year
Medium scores (5-7, gray): Moderate consistency with some variability
Low scores (1-4, red): High variability with unpredictable behavior across different years
Example: A consistency score of 8/10 indicates the month has exhibited recognizable patterns with relatively low deviation
What Best Means:
Shows the highest percentage return achieved for that specific month, along with the year it occurred
Reveals the maximum observed upside and identifies outlier years with exceptional performance
Useful for understanding the range of possible outcomes beyond the average
Example: "Best: 2016: +131.90%" means the strongest January in the dataset was in 2016 with an 131.90% gain
What Worst Means:
Shows the most negative percentage return for that specific month, along with the year it occurred
Reveals maximum observed downside and helps understand the range of historical outcomes
Important for risk assessment even in months with positive averages
Example: "Worst: 2022: -26.86%" means the weakest January in the dataset was in 2022 with a 26.86% loss
2. Day-of-Week Heatmap
How % Return is Calculated:
Calculates the percentage change from the previous day's close to the current day's price (based on user's price source selection)
Returns are aggregated by day of the week within each calendar month (e.g., all Mondays in January, all Tuesdays in January, etc.)
Each cell shows the average performance for that specific day-month combination across all historical data
Formula:
(Current Day Price - Previous Day Close) / Previous Day Close × 100
What Averages Mean:
The "Avg %" row at the bottom aggregates all months together to show the overall average return for each weekday
Identifies broad weekly patterns across the entire dataset
Calculated by summing all daily returns for that weekday across all months and dividing by total observations
Example: If Monday shows +0.04%, Mondays have averaged a 0.04% change across all months in the dataset
What Days Up % Mean:
Shows the percentage of historical occurrences where that weekday had a positive return
Calculated as:
(Number of Positive Days / Total Days Observed) × 100
Values above 50% indicate the day has been positive more often than negative; below 50% indicates more frequent negative days
Example: If Fridays show "54%", then 54% of all Fridays in the dataset had positive returns
What Consistency Score Means:
A 1-10 rating measuring how stable that weekday's performance has been across different months
Based on the coefficient of variation of daily returns for that weekday across all 12 months
High scores (8-10, green): The weekday has shown relatively consistent behavior month-to-month
Medium scores (5-7, gray): Moderate consistency with some month-to-month variation
Low scores (1-4, red): High variability across months, with behavior differing significantly by calendar month
Example: A consistency score of 7/10 for Wednesdays means they have performed with moderate consistency throughout the year
What Best Means:
Shows which calendar month had the strongest average performance for that specific weekday
Identifies favorable day-month combinations based on historical data
Format shows the month abbreviation and the average return achieved
Example: "Best: Oct: +0.20%" means Mondays averaged +0.20% during October months in the dataset
What Worst Means:
Shows which calendar month had the weakest average performance for that specific weekday
Identifies historically challenging day-month combinations
Useful for understanding which month-weekday pairings have shown weaker performance
Example: "Worst: Sep: -0.35%" means Tuesdays averaged -0.35% during September months in the dataset
3. Optimal Timing Table/Summary Table
→ Best Month to BUY: Identifies the month with the lowest average return (most negative or least positive historically), representing periods where prices have historically been relatively lower
Based on the observation that buying during historically weaker months may position for subsequent recovery
Shows the month name, its average return, and color-coded performance
Example: If May shows -0.86% as "Best Month to BUY", it means May has historically averaged -0.86% in the analyzed period
→ Best Month to SELL: Identifies the month with the highest average return (most positive historically), representing periods where prices have historically been relatively higher
Based on historical strength patterns in that month
Example: If July shows +1.42% as "Best Month to SELL", it means July has historically averaged +1.42% gains
→ 2nd Best Month to BUY: The second-lowest performing month based on average returns
Provides an alternative timing option based on historical patterns
Offers flexibility for staged entries or when the primary month doesn't align with strategy
Example: Identifies the next-most favorable historical buying period
→ 2nd Best Month to SELL: The second-highest performing month based on average returns
Provides an alternative exit timing based on historical data
Useful for staged profit-taking or multiple exit opportunities
Identifies the secondary historical strength period
Note: The same logic applies to "Best Day to BUY/SELL" and "2nd Best Day to BUY/SELL" rows, which identify weekdays based on average daily performance across all months. Days with lowest averages are marked as buying opportunities (historically weaker days), while days with highest averages are marked for selling (historically stronger days).
🟢 Examples
Example 1: NVIDIA NASDAQ:NVDA - Strong May Pattern with High Consistency
Analyzing NVIDIA from 2015 onwards, the Monthly Heatmap reveals May averaging +15.84% with 82% of months being positive and a consistency score of 8/10 (green). December shows -1.69% average with only 40% of months positive and a low 1/10 consistency score (red). The Optimal Timing table identifies December as "Best Month to BUY" and May as "Best Month to SELL." A trader recognizes this high-probability May strength pattern and considers entering positions in late December when prices have historically been weaker, then taking profits in May when the seasonal tailwind typically peaks. The high consistency score in May (8/10) provides additional confidence that this pattern has been relatively stable year-over-year.
Example 2: Crypto Market Cap CRYPTOCAP:TOTALES - October Rally Pattern
An investor examining total crypto market capitalization notices September averaging -2.42% with 45% of months positive and 5/10 consistency, while October shows a dramatic shift with +16.69% average, 90% of months positive, and an exceptional 9/10 consistency score (blue). The Day-of-Week heatmap reveals Mondays averaging +0.40% with 54% positive days and 9/10 consistency (blue), while Thursdays show only +0.08% with 1/10 consistency (yellow). The investor uses this multi-layered analysis to develop a strategy: enter crypto positions on Thursdays during late September (combining the historically weak month with the less consistent weekday), then hold through October's historically strong period, considering exits on Mondays when intraweek strength has been most consistent.
Example 3: Solana BINANCE:SOLUSDT - Extreme January Seasonality
A cryptocurrency trader analyzing Solana observes an extraordinary January pattern: +59.57% average return with 60% of months positive and 8/10 consistency (teal), while May shows -9.75% average with only 33% of months positive and 6/10 consistency. August also displays strength at +59.50% average with 7/10 consistency. The Optimal Timing table confirms May as "Best Month to BUY" and January as "Best Month to SELL." The Day-of-Week data shows Sundays averaging +0.77% with 8/10 consistency (teal). The trader develops a seasonal rotation strategy: accumulate SOL positions during May weakness, hold through the historically strong January period (which has shown this extreme pattern with reasonable consistency), and specifically target Sunday exits when the weekday data shows the most recognizable strength pattern.
CB Charts - GEX NQ/MNQ
Last Updated: 2025-10-14 12:59:34 PST
*DISCLAIMER: Only intended for NQZ2025/MNQZ2025 charts.
This indicator plots horizontal levels based on batched GEX levels for NQZ2025/MNQZ2025. The batched data is derived from contracts expiring: 0DTE, 1DTE, EoW, EoM, Next Week, Next Month and 3-months out. Labels are available for a high-level view of which levels are which. Hovering (or long-pressing on mobile TV) over the labels will display the nominal values and Rank. This script is manually updated and may not be always updated.
When and what to use:
- Most respected levels come from 1DTE, EoW and EoM.
- 0DTE is included for when this script becomes intraday updated. (CURRENTLY NOT UPDATED INTRADAY)
- Next Week setting is best used only for Friday and Sunday trading
- Next Month setting is best for weeks close to the end of the current month
Powered by the Camels of Wallstreet
RTACoreLibrary "RTACore"
Advanced multi-timeframe technical analysis framework for Pine Script
@author WavesUnchained
@build 2025-10-14 22:41:47
newFloatResult(value, context)
Create a successful Result with float value
Parameters:
value (float)
context (string)
newStringResult(value, context)
Create a successful Result with string value
Parameters:
value (string)
context (string)
newBoolResult(value, context)
Create a successful Result with boolean value
Parameters:
value (bool)
context (string)
newErrorResult(errorCode, errorMessage, floatFallback, stringFallback, boolFallback, context)
Create an error Result with fallback values
Parameters:
errorCode (string)
errorMessage (string)
floatFallback (float)
stringFallback (string)
boolFallback (bool)
context (string)
addResultTag(result, tag)
Add a tag to Result
Parameters:
result (Result)
tag (string)
newSignalResult(signalStrength, signalType)
Create a signal Result with trading-specific tags
Parameters:
signalStrength (float)
signalType (string)
newIndicatorResult(value, indicatorName)
Create an indicator calculation Result with indicator tag
Parameters:
value (float)
indicatorName (string)
newTimeframeResult(value, timeframe, context)
Create a timeframe-specific Result
Parameters:
value (float)
timeframe (string)
context (string)
newConfluenceResult(confluenceScore, confidenceLevel)
Create a confluence Result with confidence level
Parameters:
confluenceScore (float)
confidenceLevel (string)
newValidationResult(context)
Create a new validation result (starts as valid)
Parameters:
context (string)
newValidationSuccess(context)
Create a successful validation result
Parameters:
context (string)
newValidationFailure(errors, context)
Create a failed validation result with errors
Parameters:
errors (array)
context (string)
addValidationError(result, field, error)
Add an error to validation result
Parameters:
result (ValidationResult)
field (string)
error (string)
addValidationWarning(result, field, warning)
Add a warning to validation result
Parameters:
result (ValidationResult)
field (string)
warning (string)
addValidationCorrection(result, correction)
Add a correction to validation result
Parameters:
result (ValidationResult)
correction (string)
setValidationMode(result, mode)
Set validation mode
Parameters:
result (ValidationResult)
mode (string)
getValidationMode(result)
Get validation mode
Parameters:
result (ValidationResult)
incrementValidatedFields(result)
Increment validated fields counter
Parameters:
result (ValidationResult)
setValidationTotalFields(result, total)
Set total fields for validation
Parameters:
result (ValidationResult)
total (int)
calculateValidationScore(result)
Calculate and update validation score based on errors/warnings
Parameters:
result (ValidationResult)
newPerformanceProfile(functionName)
Create a new performance profile
Parameters:
functionName (string)
startTiming(profile)
Start timing a performance profile (simple)
Parameters:
profile (PerformanceProfile)
endTiming(profile, hadError)
End timing and update performance profile
Parameters:
profile (PerformanceProfile)
hadError (bool)
updateMemoryEstimate(profile, arrayElements)
Set estimated memory usage (array elements)
Parameters:
profile (PerformanceProfile)
arrayElements (int)
newHealthyStatus()
Create a new healthy status
setComponentHealth(status, component, isOK, message)
Set component health status
Parameters:
status (HealthStatus)
component (string)
isOK (bool)
message (string)
isHealthyOverall(status)
Quick health check - are all components OK?
Parameters:
status (HealthStatus)
getHealthSummary(status)
Get simple health summary
Parameters:
status (HealthStatus)
hasValidFloat(result)
Check if Result contains a valid float value
Parameters:
result (Result)
hasValidString(result)
Check if Result contains a valid string value
Parameters:
result (Result)
getFloat(result, fallback)
Get float value from Result with fallback
Parameters:
result (Result)
fallback (float)
getString(result, fallback)
Get string value from Result with fallback
Parameters:
result (Result)
fallback (string)
getBool(result, fallback)
Get boolean value from Result with fallback
Parameters:
result (Result)
fallback (bool)
hasResultTag(result, tag)
Check if Result has specific tag
Parameters:
result (Result)
tag (string)
getResultTags(result)
Get all tags from Result
Parameters:
result (Result)
setResultContext(result, context)
Set operation context for Result
Parameters:
result (Result)
context (string)
filterResultsByTag(results, tag)
Filter Results by tag (utility for arrays of Results)
Parameters:
results (array)
tag (string)
getAllResultTags(results)
Get all unique tags from array of Results
Parameters:
results (array)
newDefaultAnalysisConfig()
Create default analysis configuration
newAggressiveAnalysisConfig()
Create aggressive trading configuration
newConservativeAnalysisConfig()
Create conservative trading configuration
newDefaultTimeframeConfig()
Create default timeframe configuration
newIntradayTimeframeConfig()
Create intraday timeframe configuration
newSwingTimeframeConfig()
Create swing trading timeframe configuration
getConfigSummary(config)
Get configuration summary string
Parameters:
config (AnalysisConfig)
cloneAnalysisConfig(source)
Clone analysis configuration
Parameters:
source (AnalysisConfig)
newGenericAnalysis(analysisType, timeframe)
Create a new generic analysis result
Parameters:
analysisType (string)
timeframe (string)
newConsensusData()
Create empty consensus data
newNeutralSignal(reason)
Create a neutral signal result
Parameters:
reason (string)
newBuySignal(score, confidence, reason)
Create a buy signal result
Parameters:
score (float)
confidence (float)
reason (string)
newSellSignal(score, confidence, reason)
Create a sell signal result
Parameters:
score (float)
confidence (float)
reason (string)
newMultiTimeframeResult(config, tfConfig)
Create new multi-timeframe result
Parameters:
config (AnalysisConfig)
tfConfig (TimeframeConfig)
getAnalysisAction(analysis)
Get analysis action string
Parameters:
analysis (GenericAnalysis)
isBullish(analysis)
Check if analysis is bullish
Parameters:
analysis (GenericAnalysis)
isBearish(analysis)
Check if analysis is bearish
Parameters:
analysis (GenericAnalysis)
getSignalSummary(signal)
Get signal summary string
Parameters:
signal (SignalResult)
hasStrongConsensus(consensus)
Check if consensus is strong
Parameters:
consensus (ConsensusData)
getConsensusSummary(consensus)
Get consensus summary
Parameters:
consensus (ConsensusData)
isActionableSignal(signal)
Check if signal is actionable
Parameters:
signal (SignalResult)
getSignalColor(signal)
Get signal color for UI display
Parameters:
signal (SignalResult)
validateAnalysisConfig(config)
Validate analysis configuration
Parameters:
config (AnalysisConfig)
validateTimeframeConfig(config)
Validate timeframe configuration
Parameters:
config (TimeframeConfig)
validatePriceData(prices)
Validate price data array
Parameters:
prices (array)
sanitizeFloat(value, minVal, maxVal, defaultVal)
Sanitize numeric input
Parameters:
value (float)
minVal (float)
maxVal (float)
defaultVal (float)
sanitizeInt(value, minVal, maxVal, defaultVal)
Sanitize integer input
Parameters:
value (int)
minVal (int)
maxVal (int)
defaultVal (int)
sanitizeFloatArray(arr)
Sanitize array by removing invalid values
Parameters:
arr (array)
logError(message)
Log error message
Parameters:
message (string)
logWarning(message)
Log warning message
Parameters:
message (string)
safeExecute(operationName, condition)
Safe execute wrapper
Parameters:
operationName (string)
condition (bool)
shouldAllowOperation(errorCount, maxErrors)
Circuit breaker pattern
Parameters:
errorCount (int)
maxErrors (int)
retryOperation(maxRetries)
Retry mechanism
Parameters:
maxRetries (int)
atrDistance(value1, value2, atr)
Calculate ATR-normalized distance between two values
Parameters:
value1 (float)
value2 (float)
atr (float)
atrDistance(value, reference, atrLength)
Calculate ATR-normalized distance between values
Parameters:
value (float)
reference (float)
atrLength (simple int)
percentDistance(value1, value2)
Calculate percentage-based distance between two values
Parameters:
value1 (float)
value2 (float)
withinATRTolerance(value, reference, atr, multiplier)
Check if value is within ATR-based tolerance of reference
Parameters:
value (float)
reference (float)
atr (float)
multiplier (float)
withinATRTolerance(value, reference, multiplier)
Check if value is within ATR-based tolerance of reference
Parameters:
value (float)
reference (float)
multiplier (float)
withinPercentTolerance(value, reference, percentTolerance)
Check if value is within percentage tolerance of reference
Parameters:
value (float)
reference (float)
percentTolerance (float)
proximityScore(value, reference, maxDistance)
Get proximity score (0-1, where 1 = very close)
Parameters:
value (float)
reference (float)
maxDistance (float)
sortArrayByValue(values, sortOrder)
Efficient array sorting using Pine Script native sort
Note: Replaces inefficient bubble sort implementations found in modules
Parameters:
values (array)
sortOrder (string)
safeArrayAverage(values)
Safe array average with null handling
Parameters:
values (array)
formatTableHeader(title, width)
Create formatted header for display tables
Parameters:
title (string)
width (int)
formatTableRow(key, value, width)
Format table row with key-value pair
Parameters:
key (string)
value (string)
width (int)
formatTableFooter(width)
Close table formatting
Parameters:
width (int)
truncateText(txt, maxLength, suffix)
Truncate text to specified length
Parameters:
txt (string)
maxLength (int)
suffix (string)
padText(txt, width, padChar, align)
Pad text to specified width
Parameters:
txt (string)
width (int)
padChar (string)
align (string)
titleCase(txt)
Convert text to title case
Parameters:
txt (string)
joinStrings(strings, separator)
Join array of strings with separator
Parameters:
strings (array)
separator (string)
formatTimestamp(timestamp, format)
Format timestamp to readable date/time
Parameters:
timestamp (int)
format (string)
evictLRU(cache)
Evict least recently used entry
Parameters:
cache (CacheManager)
newRiskAssessment()
Create a default risk assessment
calculateRiskAssessment(signal, volatility, volumeLevel)
Calculate comprehensive risk assessment
Parameters:
signal (SignalResult)
volatility (float)
volumeLevel (float)
newPositionData()
Create new empty position data
getConservativeStrategy()
Create conservative strategy template
getAggressiveStrategy()
Create aggressive strategy template
newDefaultStrategy()
Create default balanced strategy template
getStandardATR()
Get standard ATR(14) - cached per bar
getATR(length)
Get custom ATR with specified length
Parameters:
length (simple int)
getATRTolerance(multiplier)
Get ATR-based tolerance for distance calculations
Parameters:
multiplier (float)
getStandardVolumeAverage()
Get standard volume average SMA(20) - cached per bar
getVolumeAverage(length)
Get custom volume average
Parameters:
length (int)
getVolumeRatio()
Get volume ratio (current vs average)
getVolumeConfirmation(threshold)
Get volume confirmation (above threshold)
Parameters:
threshold (float)
getStandardEMAs()
Get standard EMAs (21, 50, 200) - cached per bar
getEMA21()
Get individual standard EMAs
getEMA50()
getEMA200()
getEMATrendAlignment()
Get EMA trend alignment score
getStandardRSI()
Get standard RSI(14) - cached per bar
getRSILevels(overbought, oversold)
Get RSI with overbought/oversold levels
Parameters:
overbought (float)
oversold (float)
getStandardMACD()
Get standard MACD (12, 26, 9) - cached per bar
getMACDSignal()
Get MACD trend signal
getMomentumScore()
Get comprehensive momentum score
getTrendStrength()
Get trend strength (0-100)
getIndicatorSummary()
Get indicator calculation summary (for debugging)
newZoneDetectionConfig()
Create default zone configuration
newZoneDetection(upperBoundary, lowerBoundary, creationBar, zoneType)
Create new zone
Parameters:
upperBoundary (float)
lowerBoundary (float)
creationBar (int)
zoneType (string)
calculateZoneOverlap(zone1Upper, zone1Lower, zone2Upper, zone2Lower)
Calculate zone overlap ratio
Parameters:
zone1Upper (float)
zone1Lower (float)
zone2Upper (float)
zone2Lower (float)
isPriceTouchingZone(zone, currentPrice, touchTolerance)
Check if price is touching zone
Parameters:
zone (ZoneDetection)
currentPrice (float)
touchTolerance (float)
getZonesInRange(zones, minPrice, maxPrice)
Get zones within price range
Parameters:
zones (array)
minPrice (float)
maxPrice (float)
getNearestZones(zones, currentPrice)
Get nearest support and resistance zones
Parameters:
zones (array)
currentPrice (float)
processZoneDetection(zones, config)
Complete zone detection and management system
Parameters:
zones (array)
config (ZoneDetectionConfig)
processZoneDetectionEngine(zones, config)
Parameters:
zones (array)
config (ZoneDetectionConfig)
newChannelConfig()
calcKeltnerChannel(config)
Parameters:
config (ChannelConfig)
checkKeltnerTouch(upper, lower)
Parameters:
upper (float)
lower (float)
getKeltnerDepth(basis, upper, lower)
Parameters:
basis (float)
upper (float)
lower (float)
checkKeltnerBreakout(upper, lower)
Parameters:
upper (float)
lower (float)
calcDonchianChannel(config)
Parameters:
config (ChannelConfig)
checkDonchianTouch(upper, lower)
Parameters:
upper (float)
lower (float)
checkDonchianReentry(upper, lower)
Parameters:
upper (float)
lower (float)
getDonchianWidth(upper, lower)
Parameters:
upper (float)
lower (float)
calcBollingerBands(config)
Parameters:
config (ChannelConfig)
calcSqueezeRatio(bbStdev, kcMultiplier, kcAtr)
Parameters:
bbStdev (float)
kcMultiplier (float)
kcAtr (float)
detectSqueezeState(squeezeRatio)
Parameters:
squeezeRatio (float)
detectSqueezeBreak(squeezeRatio, kcUpper, kcLower)
Parameters:
squeezeRatio (float)
kcUpper (float)
kcLower (float)
getSqueezeIntensity(squeezeRatio)
Parameters:
squeezeRatio (float)
processChannelDetection(config)
Parameters:
config (ChannelConfig)
detectChannelSignals(state)
Parameters:
state (ChannelState)
detectQualityZones(state)
Parameters:
state (ChannelState)
getChannelSignalText(state)
Parameters:
state (ChannelState)
analyzeChannelTrend(state)
Parameters:
state (ChannelState)
getChannelConfluence(state)
Parameters:
state (ChannelState)
newVwapConfig()
newVwapAnchors()
calcSessionVwap()
getPreviousSessionVwap(sessionVwap)
Parameters:
sessionVwap (float)
updateVwapAnchors(anchors, config)
Parameters:
anchors (VwapAnchors)
config (VwapConfig)
calcAnchoredVwap(anchors, isHigh)
Parameters:
anchors (VwapAnchors)
isHigh (bool)
detectPriceCrosses(sessionVwap)
Parameters:
sessionVwap (float)
detectStructureCrosses(sessionVwap, anchoredHigh, anchoredLow)
Parameters:
sessionVwap (float)
anchoredHigh (float)
anchoredLow (float)
detectVwapCluster(sessionVwap, anchoredHigh, anchoredLow, config)
Parameters:
sessionVwap (float)
anchoredHigh (float)
anchoredLow (float)
config (VwapConfig)
canShowSignal(anchors, config, signalType)
Parameters:
anchors (VwapAnchors)
config (VwapConfig)
signalType (string)
updateSignalThrottle(anchors, signalType)
Parameters:
anchors (VwapAnchors)
signalType (string)
calcCrossStrength(sessionVwap, isPriceCross)
Parameters:
sessionVwap (float)
isPriceCross (bool)
calcClusterStrength(vwapsInCluster, priceInCluster, tolerance)
Parameters:
vwapsInCluster (bool)
priceInCluster (bool)
tolerance (float)
calcStructureStrength(sessionVwap, anchoredHigh, anchoredLow)
Parameters:
sessionVwap (float)
anchoredHigh (float)
anchoredLow (float)
analyzeVwapTrend(sessionVwap)
Parameters:
sessionVwap (float)
processVwapDetection(anchors, config)
Parameters:
anchors (VwapAnchors)
config (VwapConfig)
generateVwapSignals(state)
Parameters:
state (VwapState)
getVwapBias(state)
Parameters:
state (VwapState)
getVwapConfluence(state)
Parameters:
state (VwapState)
newZoneConfig()
newZoneState()
stringToFloats(s)
Parameters:
s (string)
calculateBias(config)
Parameters:
config (ZoneConfig)
createZone(top, bottom, isBull, isHTF)
Parameters:
top (float)
bottom (float)
isBull (bool)
isHTF (bool)
updateZoneStatus(zone)
Parameters:
zone (Zone)
detectFVGOverlap(zone)
Parameters:
zone (Zone)
scoreZone(zone, config)
Parameters:
zone (Zone)
config (ZoneConfig)
sortAndTrimZones(zones, config)
Parameters:
zones (array)
config (ZoneConfig)
adjustZoneVisibility(zones, config)
Parameters:
zones (array)
config (ZoneConfig)
calculateTargetsATR(base, stepsString, atrLength)
Parameters:
base (float)
stepsString (string)
atrLength (simple int)
calculateTargetsSigma(base, stepsString, sigmaLength)
Parameters:
base (float)
stepsString (string)
sigmaLength (int)
calculateTargetsLiquidity(isLong, config)
Parameters:
isLong (bool)
config (ZoneConfig)
detectZoneSignals(zones, bias, config)
Parameters:
zones (array)
bias (int)
config (ZoneConfig)
processZoneManagement(state, config)
Parameters:
state (ZoneState)
config (ZoneConfig)
findNearestZones(state)
Parameters:
state (ZoneState)
newVolumeConfig()
newVolumeState()
getPriceSource(config)
Parameters:
config (VolumeConfig)
isInSession(config)
Parameters:
config (VolumeConfig)
isNewSession(config)
Parameters:
config (VolumeConfig)
calculateWindow(config)
Parameters:
config (VolumeConfig)
calculateProfile(config, windowStart, windowLength)
Parameters:
config (VolumeConfig)
windowStart (int)
windowLength (int)
detectVolumeNodes(binVolumes, binPrices, totalVolume)
Parameters:
binVolumes (array)
binPrices (array)
totalVolume (float)
calculateVolumeChoppiness(config)
Calculate choppiness index for volume profile
Parameters:
config (VolumeConfig)
detectMarketRegime(state, config)
Detect market regime based on multiple factors
Parameters:
state (VolumeState)
config (VolumeConfig)
calculateAdaptiveParameters(state, config)
Calculate adaptive volume profile parameters
Parameters:
state (VolumeState)
config (VolumeConfig)
updateMarketConditions(state, config)
Update volume state with market conditions
Parameters:
state (VolumeState)
config (VolumeConfig)
applyAdaptiveConfig(config, state)
Apply adaptive parameters to profile calculation
Parameters:
config (VolumeConfig)
state (VolumeState)
getHTFPivots(config)
Parameters:
config (VolumeConfig)
checkPivotConfluence(price, config, pivotHigh1, pivotLow1, pivotHigh2, pivotLow2)
Parameters:
price (float)
config (VolumeConfig)
pivotHigh1 (float)
pivotLow1 (float)
pivotHigh2 (float)
pivotLow2 (float)
calculateMOST()
Calculate MOST (Moving Stop) indicator
calculateTrendFilters(config)
Parameters:
config (VolumeConfig)
findNearestNodes(hvnNodes, lvnNodes)
Parameters:
hvnNodes (array)
lvnNodes (array)
detectVolumeSignals(config, profile, trendBullish, htfConfluence)
Parameters:
config (VolumeConfig)
profile (VolumeProfile)
trendBullish (bool)
htfConfluence (bool)
calculateVolumeScore(profile, trendBullish)
Parameters:
profile (VolumeProfile)
trendBullish (bool)
processVolumeProfile(state, config)
Parameters:
state (VolumeState)
config (VolumeConfig)
newHTFConfig()
newHTFStackState()
getOptimalTimeframes(chartTF)
Parameters:
chartTF (string)
calculateChoppiness(length)
Parameters:
length (int)
detectTrendEMA(length, threshold)
Parameters:
length (simple int)
threshold (float)
detectTrendSupertrend(atrLength, multiplier)
Parameters:
atrLength (simple int)
multiplier (float)
detectTrendMOST(length, multiplier)
Parameters:
length (simple int)
multiplier (float)
analyzeTrendForTF(tf, config)
Parameters:
tf (string)
config (HTFConfig)
calculateStackConfluence(tfData, config)
Parameters:
tfData (array)
config (HTFConfig)
calculateAutoTuningParams(choppiness, stackStrength, config)
Parameters:
choppiness (float)
stackStrength (float)
config (HTFConfig)
detectStackSignals(state, prevState, config)
Parameters:
state (HTFStackState)
prevState (HTFStackState)
config (HTFConfig)
createStackPanel(state, config)
Parameters:
state (HTFStackState)
config (HTFConfig)
processHTFStack(state, config)
Parameters:
state (HTFStackState)
config (HTFConfig)
processHTFStackSignals(state, prevState, config)
Parameters:
state (HTFStackState)
prevState (HTFStackState)
config (HTFConfig)
newRedefiningTechnicalAnalysisCore(analysisConfig, timeframeConfig, strategy)
Initialize RedefiningTechnicalAnalysis Core Library
Note: This function requires valid config objects to be passed in
The configuration module must be used directly to create default configs
Parameters:
analysisConfig (AnalysisConfig)
timeframeConfig (TimeframeConfig)
strategy (StrategyTemplate)
performAnalysis(core, prices, volumes, timestamps)
Perform complete multi-timeframe analysis
Parameters:
core (RedefiningTechnicalAnalysisCore)
prices (array)
volumes (array)
timestamps (array)
generateSignal(core, analysisResult)
Generate trading signal from analysis results
Parameters:
core (RedefiningTechnicalAnalysisCore)
analysisResult (MultiTimeframeResult)
assessRisk(core, signal)
Assess risk for trading decision
Parameters:
core (RedefiningTechnicalAnalysisCore)
signal (SignalResult)
executeFullWorkflow(core)
Execute complete analysis workflow
Parameters:
core (RedefiningTechnicalAnalysisCore)
updateAnalysisConfig(core, newConfig)
Update analysis configuration
Parameters:
core (RedefiningTechnicalAnalysisCore)
newConfig (AnalysisConfig)
updateStrategy(core, newStrategy)
Update strategy template
Parameters:
core (RedefiningTechnicalAnalysisCore)
newStrategy (StrategyTemplate)
checkSystemHealth(core)
Perform system health check
Parameters:
core (RedefiningTechnicalAnalysisCore)
generateStatusReport(core)
Generate comprehensive status report
Parameters:
core (RedefiningTechnicalAnalysisCore)
enableDebugMode(core, enabled)
Enable debug mode
Parameters:
core (RedefiningTechnicalAnalysisCore)
enabled (bool)
setFeatureFlag(core, flag, enabled)
Set feature flag
Parameters:
core (RedefiningTechnicalAnalysisCore)
flag (string)
enabled (bool)
getFeatureFlag(core, flag, defaultValue)
Get feature flag
Parameters:
core (RedefiningTechnicalAnalysisCore)
flag (string)
defaultValue (bool)
resetLibraryState(core)
Reset library state
Parameters:
core (RedefiningTechnicalAnalysisCore)
getLibraryInfo()
Get library version information
quickAnalysis(config, tfConfig, strategy)
Quick analysis - simplified entry point
Parameters:
config (AnalysisConfig)
tfConfig (TimeframeConfig)
strategy (StrategyTemplate)
getQuickStatus(core)
Get quick status string
Parameters:
core (RedefiningTechnicalAnalysisCore)
Result
Generic Result type for safe operations with error handling and fallbacks
Fields:
floatValue (series float)
stringValue (series string)
boolValue (series bool)
intValue (series int)
isSuccess (series bool)
errorCode (series string)
errorMessage (series string)
floatFallback (series float)
stringFallback (series string)
boolFallback (series bool)
intFallback (series int)
operationContext (series string)
timestamp (series int)
tags (array)
ValidationResult
Comprehensive validation result with errors, warnings, and corrections
Fields:
isValid (series bool)
errors (array)
warnings (array)
corrections (array)
suggestions (array)
validationScore (series float)
validationMode (series string)
validatedFields (series int)
totalFields (series int)
validationContext (series string)
validationTime (series int)
PerformanceProfile
Simplified performance profiling for Pine Script limitations
Fields:
executionTimeMs (series float)
averageExecutionMs (series float)
executionCount (series int)
errorCount (series int)
cacheHits (series int)
cacheMisses (series int)
cacheHitRatio (series float)
estimatedArrayElements (series int)
hasHeavyCalculation (series bool)
lastOptimizationHint (series string)
performanceGrade (series string)
performanceScore (series float)
functionName (series string)
profileStartTime (series int)
HealthStatus
Simplified health status for Pine Script limitations
Fields:
isHealthy (series bool)
healthScore (series float)
healthGrade (series string)
issues (array)
warnings (array)
recommendations (array)
dataValidationOK (series bool)
calculationsOK (series bool)
memoryUsageOK (series bool)
errorCountSession (series int)
warningCountSession (series int)
lastHealthCheck (series int)
healthCheckVersion (series string)
AnalysisConfig
Comprehensive analysis configuration with factor weights, thresholds, and extensible options
Fields:
activeFactors (array)
factorWeights (map)
thresholds (map)
features (map)
tradingMode (series string)
consensusMode (series string)
riskProfile (series string)
minConfidence (series float)
signalStrength (series float)
requireConsensus (series bool)
minConsensusCount (series int)
parameters (map)
options (map)
flags (map)
configName (series string)
version (series string)
description (series string)
createdTime (series int)
lastModified (series int)
validation (ValidationResult)
TimeframeConfig
Multi-timeframe configuration with weights and adjustments
Fields:
timeframes (array)
weights (array)
autoDetectChartTF (series bool)
includeHigherTFs (series bool)
tfAdjustments (map)
tfSensitivity (map)
tfFeatures (map)
minTimeframes (series int)
consensusThreshold (series float)
consensusMethod (series string)
normalizeWeights (series bool)
adaptiveBias (series bool)
higherTFBias (series float)
tfConfigName (series string)
configTimestamp (series int)
validation (ValidationResult)
GenericAnalysis
Generic analysis result that all specific analysis types extend
Fields:
totalScore (series float)
confidence (series float)
action (series string)
strength (series string)
riskLevel (series string)
factorScores (map)
factorWeights (map)
factorSignals (map)
factorReasons (map)
analysisType (series string)
timeframeAnalyzed (series string)
analysisTimestamp (series int)
marketCondition (series string)
dataQuality (series float)
performance (PerformanceProfile)
validation (ValidationResult)
numericData (map)
textData (map)
flags (map)
ConsensusData
Multi-timeframe consensus analysis data
Fields:
agreementCount (series int)
totalTimeframes (series int)
agreementPercentage (series float)
hasStrongConsensus (series bool)
hasMajorityConsensus (series bool)
agreeingTimeframes (array)
disagreeingTimeframes (array)
tfScores (map)
tfActions (map)
consensusMode (series string)
consensusScore (series float)
consensusAction (series string)
consensusStrength (series string)
tfWeights (map)
weightedConsensus (series bool)
weightedScore (series float)
consensusQuality (series float)
consensusReliability (series string)
consensusWarnings (array)
SignalResult
Comprehensive trading signal result
Fields:
strongBuy (series bool)
buy (series bool)
neutral (series bool)
sell (series bool)
strongSell (series bool)
overallScore (series float)
confidence (series float)
primaryAction (series string)
signalStrength (series string)
signalReason (series string)
contributingFactors (array)
factorContributions (map)
triggerCondition (series string)
consensus (ConsensusData)
consensusLevel (series string)
hasConsensus (series bool)
riskLevel (series string)
riskRewardRatio (series float)
successProbability (series float)
signalTimestamp (series int)
urgency (series string)
validityPeriod (series int)
marketPhase (series string)
warningFlags (array)
metadata (map)
MultiTimeframeResult
Multi-timeframe analysis result container
Fields:
primaryAnalysis (GenericAnalysis)
tfResults (map)
consensus (ConsensusData)
aggregatedScore (series float)
confidenceScore (series float)
dominantAction (series string)
consensusStrength (series string)
analyzedTimeframes (array)
failedTimeframes (array)
failureReasons (map)
performance (PerformanceProfile)
validation (ValidationResult)
dataQualityScore (series float)
config (AnalysisConfig)
tfConfig (TimeframeConfig)
analysisTimestamp (series int)
DebugLogEntry
Debug log entry
Fields:
timestamp (series int)
level (series string)
module (series string)
function (series string)
message (series string)
context (series string)
data (map)
barIndex (series int)
timeframe (series string)
DebugLogger
Debug logger with configurable levels
Fields:
entries (array)
maxEntries (series int)
currentLevel (series string)
enabled (series bool)
enabledModules (array)
showTimestamp (series bool)
showBarIndex (series bool)
outputFormat (series string)
PerformanceMeasurement
Performance measurement
Fields:
name (series string)
startTime (series int)
endTime (series int)
duration (series float)
iterations (series int)
avgDuration (series float)
status (series string)
context (series string)
TraceEntry
Execution trace entry
Fields:
function (series string)
module (series string)
entryTime (series int)
exitTime (series int)
isEntry (series bool)
parameters (series string)
returnValue (series string)
depth (series int)
ExecutionTracer
Execution tracer
Fields:
traces (array)
currentDepth (series int)
maxDepth (series int)
enabled (series bool)
maxTraces (series int)
CacheEntry
Cache entry
Fields:
key (series string)
data (series string)
timestamp (series int)
ttl (series int)
accessCount (series int)
lastAccess (series int)
CacheManager
Cache manager
Fields:
name (series string)
entries (map)
maxEntries (series int)
defaultTTL (series int)
enabled (series bool)
hits (series int)
misses (series int)
evictions (series int)
RiskAssessment
Core risk assessment result
Fields:
riskLevel (series string)
riskScore (series float)
riskRewardRatio (series float)
successProbability (series float)
maxDrawdownExpected (series float)
positionRisk (series float)
portfolioExposure (series float)
correlationRisk (series float)
concentrationRisk (series float)
volatilityRisk (series float)
liquidityRisk (series float)
timeframeRisk (series float)
newsEventRisk (series float)
supportResistanceRisk (series float)
trendRisk (series float)
momentumRisk (series float)
volumeRisk (series float)
hasHighRisk (series bool)
hasExtremeRisk (series bool)
riskWarnings (array)
riskFactors (array)
recommendedPositionSize (series float)
stopLossDistance (series float)
takeProfitDistance (series float)
shouldAvoidTrade (series bool)
riskMitigationStrategy (series string)
assessmentTimestamp (series int)
assessmentMethod (series string)
performance (PerformanceProfile)
PositionData
Comprehensive position data
Fields:
hasPosition (series bool)
positionSide (series string)
positionSize (series float)
entryPrice (series float)
entryTimestamp (series int)
entryReason (series string)
unrealizedPnL (series float)
realizedPnL (series float)
maxUnrealizedGain (series float)
maxUnrealizedLoss (series float)
totalReturn (series float)
stopLossPrice (series float)
takeProfitPrice (series float)
riskAmount (series float)
riskRewardRatio (series float)
currentRisk (RiskAssessment)
barsInPosition (series int)
maxBarsAllowed (series int)
isTimedOut (series bool)
timeframe (series string)
hasExitSignal (series bool)
exitReason (series string)
exitScore (series float)
shouldExit (series bool)
exitUrgency (series string)
actionHistory (array)
timestampHistory (array)
reasonHistory (array)
sharpeRatio (series float)
maxDrawdown (series float)
winRate (series float)
avgHoldTime (series float)
StrategyTemplate
Base strategy template
Fields:
name (series string)
description (series string)
category (series string)
timeframes (array)
entryThreshold (series float)
entryConfidenceMin (series float)
requiredSignals (array)
excludeConditions (array)
exitThreshold (series float)
stopLossPercent (series float)
takeProfitPercent (series float)
maxBarsInTrade (series int)
maxPositionSize (series float)
basePositionSize (series float)
useVolatilityAdjustment (series bool)
useConfidenceAdjustment (series bool)
maxRiskPerTrade (series float)
maxDailyRisk (series float)
maxDrawdownLimit (series float)
useAdaptiveRisk (series bool)
requireConsensus (series bool)
minConsensusPercent (series float)
avoidNewsEvents (series bool)
requireVolume (series bool)
targetSharpeRatio (series float)
targetWinRate (series float)
targetRiskReward (series float)
parameters (map)
flags (map)
settings (map)
MetricDataPoint
Performance metric data point
Fields:
timestamp (series int)
value (series float)
name (series string)
unit (series string)
labels (map)
source (series string)
MetricStats
Metric statistics
Fields:
min (series float)
max (series float)
avg (series float)
sum (series float)
count (series int)
p50 (series float)
p95 (series float)
p99 (series float)
stdDev (series float)
firstTimestamp (series int)
lastTimestamp (series int)
MetricDataPointArray
Wrapper for array of metric data points (to avoid nested collections)
Fields:
dataPoints (array)
MetricsCollector
Metrics collector
Fields:
metrics (map)
stats (map)
maxDataPoints (series int)
retentionPeriod (series int)
autoCleanup (series bool)
enabled (series bool)
enabledMetrics (array)
lastCleanupTime (series int)
ComponentHealth
Component health status
Fields:
name (series string)
status (series string)
healthScore (series float)
lastCheckTime (series int)
warnings (array)
errors (array)
metrics (map)
lastError (series string)
errorCount (series int)
warningCount (series int)
isOperational (series bool)
SystemHealth
System health overview
Fields:
overallStatus (series string)
overallScore (series float)
healthyComponents (series int)
degradedComponents (series int)
unhealthyComponents (series int)
components (array)
systemWarnings (array)
systemErrors (array)
lastFullCheckTime (series int)
autoHealing (series bool)
healingAttempts (series int)
HealthAlert
Health alert
Fields:
level (series string)
component (series string)
message (series string)
timestamp (series int)
acknowledged (series bool)
category (series string)
ZoneDetection
Advanced zone data structure
Fields:
upper (series float)
lower (series float)
mid (series float)
height (series float)
score (series float)
quality (series string)
touchCount (series int)
lastTouchBar (series int)
creationBar (series int)
role (series int)
zoneType (series string)
isActive (series bool)
isBroken (series bool)
flipBar (series int)
flipRetestCount (series int)
flipBestQuality (series float)
flipScore (series float)
hasFlipped (series bool)
htfOverlap (series bool)
htfTimeframe (series string)
htfConfidence (series float)
retestQuality (series float)
volumeProfile (series float)
volatilityProfile (series float)
freshnessScore (series float)
successfulBounces (series int)
failedBreakouts (series int)
successRate (series float)
avgHoldTime (series float)
zoneBox (series box)
midLine (series line)
zoneLabel (series label)
flipLabel (series label)
ZoneDetectionConfig
Zone analysis configuration
Fields:
pivotPeriod (series int)
atrMultiplier (series float)
atrLength (series int)
maxZones (series int)
mergeThreshold (series float)
minTouchesForSignificance (series int)
weightTouches (series float)
weightFreshness (series float)
weightVolume (series float)
weightHTF (series float)
minWickPercent (series float)
maxBodyPercent (series float)
freshnessHalfLife (series int)
useHTFProjection (series bool)
htfTimeframe (series string)
htfPivotCount (series int)
htfProjectionMultiplier (series float)
ChannelConfig
Fields:
kcEmaLength (series int)
kcAtrLength (series int)
kcMultiplier (series float)
dcLength (series int)
bbLength (series int)
bbMultiplier (series float)
pivotLength (series int)
atrThreshold (series float)
minBarsPerLeg (series int)
minTouchCount (series int)
mergeThreshold (series float)
ChannelState
Fields:
kcUpper (series float)
kcLower (series float)
kcBasis (series float)
kcAtr (series float)
dcUpper (series float)
dcLower (series float)
dcMid (series float)
bbUpper (series float)
bbLower (series float)
bbBasis (series float)
bbStdev (series float)
squeezeRatio (series float)
isSqueezeActive (series bool)
isExpanding (series bool)
touchKcUpper (series bool)
touchKcLower (series bool)
touchDcUpper (series bool)
touchDcLower (series bool)
kcBreakoutUp (series bool)
kcBreakoutDown (series bool)
dcReentryUp (series bool)
dcReentryDown (series bool)
squeezeBreakUp (series bool)
squeezeBreakDown (series bool)
kcDepth (series float)
dcWidth (series float)
squeezeIntensity (series float)
ChannelSignal
Fields:
signalType (series string)
direction (series int)
strength (series float)
description (series string)
isQualitySignal (series bool)
VwapConfig
Fields:
pivotLeftBars (series int)
pivotRightBars (series int)
clusterTolerancePercent (series float)
minBarsBetweenSignals (series int)
crossThreshold (series float)
enableThrottling (series bool)
detectClusters (series bool)
VwapState
Fields:
sessionVwap (series float)
sessionVwapPrev (series float)
anchoredVwapHigh (series float)
anchoredVwapLow (series float)
hasAnchoredHigh (series bool)
hasAnchoredLow (series bool)
priceCrossUp (series bool)
priceCrossDown (series bool)
canShowPriceCross (series bool)
structureCrossUp (series bool)
structureCrossDown (series bool)
canShowStructureCross (series bool)
isClusterActive (series bool)
canShowCluster (series bool)
clusterTolerance (series float)
vwapsInCluster (series bool)
priceInCluster (series bool)
priceVwapPosition (series int)
priceVwapDistance (series float)
priceVwapDistancePercent (series float)
crossStrength (series float)
clusterStrength (series float)
structureStrength (series float)
VwapSignal
Fields:
signalType (series string)
direction (series int)
strength (series float)
description (series string)
isHighConfidence (series bool)
barIndex (series int)
VwapAnchors
Fields:
cumulativePV (series float)
cumulativeV (series float)
anchorPV_High (series float)
anchorV_High (series float)
hasHighAnchor (series bool)
anchorPV_Low (series float)
anchorV_Low (series float)
hasLowAnchor (series bool)
lastPriceCrossBar (series int)
lastStructureCrossBar (series int)
lastClusterBar (series int)
ZoneConfig
Fields:
htfTimeframe (series string)
useHTF (series bool)
maxZonesPerSide (series int)
rankFavorHTF (series bool)
rankFavorFVG (series bool)
rankFavorFresh (series bool)
showOnlyTopRank (series bool)
alphaTop (series int)
alphaRest (series int)
biasLength (series int)
biasBandMultiplier (series float)
targetMode (series string)
atrLength (series int)
atrSteps (series string)
sigmaLength (series int)
sigmaSteps (series string)
useSSL (series bool)
useFVGFills (series bool)
confirmMidline (series bool)
confirmBreak (series bool)
requireBias (series bool)
lazyTargets (series bool)
nearPercent (series float)
Zone
Fields:
top (series float)
bottom (series float)
mid (series float)
bornTime (series int)
isBull (series bool)
isHTF (series bool)
touched (series bool)
violated (series bool)
hasFVG (series bool)
score (series float)
rank (series int)
zoneBox (series box)
midLine (series line)
isActive (series bool)
ZoneState
Fields:
zonesTF (array)
zonesHTF (array)
bias (series int)
biasScore (series float)
biasRegime (series string)
vwapLevel (series float)
bandUpper (series float)
bandLower (series float)
targetLevels (array)
targetLines (array)
activeBullZones (series int)
activeBearZones (series int)
totalZones (series int)
avgZoneScore (series float)
longSignal (series bool)
shortSignal (series bool)
nearestBullZone (Zone)
nearestBearZone (Zone)
ZoneSignal
Fields:
signalType (series string)
sourceZone (Zone)
strength (series float)
description (series string)
confirmed (series bool)
barIndex (series int)
VolumeConfig
Fields:
profileMode (series string)
fixedLength (series int)
rollingLength (series int)
sessionString (series string)
binCount (series int)
valueAreaPercent (series float)
useHLC3 (series bool)
useHTF1 (series bool)
htfTimeframe1 (series string)
useHTF2 (series bool)
htfTimeframe2 (series string)
pivotLookback (series int)
pivotToleranceATR (series float)
enableAutoTuning (series bool)
vaPct_eff (series float)
epsATR_eff (series float)
adaptiveAlpha (series float)
choppinessLength (series int)
choppyThreshold (series float)
trendingThreshold (series float)
useMarketRegime (series bool)
enableLVNSignals (series bool)
enableVASignals (series bool)
maxRetestDistanceATR (series float)
useEMAFilter (series bool)
useSupertrendFilter (series bool)
useMOSTFilter (series bool)
showPOC (series bool)
showValueArea (series bool)
showNodes (series bool)
showSilhouette (series bool)
silhouetteOffset (series int)
silhouetteWidth (series int)
zoneOpacity (series int)
enableSessionSplits (series bool)
maxSessionCount (series int)
VolumeNode
Fields:
price (series float)
volume (series float)
nodeType (series string)
prominence (series float)
isSignificant (series bool)
VolumeProfile
Fields:
pocPrice (series float)
pocVolume (series float)
valueAreaHigh (series float)
valueAreaLow (series float)
totalVolume (series float)
windowStart (series int)
windowLength (series int)
windowHigh (series float)
windowLow (series float)
binVolumes (array)
binPrices (array)
hvnNodes (array)
lvnNodes (array)
nearestLVN (series float)
nearestHVN (series float)
htfConfluence (series bool)
pocLine (series line)
valueAreaBox (series box)
nodeBoxes (array)
silhouette (series polyline)
VolumeState
Fields:
currentProfile (VolumeProfile)
sessionProfiles (array)
trendBullish (series bool)
emaConfluence (series float)
supertrendBull (series bool)
mostBull (series bool)
choppiness (series float)
isChoppy (series bool)
isTrending (series bool)
marketRegime (series string)
vaPct_current (series float)
epsATR_current (series float)
smoothingFactor (series float)
longLVNSignal (series bool)
shortLVNSignal (series bool)
longVASignal (series bool)
shortVASignal (series bool)
volumeScore (series float)
passFilter (series bool)
inValueArea (series bool)
abovePOC (series bool)
pocRising (series bool)
nearLVN (series bool)
VolumeSignal
Fields:
signalType (series string)
direction (series int)
strength (series float)
description (series string)
triggerPrice (series float)
hasConfluence (series bool)
barIndex (series int)
HTFConfig
Fields:
timeframes (array)
tfWeights (array)
autoSelectTFs (series bool)
maxTimeframes (series int)
trendLength (series int)
trendThreshold (series float)
trendMethod (series string)
stackThreshold (series float)
requireAllTFs (series bool)
confluenceBonus (series float)
enableAutoTuning (series bool)
choppinessLength (series int)
choppyThreshold (series float)
trendingThreshold (series float)
showStackPanel (series bool)
panelPosition (series string)
panelRows (series int)
panelCols (series int)
showTooltips (series bool)
HTFTrendData
Fields:
timeframe (series string)
trendStrength (series float)
trendDirection (series string)
confidence (series float)
isValid (series bool)
weight (series float)
trendColor (series color)
HTFStackState
Fields:
tfData (array)
bullConfluence (series float)
bearConfluence (series float)
stackStrength (series float)
stackBias (series string)
choppiness (series float)
isChoppy (series bool)
isTrending (series bool)
marketRegime (series string)
vaPct_eff (series float)
epsATR_eff (series float)
adaptiveAlpha (series float)
bullStackSignal (series bool)
bearStackSignal (series bool)
stackBreakSignal (series bool)
stackTable (series table)
tfLabels (array)
strengthBars (array)
RedefiningTechnicalAnalysisCore
Main library state container
Fields:
analysisConfig (AnalysisConfig)
timeframeConfig (TimeframeConfig)
activeStrategy (StrategyTemplate)
lastAnalysis (MultiTimeframeResult)
lastSignal (SignalResult)
lastRisk (RiskAssessment)
currentPosition (PositionData)
isInitialized (series bool)
lastUpdateTime (series int)
currentTimeframe (series string)
globalPerformance (PerformanceProfile)
systemHealth (SystemHealth)
metricsCollector (MetricsCollector)
analysisCache (CacheManager)
calculationCache (CacheManager)
recentErrors (array)
recentWarnings (array)
errorCount (series int)
warningCount (series int)
debugLogger (DebugLogger)
debugMode (series bool)
extensionData (map)
featureFlags (map)
Free Stock ScreenerMissing great trade opportunities is annoying, and unless you have 12 screens or only trade one market, you are missing a lot of trades. To fix that, we created this free stock screener so you get notified instantly of potential great trading conditions in real time, right on your chart.
You get notified of trading benchmarks being met by the value being displayed on the scanner as well as a color change so that it grabs your attention and makes you aware that you should take a look at the other market and look for a potential trade. It also has built in alerts so you can have an alert notification go off when any of your trading conditions are met instead of needing to watch the scanner for color changes.
The screener will change the ticker symbol background color to red green when price is above or below the previous daily range and above or below both VWAPs. This signals that the ticker is trending, which typically means it is a great time to trade that market and follow the trend.
This free stock screener allows you to scan up to 10 different markets at the same time for various different conditions so you always know what is going on with your favorite trading symbols. If you want to scan more tickers, just add the indicator to your chart again and change the table position to the other side of the screen and update the tickers on the 2nd screener, allowing you to have 20 tickers at a time.
The scanner can be fully customized by changing the markets that it screens and turning on or off as many of them as you would like. You can also turn on or off any of the different data sets so that you only get information about trading conditions that matter to you.
The screener can provide data on any type of market, such as stocks, crypto, futures, forex and more. Each ticker can be adjusted to whatever market you would like it to scan for data in the settings panel, the only limitation is that it will not provide data for the VWAP and volume trend score if the ticker you are screening does not provide volume data.
Screener Features
The scanner will provide the following types of data for each ticker that is turned on:
Volume - Provides a volume score compared to the average volume and notifies you of higher than normal volume and volume spikes on individual bars by changing colors.
Volatility - Provides a volatility score compared to the average volatility and notifies you of higher than normal volatility by changing colors.
Oscillator - Choose between the RSI or CCI. The value of that oscillator will be displayed and will notify you when values are in extreme ranges such as overbought or oversold conditions according to the threshold values you enter in the settings panel. When those thresholds have been breached, you will be notified by it changing color.
Big Candles - Compares the current candle to average previous candle sizes, and changes color to notify you of big candles including a big top wick, big bottom wick, big candle body and big candle high to low range.
Daily Level Touches & Trends - Calculates and displays various daily candle and intraday open price levels that act as support and resistance. Notifies you when price is touching any of the daily levels that are turned on. The levels you can have on are as follows: previous day high, previous day low or previous day open. It also will notify you when price is touching the current day’s open, NY 930am open, Asia 8pm open, London 2am open and NY midnight 12am open. It will also say “Above” if price is above the previous day’s high or it will say “Below” if price is below the previous day’s low. The color of the cell will also change when a level touch is happening or price is above the previous day high or below the previous day low.
VWAP - Choose from 2 different VWAP lengths, default settings are daily and weekly VWAPs. You will get notified if price touches either of the VWAPs and they will also say “Above” or “Below” if price is currently above or below each VWAP.
How To Use The Screener To Help You Trade
The main purpose of the screener is to scan other markets and notify you of potential good trading opportunities such as price bouncing off of the daily levels or VWAPs. It can also be used to know when price is trending according to the VWAPs and daily levels. Lastly, you can use it to know how the volume and volatility trends are currently which gives you more confidence in taking a trade with this data when volume and volatility are present.
Volume Score
When volume is high, this represents a good time to trade because there are many market participants and price is likely to be volatile while there is high volume which can present a lot of good trade setups for you to take.
The volume score shown on the screener measures the current volume trend compared to previous volume trends and calculates that into a score based on 100 being the same as the previous volume trend. So any value above 100 means it is high volume and any value less than 100 means it is lower volume than normal.
In the settings panel, you can adjust the volume threshold that needs to be met for a volume notification to show up. The default setting is at 120, so you will get notified when the current volume trend score is 120 or higher or you can adjust that threshold value to whatever value you prefer.
It also will notify you when there is a volume spike on the current bar. This is determined by calculating an average of the recent volume totals and then checking to see if the current bar is greater than or equal to that average multiplied by 3. So if a single bar has volume that is greater than 3 times what the average volume is, then you will get a notification that says “Spike” to make you aware of that volume spike.
The volume trend threshold, volume spike multiplier and lookback length for the average volume used in volume spike calculations can all be adjusted in the settings panel to fit your desired preferences.
Volatility Score
High volatility can mean it is a great time to trade because the market is moving quickly and providing large enough movements that you can get in and out in a short amount of time, while still accruing decent sized trade PnL.
The volatility score will calculate the current volatility for each market compared to previous conditions and then divide the current volatility by the average volatility to give you a volatility score. Anything over 100 means the market is decently volatile and you should look at that market to find potential trade setups to execute on. Anything below 100 means the market is not very volatile and it is usually best to just wait until volatility returns before you start trading again.
The screener will notify you when the volatility score is above the threshold you set. The default value is set to 90, but can be adjusted to your preference. Pay attention to any market that shows an alert and take a look at that chart because the high volatility may present a good trade setup for you in the near future.
Oscillator Score
The oscillator data can be switched between Relative Strength Index(RSI) and Commodity Channel Index(CCI).
The RSI provides a value between 0 and 100 that indicates the momentum and strength of the recent price action. Many traders use the extremes of the 0-100 range to signal overbought or oversold conditions and use that as a sign to look for price to reverse in the near future. The typical values used for this and the default settings to provide notifications are: 70 for overbought and 30 for oversold. The scanner will notify you when the RSI value is considered overbought or oversold so you know to take a look at the chart and analyze if it is ready for a trade to be taken.
The CCI provides a value that can be used to determine the trend strength of the underlying asset when the oscillator moves above 100 or below -100. These extreme values are outside of the normal accumulation range and signify that price is moving strongly in that direction so it may be a good time to take a trade in the direction of the trend. The scanner will show you the value of the CCI for each market and notify you if that value is above 100 or below -100.
Both RSI and CCI settings can be adjusted in the settings panel to your desired settings so you have the exact oscillator settings you prefer to use as well as the exact values that you want to use for being notified.
Big Candles
Big candles can mean that many traders are buying or selling at the same time and many times indicate a good signal to trade in that same direction. That is why we included this calculation in the screener, so you are always aware when a large candle prints.
It calculates the average size of the recent candles and then uses that average as the benchmark to determine if the current candle is considered big and worthy of notifying you to take a look at that chart.
You can adjust the multiplier used for the big candle threshold to whatever you desire, but the default setting is 3 which means the candle will be considered big and notify you if it is 3 times as large as an average candle.
The big candles data will track the following candle values and notify you with these labels:
High to Low candle size = HL
Candle Body from open to close candle size = OC
Top Wick size = TW
Bottom Wick size = BW
Daily Level Touches & Trend
Daily level touches are excellent levels to watch for price to bounce because they often act as support and resistance levels for intraday trading. The scanner will track each market and notify you when the current candle is touching any of the daily levels that you have turned on in the settings panel.
The main levels that are turned on by default and are useful for all markets and how they will be labeled on the scanner are as follows:
Previous Day High = High
Previous Day Low = Low
Previous Day Open = < Open
Previous Day Close = Close
Current Day Open = Open
We also included some extra levels that are useful for futures traders. They are as follows:
NY 930am Open = 930am
NY 12am Midnight Open = 12am
Asia Open at 8pm NY time = Asia
London Open at 2am NY Time = London
Watch how price reacts to these levels and then trade the bounces off of these levels if the price action confirms that it is going to respect that level.
When price is currently above the previous day high, the scanner will say “Above” and show a green color, indicating a bullish trend and that price is above the previous daily candle’s high.
When price is currently below the previous day low, the scanner will say “Below” and show a red color, indicating a bearish trend and that price is below the previous daily candle’s low.
Pay attention to when price is trending above or below the previous daily candle as those trends can provide excellent trend trading opportunities.
The daily levels that you have turned on in the settings will also show as lines on the chart and include a label next to them, identifying each level so you know what each line represents. You can turn on or off all of the lines shown on the chart in the main settings or turn them off one by one in the style panel of the settings. Labels can also be turned on or off for all of the lines in the main settings panel. You can adjust the label positioning in the Label Offset section of the settings panel.
VWAP Touches & Trend
VWAP stands for volume weighted average price and is a very popular tool that traders use to determine trend direction based on volume as well as an excellent level to trade price bounces off of.
The typical VWAP time period used is Daily, which means the volume weighted average price will reset at the beginning of a new day. We set the first VWAP to be the daily VWAP by default and the second one to be the weekly VWAP. You can adjust both of the time periods to be any of the provided time lengths that you choose.
The screener will show “Above” with a green background color when price is above the VWAP, indicating a bullish trend. It will show “Below” with a red background color when price is below the VWAP, indicating a bearish trend. When both VWAPs are showing Above or Below, you can expect price to trend in that direction, so look for pullbacks you can trade in the direction of the trend. If the VWAPs are showing different directions, then you should expect to bounce back and forth between the VWAPs, but be careful and watch out for price to break beyond either one and start a trend.
When the current candle is touching the VWAP, the scanner will change colors and say VWAP to notify you that price is touching the VWAP and you should look at that chart and analyze the market for a potential bounce off of the VWAP to trade.
Trending Market Signals
Strong trends are excellent markets to trade and can many times provide excellent trading opportunities that don’t require expert price action reading skills to be able to take winning trades from. That is why we included a signal to notify you of a strong trending market.
The strong trending market will show up as a green or red background color for the ticker name. If the color of the ticker name is green, it is notifying you that the price is above the previous daily high, above VWAP 1 and above VWAP 2 and is a good market to look for bullish trend trades. If the color of the ticker name is red, it is notifying you that the price is below the previous daily low, below VWAP 1 and below VWAP 2 and is a good market to look for bearish trend trades.
Changing The Tickers It Scans
To change the tickers that the indicator scans, scroll near the bottom of the settings panel and select the ticker symbol you want to update and then search for the exact symbol you want to use. If you want to scan less tickers, then just turn some of the tickers off that you don’t need.
Scanning More Than 10 Tickers
If you want to scan more than 10 tickers, you can add the scanner to your chart again and then just change the table position to the other side of the screen. This will allow you to scan 10 more tickers that will show up separately. Then if you want even more, just add the indicator to your chart again and update the table position until you have as many markets as you want. The table position setting can be found at the bottom of the main settings panel.
Alerts
The screener has alerts that can be used to notify you when any of the data set thresholds have been met or if price is touching one of the levels. You can set alerts for the following events:
Bullish Trend Alert - Price is above the previous daily high and above both VWAPs.
Bearish Trend Alert - Price is below the previous daily low and below both VWAPs.
High Volume Alert - Volume is higher than the threshold or a volume spike is detected.
High Volatility Alert - Volatility is higher than the threshold.
Oscillator Is Extended Alert - Oscillator value has exceeded the upper or lower threshold.
Big Candle Alert - A big candle has been detected.
Daily Level Touch Alert - One of the daily levels that is turned on is being touched.
VWAP Touch Alert - One of the 2 VWAPs are being touched.
An alert will trigger when any one of tickers on your scanner meets the alert conditions, so when you see the alert, you will need to go to your chart and look at the scanner to see which ticker it was and then navigate to that chart to look for potential trade setups.
The alerts will use the exact same settings you have configured in the settings panel to send you alert notifications. With normal settings, this could give you a lot of alerts, so if you only want alerts to fire when abnormal conditions are being met, try setting up a second screener on your chart that has very high threshold values and only has the most important level touches on. Then turn the setting "Do Not Show The Screener On The Chart" to off so the calculations will still run and fire alerts, but won't clog up your charts. This way you can only get alert notifications when major events happen but still have your normal screener settings available on your chart.
Markets This Can Be Used On
This screener uses the price action and volume data so you can use it to scan any type of market you would like as long as the ticker you are scanning has price and volume data feeds. If a market does not have volume data, then it will just show NaN in the volume row and the VWAP rows will not show anything.
5-Min EMA MACD RSI Scalping (MACD 5 Candles Confirm) - BVK 🔹 5-Min EMA MACD RSI Scalping Strategy – Full Description
The 5-Min EMA MACD RSI Scalping Strategy is a powerful intraday trading technique designed for quick trades on lower timeframes, mainly the 5-minute chart. It combines trend confirmation (EMA), momentum analysis (MACD), and overbought/oversold signals (RSI) to capture short, high-probability price moves in both bullish and bearish markets.
⚙️ Indicators Used:
Exponential Moving Averages (EMA)
EMA 9 – Fast-moving average for entry trigger.
EMA 21 – Medium-term average for trend confirmation.
When EMA 9 crosses above EMA 21 → Bullish bias.
When EMA 9 crosses below EMA 21 → Bearish bias.
MACD (12, 26, 9)
Confirms momentum and possible entry zones.
Bullish confirmation: MACD line crosses above signal line.
Bearish confirmation: MACD line crosses below signal line.
RSI (14-period)
Filters out false signals.
Buy zone: RSI rising above 40–50.
Sell zone: RSI falling below 60–50.
Avoid trades when RSI is near 70 (overbought) or 30 (oversold).
💡 Entry Rules:
Buy Setup (Long Trade):
EMA 9 crosses above EMA 21.
MACD line crosses above signal line (positive momentum).
RSI is above 50 but below 70 (confirming strength).
Enter trade at candle close.
Sell Setup (Short Trade):
EMA 9 crosses below EMA 21.
MACD line crosses below signal line.
RSI is below 50 but above 30 (confirming weakness).
Enter trade at candle close.
🎯 Exit Rules:
Take Profit: 1.5x to 2x of risk or near the opposite EMA crossover.
Stop Loss: Below/above recent swing low/high or 0.3–0.5% away from entry.
Optional trailing stop using EMA 9 for dynamic exits.
📊 Best Timeframes & Assets:
Works best on 5-minute charts.
Suitable for Forex, Indices, Cryptocurrency, and Stocks with good liquidity.
Avoid major news events or low-volume sessions.
⚠️ Tips for Best Results:
Trade only during high-volume market sessions (e.g., London/New York overlap).
Always confirm trend direction on higher timeframes (15m or 1H).
Avoid overtrading—wait for clear signal confluence (EMA + MACD + RSI).
🧠 Strategy Summary:
“EMA gives you the trend, MACD gives you momentum, and RSI keeps you disciplined.”
This strategy is simple yet effective for traders who prefer quick in-and-out trades within minutes, offering a structured approach to scalping with reduced emotional bias.
Directional Indicator Crossovers v1[JopAlgo]Directional Indicator Crossovers v1 — the classic DMI, made clearer and easier to act on
We'd like to introduce you to a more relaxed, streamlined version of DI. While it may not seem like it at first glance, we've taken the D+/D- method as a starting point and developed our own version of this indicator: two lines, a smooth green/red field indicating who's in control, and clear crossover alerts for a flip. We deliberately chose the step line representation because it closely matches the candlestick patterns on the chart. Designed to help you react faster—without clutter.
What you’ll see
+DI (green) and −DI (red) using classic Wilder smoothing.
A soft control zone between the lines: green when +DI dominates, red when −DI dominates.
Crossover alerts (no labels, no background flooding)—just the turning points.
Why this helps
Instant bias: the shaded field tells you who’s in control without reading values.
Cleaner execution: minimal visuals keep focus on the handoff (+DI↔−DI) and your price levels.
Actionable by design: built-in alerts fire right at the flip to route into your workflow.
How to read it
Bias: Green zone → buyers lead. Red zone → sellers lead.
Trigger: Consider entries on the DI crossover that aligns with your higher-timeframe context (trend, S/R, OB).
Patience in chop: If flips are frequent in tight ranges, wait for sustained zone dominance or confirm on a higher TF.
Exit/flip: Opposite crossover or a clear loss of dominance.
Settings that matter
DI Length (default 14): Higher = calmer, fewer flips. Lower = faster, more signals.
Visuals: Keep the control zone on for quick reads; hide crossover marks if you prefer pure lines.
Alerts: Enable bullish and bearish DI cross alerts; connect to notifications or webhooks as needed.
Starter presets
Intraday (15m–1H): DI Length 12–14 for quicker handoffs.
Swing (4H–1D): DI Length 14–20 for cleaner signals.
Choppy assets: Nudge length higher to dampen noise.
Where it shines (and limits)
Best: Liquid markets (crypto majors, indices, large caps) where handoffs matter.
Works elsewhere: Still useful on slower pairs; extend length for stability.
Limit: Frequent flips in low-range sessions—pair with HTF bias or structure.
Alerts included
Bullish DI Crossover: +DI crosses above −DI.
Bearish DI Crossover: −DI crosses above +DI.
Attribution & License
Built on the Directional Movement Index concept by J. Welles Wilder Jr. (1978).
Independent Pine v6 implementation (not derived from TradingView’s built-in source).
Released as Open Source (MPL-2.0)—please keep the license header intact.
Disclaimer
For educational purposes only; not financial advice. Trading involves risk. Test first, use clear levels, and manage risk. This project is independent and not affiliated with or endorsed by TradingView.
Triple SuperTrend + RSI + Fib BB + Vol Osc Strategy✅ Key Features Implemented:
Three SuperTrend Indicators with different opacities:
ST1: 10 period, 1.0 multiplier (solid)
ST2: 11 period, 2.0 multiplier (40% transparent)
ST3: 12 period, 3.0 multiplier (70% transparent)
Signal Logic (no repainting):
BUY: All 3 SuperTrends turn green + RSI(7) > 50
SELL: All 3 SuperTrends turn red + RSI(7) < 50
EXIT: Any SuperTrend changes color OR price touches Fib BB
Fibonacci Bollinger Bands (200 SMA ± 2.618 × StdDev):
Purple bands with subtle fill
Gray dashed middle line
Visual Elements:
Green "BUY" labels below bars
Red "SELL" labels above bars
Yellow circle "EXIT" labels at candle tops
Green/red background tint when all STs align
Info dashboard showing real-time status
Alert Conditions for BUY, SELL, and EXIT
Position Tracking ensures only one signal per condition change
📊 Usage:
Copy the entire code and paste it into TradingView's Pine Editor, then click "Add to Chart". The indicator will display all three SuperTrends, Fibonacci Bollinger Bands, and generate signals according to your exact specifications.
The dashboard in the top-right corner shows the current status of each SuperTrend, RSI value, and whether you're in a position!RetryLH
SPY200SMA (+4%/-3%) TQQQ/QQQ STRATEGYSummary of the Improved Strategy: When the price of AMEX:SPY is +4% above the 200SMA BUY NASDAQ:TQQQ and when the price of SPY drops to -3% under the SPY 200SMA SELL everything and slowly DCA into NASDAQ:QQQ over the next 6-12 months or until price returns to +4% above the SPY 200SMA at which point you will go back into 100% TQQQ.
Note: (if the price of QQQ goes 30% above the 200SMA of QQQ deleverage to QQQ or Sell to protect yourself from dot com level event)
More info and stats -https://www.reddit.com/r/LETFs/comments/1nhye66/spy_200sma_43_tqqqqqq_long_term_investment/
SMC POI Entry System HUDEntry, RR, Exit, of supply and demand zones taught in smart money trading. 12 types of zones and setups around Flips, Order Blocks, High Probability, and Extreme Demand Zones. Includes Checklist for Entry, Exit Rules, Take Profit Targets, Stop Loss spots, and Context
Daytrade Forex Scalper TwinPulse Auction Timer IndicatorWhat this indicator is
TwinPulse Auction Timer is a multi component execution aid designed for liquid markets. It looks for two families of opportunities
Breakouts that leave a compression area after a fresh sweep
Reversals that trigger after a sweep with strong wick polarity
It does not try to predict future prices. It measures present auction conditions with transparent rules and shows you when those conditions align. You get a simple table that says LONG SHORT or WAIT, optional session shading, clean entry and exit level visuals, and alerts you can wire to your workflow.
Why it is different
Most tools show a single signal. TwinPulse combines several independent signals into an Edge Score that you can tune. The components are
• Pulse. A signed measure of wick asymmetry with candle body direction
• Compression. Current true range compared with an average range
• Sweep timer. Bars elapsed since the most recent sweep of a prior high or low
• Bias. Direction of a higher timeframe candle
• Regime. Efficiency ratio and the relation of micro to macro volatility
• Location. Distance from the daily anchored VWAP
• Session. London and New York filter by time windows
Each component is visible in the inputs and in the table so you can understand why a suggestion appears. The script uses request.security() with lookahead off in all calls so it does not peek into the future. Shapes may move while a bar is open since price is still forming. They stop moving when the bar closes.
What you will see on the chart
• L and S shapes on entry bars
• An Exit shape at the price where a stop or the runner target would have been hit
• Four horizontal lines while a trade is active
Entry
Stop
TP1 at one R
TP2 at the runner target expressed in R
• Labels anchored to each line so you can instantly read Entry SL TP1 and TP2 with current values
• Optional shading during your session windows
• Optional daily VWAP line
The table in the top right shows
Action LONG SHORT IN LONG IN SHORT or WAIT
Session ON or OFF
Bias UP DOWN or FLAT
Pulse value
Compression value
Edge L percent and Edge S percent
How it works in detail
Pulse
For each bar the script measures up wick minus down wick divided by range and multiplies that by the sign of the candle body. The result is averaged with pulse_len. Positive numbers indicate aggressive buying. Negative numbers indicate aggressive selling. You control the minimum absolute value with pulse_thr.
Compression
Compression is the ratio of current range to an average range. You can choose the range basis. HL SMA uses simple high minus low smoothed by range_len. ATR uses classic True Range smoothed by atr_len. Values below comp_thr indicate a coil.
Sweeps and the timer
A sweep occurs when price trades beyond the highest high or lowest low seen in the previous sweep_len bars. A strict sweep requires a close back inside that prior range. The timer measures how many bars have elapsed since the last sweep. Breakout setups require the timer to exceed timer_thr.
Bias on a confirmation timeframe
A higher timeframe candle is read with confirm_tf. If close is above open bias is UP. If close is below open bias is DOWN. This keeps breakouts aligned with the prevailing drift.
Regime filters
Efficiency ratio measures the straight line change over the sum of absolute bar to bar changes over er_len. It rises in trendy conditions and falls in noise. Minimum efficiency is controlled by er_min.
Micro to macro volatility ratio compares a short lookback average range with a longer lookback average range using your chosen basis. For breakouts you usually want micro volatility to be near or above macro hence mvr_min. For reversals you often want micro volatility that is not overheated relative to macro hence mvr_max_rev.
VWAP distance gate
Daily anchored VWAP is rebuilt from the open of each session. The script computes the absolute distance from VWAP in units of your average range and requires that distance to exceed vwap_dist_thr when use_vwap_gate is true. This keeps entries away from the mean.
Edge Score
Each gate contributes a weight that you control. The script sums weights of the satisfied gates and divides by the sum of all weights to produce an Edge percent for long and an Edge percent for short. You can then require a minimum Edge percent using edge_min_pct. This turns the indicator into a step by step checklist that you can tune to your taste.
Using the indicator step by step
Choose markets and timeframes
The logic is designed for liquid instruments. Major currency pairs, index futures and cash index CFDs, and the most liquid crypto pairs work well. On intraday use one to fifteen minutes for signals and fifteen to sixty minutes for confirmation. On swing use one hour to one day for signals and one day for confirmation.
Decide on entry mode
Breakouts require a compression area and a sweep timer. Reversals require a strict sweep and a strong pulse. If you are unsure leave the default which allows both.
Pick a range basis
For FX and crypto HL SMA is often stable. For indices and single name equities with gaps ATR can adapt better. If results look too reactive increase the window. If results are too slow reduce it.
Tune regime filters
If you trade trend continuation raise er_min and mvr_min. If you trade counter rotation lower them and rely on the reversal path with the strict sweep condition.
Set the VWAP gate
Enabling it helps you avoid entries at the mean. Push the threshold higher on range bound days. Reduce it in strong trend days.
Table driven decision
Watch Action and the Edge percents. If the script says WAIT you can read Pulse and Compression to see what is missing. Often the best trades appear when both Edge percents are well separated and your session switch is ON.
Use the visuals
When a suggestion triggers you will see entry stop and targets. You can mirror the levels in your own workflow or use alerts.
Consider bar close
Signals are computed in real time. For a strict process you can wait until the bar closes to reduce noise.
Inputs explained with quick guidance
Setup
Signal TF chooses where the logic is computed. Leave blank to use the chart.
Confirm TF sets the higher timeframe for bias.
Session filter restricts signals to the London and New York windows you specify.
Invert flips long and short. It is useful on inverse instruments.
Logic options
Entry mode allows Breakouts Reversals or Both.
Average range basis selects HL SMA or ATR.
ATR length is used when ATR is selected.
Pulse source can be Regular OHLC or Heikin Ashi. Heikin Ashi smooths noisy series, but the script still runs on regular bars and you should publish and use it on standard candles to respect the platform guidance.
Core numeric settings
Sweep lookback controls the size of the liquidity pool targeted by the sweep condition.
Pulse window smooths the wick polarity measure.
Average range window controls your base range when you use HL SMA.
Pulse threshold sets the minimum polarity required.
Compression threshold sets the maximum current range relative to average to consider the market coiled.
Expansion timer bars sets how much time has passed since the last sweep before you allow a breakout.
Regime filters
Efficiency ratio length and minimum value keep you out of aimless drift.
Micro and Macro range lengths feed the micro to macro ratio.
Minimum micro to macro for breakouts and maximum micro to macro for reversals steer the two entry families.
VWAP gate and distance threshold keep you away from the mean.
Levels and trade management visuals
Runner target in R sets TP2 as a multiple of initial risk.
Stop distance as average range multiple sets initial risk size for the visuals.
Move stop to entry after one R touch turns on break even logic once price has traveled one risk unit.
Trail buffer as R fraction uses the last sweep as an anchor and keeps a dynamic stop at a chosen fraction of R beyond it.
Cooldown after exit prevents immediate re entries.
Edge Score
Weights for pulse compression timer bias efficiency ratio micro to macro VWAP gate and session let you align the checklist with your style.
Minimum Edge percent to suggest applies a final filter to LONG or SHORT suggestions.
UI
Table and markers switch the compact dashboard and the shapes.
TP and SL lines and labels draw and name each level.
TP1 partial label percent is printed in the TP1 label for clarity.
Session shading helps with focus.
Daily VWAP line is optional.
Alerts
The script provides alerts for Long Short Exit and for Edge percent crossing the threshold on either side. Use them to drive notifications or to sync with webhooks and your broker integration. Alerts trigger in real time and will repaint during a bar. For conservative use trigger on bar close.
Recommended presets
Intraday trend continuation
Confirm TF fifteen minutes
Entry mode Breakouts
Range basis HL SMA
Pulse threshold near 0.10
Compression threshold near 0.60
Timer around 18
Minimum efficiency ratio near 0.20
Minimum micro to macro near 1.00
VWAP gate enabled with distance near 0.35
Edge minimum 50 or higher
Intraday mean reversion at sweeps
Entry mode Reversals
Pulse source Regular OHLC
Compression threshold can be a little higher
Maximum micro to macro near 1.60
Efficiency ratio minimum lower near 0.12
VWAP gate enabled
Edge minimum 40 to 60
Swing trend continuation
Signal TF one hour
Confirm TF one day
Range basis ATR
ATR length around 14
Average range window 20 to 30
Efficiency ratio minimum near 0.18
Micro to macro windows 12 and 60
Edge minimum 50 to 70
These are starting points only. Your instrument and timeframe will require small adjustments.
Limitations and honest warnings
No indicator is perfect. TwinPulse will mark attractive conditions that do not always lead to profitable trades. During economic releases or very thin liquidity the assumptions behind compression and sweeps may fail. In strong gap environments the HL SMA basis may lag while ATR may overreact. Heikin Ashi pulse can help in choppy markets but it will lag during sharp reversals. Session times use the exchange time of your chart. If you switch symbol or exchange verify the windows.
Edge percent is not a probability of profit. It is the fraction of satisfied gates with your chosen weights. Two traders can set different weights and see different Edge readings on the same bar. That is the design. The score is a guide that helps you act with discipline.
This indicator does not place orders or manage real risk. The lines and labels show a model entry a model stop and two model targets built from the average range at entry and from recent swing points. Use them as references and not as hard rules. Always test on historical data and demo first. Past results do not guarantee anything in the future.
Credits and originality
All code in this publication is original and written for this indicator. The concept of the efficiency ratio originates from Perry Kaufman. The use of a daily anchored volume weighted average price is a standard industry tool. The specific combination of pulse from wick polarity strict sweep timing compression and the tunable Edge Score is unique to this script at the time of publication. If you reuse parts of the open source code in your own work remember to credit the author and contribute meaningful improvements.
How to read the table at a glance
Action reflects your current state.
IN LONG or IN SHORT appears while a trade is active.
LONG or SHORT appears when conditions for entry are met and the Edge threshold is satisfied.
WAIT appears when at least one gate is missing.
Session shows ON during your chosen windows.
Bias shows the color of the confirmation candle.
Pulse is the smoothed polarity number.
Comp shows current range divided by the average range. Values below one mean compression.
Edge L percent and Edge S percent show the long and short checklists as percents.
Final thoughts
Markets move because orders accumulate at certain prices and at certain times. The indicator tries to measure two things that often matter at those turning points. One is the existence of a hidden imbalance revealed by wick polarity and by sweeps of prior extremes. The other is the presence of energy stored in a coil that can release in the direction of a drift. Neither force guarantees profit. Together they can improve your selection and your timing.
Use the defaults for a few days so you learn the personality of the signals. After that adjust one group at a time. Start with the session filter and the Edge threshold. Then tune compression and the timer. Finally adjust the regime filters. Keep notes. You will learn which weights matter for your market and timeframe. The result is a process you can apply with consistency.
Disclaimer
This script and description are for education and analysis. They are not investment advice and they do not promise future results. Use at your own risk. Test thoroughly on historical data and in simulation before considering any live use.
MACD Enhanced [DCAUT]█ MACD Enhanced
📊 ORIGINALITY & INNOVATION
The MACD Enhanced represents a significant improvement over traditional MACD implementations. While Gerald Appel's original MACD from the 1970s was limited to exponential moving averages (EMA), this enhanced version expands algorithmic options by supporting 21 different moving average calculations for both the main MACD line and signal line independently.
This improvement addresses an important limitation of traditional MACD: the inability to adapt the indicator's mathematical foundation to different market conditions. By allowing traders to select from algorithms ranging from simple moving averages (SMA) for stability to advanced adaptive filters like Kalman Filter for noise reduction, this implementation changes MACD from a fixed-algorithm tool into a flexible instrument that can be adjusted for specific market environments and trading strategies.
The enhanced histogram visualization system uses a four-color gradient that helps communicate momentum strength and direction more clearly than traditional single-color histograms.
📐 MATHEMATICAL FOUNDATION
The core calculation maintains the proven MACD formula: Fast MA(source, fastLength) - Slow MA(source, slowLength), but extends it with algorithmic flexibility. The signal line applies the selected smoothing algorithm to the MACD line over the specified signal period, while the histogram represents the difference between MACD and signal lines.
Available Algorithms:
The implementation supports a comprehensive spectrum of technical analysis algorithms:
Basic Averages: SMA (arithmetic mean), EMA (exponential weighting), RMA (Wilder's smoothing), WMA (linear weighting)
Advanced Averages: HMA (Hull's low-lag), VWMA (volume-weighted), ALMA (Arnaud Legoux adaptive)
Mathematical Filters: LSMA (least squares regression), DEMA (double exponential), TEMA (triple exponential), ZLEMA (zero-lag exponential)
Adaptive Systems: T3 (Tillson T3), FRAMA (fractal adaptive), KAMA (Kaufman adaptive), MCGINLEY_DYNAMIC (reactive to volatility)
Signal Processing: ULTIMATE_SMOOTHER (low-pass filter), LAGUERRE_FILTER (four-pole IIR), SUPER_SMOOTHER (two-pole Butterworth), KALMAN_FILTER (state-space estimation)
Specialized: TMA (triangular moving average), LAGUERRE_BINOMIAL_FILTER (binomial smoothing)
Each algorithm responds differently to price action, allowing traders to match the indicator's behavior to market characteristics: trending markets benefit from responsive algorithms like EMA or HMA, while ranging markets require stable algorithms like SMA or RMA.
📊 COMPREHENSIVE SIGNAL ANALYSIS
Histogram Interpretation:
Positive Values: Indicate bullish momentum when MACD line exceeds signal line, suggesting upward price pressure and potential buying opportunities
Negative Values: Reflect bearish momentum when MACD line falls below signal line, indicating downward pressure and potential selling opportunities
Zero Line Crosses: MACD crossing above zero suggests transition to bullish bias, while crossing below indicates bearish bias shift
Momentum Changes: Rising histogram (regardless of positive/negative) signals accelerating momentum in the current direction, while declining histogram warns of momentum deceleration
Advanced Signal Recognition:
Divergences: Price making new highs/lows while MACD fails to confirm often precedes trend reversals
Convergence Patterns: MACD line approaching signal line suggests impending crossover and potential trade setup
Histogram Peaks: Extreme histogram values often mark momentum exhaustion points and potential reversal zones
🎯 STRATEGIC APPLICATIONS
Comprehensive Trend Confirmation Strategies:
Primary Trend Validation Protocol:
Identify primary trend direction using higher timeframe (4H or Daily) MACD position relative to zero line
Confirm trend strength by analyzing histogram progression: consistent expansion indicates strong momentum, contraction suggests weakening
Use secondary confirmation from MACD line angle: steep angles (>45°) indicate strong trends, shallow angles suggest consolidation
Validate with price structure: trending markets show consistent higher highs/higher lows (uptrend) or lower highs/lower lows (downtrend)
Entry Timing Techniques:
Pullback Entries in Uptrends: Wait for MACD histogram to decline toward zero line without crossing, then enter on histogram expansion with MACD line still above zero
Breakout Confirmations: Use MACD line crossing above zero as confirmation of upward breakouts from consolidation patterns
Continuation Signals: Look for MACD line re-acceleration (steepening angle) after brief consolidation periods as trend continuation signals
Advanced Divergence Trading Systems:
Regular Divergence Recognition:
Bullish Regular Divergence: Price creates lower lows while MACD line forms higher lows. This pattern is traditionally considered a potential upward reversal signal, but should be combined with other confirmation signals
Bearish Regular Divergence: Price makes higher highs while MACD shows lower highs. This pattern is traditionally considered a potential downward reversal signal, but trading decisions should incorporate proper risk management
Hidden Divergence Strategies:
Bullish Hidden Divergence: Price shows higher lows while MACD displays lower lows, indicating trend continuation potential. Use for adding to existing long positions during pullbacks
Bearish Hidden Divergence: Price creates lower highs while MACD forms higher highs, suggesting downtrend continuation. Optimal for adding to short positions during bear market rallies
Multi-Timeframe Coordination Framework:
Three-Timeframe Analysis Structure:
Primary Timeframe (Daily): Determine overall market bias and major trend direction. Only trade in alignment with daily MACD direction
Secondary Timeframe (4H): Identify intermediate trend changes and major entry opportunities. Use for position sizing decisions
Execution Timeframe (1H): Precise entry and exit timing. Look for MACD line crossovers that align with higher timeframe bias
Timeframe Synchronization Rules:
Daily MACD above zero + 4H MACD rising = Strong uptrend context for long positions
Daily MACD below zero + 4H MACD declining = Strong downtrend context for short positions
Conflicting signals between timeframes = Wait for alignment or use smaller position sizes
1H MACD signals only valid when aligned with both higher timeframes
Algorithm Considerations by Market Type:
Trending Markets: Responsive algorithms like EMA, HMA may be considered, but effectiveness should be tested for specific market conditions
Volatile Markets: Noise-reducing algorithms like KALMAN_FILTER, SUPER_SMOOTHER may help reduce false signals, though results vary by market
Range-Bound Markets: Stability-focused algorithms like SMA, RMA may provide smoother signals, but individual testing is required
Short Timeframes: Low-lag algorithms like ZLEMA, T3 theoretically respond faster but may also increase noise
Important Note: All algorithm choices and parameter settings should be thoroughly backtested and validated based on specific trading strategies, market conditions, and individual risk tolerance. Different market environments and trading styles may require different configuration approaches.
📋 DETAILED PARAMETER CONFIGURATION
Comprehensive Source Selection Strategy:
Price Source Analysis and Optimization:
Close Price (Default): Most commonly used, reflects final market sentiment of each period. Best for end-of-day analysis, swing trading, daily/weekly timeframes. Advantages: widely accepted standard, good for backtesting comparisons. Disadvantages: ignores intraday price action, may miss important highs/lows
HL2 (High+Low)/2: Midpoint of the trading range, reduces impact of opening gaps and closing spikes. Best for volatile markets, gap-prone assets, forex markets. Calculation impact: smoother MACD signals, reduced noise from price spikes. Optimal when asset shows frequent gaps, high volatility during specific sessions
HLC3 (High+Low+Close)/3: Weighted average emphasizing the close while including range information. Best for balanced analysis, most asset classes, medium-term trading. Mathematical effect: 33% weight to high/low, 33% to close, provides compromise between close and HL2. Use when standard close is too noisy but HL2 is too smooth
OHLC4 (Open+High+Low+Close)/4: True average of all price points, most comprehensive view. Best for complete price representation, algorithmic trading, statistical analysis. Considerations: includes opening sentiment, smoothest of all options but potentially less responsive. Optimal for markets with significant opening moves, comprehensive trend analysis
Parameter Configuration Principles:
Important Note: Different moving average algorithms have distinct mathematical characteristics and response patterns. The same parameter settings may produce vastly different results when using different algorithms. When switching algorithms, parameter settings should be re-evaluated and tested for appropriateness.
Length Parameter Considerations:
Fast Length (Default 12): Shorter periods provide faster response but may increase noise and false signals, longer periods offer more stable signals but slower response, different algorithms respond differently to the same parameters and may require adjustment
Slow Length (Default 26): Should maintain a reasonable proportional relationship with fast length, different timeframes may require different parameter configurations, algorithm characteristics influence optimal length settings
Signal Length (Default 9): Shorter lengths produce more frequent crossovers but may increase false signals, longer lengths provide better signal confirmation but slower response, should be adjusted based on trading style and chosen algorithm characteristics
Comprehensive Algorithm Selection Framework:
MACD Line Algorithm Decision Matrix:
EMA (Standard Choice): Mathematical properties: exponential weighting, recent price emphasis. Best for general use, traditional MACD behavior, backtesting compatibility. Performance characteristics: good balance of speed and smoothness, widely understood behavior
SMA (Stability Focus): Equal weighting of all periods, maximum smoothness. Best for ranging markets, noise reduction, conservative trading. Trade-offs: slower signal generation, reduced sensitivity to recent price changes
HMA (Speed Optimized): Hull Moving Average, designed for reduced lag. Best for trending markets, quick reversals, active trading. Technical advantage: square root period weighting, faster trend detection. Caution: can be more sensitive to noise
KAMA (Adaptive): Kaufman Adaptive MA, adjusts smoothing based on market efficiency. Best for varying market conditions, algorithmic trading. Mechanism: fast smoothing in trends, slow smoothing in sideways markets. Complexity: requires understanding of efficiency ratio
Signal Line Algorithm Optimization Strategies:
Matching Strategy: Use same algorithm for both MACD and signal lines. Benefits: consistent mathematical properties, predictable behavior. Best when backtesting historical strategies, maintaining traditional MACD characteristics
Contrast Strategy: Use different algorithms for optimization. Common combinations: MACD=EMA, Signal=SMA for smoother crossovers, MACD=HMA, Signal=RMA for balanced speed/stability, Advanced: MACD=KAMA, Signal=T3 for adaptive behavior with smooth signals
Market Regime Adaptation: Trending markets: both fast algorithms (EMA/HMA), Volatile markets: MACD=KALMAN_FILTER, Signal=SUPER_SMOOTHER, Range-bound: both slow algorithms (SMA/RMA)
Parameter Sensitivity Considerations:
Impact of Parameter Changes:
Length Parameter Sensitivity: Small parameter adjustments can significantly affect signal timing, while larger adjustments may fundamentally change indicator behavior characteristics
Algorithm Sensitivity: Different algorithms produce different signal characteristics. Thoroughly test the impact on your trading strategy before switching algorithms
Combined Effects: Changing multiple parameters simultaneously can create unexpected effects. Recommendation: adjust parameters one at a time and thoroughly test each change
📈 PERFORMANCE ANALYSIS & COMPETITIVE ADVANTAGES
Response Characteristics by Algorithm:
Fastest Response: ZLEMA, HMA, T3 - minimal lag but higher noise
Balanced Performance: EMA, DEMA, TEMA - good trade-off between speed and stability
Highest Stability: SMA, RMA, TMA - reduced noise but increased lag
Adaptive Behavior: KAMA, FRAMA, MCGINLEY_DYNAMIC - automatically adjust to market conditions
Noise Filtering Capabilities:
Advanced algorithms like KALMAN_FILTER and SUPER_SMOOTHER help reduce false signals compared to traditional EMA-based MACD. Noise-reducing algorithms can provide more stable signals in volatile market conditions, though results will vary based on market conditions and parameter settings.
Market Condition Adaptability:
Unlike fixed-algorithm MACD, this enhanced version allows real-time optimization. Trending markets benefit from responsive algorithms (EMA, HMA), while ranging markets perform better with stable algorithms (SMA, RMA). The ability to switch algorithms without changing indicators provides greater flexibility.
Comparative Performance vs Traditional MACD:
Algorithm Flexibility: 21 algorithms vs 1 fixed EMA
Signal Quality: Reduced false signals through noise filtering algorithms
Market Adaptability: Optimizable for any market condition vs fixed behavior
Customization Options: Independent algorithm selection for MACD and signal lines vs forced matching
Professional Features: Advanced color coding, multiple alert conditions, comprehensive parameter control
USAGE NOTES
This indicator is designed for technical analysis and educational purposes. Like all technical indicators, it has limitations and should not be used as the sole basis for trading decisions. Algorithm performance varies with market conditions, and past characteristics do not guarantee future results. Always combine with proper risk management and thorough strategy testing.
Retracement FiboNacci🎯 Core Functionality
Automatic Swing Detection: Uses ZigZag algorithm to detect significant price swings
Dual Modes:
Fibonacci Retracements - Traditional price-based levels
Fibonacci Time Zones - Time-based projections
Multi-Timeframe Analysis: Works on any timeframe while detecting swings from higher timeframes
⚙️ Customization Options
Fibonacci Levels:
Fully customizable Fibonacci levels (0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%)
Individual color selection for each level
Toggle on/off specific levels as needed
Display Settings:
Line Styling: Choose between Solid, Dashed, or Dotted lines
Line Thickness: Adjustable from 1 to 5 pixels
ZigZag Visibility: Toggle base ZigZag line display
Label Management:
Fibonacci Labels: Show percentage retracement levels
Price Labels: Display actual price values
Flexible Positioning:
Left, Right, Both sides, or Auto-centering
Independent control for Fib and Price labels
Option to hide labels completely
🔧 Technical Specifications
ZigZag Parameters:
Depth: 12 bars
Deviation: 1%
Backstep: 2 bars
Real-time Updates: Automatically redraws when new swings are detected
Clean Interface: Removes old drawings to prevent chart clutter
Usage Scenarios
📈 Trend Analysis
Identify retracement levels during pullbacks
Spot potential reversal zones at key Fibonacci levels
Measure swing magnitudes for position sizing
⏰ Time Projections
Use Time Zone mode for forecasting potential reversal times
Combine price and time analysis for confluence
🎨 Visual Customization
Color-code important levels (e.g., 61.8% as golden ratio)
Adjust label sizes for better readability
Choose line styles that complement your chart setup
Ideal For
Swing traders identifying entry/exit points
Position traders finding optimal accumulation zones
Technical analysts validating support/resistance levels
Multi-timeframe analysts correlating higher timeframe structure
Pro Tips
Combine with Volume: Confirm reactions at Fibonacci levels with volume spikes
Multiple Timeframes: Use higher timeframe Fibonacci levels for major S/R
Confluence Trading: Look for Fibonacci levels aligning with previous support/resistance
Risk Management: Use Fibonacci extensions for profit targets
Cumulative Volume Delta Profile and Heatmap [BackQuant]Cumulative Volume Delta Profile and Heatmap
A multi-view CVD workstation that measures buying vs selling pressure, renders a price-aligned CVD profile with Point of Control, paints an optional heatmap of delta intensity, and detects classical CVD divergences using pivot logic. Built for reading who is in control, where participation clustered, and when effort is failing to produce result.
What is CVD
Cumulative Volume Delta accumulates the difference between aggressive buys and aggressive sells over time. When CVD rises, buyers are lifting the offer more than sellers are hitting the bid. When CVD falls, the opposite is true. Plotting CVD alongside price helps you judge whether price moves are supported by real participation or are running on fumes.
Core Features
Visual Analysis Components
CVD Columns - Plot of cumulative delta, colored by side, for quick read of participation bias.
CVD Profile - Price-aligned histogram of CVD accumulation using user-set bins. Shows where net initiative clustered.
Split Buy and Sell CVD - Optional two-sided profile that separates positive and negative CVD into distinct wings.
POC - Point of Control - The price level with the highest absolute CVD accumulation, labeled and line-marked.
Heatmap - Semi-transparent blocks behind price that encode CVD intensity across the last N bars.
Divergence Engine - Pivot-based detection of Bearish and Bullish CVD divergences with optional lines and labels.
Stats Panel - Top level metrics: Total CVD, Buy and Sell totals with percentages, Delta Ratio, and current POC price.
How it works
Delta source and sampling
You select an Anchor Timeframe that defines the higher time aggregation for reading the trend of CVD.
The script pulls lower timeframe volume delta and aggregates it to the anchor window. You can let it auto-select the lower timeframe or force a custom one.
CVD is then accumulated bar by bar to form a running total. This plot shows the direction and persistence of initiative.
Profile construction
The recent price range is split into Profile Granularity bins.
As price traverses a bin, the current delta contribution is added to that bin.
If Split Buy and Sell CVD is enabled, positive CVD goes to the right wing and negative CVD to the left wing.
Widths are scaled by each side’s maximum so you can compare distribution shape at a glance.
The Point of Control is the bin with the highest absolute CVD. This marks where initiative concentrated the most.
Heatmap
For each bin, the script computes intensity as absolute CVD relative to the maximum bin value.
Color is derived from the side in control in that bin and shaded by intensity.
Heatmap Length sets how far back the panels extend, highlighting recurring participation zones.
Divergence model
You define pivot sensitivity with Pivot Left and Right .
Bearish divergence triggers when price confirms a higher high while CVD fails to make a higher high within a configurable Delta Tolerance .
Bullish divergence triggers when price confirms a lower low while CVD fails to make a lower low.
On trigger, optional link lines and labels are drawn at the pivots for immediate context.
Key Settings
Delta Source
Anchor Timeframe - Higher TF for the CVD narrative.
Custom Lower TF and Lower Timeframe - Force the sampling TF if desired.
Pivot Logic
Pivot Left and Right - Bars to each side for swing confirmation.
Delta Tolerance - Small allowance to avoid near-miss false positives.
CVD Profile
Show CVD Profile - Toggle profile rendering.
Split Buy and Sell CVD - Two-sided profile for clearer side attribution.
Show Heatmap - Project intensity panels behind price.
Show POC and POC Color - Mark the dominant CVD node.
Profile Granularity - Number of bins across the visible price range.
Profile Offset and Profile Width - Position and scale the profile.
Profile Position - Right, Left, or Current bar alignment.
Visuals
Bullish Div Color and Bearish Div Color - Colors for divergence artifacts.
Show Divergence Lines and Labels - Visualize pivots and annotations.
Plot CVD - Column plot of total CVD.
Show Statistics and Position - Toggle and place the summary table.
Reading the display
CVD columns
Rising CVD confirms buyers are in control. Falling CVD confirms sellers.
Flat or choppy CVD during wide price moves hints at passive or exhausted participation.
CVD profile wings
Thick right wing near a price zone implies heavy buy initiative accumulated there.
Thick left wing implies heavy sell initiative.
POC marks the strongest initiative node. Expect reactions on first touch and rotations around this level when the tape is balanced.
Heatmap
Brighter blocks indicate stronger historical net initiative at that price.
Stacked bright bands form CVD high volume nodes. These often behave like magnets or shelves for future trade.
Divergences
Bearish - Price prints a higher high while CVD fails to do so. Effort is not producing result. Potential fade or pause.
Bullish - Price prints a lower low while CVD fails to do so. Capitulation lacks initiative. Potential bounce or reversal.
Stats panel
Total CVD - Net initiative over the window.
Buy and Sell volume with percentages - Side composition.
Delta Ratio - Buy over Sell. Values above 1 favor buyers, below 1 favor sellers.
POC Price - Current control node for plan and risk.
Workflows
Trend following
Choose an Anchor Timeframe that matches your holding period.
Trade in the direction of CVD slope while price holds above a bullish POC or below a bearish POC.
Use pullbacks to CVD nodes on your profile as entry locations.
Trend weakens when price makes new highs but CVD stalls, or new lows while CVD recovers.
Mean reversion
Look for divergences at or near prior CVD nodes, especially the POC.
Fade tests into thick wings when the side that dominated there now fails to push CVD further.
Target rotations back toward the POC or the opposite wing edge.
Liquidity and execution map
Treat strong wings and heatmap bands as probable passive interest zones.
Expect pauses, partial fills, or flips at these shelves.
Stops make sense beyond the far edge of the active wing supporting your idea.
Alerts included
CVD Bearish Divergence and CVD Bullish Divergence.
Price Cross Above POC and Price Cross Below POC.
Extreme Buy Imbalance and Extreme Sell Imbalance from Delta Ratio.
CVD Turn Bullish and CVD Turn Bearish when net CVD crosses zero.
Price Near POC proximity alert.
Best practices
Use a higher Anchor Timeframe to stabilize the CVD story and a sensible Profile Granularity so wings are readable without clutter.
Keep Split mode on when you want to separate initiative attribution. Turn it off when you prefer a single net profile.
Tune Pivot Left and Right by instrument to avoid overfitting. Larger values find swing divergences. Smaller values find micro fades.
If volume is thin or synthetic for the symbol, CVD will be less reliable. The script will warn if volume is zero.
Trading applications
Context - Confirm or question breakouts with CVD slope.
Location - Build entries at CVD nodes and POC.
Timing - Use divergence and POC crosses for triggers.
Risk - Place stops beyond the opposite wing or outside the POC shelf.
Important notes and limits
This is a price and volume based study. It does not access off-book or venue-level order flow.
CVD profiles are built from the data available on your chart and the chosen lower timeframe sampling.
Like all volume tools, readings can distort during roll periods, holidays, or feed anomalies. Validate on your instrument.
Technical notes
Delta is aggregated from a lower timeframe into an Anchor Timeframe narrative.
Profile bins update in real time. Splitting by side scales each wing independently so both are readable in the same panel.
Divergences are confirmed using standard pivot definitions with user-set tolerances.
All profile drawing uses fixed X offsets so panels and POC do not swim when you scroll.
Quick start
Anchor Timeframe = Daily for intraday context.
Split Buy and Sell CVD = On.
Profile Granularity = 100 to 200, Profile Position = Right, Width to taste.
Pivot Left and Right around 8 to 12 to start, then adapt.
Turn on Heatmap for a fast map of interest bands.
Bottom line
CVD tells you who is doing the lifting. The profile shows where they did it. Divergences tell you when effort stops paying. Put them together and you get a clear read on control, location, and timing for both trend and mean reversion.
Yon Hybrid Momentum + Breakout Scanner with BB SqueezeThis Pine Script indicator is a comprehensive momentum and breakout scanner that combines multiple technical analysis tools to identify high-probability trading setups. Here's what it does:
Core Features:
1. Trend Identification (EMA System)
Uses two EMAs (9-period fast, 20-period slow) to determine trend direction
Colors the chart background: teal = uptrend, red = downtrend
An uptrend is confirmed when the fast EMA crosses above the slow EMA
2. Volume Analysis
Monitors volume spikes (when current volume exceeds 2x the 20-period average)
Volume spikes often indicate strong institutional interest or breakout momentum
Critical for confirming the validity of price movements
3. Momentum Indicators
MACD (12, 26, 9): Shows bullish/bearish crossovers with triangle markers
RSI (7-period): Identifies overbought (>70) and oversold (<30) conditions
VWAP: Shows the volume-weighted average price (purple line) - helps identify whether price is trading at fair value
4. Bollinger Bands & Squeeze Detection
Displays Bollinger Bands (20-period, 2 standard deviations)
BB Squeeze: Detects when volatility contracts to its lowest level in 20 bars
Squeezes often precede explosive breakout moves (like a coiled spring)
Orange squares appear at the bottom when a squeeze is detected
5. Breakout Detection
The script identifies breakouts using TWO methods:
Price breakout: Close above the recent 20-bar high
BB breakout: Close above the upper Bollinger Band
Confirmed breakout: Must have uptrend + volume spike + one of the above conditions
Shows a green "BREAKOUT" label when all conditions align
6. Live Status Label
A label in the top-right displays real-time market conditions:
Current trend (UPTREND/DOWNTREND)
Volume status (VOL SPIKE/Normal Vol)
RSI condition (HOT/COOL/Neutral)
Squeeze status (if active)
7. Alerts
Two automated alerts:
Breakout Alert: Triggers when a confirmed breakout occurs
Squeeze Alert: Triggers when Bollinger Bands enter a squeeze
Trading Use Cases:
This indicator is ideal for:
Swing traders looking for momentum setups with strong volume confirmation
Breakout traders who want to catch explosive moves after consolidation
Day traders monitoring multiple timeframes for high-probability entries
Watchlist scanning to quickly identify which stocks/cryptos are showing momentum
How to Use It:
Setup Phase: Look for BB squeeze markers (orange squares) - these signal compression
Confirmation: Wait for volume spike + uptrend + MACD bullish crossover
Entry: When "BREAKOUT" label appears with all confirmations
Validation: Price should be above VWAP and RSI not extremely overbought
The script essentially automates the process of finding stocks that are "coiling up" and ready to make a big move, then confirms when that move actually happens with volume.
Institutional Activity DetectorInstitutional Activity Detector - Complete Tutorial
Table of Contents
Installation
Understanding the Indicator
Signal Interpretation
Settings Configuration
Trading Strategies
Best Practices
Common Mistakes to Avoid
1. Installation {#installation}
Step-by-Step Setup:
Step 1: Access TradingView
Go to TradingView.com
Log in to your account (free account works fine)
Step 2: Open Pine Editor
Click on "Pine Editor" at the bottom of the chart
If you don't see it, go to the top menu and select "Pine Editor"
Step 3: Add the Script
Click "New" to create a new indicator
Delete any default code
Copy the entire Institutional Activity Detector code
Paste it into the editor
Step 4: Save and Apply
Click "Save" (give it a name like "Inst Detector")
Click "Add to Chart"
The indicator will now appear on your chart
2. Understanding the Indicator {#understanding}
What It Detects:
This indicator identifies institutional traders (banks, hedge funds, market makers) by analyzing:
Volume Analysis
Detects unusual volume spikes that indicate large players entering
Compares current volume to 20-period average
Institutional trades create volume 2-5x normal levels
Order Flow
Delta: Difference between buying and selling volume
Positive delta = More buying pressure
Negative delta = More selling pressure
Institutions leave "footprints" in order flow
Price Action Patterns
Bullish Rejection Wicks:
| <- Small upper wick
|
███ <- Small body
███
|
|
| <- Large lower wick (rejection)
Indicates institutions bought aggressively at lower prices
Bearish Rejection Wicks:
|
|
| <- Large upper wick (rejection)
|
███ <- Small body
███
| <- Small lower wick
Indicates institutions sold aggressively at higher prices
Liquidity Grabs
Institutions often:
Push price above resistance or below support
Trigger stop losses (grab liquidity)
Reverse direction and trade the other way
Dark Pool Activity
Large block trades executed off-exchange:
High volume with minimal price movement
Indicates institutional accumulation/distribution without moving price
3. Signal Interpretation {#signals}
Signal Types:
🟢 INSTITUTIONAL BUY Signal
Appears as green triangle below candle with strength number (2-5)
What it means:
Institutions are actively accumulating (buying)
Higher strength = More confirmation factors
Strength Levels:
2-3: Moderate confidence - Wait for confirmation
4: High confidence - Strong institutional interest
5: Maximum confidence - Multiple factors aligned
🔴 INSTITUTIONAL SELL Signal
Appears as red triangle above candle with strength number (2-5)
What it means:
Institutions are actively distributing (selling)
Higher strength = More confirmation factors
🟠 Dark Pool (DP) Marker
Small orange diamond
What it means:
Large block trade executed
Accumulation/distribution happening quietly
Often precedes significant moves
Liquidity Zones
Red boxes above price = Resistance/sell liquidity
Green boxes below price = Support/buy liquidity
Institutions target these zones to trigger stops
4. Settings Configuration {#settings}
Recommended Settings by Asset Type:
For Stocks (SPY, AAPL, TSLA):
Volume Spike Multiplier: 2.0
Volume Average Period: 20
Delta Threshold: 70%
Minimum Signal Strength: 3
Timeframe: 5m, 15m, 1H
For Forex (EUR/USD, GBP/USD):
Volume Spike Multiplier: 1.5
Volume Average Period: 30
Delta Threshold: 65%
Minimum Signal Strength: 3
Timeframe: 15m, 1H, 4H
For Crypto (BTC, ETH):
Volume Spike Multiplier: 2.5
Volume Average Period: 20
Delta Threshold: 70%
Minimum Signal Strength: 4
Timeframe: 15m, 1H, 4H
For Futures (ES, NQ):
Volume Spike Multiplier: 2.0
Volume Average Period: 20
Delta Threshold: 75%
Minimum Signal Strength: 3
Timeframe: 5m, 15m, 30m
Parameter Explanations:
Volume Spike Multiplier (1.0 - 10.0)
Lower = More sensitive (more signals, some false)
Higher = Less sensitive (fewer signals, more reliable)
Start with 2.0 and adjust based on your asset's volatility
Delta Threshold % (50 - 100)
Measures buying vs selling pressure
70% = Strong institutional bias required
Lower for ranging markets, higher for trending
Minimum Signal Strength (2 - 5)
Number of factors that must align for a signal
2 = Very sensitive (many signals)
5 = Very conservative (rare signals)
Recommended: 3-4 for balance
5. Trading Strategies {#strategies}
Strategy 1: Liquidity Grab Reversal
Setup:
Price approaches a liquidity zone (green/red box)
Price penetrates the zone briefly
Institutional BUY/SELL signal appears
Price reverses away from the zone
Entry:
Enter on the signal candle close
Or wait for next candle confirmation
Stop Loss:
Below the liquidity grab low (for buys)
Above the liquidity grab high (for sells)
Take Profit:
2:1 or 3:1 risk/reward ratio
Or next opposing liquidity zone
Example:
Price drops below support → Triggers stops →
Institutional BUY signal (4-5 strength) →
Enter LONG → Price rallies
Strategy 2: Trend Continuation
Setup:
Identify the trend (higher highs/higher lows for uptrend)
Wait for pullback to support in uptrend
Institutional BUY signal appears during pullback
Confirms institutions are adding to positions
Entry:
Enter on signal with strength ≥ 4
Or next candle after signal
Stop Loss:
Below the pullback low + small buffer
Take Profit:
Previous swing high
Or trailing stop using ATR
Strategy 3: Dark Pool Accumulation
Setup:
Dark Pool (DP) markers appear multiple times
Price consolidates in tight range
Institutional BUY signal with high strength appears
Breakout occurs
Entry:
Enter on breakout candle after signal
Or on retest of breakout level
Stop Loss:
Below consolidation range
Take Profit:
Measured move (height of consolidation projected)
Strategy 4: Divergence Play
Setup:
Price makes lower low
MFI/RSI makes higher low (bullish divergence)
Institutional BUY signal appears
Volume confirms with spike
Entry:
Enter on signal candle or next
Stop Loss:
Below the divergence low
Take Profit:
Previous swing high or resistance
6. Best Practices {#best-practices}
✅ DO's:
1. Use Multiple Timeframes
Check higher timeframe for trend direction
Trade signals that align with higher timeframe
Example: 15m signals in direction of 1H trend
2. Combine with Key Levels
Support/resistance
Supply/demand zones
Previous day high/low
Round numbers (psychological levels)
3. Wait for Confirmation
Don't rush into trades
Let the signal candle close
Watch next candle for follow-through
4. Check the Metrics Table
Look at Relative Volume (should be >2.0)
Check Delta % (should be strong positive/negative)
Verify Order Flow aligns with signal
5. Consider Market Context
News events can override signals
Low liquidity times (lunch, overnight) less reliable
Major economic releases need caution
6. Paper Trade First
Test the indicator for 2-4 weeks
Learn how it behaves on your chosen assets
Develop confidence before using real money
Best Times to Trade:
Stock Market Hours:
9:30-11:30 AM EST (high volume, strong moves)
2:00-4:00 PM EST (institutional positioning)
Avoid: 11:30 AM-2:00 PM (lunch, low volume)
Forex:
London Open: 3:00-6:00 AM EST
New York Open: 8:00-11:00 AM EST
London/NY Overlap: 8:00 AM-12:00 PM EST
Crypto:
24/7 market, but highest volume during US/European hours
Watch for weekend low liquidity
7. Common Mistakes to Avoid {#mistakes}
❌ DON'T:
1. Trade Every Signal
Not all signals are equal
Focus on strength 4-5 signals
Wait for optimal setups
2. Ignore Market Structure
Don't buy into strong downtrends (catch falling knife)
Don't sell into strong uptrends (fight the tape)
Respect major support/resistance
3. Use Too Small Timeframes
1m and 2m charts are too noisy
Minimum recommended: 5m for scalping
Better: 15m, 30m, 1H for reliability
4. Overtrade
Quality over quantity
2-5 good trades per day is excellent
Forcing trades leads to losses
5. Ignore Risk Management
Always use stop losses
Risk only 1-2% per trade
Don't revenge trade after losses
6. Trade During Low Volume
Signals less reliable with low volume
Check Relative Volume metric (should be >1.5)
Avoid pre-market/after-hours for stocks
7. Misread Liquidity Grabs
Not every wick is a liquidity grab
Need volume confirmation
Must have institutional signal
Advanced Tips:
Filtering False Signals:
Use Signal Strength Filter:
Minimum strength 3 = Balanced
Minimum strength 4 = Conservative (recommended)
Minimum strength 5 = Ultra conservative
Confluence Checklist:
Signal strength ≥ 4
Relative volume > 2.0
At key support/resistance
Aligns with higher timeframe trend
Delta % strongly positive/negative
Clean price action setup
If 4+ boxes checked = High probability trade
Setting Up Alerts:
Click the three dots on the indicator
Select "Create Alert"
Choose condition:
"Institutional Buy Signal"
"Institutional Sell Signal"
"Dark Pool Activity"
Set up notification (email, SMS, app)
Save alert
Alert Strategy:
Set minimum strength to 4 for fewer, better alerts
Use for assets you can't watch constantly
Don't rely solely on alerts - check chart context
Practice Exercise:
Week 1-2: Observation
Add indicator to your favorite assets
Watch how signals develop
Note which ones lead to profitable moves
Don't trade yet - just observe
Week 3-4: Paper Trading
Use TradingView's paper trading
Trade only strength 4-5 signals
Record results in a journal
Note: entry, exit, profit/loss, what worked/didn't
Week 5+: Small Live Positions
Start with smallest position size
Trade only your best setups
Gradually increase size as you gain confidence
Keep detailed journal
Quick Reference Card:
Signal Quality Ranking:
🔥 Best Setups (Take These):
Strength 5 + Liquidity grab + Key level
Strength 4-5 + Volume >3.0 + Trend alignment
Dark Pool markers + Strength 4+ signal
✅ Good Setups:
Strength 4 at support/resistance
Strength 3-4 with strong delta
Liquidity grab + Strength 3+
⚠️ Caution (Wait for More):
Strength 2-3 in middle of nowhere
Against higher timeframe trend
Low volume (Rel Vol <1.5)
❌ Avoid:
Strength 2 only
During major news
Low liquidity hours
Against strong trend
Troubleshooting:
"Too many signals"
→ Increase Minimum Signal Strength to 4
→ Increase Volume Spike Multiplier to 2.5-3.0
"Too few signals"
→ Decrease Minimum Signal Strength to 2-3
→ Decrease Volume Spike Multiplier to 1.5
"Signals not working"
→ Check if you're trading during low volume hours
→ Verify you're using recommended timeframes
→ Make sure signals align with market structure
"Can't see liquidity zones"
→ Enable "Show Liquidity Zones" in settings
→ Adjust Swing Detection Length (try 7-15)
Resources for Further Learning:
Concepts to Study:
Order Flow Trading
Market Profile / Volume Profile
Smart Money Concepts (SMC)
Liquidity Sweeps and Stop Hunts
Institutional Order Flow
Wyckoff Method
Volume Spread Analysis (VSA)
Recommended Practice:
Study past signals on chart
Replay market using TradingView's bar replay feature
Join trading communities to share setups
Keep a detailed trading journal
Final Thoughts:
This indicator is a tool, not a crystal ball. It identifies high-probability setups where institutions are active, but still requires:
Proper risk management
Market context understanding
Patience and discipline
Continuous learning
Success Formula:
Right Tool + Proper Training + Risk Management + Discipline = Consistent Profits
Start slow, master the basics, and gradually increase complexity as you gain experience.
Good luck and trade smart! 📊📈
SequencerLibraryLibrary "SequencerLibrary"
SequencerLibrary v1 is a Pine Script™ library for identifying, tracking, and visualizing
sequential bullish and bearish patterns on price charts.
It provides a complete framework for building sequence-based trading systems, including:
• Automatic detection and counting of setup and countdown phases.
• Real-time tracking of completion states, perfected setups, and exhaustion signals.
• Dynamic support and resistance thresholds derived from recent price structure.
• Customizable visual highlighting for both setup and countdown sequences.
method doSequence(s, src, config, condition)
Updates the sequence state based on the source value, and user configuration.
Namespace types: Sequence
Parameters:
s (Sequence) : The sequence object containing bullish and bearish setups.
src (float) : The source value (e.g., close price) used for evaluating sequence conditions.
config (SequenceInputs) : The user-defined settings for sequence analysis.
condition (bool) : When true, executes the sequence logic.
Returns:
highlight(s, css, condition)
Highlights the bullish and bearish sequence setups and countdowns on the chart.
Parameters:
s (Sequence) : The sequence object containing bullish and bearish sequence states.
css (SequenceCSS) : The styling configuration for customizing label appearances.
condition (bool) : When true, the function creates and displays labels for setups and countdowns.
Returns:
SequenceState
A type representing the configuration and state of a sequence setup.
Fields:
setup (series int) : Current count of the setup phase (e.g., how many bars have met the setup criteria).
countdown (series int) : Current count of the countdown phase (e.g., bars meeting countdown criteria).
threshold (series float) : The price threshold level used as support/resistance for the sequence.
priceWhenCompleted (series float) : The closing price when the setup or countdown phase is completed.
indicatorWhenCompleted (series float) : The indicator value when the setup or countdown phase is completed.
setupCompleted (series bool) : Indicates if the setup phase has been completed (i.e., reached the required count).
countdownCompleted (series bool) : Indicates if the countdown phase has been completed (i.e., reached exhaustion).
perfected (series bool) : Indicates if the setup meets the "perfected" condition (e.g., aligns with strict criteria).
highlightSetup (series bool) : Determines whether the setup phase should be visually highlighted on the chart.
highlightCountdown (series bool) : Determines whether the countdown phase should be visually highlighted on the chart.
Sequence
A type containing bullish and bearish sequence setups.
Fields:
bullish (SequenceState) : Configuration and state for bullish sequences.
bearish (SequenceState) : Configuration and state for bearish sequences.
SequenceInputs
A type for user-configurable input settings for sequence-based analysis.
Fields:
showSetup (series bool) : Enables or disables the display of setup sequences.
showCountdown (series bool) : Enables or disables the display of countdown sequences.
setupFilter (series string) : A comma‐separated string containing setup sequence counts to be highlighted (e.g., "1,2,3,4,5,6,7,8,9").
countdownFilter (series string) : A comma‐separated string containing countdown sequence counts to be highlighted (e.g., "1,2,3,4,5,6,7,8,9,10,11,12,13").
lookbackSetup (series int) : Defines the lookback period for evaluating setup conditions (default: 4 bars).
lookbackCountdown (series int) : Defines the lookback period for evaluating countdown conditions (default: 2 bars).
lookbackSetupPerfected (series int) : Defines the lookback period to determine a perfected setup condition (default: 6 bars).
maxSetup (series int) : The maximum count required to complete a setup phase (default: 9).
maxCountdown (series int) : The maximum count required to complete a countdown phase (default: 13).
SequenceCSS
A type defining the visual styling options for sequence labels.
Fields:
bullish (series color) : Color used for bullish sequence labels.
bearish (series color) : Color used for bearish sequence labels.
imperfect (series color) : Color used for labels representing imperfect sequences.
Gho$t EMA CloudSimple 9/14EMA With Cloud system. Ghost EMA Cloud is a clean, minimal trend-tracking indicator designed to visualize short-term momentum shifts. It plots the 9-EMA (gray) and 14-EMA (white) while shading the area between them with dynamic cloud colors — green when momentum turns bullish, red when it weakens. The smooth cloud instantly highlights crossovers that often precede breakout or reversal moves. Optional 5-EMA and 12-EMA layers can be toggled on for extra precision without cluttering the chart. Ideal for intraday and swing traders, Ghost EMA Cloud helps you confirm entries, spot trend continuations, and time exits with clear visual simplicity and speed.
Aggression Bulbs v3.1 (Sessions + Bias, fixed)EYLONAggression Bulbs v3.2 (Sessions + Bias + Volume Surge)
This indicator highlights aggressive buy and sell activity during the London and New York sessions, using volume spikes and candle body dominance to detect institutional momentum.
⚙️ Main Logic
Compares each candle’s volume vs average volume (Volume Surge).
Checks body size vs full candle range to detect strong directional moves.
Uses an EMA bias filter to align signals with the current trend.
Displays green bubbles for aggressive buyers and red bubbles for aggressive sellers.
🕐 Sessions
London: 08:00–12:59 UTC+1
New York: 14:00–18:59 UTC+1
(Backgrounds: Yellow = London, Orange = New York)
📊 How to Read
🟢 Green bubble below bar → Aggressive BUY candle (strong demand).
🔴 Red bubble above bar → Aggressive SELL candle (strong supply).
Bubble size = relative strength (volume × candle dominance).
Use in confluence with key POI zones, volume profile, or delta clusters.
⚠️ Tips
Use on 1m–15m charts for scalping or intraday analysis.
Combine with your session bias or FVG zones for higher accuracy.
Set alerts when score ≥ threshold to catch early momentum.
First Passage Time - Distribution AnalysisThe First Passage Time (FPT) Distribution Analysis indicator is a sophisticated probabilistic tool that answers one of the most critical questions in trading: "How long will it take for price to reach my target, and what are the odds of getting there first?"
Unlike traditional technical indicators that focus on what might happen, this indicator tells you when it's likely to happen.
Mathematical Foundation: First Passage Time Theory
What is First Passage Time?
First Passage Time (FPT) is a concept in stochastic processes that measures the time it takes for a random process to reach a specific threshold for the first time. Originally developed in physics and mathematics, FPT has applications in:
Quantitative Finance: Option pricing, risk management, and algorithmic trading
Neuroscience: Modeling neural firing patterns
Biology: Population dynamics and disease spread
Engineering: Reliability analysis and failure prediction
The Mathematics Behind It
This indicator uses Geometric Brownian Motion (GBM), the same stochastic model used in the Black-Scholes option pricing formula:
dS = μS dt + σS dW
Where:
S = Asset price
μ = Drift (trend component)
σ = Volatility (uncertainty component)
dW = Wiener process (random walk)
Through Monte Carlo simulation, the indicator runs 1,000+ price path simulations to statistically determine:
When each threshold (+X% or -X%) is likely to be hit
Which threshold is hit first (directional bias)
How often each scenario occurs (probability distribution)
🎯 How This Indicator Works
Core Algorithm Workflow:
Calculate Historical Statistics
Measures recent price volatility (standard deviation of log returns)
Calculates drift (average directional movement)
Annualizes these metrics for meaningful comparison
Run Monte Carlo Simulations
Generates 1,000+ random price paths based on historical behavior
Tracks when each path hits the upside (+X%) or downside (-X%) threshold
Records which threshold was hit first in each simulation
Aggregate Statistical Results
Calculates percentile distributions (10th, 25th, 50th, 75th, 90th)
Computes "first hit" probabilities (upside vs downside)
Determines average and median time-to-target
Visual Representation
Displays thresholds as horizontal lines
Shows gradient risk zones (purple-to-blue)
Provides comprehensive statistics table
📈 Use Cases
1. Options Trading
Selling Options: Determine if your strike price is likely to be hit before expiration
Buying Options: Estimate probability of reaching profit targets within your time window
Time Decay Management: Compare expected time-to-target vs theta decay
Example: You're considering selling a 30-day call option 5% out of the money. The indicator shows there's a 72% chance price hits +5% within 12 days. This tells you the trade has high assignment risk.
2. Swing Trading
Entry Timing: Wait for higher probability setups when directional bias is strong
Target Setting: Use median time-to-target to set realistic profit expectations
Stop Loss Placement: Understand probability of hitting your stop before target
Example: The indicator shows 85% upside probability with median time of 3.2 days. You can confidently enter long positions with appropriate position sizing.
3. Risk Management
Position Sizing: Larger positions when probability heavily favors one direction
Portfolio Allocation: Reduce exposure when probabilities are near 50/50 (high uncertainty)
Hedge Timing: Know when to add protective positions based on downside probability
Example: Indicator shows 55% upside vs 45% downside—nearly neutral. This signals high uncertainty, suggesting reduced position size or wait for better setup.
4. Market Regime Detection
Trending Markets: High directional bias (70%+ one direction)
Range-bound Markets: Balanced probabilities (45-55% both directions)
Volatility Regimes: Compare actual vs theoretical minimum time
Example: Consistent 90%+ bullish bias across multiple timeframes confirms strong uptrend—stay long and avoid counter-trend trades.
First Hit Rate (Most Important!)
Shows which threshold is likely to be hit FIRST:
Upside %: Probability of hitting upside target before downside
Downside %: Probability of hitting downside target before upside
These always sum to 100%
⚠️ Warning: If you see "Low Hit Rate" warning, increase this parameter!
Advanced Parameters
Drift Mode
Allows you to explore different scenarios:
Historical: Uses actual recent trend (default—most realistic)
Zero (Neutral): Assumes no trend, only volatility (symmetric probabilities)
50% Reduced: Dampens trend effect (conservative scenario)
Use Case: Switch to "Zero (Neutral)" to see what happens in a pure volatility environment, useful for range-bound markets.
Distribution Type
Percentile: Shows 10%, 25%, 50%, 75%, 90% levels (recommended for most users)
Sigma: Shows standard deviation levels (1σ, 2σ)—useful for statistical analysis
⚠️ Important Limitations & Best Practices
Limitations
Assumes GBM: Real markets have fat tails, jumps, and regime changes not captured by GBM
Historical Parameters: Uses recent volatility/drift—may not predict regime shifts
No Fundamental Events: Cannot predict earnings, news, or macro shocks
Computational: Runs only on last bar—doesn't give historical signals
Remember: Probabilities are not certainties. Use this indicator as part of a comprehensive trading plan with proper risk management.
Created by: Henrique Centieiro. feedback is more than welcome!
Channels by TradingConTotoThis indicator plots clear and minimalistic High (H) and Low (L) pivot points only within the selected trading session (e.g., 10:00–12:00).
During the active session, the background is shaded for easy visual reference, and pivot labels alternate automatically — meaning no consecutive H or L points appear in a row. This makes it simple to identify real swing changes within a specific session.
⚙️ Features
Detects and labels pivots only during the chosen time range.
Alternating logic prevents consecutive highs or lows (H → L → H → L).
Clean session background highlight for visual clarity.
Fully customizable parameters (session time, sensitivity, colors, etc.).
Ideal for intraday traders, scalpers, and structure-based strategies.
💡 Suggested Use
Perfect for traders who focus on specific market sessions (e.g., New York, London, or custom hours).
The alternating pivot logic helps visualize market swings and structural shifts without visual clutter, making it an excellent companion for price action analysis.
Multi-Timeframe MACD with Color Mix (Nikko)Multi-Timeframe MACD with Color Mix (Nikko) Indicator
This documentation explains the benefits of the "Multi-Timeframe MACD with Color Mix (Nikko)" indicator for traders and provides easy-to-follow steps on how to use it. Written as of 05:06 AM +07 on Saturday, October 04, 2025, this guide focuses on helping you, as a trader, get the most out of this tool with clear, practical advice before diving into the technical details.
Benefits for Traders
1. Multi-Timeframe Insight
This indicator lets you see momentum trends across 15-minute, 1-hour, 1-day, and 1-week timeframes all on one chart. This big-picture view helps you catch both quick market moves and long-term trends without flipping between charts, saving you time and giving you a fuller understanding of the market.
2. Visual Momentum Representation
The background changes from red to green based on short-term (15m) momentum, giving you a quick, easy-to-see signal—red means bearish (prices might drop), and green means bullish (prices might rise). The histogram uses a mix of red, green, and blue colors to show the combined strength of the 1-hour, 1-day, and 1-week timeframes, helping you spot strong trends at a glance (e.g., a bright mix for strong momentum, darker for weaker).
3. Enhanced Decision-Making
The background and histogram colors work together to confirm trends across different timeframes, making it less likely you’ll act on a false signal. This helps you feel more confident when deciding when to buy, sell, or hold.
4. Proactive Alert System
You can set alerts to notify you when the percentage of bullish timeframes hits your chosen levels (e.g., below 10% for bearish, above 90% for bullish). This keeps you in the loop on big momentum shifts without needing to watch the chart all day—perfect for when you’re busy.
5. Flexibility and Efficiency
You can turn timeframes on or off, adjust settings like speed of the moving averages, and tweak transparency to fit your trading style—whether you’re a fast scalper or a patient swing trader. Everything is shown on one chart, saving you effort, and the colors make it simple to read, even if you’re new to trading.
How to Use It
Getting Started
Add the Indicator: Load the "Multi-Timeframe MACD with Color Mix (Nikko)" onto your TradingView chart using the Pine Script editor or indicator library.
Pick Your Timeframes: Turn on the timeframes that match your trading—use 15m and 1h for quick trades, or 1d and 1w for longer holds—using the enable_15m, enable_1h, enable_1d, enable_1w, and enable_background options.
Reading the Colors
Background Gradient: Watch for red to signal bearish 15m momentum and green for bullish momentum. Adjust the Background_transparency (default 75%, or 25% opacity) if the chart feels too busy—try lowering it to 50 for clearer candlesticks in fast markets.
Histogram and EMA Colors:
The histogram and its Exponential Moving Average (EMA) line show a mix of red (1-week), green (1-day), and blue (1-hour) based on how strong the momentum is in each timeframe.
Brighter colors mean stronger momentum—white (all bright) shows all timeframes are pushing up hard, while darker shades (like gray or black) mean weaker or mixed momentum.
Turn off a timeframe (e.g., enable_1h = false) to see how it changes the color mix and focus on what matters to you.
Setting Alerts
Set Your Levels: Choose a threshold_low (default 10%) and threshold_high (default 90%) based on your comfort zone or past market patterns to catch big turns.
Get Notifications: Use TradingView alerts to get pings when the market hits your set levels, so you can act without staring at the screen.
Practical Tips
Pair with Other Tools: Use it with support/resistance lines or the RSI to double-check your moves and build a solid plan.
Tweak Settings: Adjust fast_length, slow_length, and signal_smoothing to match your asset’s speed, and bump up the lookback (default 50) for steadier trends in wild markets.
Practice First: Test different timeframe combos on a demo account to find what works best for you.
Understanding the Colors (Simple Explanation)
How Colors Work
The histogram and its EMA line use a color mix based on a simple idea from color theory, like mixing paints with red, green, and blue (RGB):
Red comes from the 1-week timeframe, green from 1-day, and blue from 1-hour.
When all three timeframes show strong upward momentum, they blend into bright white—the brightest color, like a super-bright light telling you the market’s roaring up.
If some timeframes are weak or pulling down, the mix gets darker (like gray or black), warning you the momentum might not be solid.
Brighter is Better
Bright Colors = Strong Opportunity: The brighter the histogram and EMA (closer to white), the more all your chosen timeframes are in agreement that prices are rising. This is your signal to think about buying or holding, as it points to a powerful trend you can ride.
Dark Colors = Caution: A darker mix (toward black) means some timeframes are lagging or bearish, suggesting you might wait or consider selling. It’s like a dim light saying, “Hold on, check again.”
Benefit in Practice: Watching the brightness helps you jump on the best trades fast. For example, a bright white histogram on a green background is like a green traffic light—go for it! A dark gray on red is like a red light—pause and rethink. This quick color check can save you from bad moves and boost your profits when the trend is strong.
Why It Helps
These colors are your fast friend in trading. A bright histogram means all your timeframes are cheering for an uptrend, giving you the confidence to act. A dull one tells you to be careful, helping you avoid traps. It’s like having a color-coded guide to pick the hottest market moments!
Technical Details
Input Parameters
Fast Length (default: 12): Short-term moving average speed.
Slow Length (default: 26): Long-term moving average speed.
Source (default: close): Price data used.
Signal Smoothing (default: 9): Smooths the signal line.
MA Type (default: EMA): Choose EMA or SMA.
Timeframe and Scaling
Timeframes: 15m, 1h, 1d, 1w, with on/off switches.
Lookback Period (default: 50): Sets the data window for trends.
Background Transparency (default: 75%): Controls background see-through level.
MACD Calculation
Per Timeframe: Uses request.security():
MACD Line: ta.ema(src, fast_length) - ta.ema(src, slow_length).
Signal Line: ta.ema(MACD, signal_length).
Histogram: (macd - signal) / 3.0.
Background Gradient
15m Normalization: norm_value = (hist_15m - hist_15m_min) / max(hist_15m_range, 1e-10), limited to 0-1.
RGB Mix: Red drops from 255 to 0, green rises from 0 to 255, blue stays 0.
Apply: color.new(color.rgb(r_val, g_val, b_val), Background_transparency).
Histogram and EMA Colors
Color Assignment:
1h: Blue (#0000FF) if hist_1h >= 0, else black.
1d: Green (#00FF00) if hist_1d >= 0, else black.
1w: Red (#FF0000) if hist_1w >= 0, else black.
Final Color: final_color = color.rgb(min(r, 255), min(g, 255), min(b, 255)).
Plotting: Histogram and EMA use final_color; MACD (#2962FF), signal (#FF6D00).
Alerts
Bullish Percentage: bullish_pct = (bullish_count / bullish_total) * 100, counting hist >= 0.
Triggers: Below threshold_low or above threshold_high.
--------------------------------------------------------------------
Conclusion
The "Multi-Timeframe MACD with Color Mix (Nikko)" is your all-in-one tool to spot trends, confirm moves, and trade smarter with its bright, easy-to-read colors. By using it wisely, you can sharpen your market edge and trade with more confidence.
This README is tailored for traders and reflects the indicator's practical value as of 05:06 AM +07 on October 04, 2025.
Stage Market AnalyzerStage Market Analyzer – User Guide
Overview:
The “Stage Market Analyzer” indicator is a comprehensive market analysis tool that identifies the current market phase (6 stages) using multiple EMAs (Exponential Moving Averages) and provides key performance metrics including 52-week high, YTD change, and recent price changes. This indicator is displayed on the chart with a visual table and plotted EMA lines for easy trend analysis.
Market Stages
-The indicator classifies the market into six stages based on the position of price relative to the fast and slow EMAs:
Recovery:
-Price above the fast EMA, but below the slow EMA.
-Slow EMA is above the fast EMA.
-ndicates a market recovering from a downtrend.
Accumulation:
-Price above both EMAs, slow EMA above fast EMA.
-Suggests accumulation phase, usually after a downtrend.
Bull Market:
-Price above both EMAs, fast EMA above slow EMA.
-Represents strong uptrend.
Warning:
-Price below both EMAs, fast EMA above slow EMA.
-Signals caution; potential weakening trend.
Distribution:
-Price below fast EMA, slow EMA below fast EMA.
-Market may be topping or preparing to reverse.
Bear Market:
-Price below both EMAs, slow EMA above fast EMA.
-Strong downtrend confirmed.
The indicator counts consecutive bars within the same stage and displays this as “Stage Name (X Bar)” in the table.
EMA Settings
-Fast EMA: Default 50 bars.
-Slow EMA: Default 200 bars.
Additional EMAs: EMA1 (21), EMA2 (100), EMA3 (150) – optional display.
Users can customize all EMA lengths and choose which EMAs to display.
The plotted EMAs help visualize trends, crossovers, and market momentum.
Performance Metrics
30-Bar & 90-Bar Price Change:
Displays the percentage change over the last 30 or 90 bars.
Positive change in green, negative in red.
YTD Change (Year-to-Date):
-Calculated from the first trading bar of the current year to current price.
-Reflects overall market performance for the current year.
52-Week High:
-Shows the percentage difference between current price and the highest price over the last 52 weeks.
-Adjusts automatically for the chart timeframe:
Daily: last 252 bars
Weekly: last 52 bars
Monthly: last 12 bars
Intraday: calculated based on bars per day × 252 trading days
Positive deviation is shown in green, negative in red.
Note: For non-daily charts, the calculation approximates a “year” based on available bars.
Table Display
Located at the bottom-right of the chart.
Columns:
Current Market Stage (with consecutive bar count)
30-Bar Change
90-Bar Change
YTD Change
52-Week High (optional)
Background colors indicate the stage for quick visual reference.
How to Use
Add the indicator to your chart.
Adjust EMAs to match your trading strategy.
Observe the table to understand:
Current market phase
Short-term and long-term performance metrics
Trend direction using plotted EMAs
Use the stage information together with other analysis (support/resistance, volume, etc.) to make informed trading decisions.
Notes & Recommendations
The indicator works best on daily charts for accurate 52-week high and YTD calculations.
For crypto or non-standard trading calendars, be aware that intraday data may approximate the “year” differently.
EMAs are customizable – experiment with different lengths to fit your preferred timeframe or trading style.