Cycle Timing Framework - Adaptive Point MappingThis indicator is a visual cycle-timing framework designed to help traders study when recurring turning points tend to occur within a repeating market cycle.
Instead of reacting only to indicators that respond after price moves, this tool focuses on time structure — mapping recurring points inside a fixed-length cycle and projecting that same structure across past, current, and forward cycles for contextual reference.
Each cycle point is fully configurable, allowing the model to be tuned to individual assets, timeframes, or market regimes.
🔍 What This Indicator Does
Draws a repeating cycle template (default: 122 bars)
Displays up to 35 recurring cycle points per cycle
Projects the same structure across:
Past cycles (for validation)
The current cycle (for context)
Future cycles (for planning reference)
Allows point-by-point customization:
Enable / disable any point
Independent bar offsets per point
Individual colors for visual grouping
Optional tolerance windows (± bars) around each point
Optional numbered markers for clean point identification
This is a non-predictive, non-trading tool intended for cycle research, timing context, and structural alignment.
🛠 How to Use It (Workflow)
1️⃣ Choose Your Timeframe First
Cycle behavior is timeframe-dependent.
Decide whether you are working on Daily, Weekly, or another timeframe before tuning offsets.
2️⃣ Define the Cycle
Cycle Length (bars)
Sets the total cycle duration (default: 122).
Bars Back to Current Cycle Start
Anchors the current cycle to a known starting point.
Bars Back Lookback
Controls how many historical cycles are displayed.
3️⃣ Tune the Points
In Point Offsets (Bars):
Adjust each point so its vertical line aligns with recurring highs, lows, or pivots.
Disable points that are not relevant to the asset.
Use color groupings to distinguish high-probability or structural points.
This tuning process is intentionally manual to encourage asset-specific calibration.
4️⃣ Use Window Bands for Flexibility
Enable ± Window Bands if turning points tend to vary by a bar or two.
This helps visualize timing zones instead of single-bar precision.
5️⃣ Validate with Bar Replay
Use TradingView’s Bar Replay feature to:
Step through historical price action
Observe how consistently points align
Refine offsets where necessary
This is the intended validation method for this indicator.
🎯 Intended Use Cases
Cycle and rhythm analysis
Timing context for other indicators
Structural alignment across market phases
Studying recurring turning points on a specific asset
Educational and research-oriented cycle mapping
This indicator is designed to complement — not replace — price action, trend analysis, or risk management.
⚠ Important Notes
This script does not place trades
It does not generate buy/sell signals
It does not guarantee future outcomes
Forward projections are visual references only
Always confirm with additional analysis
This tool is best used as a context layer, helping answer when something may be more likely to occur — not what will occur.
🧠 Final Thought
Markets often move with rhythm, but that rhythm is asset-specific.
This indicator is intentionally flexible so the same cycle engine can be adapted to different instruments without forcing a one-size-fits-all model.
If you study cycles, this script gives you a clean, disciplined framework to do so directly on the chart.
Indicateurs et stratégies
Gold Futures Prop-Firm Strategy (GC) 1-18-2026Overview
This is a long-only, session-based, multi-regime trading strategy designed specifically for Gold futures (GC / GC1!) on intraday timeframes (typically 5–15 minutes).
The strategy aims to capture high-probability moves during the New York and Asian sessions while avoiding major economic news events and enforcing strict daily risk limits — making it suitable for prop firm challenges (e.g. FTMO, FundedNext, Apex, etc.) that require consistent profitability, limited drawdown, and disciplined risk management.
Core Philosophy
Trade longs only (shorts were removed after analysis showed they were consistently unprofitable)
Different logic depending on session and market regime (trending vs ranging)
Heavy filtering using trend strength (ADX), volume confirmation, EMA alignment, Bollinger Bands, and RSI
Strict position sizing, daily loss cap, per-session trade limits, and news blackout periods
Trailing stop mechanism to let winners run while protecting against reversals
Trading Sessions & Time Windows (Eastern Time)
NY Session: 08:30 – 15:00 ET
NY AM (trend/breakout zone): 08:30 – 11:30 ET
NY PM (mean-reversion zone): 11:30 – 15:00 ET
Asia Session (mean-reversion zone): 18:00 – 02:00 ET
News blackouts: short windows around high-impact releases (CPI/NFP, ISM/Fed, FOMC)
Entry Logic (Long Only)
NY AM – Trend Following & Breakouts (strongest trend filter)
ADX > 30 (strong trend)
Price above 200 EMA (bull regime)
Fast EMA (21) crosses above Slow EMA (55) or breakout above 20-bar high
Volume spike (> 1.4 × 20-period SMA)
Max 2 trades per NY session per day
NY PM & Asia – Mean Reversion
ADX ≤ 30 (ranging market)
Price below lower Bollinger Band (20, 2.0)
RSI < 25 (deep oversold)
No volume filter required here
Max 2 trades per Asia session per day
Risk Management Rules
Position size: Fixed 1–2 contracts (user selectable)
Initial stop: 1.7 × ATR(14) below entry (tightened from original)
Trailing stop:
Activates after price moves +1.0 × ATR in profit
Trails by 1.0 × ATR (locked-in profits aggressively)
Daily loss limit: -$600 (stops all trading for the day once hit)
No trading during defined news windows
Pyramiding disabled (only one position at a time)
No short entries (removed after backtest analysis)
Indicators Used
EMA 21 / 55 / 200 (trend direction & filter)
ATR(14) × 0.85 (volatility base)
ADX(14) threshold 30 (strong trend confirmation)
Bollinger Bands (20, 2.0) for mean-reversion entries
RSI(14) with oversold < 25
Volume spike filter (1.4× SMA) for trend/breakout entries
20-bar highest high / lowest low for breakout detection
Visual Elements on Chart
Fast (blue), Slow (orange), and Filter (red) EMAs
Bollinger Bands (gray, semi-transparent fill)
Background coloring:
Red tint during news blackout periods
Purple tint when daily loss limit is hit
Intended Use Case
Prop trading firm evaluation accounts
Conservative intraday gold trading
Focus on high-quality long setups in trending (NY AM) and mean-reverting (Asia/PM) environments
Goal: positive expectancy with controlled drawdown, suitable for passing drawdown and profit targets
BTCUSD 1D Trend Strategy [Gemini]1Dchart
100% of equity per trade
0.1% commission
1 tick slippage
please convert this indicator to a trading strategy as you see fit
find attached the date of the chart and the indicator on BTCUSD 1D chart so you can make a better decision when to buy and sell
avoid forward looking and repainting at all costs.
Don't add tables to the chart
don't ever use line breaks in function calls:
long only
2018-2069
1D chart
100% of
Multi-Data Chart-AnalyticsDynamic Sentiment & Contextual Trend Analysis
Function Description
The Multi-Data Chart-Analytics is a comprehensive market context indicator designed to convert complex technical data into a readable, real-time narrative. Unlike traditional visual-only indicators, this script acts as an on-chart "trading assistant" that evaluates price action, momentum, volatility, and institutional volume simultaneously.
Key Technical Features:
Adaptive Trend Engine: Automatically scales its lookback period based on available historical data (up to 200 periods). This ensures accurate analysis for "young" assets or high timeframes (like BTC on Monthly charts) where standard fixed-length EMAs fail.
Momentum & Feel Tracking: Integrates RSI and DMI (ADX) to determine if the market is overextended (expensive) or undervalued (cheap), and whether the trend has sufficient strength.
Volatility Squeeze Detection: Monitors Bollinger Band width to alert users to "coiling" phases, signaling imminent breakouts.
Institutional Volume Filter: Compares current volume against its 20-period moving average to identify "Smart Money" conviction.
Who is this for?
Discretionary Traders: Who want a quick "second opinion" or sanity check before entering a trade.
Beginners: Who find it difficult to read multiple indicators at once; the terminal translates lines into actionable insights.
Systematic Traders: Who need to maintain awareness of higher-timeframe context without cluttering their main chart window.
How to Use It
Look at the Environment: Start by checking the long-term trend status to ensure you aren't trading against the dominant market force.
Verify Momentum: Check "Market Feel" to avoid buying at exhaustion points (Overbought) or selling at bottoms (Oversold).
Prepare for Breakouts: Keep an eye on the "Volatility" section. If it indicates a "Squeeze," tighten your stops or prepare for a large move.
Confirm with Smart Money: Only trust significant moves if the terminal confirms "Institutional Activity" is present.
Customize: Use the settings menu to adjust the box width, colors, and font size to fit your personal chart layout.
Technical Breakdown (Short Form)
Trend: Adaptive EMA/SMA (max 200).
Momentum: RSI (14) + ADX (14).
Volatility: Bollinger Band Width (20).
Volume: SMA (20) based Volume multiplier.
You might want to use this script in combination with our "Range Indicator Golden Pocket" and "Multi Asset & Multi Timeframe Trend Dashoboard" and the "Risk & Reward Position Planner"
TimeframeAlignTHE PROBLEM THIS LIBRARY SOLVES
When you use `request.security()` to get data from a Higher Timeframe (HTF) and try to draw objects like boxes, lines, or labels, they appear at the wrong horizontal position . This is the "floating in space" problem.
Why does this happen?
The `bar_index` in Pine Script refers to where data was RECEIVED , not where the event OCCURRED .
Consider this scenario:
• You're on a 5-minute chart
• You request 1-hour data for drawing an FVG (Fair Value Gap)
• A 1H candle spans 12 chart bars (60min / 5min = 12)
• But your code draws at `bar_index - 1` or `bar_index - 3`
• The result: your FVG box is only 2-3 bars wide instead of spanning the correct 12-36 bars
This library solves that by tracking where HTF bars actually start and end on your chart timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE THIS LIBRARY
Step 1: Import the Library
```
import ArunaReborn/TimeframeAlign/1 as tfa
```
Step 2: Create a Tracker for Each HTF
```
var tfa.HTFTracker tracker1H = tfa.createTracker("60")
```
Step 3: Update the Tracker Every Bar
```
tfa.updateTracker(tracker1H, "60")
```
Step 4: Use Synced Drawing Functions
```
if tfa.htfBarChanged(tracker1H)
tfa.syncedBox(tracker1H, 3, 1, topPrice, bottomPrice, color.new(color.green, 80))
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EXPORTED TYPES
TimeframePair
Stores metadata about the relationship between source and chart timeframes.
• sourceTimeframe - The HTF/LTF being compared
• chartTimeframe - Current chart timeframe
• isHTF - True if source is higher than chart
• isLTF - True if source is lower than chart
• barRatio - Chart bars per source bar
• secondsRatio - Time ratio between timeframes
MTFEventData
Stores synchronized event data with correct bar positions.
• price - Price level of the event
• eventTime - Unix timestamp of the event
• chartBarStart - Chart bar_index where event's TF bar started
• chartBarEnd - Chart bar_index where event's TF bar ended
• htfOffset - The HTF offset used
• isValid - True if synchronization succeeded
HTFTracker
Tracks HTF bar boundaries. Create one per timeframe you need to track.
• htfTimeframe - The timeframe being tracked
• currentStartBar - Where current HTF bar started
• currentEndBar - Where current HTF bar ends (provisional)
• startHistory - Array of historical start positions
• endHistory - Array of historical end positions
• lastUpdateBar - Last bar_index when updated
• barJustChanged - True if HTF bar changed on this chart bar (set by updateTracker)
SyncedBox
Managed box with synchronization metadata.
• bx - The Pine Script box object
• htfTimeframe - Source timeframe
• leftHtfOffset / rightHtfOffset - HTF offsets for edges
• topPrice / bottomPrice - Price boundaries
• extendRight - Auto-extend flag
SyncedLine
Managed line with synchronization metadata.
• ln - The Pine Script line object
• htfTimeframe - Source timeframe
• htfOffset - Anchor offset
• price - Price level (horizontal lines)
• isHorizontal - Line orientation
• extendRight - Auto-extend flag
SyncedLabel
Managed label with synchronization metadata.
• lbl - The Pine Script label object
• htfTimeframe - Source timeframe
• htfOffset - Anchor offset
• price - Price level
• anchorPoint - "start", "end", or "middle"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EXPORTED FUNCTIONS
━━ CORE FUNCTIONS ━━
getTimeframeInfo(sourceTimeframe)
Analyzes relationship between a source TF and chart TF.
Returns: TimeframePair with comparison metadata
createTracker(htfTimeframe)
Creates a new HTF tracker. Call once per timeframe, store with `var`.
Returns: HTFTracker instance
updateTracker(tracker, htfTimeframe, historyDepth)
Updates tracker with current bar data. Call on every bar.
• htfTimeframe: The timeframe string (must match createTracker)
• historyDepth: Max HTF bars to track (default 500)
Returns: Updated tracker
getStartBar(tracker, htfOffset)
Gets chart bar_index where a specific HTF bar started.
• htfOffset: 0=current, 1=previous, 2=two bars ago, etc.
Returns: bar_index or na
getEndBar(tracker, htfOffset)
Gets chart bar_index where a specific HTF bar ended.
Returns: bar_index or na
htfBarChanged(tracker)
Detects when HTF bar just changed.
Returns: True on first chart bar of new HTF bar
findBarAtTime(timestamp, maxLookback)
Searches backward to find chart bar containing a timestamp.
• maxLookback: How far back to search (default 500)
Returns: bar_index or na
syncEventToChart(tracker, eventPrice, eventTime, anchorPoint)
Generic sync function mapping any event to correct chart position.
• anchorPoint: "start", "end", or "middle"
Returns: MTFEventData
━━ DRAWING CREATION FUNCTIONS ━━
syncedBox(tracker, leftHtfOffset, rightHtfOffset, topPrice, bottomPrice, bgcolor, ...)
Creates a box at correct HTF-aligned position.
• leftHtfOffset: HTF bars back for left edge
• rightHtfOffset: HTF bars back for right edge
• extendRight: Auto-extend to current bar
Returns: SyncedBox or na
syncedHLine(tracker, htfOffset, price, lineColor, lineStyle, lineWidth, extendRight)
Creates horizontal line anchored to HTF bar start.
• extendRight: If true, extends to current bar (default true)
Returns: SyncedLine or na
syncedVLine(tracker, htfOffset, atStart, lineColor, lineStyle, lineWidth)
Creates vertical line at HTF bar boundary.
• atStart: True=start of HTF bar, False=end
Returns: SyncedLine or na
syncedLabel(tracker, htfOffset, price, labelText, anchorPoint, ...)
Creates label at correct HTF-aligned position.
• anchorPoint: "start", "end", or "middle"
Returns: SyncedLabel or na
syncedPlotValue(tracker, value, htfOffset)
Returns value for plotting only at synced positions.
Returns: value if current bar is within HTF range, otherwise na
━━ UPDATE FUNCTIONS ━━
updateSyncedBox(syncedBox, extendToCurrentBar)
Extends existing box's right edge to current bar.
Returns: Updated SyncedBox
updateSyncedLine(syncedLine, extendToCurrentBar)
Extends existing horizontal line to current bar.
Returns: Updated SyncedLine
updateSyncedLabel(syncedLabel, tracker, newText, newPrice)
Updates label text/price while maintaining sync.
Returns: Updated SyncedLabel
━━ CONVENIENCE FUNCTIONS ━━
htfBarStartIndex(htfTimeframe, htfOffset, historyDepth)
Simple function to get HTF bar start without explicit tracker.
⚠️ Only tracks ONE timeframe. For multiple TFs, use createTracker pattern.
Returns: bar_index or na
htfBarEndIndex(htfTimeframe, htfOffset, historyDepth)
Simple function to get HTF bar end without explicit tracker.
⚠️ Only tracks ONE timeframe. For multiple TFs, use createTracker pattern.
Returns: bar_index or na
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
COMPLETE USAGE EXAMPLES
Example 1: FVG Box with Auto-Extend
```
//@version=6
indicator("FVG with Synced Drawing", overlay=true)
import ArunaReborn/TimeframeAlign/1 as tfa
htfInput = input.timeframe("60", "HTF for FVG")
// Create tracker for chosen timeframe
var tfa.HTFTracker fvgTracker = tfa.createTracker(htfInput)
tfa.updateTracker(fvgTracker, htfInput)
// Get FVG data from HTF (confirmed bars with offset)
= request.security(syminfo.tickerid, htfInput,
[low , high , low > high ],
lookahead=barmerge.lookahead_off)
// Store managed box
var tfa.SyncedBox fvgBox = na
// Create synced box when FVG detected
if fvgDetected and tfa.htfBarChanged(fvgTracker)
fvgBox := tfa.syncedBox(fvgTracker, 3, 1, fvgTop, fvgBot,
color.new(color.green, 85), color.green, 1, "FVG", color.white, true)
// Extend box to current bar each tick
if not na(fvgBox)
tfa.updateSyncedBox(fvgBox, true)
```
Example 2: HTF Support/Resistance Lines
```
//@version=6
indicator("HTF S/R Lines", overlay=true)
import ArunaReborn/TimeframeAlign/1 as tfa
htfInput = input.timeframe("240", "HTF for S/R")
// Create and update tracker
var tfa.HTFTracker srTracker = tfa.createTracker(htfInput)
tfa.updateTracker(srTracker, htfInput)
// Get HTF high/low (confirmed with offset)
= request.security(syminfo.tickerid, htfInput,
[high , low ], lookahead=barmerge.lookahead_off)
// Track lines
var tfa.SyncedLine resistanceLine = na
var tfa.SyncedLine supportLine = na
// Create new lines when HTF bar changes
if tfa.htfBarChanged(srTracker)
resistanceLine := tfa.syncedHLine(srTracker, 1, htfHigh, color.red, line.style_solid, 2, true)
supportLine := tfa.syncedHLine(srTracker, 1, htfLow, color.green, line.style_solid, 2, true)
// Auto-extend lines each bar
if not na(resistanceLine)
tfa.updateSyncedLine(resistanceLine, true)
if not na(supportLine)
tfa.updateSyncedLine(supportLine, true)
```
Example 3: Multiple Timeframes
```
//@version=6
indicator("Multi-TF Boxes", overlay=true)
import ArunaReborn/TimeframeAlign/1 as tfa
// Create separate tracker for each timeframe
var tfa.HTFTracker tracker1H = tfa.createTracker("60")
var tfa.HTFTracker tracker4H = tfa.createTracker("240")
var tfa.HTFTracker trackerD = tfa.createTracker("1D")
// Update ALL trackers every bar (pass the same TF string)
tfa.updateTracker(tracker1H, "60")
tfa.updateTracker(tracker4H, "240")
tfa.updateTracker(trackerD, "1D")
// Now use each tracker independently for drawing
// Each tracker maintains its own separate boundary history
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NON-REPAINTING COMPLIANCE
To ensure non-repainting behavior, always use this pattern with request.security:
```
= request.security(syminfo.tickerid, htfTimeframe,
[value1 , value2 ], // Use offset for confirmed data
lookahead=barmerge.lookahead_off) // Never use lookahead_on
```
The ` ` offset ensures you're using the previous completed HTF bar, not the current forming bar.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HISTORY DEPTH PARAMETER
The `historyDepth` parameter controls how many HTF bars are tracked:
• Default: 500 HTF bars
• Maximum: Limited by Pine Script's array constraints
• Higher values = more historical accuracy but more memory usage
• Lower values = less memory but may return `na` for older offsets
Adjust based on your needs:
```
tfa.updateTracker(tracker, 100) // Track 100 HTF bars (light)
tfa.updateTracker(tracker, 1000) // Track 1000 HTF bars (heavier)
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
IMPORTANT NOTES
1. One Tracker Per Timeframe : If you need multiple HTFs, create separate trackers for each. The convenience functions (htfBarStartIndex, htfBarEndIndex) only track one TF.
2. Update Every Bar : Always call updateTracker() unconditionally on every bar, not inside conditionals.
3. HTF Only : This library is designed for Higher Timeframe data. For LTF aggregation, use findBarAtTime() for time-based lookups.
4. Drawing Limits : Pine Script has limits on drawing objects. Use box.delete(), line.delete(), label.delete() to clean up old objects.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TROUBLESHOOTING
Q: My boxes/lines still appear at wrong positions
A: Make sure you're calling updateTracker() on every bar (not inside an if statement) and using the correct htfOffset values.
Q: Functions return na
A: The htfOffset might be larger than available history. Increase historyDepth or use a smaller offset.
Q: Multiple timeframes don't work correctly
A: Don't use the convenience functions for multiple TFs. Create separate HTFTracker instances with createTracker() for each timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CHANGELOG
v1 - Initial release
• HTFTracker pattern for reliable multi-TF tracking
• Synced drawing functions for boxes, lines, labels
• Update functions for extending drawings
• Convenience functions for simple single-TF use cases
Wick & Body % with upper wick thresholdA simple indicator to give the sizes of wicks and main body of the last candle as percentage of high - low. No negative figures. If the candle is red, the table will be red and vice versa. Table could be located as per user preference. Upper wick threshold is user defined and will be red beyond the threshold.
Plan Limit TimerA Pine Script library that helps developers monitor script execution time against TradingView's plan-specific timeout limits. Displays a visual debug table with runtime metrics, percentage of limit consumed, and color-coded status warnings.
WHAT THIS LIBRARY DOES
TradingView enforces different script timeout limits based on subscription tier:
• Basic : 20 seconds
• Essential / Plus / Premium : 40 seconds
• Ultimate : 100 seconds
This library measures your script's total execution time and displays it relative to these limits, helping you optimize indicators for users on different plans.
THE DEBUG TABLE
When enabled, a table appears on your chart showing:
• Plan : The selected TradingView subscription tier
• Limit : Maximum allowed execution time for that plan
• Runtime : Measured script execution time
• Per Bar : Average time spent per bar
• Bars : Number of bars processed
• % Used : Percentage of timeout limit consumed (color-coded)
• Status : OK (green), WARNING (yellow), DANGER (orange), or EXCEEDED (red)
HOW IT WORKS
The library captures a timestamp at the start of your script using timenow, then calculates the elapsed time at the end. It compares this against the selected plan's timeout limit to determine percentage used and status.
Technical Note : Pine Script's timenow variable has approximately 1-second precision. Scripts that execute in under 1 second may display 0ms. This is a platform limitation, not a library issue. For detailed per-function profiling, use TradingView's built-in Pine Profiler (More → Profiler mode in the Editor).
EXPORTED FUNCTIONS
startTimer()
Call at the very beginning of your script. Returns a timestamp.
getStats(startTime, plan)
Calculates timing statistics. Returns a TimingStats object with all metrics.
showTimingTable(stats, plan, tablePosition, showOnlyOnLast)
Renders the debug table on the chart.
debugTiming(startTime, plan, tablePosition)
Convenience function combining getStats() and showTimingTable() in one call.
isApproachingLimit(stats, threshold)
Returns true if execution time has reached the specified percentage of the limit.
getRemainingMs(stats)
Returns milliseconds remaining before timeout.
formatSummary(stats)
Returns a compact single-line string for labels or tooltips.
addTimingLabel(stats, barIdx, price, labelStyle, textSize)
Creates a color-coded chart label displaying timing statistics. Useful for visual debugging without the full table. Returns the label object for further customization.
EXPORTED CONSTANTS
• LIMIT_BASIC = 20
• LIMIT_ESSENTIAL = 40
• LIMIT_PLUS = 40
• LIMIT_PREMIUM = 40
• LIMIT_ULTIMATE = 100
EXPORTED TYPE: TimingStats
Object containing:
• totalTimeMs (float): Total execution time in milliseconds
• timePerBarMs (float): Average time per bar
• barsTimed (int): Number of bars measured
• barsSkipped (int): Bars excluded from measurement
• planLimitMs (int): Plan timeout in milliseconds
• percentUsed (float): Percentage of limit consumed
• status (string): "OK", "WARNING", "DANGER", or "EXCEEDED"
HOW TO USE IN YOUR INDICATOR
//@version=6
indicator("My Indicator", overlay = true)
import YourUsername/PlanLimitTimer/1 as timer
// User selects their TradingView plan
planInput = input.string("basic", "Your Plan", options = )
// START TIMING - must be first
startTime = timer.startTimer()
// Your indicator calculations here
sma20 = ta.sma(close, 20)
rsi14 = ta.rsi(close, 14)
plot(sma20)
// END TIMING - must be last
timer.debugTiming(startTime, planInput)
ADVANCED USAGE EXAMPLE
//@version=6
indicator("Advanced Example", overlay = true)
import YourUsername/PlanLimitTimer/1 as timer
planInput = input.string("basic", "Plan", options = )
startTime = timer.startTimer()
// Your calculations...
sma = ta.sma(close, 200)
plot(sma)
// Get stats for programmatic use
stats = timer.getStats(startTime, planInput)
// Option 1: Use addTimingLabel for a quick visual indicator
if barstate.islast
timer.addTimingLabel(stats, bar_index, high)
// Option 2: Show custom warning label if approaching limit
if timer.isApproachingLimit(stats, 70.0) and barstate.islast
label.new(bar_index, low, "Warning: " + timer.formatSummary(stats),
color = color.orange, textcolor = color.white, style = label.style_label_up)
// Display the debug table
timer.showTimingTable(stats, planInput, position.bottom_right)
IMPORTANT LIMITATIONS
1. Precision : Timing precision is approximately 1 second due to timenow behavior. Fast scripts show 0ms.
2. Variability : Results vary based on TradingView server load. The same script may show different times across runs.
3. Total Time Only : This library measures total script execution time, not individual function timing. For per-function analysis, use the Pine Profiler in the Editor.
4. Historical Bars : On historical bars, timenow reflects when the script loaded, not individual bar processing times.
USE CASES
• Optimization Debugging : See how close your script is to timeout limits
• Multi-Plan Support : Help users select appropriate settings for their subscription tier
• Performance Regression : Detect when changes increase execution time
• Documentation : Show users the performance characteristics of your indicator
Minervini TT RS Break (vs TOPIX)his script selects “buyable” stocks using Minervini’s Trend Template and filters for market leaders by relative strength versus TOPIX. A BUY signal appears when all TT conditions are met (price above 50/150/200-day MAs, 50>150>200 alignment, rising 200-day MA, +30% from 52-week low, within 25% of 52-week high) and RS is above the threshold, trending up, and making new highs. While BUY is active, an ENTRY signal is shown only when a pivot breakout (above the prior N-day high) occurs with a volume surge (multiple of average volume) and volatility contraction (lower ATR%). An RS BREAK is flagged when relative strength weakens (below its MA or MA turning down), indicating no-add and exit watch. Use BUY to build a watchlist, act only on ENTRY signals, and stop adding while prioritizing exit decisions when RS BREAK appears.
SMA Convergence Finder (7, 25, 50)This to detect and show the three SMAs(7,25,50)convergence's point.
small orange cicle is showed at the point.
Tokyo Sessions HighlighterOverview
This indicator provides a clean, visual representation of the Asian (Tokyo) trading session by highlighting its specific price range. It is designed to help traders identify the initial intraday range and key liquidity levels established during the Tokyo open.
Features
Dynamic Range Box: Automatically plots a box from the session's highest high to its lowest low.
Real-Time Updates: The box height and price labels update live as new session extremes are reached during the designated hours.
Professional Aesthetic: Features a minimalist gray fill, solid black borders, and black text for a clean, professional look on both light and dark chart themes.
Instant Data: Displays a label at the bottom of the box showing the exact price range in the format: Tokyo (Lowest Value - Highest Value).
How To Use
Settings: Adjust the Tokyo Session Time and Timezone in the indicator inputs to match your broker's server time or local requirements.
Strategy: Use the highlighted range to identify potential breakouts or to treat the session high and low as institutional liquidity zones for the London and New York sessions.
Customization: You can adjust the colors and transparency of the box through the script settings menu.
NSE Monthly Expiry 2022-26 : Ashish RajoriaThis indicator, "NSE Monthly Expiry Marker 2022-2026", is designed for traders on TradingView to visually track NSE (National Stock Exchange) monthly F&O (Futures & Options) expiry dates from 2022 to 2026. It plots red dashed vertical lines on each expiry date, with labels showing the month, year, and exact date for easy identification. The dates are accurately calculated based on NSE rules: last Thursday for months up to August 2025, and last Tuesday from September 2025 onwards, with holiday adjustments (e.g., shifted if expiry falls on a holiday). Additionally, it includes trading days, holidays in the session, and a link to www.GSTwork.com for reference. Ideal for option traders to plan strategies around expiry cycles, this tool helps in analyzing patterns over multiple years without manual calculations. Note: Ensure your chart timeframe is daily or higher for best visibility.
Abe's MES Apex Runner - Chop & TrendHow to use this to Hold Longer:
The Entry: When the "ENTRY" label appears, it means the MES and MNQ are both stretched and a reversal pattern has formed.
The "Cloud" Rule: Notice the shaded area between the two EMAs (the Cloud).
If you are in a Long, stay in as long as the Cloud is Green and price stays above the Red line.
If you are in a Short, stay in as long as the Cloud is Red and price stays below the Green line.
The VWAP Target: The Orange line is your first target. Once price hits the Orange line, move your Stop Loss to Break Even.
The Runner: After hitting the Orange line, don't close the whole trade. Keep a "Runner" until the Cloud changes color. This is how you catch those 20-30 point MES moves instead of just 4-5 points.
Relative Strength Index as HistogramThe Relative Strength Index, converted to be represented as a histogram. It is calculated as RSI minus 50. The overbought zone is greater than 20. The oversold zone is less than -20. The columns differ in color depending on the positive or negative zone and the previous columns.
No Wick Candle AlertNo Wick Candle Alert is a price-action indicator designed to identify strong momentum candles with no lower wick, signaling decisive buying or selling pressure.
This indicator automatically scans the chart and highlights:
Bullish candles with no lower wick (open = low)
Bearish candles with no lower wick (close = low)
When such a candle appears:
A clear visual marker is plotted slightly away from the candle (so it does not overlap)
An automatic alert is triggered to notify you in real time
🔹 Key Features
Detects true no-wick candles with precision
Works on any market (Forex, Crypto, Indices, Stocks)
Designed for 15-minute timeframe price action (can be adapted)
Non-repainting alerts (confirmed candle close)
Clean and minimal chart display
🔹 How Traders Use It
No-wick candles often indicate strong institutional pressure and can be used for:
Momentum confirmation
Breakout validation
Entry timing in price-action strategies
Confluence with support & resistance or session opens
🔹 Alerts
Once enabled, the indicator sends an alert immediately after the candle closes, allowing you to react without watching the screen.
Open Interest Spaghetti - Multi ExchangeOpen Interest Spaghetti – Multi Exchange is a structural open-interest flow visualizer designed to expose where and when derivatives positioning is being built or unwound across major futures venues — without collapsing that information into a single, opaque aggregate line.
Instead of smoothing, normalizing, or trend-filtering open interest, this script intentionally preserves exchange-level granularity and plots each venue’s cumulative OI delta from a shared anchor point. The result is a “spaghetti” structure: multiple independent OI paths evolving in parallel, revealing divergence, dominance, and regime shifts in real time.
Core Idea and Originality
Most OI indicators do one of three things:
1) Plot raw open interest (slow, hard to interpret),
2) Plot OI change per bar (noisy, context-less),
3) Aggregate all exchanges into one line (information loss).
This script does none of those.
Instead, it implements an anchored cumulative delta framework applied individually to each exchange, using a common reset reference. This preserves path dependency — you see how positioning evolved since a known structural point, not just what happened on the last candle.
Key differentiators:
- Exchange-segmented OI accumulation
- Explicit anchor-based reset logic
- Optional normalization into percent-of-total OI
- No smoothing, no averages, no trend assumptions
This is not a trend indicator. It is a positioning flow map.
Data Construction and Normalization
Multi-Contract Aggregation (per exchange)
Each exchange’s total open interest is constructed by summing all available perpetual contracts:
- USD-margined
- USDT-margined
- USDC-margined
Where necessary, contract units are converted into a common base-coin representation so that all venues are directly comparable. This prevents distortions caused by mixed margin types.
The result is a true total OI per exchange, not a single contract proxy.
Anchored Cumulative Delta Logic
Let:
- OI(t) = total open interest at time t for a given exchange
- ΔOI(t)=OI(t) - OI(t-1)
For each bar:
- The script accumulates ΔOI forward in time
- This accumulation resets to zero whenever the anchor period changes
The anchor period is user-defined (default: Daily). At each reset:
- All exchange accumulators are cleared
- The current combined OI across all enabled exchanges is stored as the normalization baseline
This makes every plotted value interpretable as:
“Net positioning added or removed since the last anchor reset.”
Display Modes
1. Actual Change (default)
Plots the absolute net change in open interest since the anchor reset.
Interpretation:
- Large positive values → sustained position building
- Large negative values → sustained position unwinding
- Divergence between exchanges → uneven participation or venue-specific positioning
This mode preserves raw scale and is best for structural analysis.
2. Percent Change (normalized mode)
Each exchange’s cumulative delta is divided by the total combined OI at the anchor reset, then expressed as a percentage.
Percent Change = (Exchange Cumulative OI Delta / Total OI at Anchor) * 100
Interpretation:
- Removes absolute size bias between large and small exchanges
- Allows direct comparison of relative contribution
- Makes regime shifts easier to spot across different assets
This mode answers:
“Which exchange is driving the majority of positioning change relative to the market’s size?”
Visual and Structural Aids
- Zero baseline represents the anchor reset point
- Vertical dashed lines mark anchor transitions
- End-of-chart labels identify each exchange without relying on a legend
- All plots are unsmoothed and unfiltered by design
Noise is not removed — it is contextualized.
How Traders Use This
This indicator is most effective for:
- Detecting exchange-specific accumulation or distribution
- Identifying hidden divergence beneath price
- Confirming whether price moves are supported by broad positioning or isolated leverage
- Comparing how different venues react to the same market event
Typical interpretations:
- Price rising while OI spaghetti diverges → short covering or uneven leverage
- One exchange leading OI expansion → localized risk concentration
- Flat price with rising OI across venues → compression and potential expansion setup
What This Is Not
- Not a trend detector
- Not a momentum oscillator
- Not a signal generator
It provides structural context, not trade entries.
Summary
Open Interest Spaghetti – Multi Exchange is a flow-first, structure-aware OI framework that exposes how derivatives positioning evolves across venues from a shared reference point. By preserving exchange independence, anchoring accumulation, and offering optional normalization, it reveals information that aggregate or smoothed OI indicators inherently destroy.
If you trade derivatives and care where risk is building — not just that it is — this tool is designed for that exact purpose.
ColorFlow EMA📊 ColorFlow EMA — Trend Flow & Bias Indicator
🔹 What This Indicator Does
ColorFlow EMA is a clean, visual trend-flow indicator designed to show directional bias and momentum state at a glance.
It uses two exponential moving averages:
Fast EMA (default: 10)
Slow EMA (default: 20)
The area between the EMAs is color-shaded to clearly display whether price is in a bullish or bearish flow.
🎨 Visual Logic
🔵 Blue shading → Bullish flow
(Fast EMA above Slow EMA)
🔴 Red shading → Bearish flow
(Fast EMA below Slow EMA)
Optional crossover markers can be enabled for visual confirmation when EMA alignment changes.
🧠 How to Use ColorFlow EMA
This indicator is not a standalone strategy and is not intended for signal-chasing.
It is best used as a context and bias filter alongside:
Price action
Market structure (HH/HL, LH/LL)
Support & resistance or supply & demand zones
Pullbacks vs premium/discount
Typical use cases:
Favor longs when the flow is blue
Favor shorts when the flow is red
Avoid forcing trades when EMAs are tangled or flat
Wait for pullbacks into structure instead of chasing price
⚠️ Important Notes
EMA crossovers alone do not guarantee profitable trades
Market conditions, structure, and location always matter
Works best in trending or transitioning markets
Not designed for ranging/choppy environments without context
⚙️ Customization
EMA lengths can be adjusted
Crossover markers can be toggled on/off
Designed to stay visually clean and uncluttered
🎯 Who This Indicator Is For
Traders who prioritize price action over indicators
Intraday traders (forex, indices, ETFs, stocks)
Traders who want clarity, not noise
📝 Final Thought
ColorFlow EMA answers one simple question:
“Should I be looking for longs or shorts here?”
Use it for bias, not prediction.
Indicador de Vela de Apertura NY 4HEn 4H muestra la apertura de la vela del horario de nueva york y el cierre de la misma.
6pm ATR% Bands + Outside SD BandsATR Bands that are adjustable with STD ATR
Up to 3 bands, and 3 standard deviations, also can change the ATR range
VFI MagnoVFI – Virtual Football Index (Bet365)
Indicador estatístico para leitura do “preço” (linha branca) em relação ao Fair Value (média) e suas bandas de desvio padrão.
Quando o preço sai da zona normal:
OVER Signal (triângulo verde) → preço abaixo da Lower Band + momentum virando para cima (tendência de correção / alta).
UNDER Signal (triângulo vermelho) → preço acima da Upper Band + momentum virando para baixo (tendência de correção / queda).
As zonas coloridas no fundo destacam excesso (vermelho) e escassez (verde).
-----------
VFI – Virtual Football Index (Bet365)
A statistical mean-reversion indicator that compares the current “price” (white line) against a Fair Value baseline (SMA) and standard deviation bands.
When price moves outside the normal range:
OVER Signal (green triangle) → price below the lower band + momentum turning up (potential rebound / correction).
UNDER Signal (red triangle) → price above the upper band + momentum turning down (potential pullback / correction).
Background colors highlight extreme zones: green (scarcity/undersold) and red (excess/overbought)
Pi Cycle Top RatioPast cycles show a top prediction within a few days of the top when 111DMA crosses the 350DMA*2 (Pi Cycle top indicator).
Each cycle the 2 ratios have crossed less and for shorter periods of time. In 2021 the 2 averages hardly even crossed each other. It is likely the moving averages will not cross this cycle.
This can be seen more clearly if the two moving averages are divided by each other to give a visual ratio, when this is done you can clearly see the diminishing peaks. A trendline can then be applied across these peaks to account for the decaying signal. When the upper trend is hit this would be indicative of a potential peak. Interestingly, this ratio also represents bottoms consistently across each cycle, when the ratio has gone below 0.35 these matches with BTC lows.
Stock Fundamental Performance:EPS and Revenue growth [Dots3Red]This indicator provides a clear and intuitive overview of a company’s revenue and EPS growth, helping you quickly evaluate its financial performance over time.
All data is displayed in a clean, easy-to-read table below the main chart, so you can analyze fundamentals without cluttering price action.
The indicator supports both annual and quarterly data, making it suitable for long-term investors and short-term traders alike.
In addition to raw values, it also shows the percentage change relative to the previous period, allowing you to instantly identify acceleration or deceleration in growth.
To improve visual clarity:
Green values indicate an increase compared to the previous period
Red values indicate a decrease compared to the previous period
This color-coded system makes trend changes immediately visible at a glance.
How to use
By default, the table displays annual data for the last 5 years, offering a long-term perspective on company growth.
You can switch to quarterly data in the settings for a more granular analysis.
Limitations
Due to Pine Engine data request constraints, quarterly data is limited to a maximum lookback of 5 years.
Selecting a longer quarterly period may cause the data to appear out of chronological order. We are actively working on improvements to address this in future updates.






















