HTF Candle hourHTF candlestick builder indicator to view 3 HTFs Includes timestamps and editable HTF 1, 2 Color and text can be edited in the indicator builder sectionIndicador Pine Script®por sjlver9142
HTF Candle Projections [LuxAlgo]The HTF Candle Projections indicator projects recent and current higher timeframe candles onto the right side of the chart, providing a clear visualization of macro trends and internal candle composition. 🔶 USAGE The tool is designed to bridge the gap between lower timeframe execution and higher timeframe context. By projecting HTF candles into the future space (right of the current bar), traders can maintain a clear perspective on the larger trend without constantly switching tabs. 🔹 HTF Trend Alignment Traders can use the projected candles to ensure their lower timeframe (LTF) entries align with the broader market direction. For instance, a scalp trader might only look for long setups if the current projected Daily candle is bullish. This "Top-Down" filter helps traders avoid "fighting the trend" by providing a constant visual reminder of the HTF candle's polarity and momentum. 🔹 Anticipating Reversals & Level Origins The indicator includes connection lines that trace back from the projected HTF wicks to the exact LTF bars that established the High and Low of that period. This allows traders to pinpoint the specific price action or "order block" responsible for the HTF extrema. If price returns to the origin of an HTF wick, traders can watch for a reaction, as these levels often represent areas of significant supply or demand. 🔹 Internal Sentiment Divergence A unique feature of this script is the "Internal Sentiment Bars." These small bars inside the HTF candle body show the ratio of bullish vs. bearish LTF bars that make up that specific HTF candle. If a bullish HTF candle has a high bearish sentiment bar, it suggests a "weak" or "grinding" trend where sellers are actively fighting the move, potentially signaling exhaustion. Conversely, if the sentiment bars align strongly with the HTF candle direction (e.g., a bullish candle with almost entirely bullish sentiment), it indicates a high-conviction "power move" with little resistance. 🔹 Range Play & Breakouts The indicator highlights the absolute highest high and lowest low of the entire projected sequence with solid connection lines. These lines define the current HTF trading range. Traders can use these boundaries to identify mean reversion opportunities within the range or to prepare for high-probability breakout trades once price moves beyond these absolute levels. 🔹 Visualizing Wick Development By observing the live development of the current HTF candle, traders can see "wicking" behavior as it happens. If the current price is far from the HTF high but the connection line remains anchored there, it visually confirms a rejection from that level. This real-time feedback is crucial for identifying if an HTF candle is closing as a "Pin Bar" or "Shooting Star" before the timeframe actually expires. 🔶 DETAILS The script uses a custom data structure to track the Open, High, Low, and Close of the selected timeframe. It also tracks the specific bar index of the highs and lows to draw the connection lines accurately. The absolute high and low of the entire projected sequence are highlighted with solid lines to identify the "Range High" and "Range Low" of the projected window. 🔶 SETTINGS HTF Timeframe: Sets the higher timeframe to be projected (e.g., Daily, Weekly, Monthly). Candle Width (Bars): Determines how many bars wide each projected candle appears on the right side of the chart. Gap Between Candles: Sets the horizontal spacing between the projected HTF candles. Number of HTF Candles: The total number of candles to project (previous completed candles + current live candle). Show Internal Sentiment Bars: Toggles the visibility of the internal bull/bear composition bars. 🔹 Colors HTF Bull/Bear Body: Adjusts the colors and transparency of the main projected candle bodies. Sentiment Bull/Bear: Sets the color for the internal composition bars (ratio of LTF closes). Wick Color: Customizes the color of the projected candle wicks. Connection Line: Sets the color for the dotted lines connecting HTF wicks to their LTF origins. Absolute High/Low Connection: Sets the color for the solid lines marking the highest and lowest points of the projected set. Indicador Pine Script®por LuxAlgoAtualizado 77735
PowerGaps - Multi-Timeframe Fair Value GapsPowerGaps — Multi‑Timeframe Fair Value Gap Engine PowerGaps is a precision‑built, multi‑timeframe Fair Value Gap (FVG) engine designed for traders who rely on clean, reliable market structure signals without noise, repainting, or clutter. It automatically detects and plots institutional FVGs from higher timeframes directly onto your current chart, giving you a clear view of premium/discount imbalances and liquidity inefficiencies that matter most. What PowerGaps Does • Scans four customizable timeframes (e.g., M5, M15, H1, H4) for valid bullish and bearish FVGs • Projects those HTF gaps onto any lower timeframe chart • Colors and labels each gap by timeframe for instant visual recognition • Tracks each gap until it is mitigated by wick touch, then automatically closes and removes it • Ensures no repainting, no duplicates, and no phantom gaps • Maintains perfect alignment across timeframes using a robust, cross‑TF‑safe architecture Why It’s Different PowerGaps is engineered with a strict validation and mitigation system that prevents the common issues seen in many FVG indicators: • No repeated stacking of the same gap • No gaps disappearing when switching timeframes • No false mitigation signals • No stale or corrupted objects left behind Every plotted gap is intentional, accurate, and actionable. Ideal For • ICT‑style traders • Liquidity and imbalance‑based strategies • HTF bias mapping • Scalpers who rely on HTF inefficiencies • Swing traders looking for clean continuation or reversal zones Inputs & Customization • Enable/disable each timeframe independently • Choose custom colors for bullish and bearish gaps • Full control over which timeframes you want projected onto your chartIndicador Pine Script®por PowerEdgeTraderAtualizado 266
Weekly IR Breakout SignalsInspired by XO (@Trader_XO) on CT for his trading strategy and special thanks to REBO (@@R3BOOO) for putting it together in a cheat sheet and sharing it contact me on X: @neuromancer0x ------------------------------------------- Timeframe Recommendations: 1H chart - Day trading (5-10 signals/month) 4H chart - Swing trading (2-5 signals/month) ⭐ Best Daily chart - Position trading (1-2 signals/month) ------------------------------------------- When Signals Appear: Monday: No signals (just setting up IR) Tuesday-Friday: Watch for breakouts Max 1 LONG + 1 SHORT per week (indicator enforces this) ------------------------------------------- Risk Management: Risk 0.5-1% per trade Never risk more than 2% in one day If 2 losses in a row → reduce size or pause ------------------------------------------- 🔔 Setting Up Alerts Click "Create Alert" (⏰ icon) Condition: Select "🟢 LONG Entry" or "🔴 SHORT Entry" Alert name: "Weekly IR Signal" Set to: "Once Per Bar Close" Send to: Phone/Email/AppIndicador Pine Script®por bitsguy7820
Custom Dividers [louis]Custom Dividers is a streamlined utility designed for Multi-Timeframe Analysis (MTF). It allows you to visualize higher timeframe structures directly on lower timeframe charts by drawing infinite vertical lines at the open of new periods. Unlike standard grid lines and other divider indicators, this has custom inputs, giving you complete control over non-standard timeframes (e.g., 90-minute cycles, 6-hour blocks, or 2-day periods). 🔑 Key Features - 4 Independent Timeframe Slots: Configure up to four different vertical dividers simultaneously. - Custom Minute Inputs (TF 1 & TF 2): Instead of restricting you to a dropdown, the first two slots allow you to input any integer for minutes. Example: Set 90 for 90-minute cycle dividers. Example: Set 360 for 6-hour dividers. - Standard Timeframe Selectors (TF 3 & TF 4): Traditional dropdowns for standard periods like Daily (D), Weekly (W), or Monthly (M). - Visual Customization: Lines: Uses line.new() drawing logic to ensure dividers stretch infinitely from top to bottom, regardless of price scale. Styles: Select from Solid, Dashed, or Dotted directly in the inputs. Width & Color: Fully customizable to blend into your chart theme. ⚙️ How to Configure Go to the Settings (Inputs Tab): TF 1 & TF 2: Enter the specific number of minutes (e.g., 60 = 1 Hour, 240 = 4 Hours). Toggle the checkbox to Show/Hide. TF 3 & TF 4: Select the timeframe period from the dropdown. Toggle the checkbox to Show/Hide. Style: Choose your line style, color, and width. Note: Since this indicator uses geometric drawings (line.new) to achieve full-height vertical lines, all visual settings (Color, Width, Style) are located in the Inputs Tab, not the Style tab.Indicador Pine Script®por louisq69Atualizado 14
Dual HTF EMAMulti-timeframe Exponential Moving Average (EMA) indicator plots two separate higher timeframe (HTF) EMAs of your choice. Displays four EMAs per HTF while providing optional background coloring (bullish/bearish). The background coloring occurs when two EMA's cross per HTF. User can select two of the four EMAs to determine the trend direction as they cross creating the background color. User can configure timeframe, EMA lengths, EMA cross and background, source, and visibility; separately for each timeframe. Default lengths are 9, 21, 50, 200 with source as closed and EMA cross background from EMA 1 and EMA 3. Also clear visual distinction using thick solid lines for HTF 1 and thin dashed lines for HTF 2. Uses request.security() with gaps=barmerge.gaps_on to avoid staircase effects on lower timeframes. This script is ideal for multi-timeframe analysis, helping traders align shorter-term price movements with broader trends from higher timeframes without cluttering the chart.Indicador Pine Script®por Eightgent7Atualizado 7
Monte Carlo Simulation BandsMonte Carlo Simulation v2.4.2 Plots a one-bar-ahead price distribution band built from many simulated paths. The green band shows empirical percentiles of simulated final prices—these are distribution bounds, not a confidence interval of the mean. What It Does Simulates many one-bar price paths using a directional random walk with volatility scaling (uniform shocks, not Gaussian GBM). Plots Mean Forecast, Median Forecast, and configurable percentile bounds (default 5th/95th). Optional rolling HTF-days mean line (yellow) for trend context. Optional labels and forward projection lines. Alerts when the confirmed close breaks above or below the percentile band. Non-Repainting & HTF Behavior (Fail-Closed) All calculations are gated to confirmed bars only via explicit no_repaint_ok gate (barstate.isconfirmed). If you select an HTF Resolution, the script uses a strict request.security(..., lookahead_off, gaps_off) pipeline. If HTF data is unavailable, outputs are na—no silent fallback to chart timeframe. A separate "HTF Alignment (lagged)" plot shows the prior HTF close (htf_price ) as visual proof of no look-ahead. Volatility Source & Scaling If "Use Historical Volatility" is enabled, volatility is estimated from log returns on the selected resolution (HTF if set, otherwise chart). Annualization adapts to session type: Equities: 6.5 hours/day, 252 trading days/year Crypto: 24 hours/day, 365 days/year Substeps increase path smoothness within the same one-bar horizon—they do not extend the forecast to multiple bars. Key Inputs • Prob Up / Prob Down — Must satisfy Prob Up + Prob Down ≤ 1.0. If violated, simulation is skipped and table shows "✗ PROB>1". • # Simulations / # Substeps — Higher = smoother/more stable, but slower. Default 100×100 is a good balance. • Lower/Upper Percentile — Define the band width (e.g., 5 and 95 for a 90% distribution band). • Run On Last Bar Only — Performance mode (recommended). Skips historical computation; updates on each new confirmed bar. • Resolution (HTF) — Leave blank for chart timeframe, or set to Weekly/Monthly for HTF-aligned simulation. • Crypto 24/7 Session? — Enable for crypto markets to use correct annualization (365d, 24h). How to Use (Quickstart) Start with defaults and keep Run On Last Bar Only = true for speed. Set Prob Up and Prob Down so their sum ≤ 1.0 (e.g., 0.5 + 0.5 = 1.0 for neutral). Enable "Use Historical Volatility" and set a Volatility Lookback (e.g., 20 bars) for data-driven vol. Set Resolution (HTF) if you want the model to run on higher timeframe data (e.g., 1W). Expect updates only when a new HTF interval starts. Choose percentiles (e.g., 5 and 95) to define your distribution band width. Enable alerts for "Price Above Upper Percentile" or "Price Below Lower Percentile" to get notified of breakouts. Limitations & Disclosures Forecast horizon is one bar only. Substeps do not create a multi-bar forecast. Model uses uniform shocks with direction chosen from Prob Up/Down. This is not Geometric Brownian Motion (GBM) and is not calibrated to any option-implied distribution. Bounds are percentiles of final simulated prices, not a statistical confidence interval of the mean. HTF mode updates at the start of a new HTF interval (first chart bar where the HTF timestamp changes), so the band appears "step-like" in realtime. Historical volatility requires enough bars for the selected lookback; until then, values may be na. Performance depends on Sims × Substeps; extreme settings (e.g., 500×500) can be slow. This indicator does not predict direction—it shows a probabilistic range based on your inputs. Indicador Pine Script®por actempletAtualizado 28
[LJ] HTF Candles with Volume POC [Highly Optimized]Welcome to the ultimate Higher Timeframe (HTF) fusion tool. This indicator seamlessly merges Higher Timeframe price action with precise volume profiling on Lower Timeframe (LTF) charts. By utilizing advanced array memory management, it bypasses TradingView's drawing limits to render clean HTF candle boxes and their exact Volume Point of Control (POC), ensuring peak performance and accuracy even on extreme timeframe combinations. 🔎 Visual Guide: What's on Your Chart? The Big Boxes (Wick & Body): These represent the Open, High, Low, and Close of your selected Higher Timeframe (e.g., a 1-Hour candle projected onto your 5-Minute chart). Color-coded for bullish/bearish momentum. The Midline: A horizontal line dividing the HTF candle perfectly in half. Useful for gauging if LTF price is in a "premium" or "discount" zone relative to the HTF. The Yellow Box (The POC): This is the Point of Control. When an HTF candle closes, this yellow box locks in place, showing the exact price zone that saw the highest volume accumulation during that period, calculated using precise LTF hlc3 price data. ⚙️ Key Settings & Configuration To get the most out of this indicator, check these inputs in the settings menu: Box Time Interval: Set this to your desired HTF (e.g., "1H", "4H", "D"). Tip: A good rule of thumb is an HTF that is 5x to 12x higher than your current chart. POC Resolution (Levels): This is your fine-tuning dial. Set to 50 - 100: Creates a very thin, precise POC line. Great for exact support/resistance levels. Set to 15 - 35: Creates a thicker POC "Zone". Great for capturing broader areas of high liquidity. Max Historical Boxes: Controls how far back the indicator draws. Keep this at 50 for a clean chart and fast loading times. 📈 Trading Strategies: How to Trade the HTF POC 1. The "Magnet" Mean Reversion High volume nodes (POCs) act as price magnets. If the current LTF price is far away from the previous HTF candle's POC, look for setups that trade back toward that yellow box. 2. The Break & Retest The POC box acts as a heavy Support/Resistance wall. If price breaks through the yellow POC box with strong momentum, look to enter on the retest of that box in the direction of the breakout. 3. Trend Continuation In a strong uptrend, look for the current LTF price to bounce off the Midline or the previous candle's POC to join the dominant HTF trend. ⚡ Performance Note This indicator uses advanced Pine Script Array Management. Unlike standard volume profile scripts that crash when calculating big timeframes, this indicator guarantees zero lag and no disappearing boxes, even when looking at a Daily HTF on a 1-Minute chart. 🙏 Credits This is a refactored and heavily optimized fusion of two great concepts: Original HTF Box logic by © krollo041 Original Volume Thermometer concept by © ChartPrime Merged, debugged, and optimized for v6 Array Management by ©Luki_eR Disclaimer: This script is for educational and informational purposes only and does not constitute financial advice.Indicador Pine Script®por Luki_eR26
eBacktesting Learning: HTF CandleseBacktesting - Learning: HTF Candles brings higher-timeframe candles directly onto your current chart, so you can keep your bigger-picture context while executing on the lower timeframe. Pick up to 4 timeframes (for example 15m / 30m / 1H / 4H) and the indicator will draw their candles neatly to the right of price. For each one you can choose to show the Current HTF candle (still forming) or the previously closed HTF candle, so you can train both “live context” and “closed-candle confirmation” workflows. You can also enable an optional flip alert per timeframe. A “flip” happens when that HTF candle changes from bullish to bearish (or the other way around). This is great for spotting shifts in bias without staring at multiple charts. These indicators are built to pair perfectly with the eBacktesting extension, where traders can practice these concepts step-by-step. Backtesting concepts visually like this is one of the fastest ways to learn, build confidence, and improve trading performance. Educational use only. Not financial advice.Indicador Pine Script®por eBacktestingAtualizado 12
cephxs + fadi / HTF PSPHTF PSP - PRECISION SWING POINTS Detect divergence-based Precision Swing Points (PSPs) across multiple higher timeframes with automatic correlated asset detection. WHAT'S NEW (vs Original HTF Candles) This indicator builds on @fadizeidan's excellent ICT HTF Candles foundation with significant new functionality, depending on who you ask of course: ✨ PSP Divergence Detection: Automatically identifies Precision Swing Points where price diverges from correlated assets—the original has no divergence analysis ✨ Auto Asset Correlation: Uses AssetCorrelationUtils library to detect and pair correlated assets (ES↔NQ↔DXY, BTC↔ETH, Gold↔Silver, etc.)—no manual setup required ✨ Multi-Asset Comparison: Tracks up to 3 correlated assets simultaneously with divergence relationships between all pairs ✨ Dynamic Asset Reordering: When you switch charts, the indicator automatically reorders assets so your chart is always primary ✨ Inverse Correlation Support: Properly handles inversely correlated assets like DXY (bullish DXY = bearish signal for risk assets) ✨ HTF Sweep Detection: New sweep line feature highlights when HTF candles take out previous highs/lows and close back inside. One of my followers asked me for this, there you go anon. 🔧 Streamlined to 3 HTFs: Focused design with 3 HTF slots (vs 6) for cleaner charts and better performance The original remains excellent for pure HTF candle visualization. This version adds institutional flow analysis through divergence detection. WHAT IT DOES This indicator displays Higher Timeframe (HTF) candles to the right of your chart and highlights Precision Swing Points—pivots where price diverges from correlated assets. When ES makes a new high but NQ doesn't follow, or gold pushes higher while DXY fails to confirm, you're looking at institutional repositioning. PSPs mark these moments on your HTF candles, giving you a clean visual signal for potential reversals. HOW IT WORKS Divergence Detection The indicator compares price action between your chart and up to two correlated assets. A divergence occurs when one asset makes a directional move (bullish/bearish candle) while a correlated asset moves the opposite direction. Three divergence relationships are tracked: Primary vs Secondary (e.g., ES vs NQ) Primary vs Tertiary (e.g., ES vs DXY) Secondary vs Tertiary (e.g., NQ vs DXY) PSP Confirmation A candle is marked as a PSP when: A divergence exists between correlated assets A swing pivot forms (high > previous high AND high > next high, or vice versa for lows) This dual confirmation filters noise and highlights only meaningful institutional activity. Automatic Asset Detection In Auto mode, the indicator uses the AssetCorrelationUtils library to detect your chart's asset class and automatically select the most relevant correlated pairs: Indices: ES ↔ NQ ↔ DXY, YM ↔ ES ↔ NQ Forex: EURUSD ↔ DXY ↔ GBPUSD, USDJPY ↔ DXY ↔ US10Y Crypto: BTC ↔ ETH ↔ DXY Metals: Gold ↔ Silver ↔ DXY Energy: CL (Oil) ↔ NG ↔ DXY HTF Sweep Detection Sweeps are detected when an HTF candle (C2) takes out the high or low of the previous candle (C1) and then closes back inside. This marks liquidity grabs on the higher timeframe. HOW TO USE Enable HTF timeframes: Select 1-3 higher timeframes relevant to your trading style (e.g., 30m, 90m, 4H for intraday traders) Watch for PSP candles: When a candle body color changes to the divergence color, a PSP has formed Note the direction: Bullish divergence (your asset bullish while correlated asset bearish) suggests upside; bearish divergence suggests downside Combine with LTF structure: Use PSPs as bias, then look for entry on lower timeframes (CHoCH, FVG, etc.) Sweeps confirm liquidity: A sweep followed by a PSP is a strong reversal signal INPUTS HTF Selection HTF 1/2/3: Enable/disable each HTF slot with timeframe and candle count Custom Daily Open: Use Midnight, 8:30, or 9:30 ET as daily candle open Styling Body/Border/Wick Colors: Customize bullish and bearish candle appearance Padding/Buffer/HTF Buffer: Control spacing between candles and timeframe groups Labels HTF Label: Show timeframe name above/below candles Remaining Time: Countdown to candle close Label Position: Top, Bottom, or Both Label Alignment: Align across timeframes or follow individual candles Interval Value: Show interval details on candles Imbalance Fair Value Gap: Highlight FVGs on HTF candles Volume Imbalance: Highlight VIs on HTF candles HTF Sweeps: Show sweep lines when C2 takes out C1's high/low Trace Trace Lines: Draw lines from HTF candle OHLC levels back to chart price Anchor: Anchor to first or last timeframe PSP Divergence Detection Precise Mode: Only highlight pivots on current asset (stricter confirmation) Divergence Body Colors: Custom colors for bullish/bearish divergence candles Asset Selection Correlation Preset: Auto (library-detected) or Manual Manual Assets 1/2/3: Specify custom correlated assets Invert Asset 3: Flip the bullish/bearish interpretation for inverse correlations (e.g., DXY) KEY FEATURES Multi-HTF Display: Up to 3 higher timeframes displayed simultaneously Auto Asset Detection: Automatically finds relevant correlated assets for your chart Dynamic Reordering: When you switch charts, assets reorder so the chart is always primary Inverse Correlation Support: Properly handles DXY and other inversely correlated assets HTF Sweep Detection: Highlights liquidity grabs on higher timeframes FVG/VI Detection: Fair Value Gaps and Volume Imbalances on HTF candles Remaining Time Counter: Know exactly when the next HTF candle closes BEST PRACTICES Use PSPs as directional bias, not direct entries—wait for LTF confirmation A PSP at a key level (previous day high, weekly open) carries more weight Multiple PSPs across different HTFs pointing the same direction = stronger signal Sweeps that fail to hold (sweep + PSP) often mark significant reversals In Auto mode, trust the library's asset selection—it's been tuned for common correlations DISCLAIMER This indicator is for educational purposes only and does not constitute financial advice. Divergences and PSPs do not guarantee reversals—always use proper risk management and confirm signals with your own analysis. Past performance does not guarantee future results. CREDITS Original HTF candle plotting concept by @fadizeidan. PSP divergence detection and asset correlation logic by cephxs & fstarcapital. Uses the AssetCorrelationUtils library by fstarcapital. Open Sourced For all. Enjoy. Made with ❤️ by cephxs + fadiIndicador Pine Script®por fstarcapital77638
HTF Candle Hourly Display**IMPORTANT:** For best visual results, move the indicator to the FIRST position in Object Tree: - Right-click on chart → Object Tree - Drag "Hour Display" to the top (first position above candles) - This ensures hour labels display cleanly behind candlesticks HOW TO USE: 1. Add to your H1 or higher timeframe chart 2. Adjust UTC offset to match current time (use 0 or 1 - try both to see which matches) 3. Customize text colors for bullish/bearish candles as needed 4. Enable/disable daily separator at 18:00 based on preference SETTINGS: • UTC Offset: Use 0 or 1 to match your current time. The correct value changes throughout the year due to daylight saving time (e.g., January may need 1, July may need 0). Simply try both values and use the one that displays correctly. • Bullish Candle Text Color: Color for labels on up candles (default: black) • Bearish Candle Text Color: Color for labels on down candles (default: white) • Show Daily Separator: Toggle 18:00 vertical line on/off • Daily Separator Color: Customize separator line color IMPORTANT: This indicator only works on H1 (1-hour) and higher timeframes. A warning will display if used on lower timeframes.Indicador Pine Script®por CandleSyntax22
ADR Daily & Session (Asia, London, NY) Range TrackerOVERVIEW: The Daily & Session Range Tracker provides comprehensive range analysis for daily and intraday trading sessions (Asia, London, NY) . This indicator is essential for traders who need to understand market volatility and typical price movement ranges across different trading sessions. KEY FEATURES: • Daily Range Tracking: Tracks the daily candle range starting from 18:00 (6 PM), aligning with the institutional trading day open • Session-Based Analysis: Monitors Asia (18:00-02:00), London (02:00-08:00), and NY (08:00-16:00) sessions • Statistical Analysis: Displays Current, Average, and Median ranges for each period • Customizable Lookback: Adjustable lookback period (1-20 days) for historical range calculation • Clean Table Display: Organized data table positioned in the bottom-right corner HOW TO USE: 1. Add the indicator to your chart 2. Adjust the lookback period to match your trading style (default: 10 days) 3. Customize session times if trading in a different timezone 4. Use the range data to set realistic profit targets and stop losses 5. Compare current range to average/median to gauge if price has room to move SETTINGS: • Lookback Period: Number of days to include in average/median calculations (1-20) • Text Color: Customize the table text color for visibility • Session Times: Adjust session start/end times for your timezone PERFECT FOR: ✓ Day traders monitoring session volatility ✓ Scalpers setting realistic targets based on average ranges ✓ Swing traders understanding daily movement potential ✓ Risk management and position sizing decisions NOTE: The daily range resets at 18:00 to align with institutional daily candle open times.Indicador Pine Script®por CandleSyntax6
Custom Timeframe Candles [Metrify]This script lets you build custom timeframe candles (like 7m, 11m, 2h, 3D, etc.) by manually aggregating price data from a lower chart timeframe. While it doesn’t fully replace TradingView’s native custom TF — especially in terms of perfect timestamp alignment, it gives you a very close (same calculation) and practical alternative for analysis. How it works Candles are manually aggregated from the current chart timeframe Instead of relying on request.security(), candles are constructed directly from the current chart data. For best results, use a chart timeframe that is divisible and as close as possible to your custom timeframe Example: Custom TF = 10m → use 5m chart (1m chart also works, but the gap will be larger and less efficient) Smaller gaps = cleaner candles, better visual accuracy, and smoother updates Indicador Pine Script®por Metrify16
HTF Long/Short 1hr This is one of my latest algo it helps with your long and short bias for GC on the 1HR HTFIndicador Pine Script®por Birels21
Day Trading Signals Trend & Momentum Buy/Sell [CocoChoco]Day Trading Signals: Trend & Momentum Buy/Sell Overview The indicator is a comprehensive day-trading tool designed to identify high-probability entries by aligning short-term momentum with long-term trend confluence. It filters out low-volatility "choppy" markets using ADX and ensures you are always trading in the direction of the dominant higher-timeframe trend. Important: Use on timeframes from 15 min to 2 hours, as the indicator is for day trading only. How It Works The script uses a three-layer confirmation system: Trend Alignment: Uses a Fast/Slow SMA cross (10/50) on the current chart. Signal prints only if price closes above (for bullish) or below (for bearish) the 10-period SMA. Higher Timeframe Confluence: The script automatically looks at a higher timeframe (1H for charts <=15m, and 4H for others) and checks if the price is above/below a 200-period SMA. Momentum & Volatility: Signals are only triggered if the Stochastic Oscillator is rising/falling and the ADX is above 20, ensuring there is enough "strength" behind the move. Visual Signals Buy/Sell Green Label (Up Arrow): Bullish entry signal Red Label (Down Arrow): Bearish entry signal. Red "X": Exit signal based on a moving average crossover (trend exhaustion). Visual Risk/Reward (1:1) Boxes: When a signal appears, the script automatically draws a projection of your Stop Loss (Red) and Take Profit (Green) based on the current ATR (Average True Range). How to Use Entry: Enter when a Label appears. Ensure the candle has closed to confirm the signal. Stop Loss/Take Profit: Use the visual boxes as a guide. The default is 1.0 ATR for risk and 1.0 RR ratio, which can be adjusted in the settings. Exit: Exit the trade either at the target boxes or when the Red "X" appears, indicating the trend has shifted. Please note that this is just a tool, not financial advice. Perform your own analysis before entering a trade.Indicador Pine Script®por CocoChoco1Atualizado 56
HTF Candles on Lower Timeframes (Manual OHLC)Hi everyone, this indicator is designed to plot higher timeframes candles on the chart. Here are the details: The data is built directly from OHLC values at specific time intervals, instead of using request.security. It supports 1H / 2H / 4H / 8H / 1D higher timeframes, and can be viewed on lower timeframes such as 5m / 10m / 15m / 30m. The main idea behind this chart is to serve as a foundation for building other indicators that need to operate on higher timeframes while still being visualized on lower timeframes. Feel free to share your feedback or ideas for improvement in the comments below.Indicador Pine Script®por begril51
VCAI Stochastic RSI+VCAI Stoch RSI+ is a cleaned-up Stochastic RSI built with V-Core colours for faster, clearer momentum reads and more reliable OB/OS signals. What it shows: Purple %K line → bearish momentum strengthening Yellow %D line → bullish momentum building and smoothing Soft purple/yellow background bands → OB/OS exhaustion zones, not just raw 80/20 triggers Midline at 50 → balance point where momentum shifts between bull- and bear-side control Optional HTF mode → run Stoch RSI from any timeframe while viewing it on your current chart How to read it: Both lines rising out of OS → early bullish shift; pullbacks that hold direction favour continuation Both lines falling from OB → early bearish shift; bounces into the purple OB zone can become fade setups Lines stacked and moving together → strong, cleaner momentum Lines crossing repeatedly → low-conviction, choppy conditions OB/OS shading highlights exhaustion so you focus on moves with context, not every 80/20 tick Why it’s different: Classic Stoch RSI is hyper-sensitive and mostly noise. VCAI Stoch RSI+ applies V-Core’s colour-driven regime logic, controlled OB/OS shading, and optional HTF smoothing so you see momentum structure instead of clutter — making it easier to judge when momentum is genuinely shifting and when it’s just another wiggle.Indicador Pine Script®por Vectorcoresai22
HTF Frequency Zone [BigBeluga]🔵 OVERVIEW HTF Frequency Zone highlights the dominant price level (Point of Control) and the full high–low expansion of any higher timeframe — Daily, Weekly, or Monthly. It captures the frequency of closes inside each HTF candle and plots the most traded “frequency zone”, allowing traders to easily see where price spent the most time and where buy/sell pressure accumulated. This tool transforms each higher-timeframe bar into a fully visualized structure: • Top = HTF high • Bottom = HTF low • Midline = HTF Frequency POC • Color-coded zones = bullish or bearish bias • Labels = counts of bullish and bearish candles inside the HTF range It is designed to give traders an immediate understanding of high-timeframe balance, imbalance, and price attraction zones. 🔵 CONCEPTS HTF Partitioning — Each Weekly/Daily/Monthly candle is converted into a dedicated zone with its own High, Low, and Frequency Point of Control. Frequency POC (Most Touched Price) — The indicator divides the HTF range into 100 bins and counts how many times price closed near each level. Dominant Zone — The level with the highest frequency becomes the HTF “Value Zone,” plotted as a bold central line. Directional Bias — • Bullish HTF zone • Bearish HTF zone Internal Candle Counting — Within each HTF period the indicator counts: • Buy candles (close > open) • Sell candles (close < open) This reveals whether intraperiod flow was bullish or bearish. HTF Structure Blocks — High, Low, and POC are connected across the entire higher-timeframe duration, showing the real shape of HTF balance. 🔵 FEATURES Automatic HTF Zone Construction — Generates a complete price zone every time the selected timeframe flips (Daily / Weekly / Monthly). Dynamic High & Low Extraction — The indicator scans every bar inside the HTF window to find true extremes of the range. 100-Level Frequency Scan — Each close within the period is assigned to a bin, creating a detailed distribution of price interaction. HTF POC Highlighting — The most frequent price level is plotted with a bold red line for immediate visual clarity. Bull/Bear Coloring — • Green → Bullish HTF zone. • Orange → Bearish HTF zone. Zone Shading — High–Low range is filled with a semi-transparent color matching trend direction. Buy/Sell Candle Counters — Printed at the top and bottom of each HTF block, showing how many internal candles were bullish or bearish. POC Label — Displays frequency count (how many touches) at the POC level. Adaptive Threshold Warning — If bars inside the HTF window are too few (<10), the indicator warns the trader to switch timeframe. 🔵 HOW TO USE Higher-Timeframe Biasing — Read the zone color to determine if the HTF candle leaned bullish or bearish. Value Zone Reactions — Price often reacts to the Frequency POC; use it as support/resistance or liquidity magnet. Range Context — Identify when price is trading near HTF highs (breakout potential) or lows (reversal potential). Momentum Evaluation — More bullish internal candles = internal buying pressure; more bearish = internal selling pressure. Swing Trading — Use HTF zones as the “macro map,” then execute trades on lower timeframes aligned with the zone structure. Liquidity Awareness — The HTF POC often aligns with algorithmic liquidity levels, making it a strong reaction point. 🔵 CONCLUSION HTF Frequency Zone transforms raw higher-timeframe candles into detailed distribution zones that reveal true market behavior inside the HTF structure. By showing highs, lows, buying/selling activity, and the most interacted price level (Frequency POC), this tool becomes invaluable for traders who want to align executions with powerful HTF levels, liquidity magnets, and structural zones.Indicador Pine Script®por BigBeluga33 1.3 K
Range Lattice## RangeLattice RangeLattice constructs a higher-timeframe scaffolding on any intraday chart, locking in structural highs/lows, mid/quarter grids, VWAP confluence, and live acceptance/break analytics. It provides a non-repainting overlay that turns range management into a disciplined process. HOW IT WORKS Structure Harvesting – Using request.security() , the script samples highs/lows from a user-selected timeframe (default 240 minutes) over a configurable lookback to establish the dominant range. Grid Construction – Midpoint and quarter levels are derived mathematically, mirroring how institutional traders map distribution/accumulation zones. Acceptance Detection – Consecutive closes inside the range flip an acceptance flag and darken the cloud, signaling balanced auction conditions. Break Confirmation – Multi-bar closes outside the structure raise break labels and alerts, filtering the countless fake-outs that plague breakout traders. VWAP Fan Overlay – Session VWAP plus ATR-based bands provide a live measure of flow centering relative to the lattice. HOW TO USE IT Range Plays : Fade taps of the outer rails only when acceptance is active and VWAP sits inside the grid—this is where mean-reversion works best. Breakout Plays : Wait for confirmed break labels before entering expansion trades; the dashboard's Width/ATR metric tells you if the expansion has enough fuel. Market Prep : Carry the same lattice from pre-market into regular trading hours by keeping the structure timeframe fixed; alerts keep you notified even when managing multiple tickers. VISUAL FEATURES Range Tap and Mid Pivot markers provide a tape-reading breadcrumb trail for journaling. Cloud fill opacity tightens when acceptance persists, visually signaling balance compressions ready to break. Dashboard displays absolute width, ATR-normalized width, and current state (Balanced vs Transitional) so you can glance across charts quickly. Acceptance Flag toggle: Keep the repeated acceptance squares hidden until you need to audit balance. PARAMETERS Structure Timeframe (default: 240): Choose the timeframe whose ranges matter most (4H for indices, Daily for stocks). Structure Lookback (default: 60): Bars sampled on the structure timeframe. Acceptance Bars (default: 8): How many consecutive bars inside the range confirm balance. Break Confirmation Bars (default: 3): Bars required outside the range to validate a breakout. ATR Reference (default: 14): ATR period for width normalization. Show Midpoint Grid (default: enabled): Display the midpoint and quarter levels. Show Adaptive VWAP Fan (default: enabled): Toggle the VWAP channel for assets where volume distribution matters most. Show Acceptance Flags (default: disabled): Turn the acceptance markers on/off for maximum visual control. Show Range Dashboard (default: enabled): Disable if screen space is limited, re-enable during prep sessions. ALERTS The indicator includes five alert conditions: Range High Tap: Price interacted with the RangeLattice high Range Low Tap: Price interacted with the RangeLattice low Range Mid Tap: Price interacted with the RangeLattice mid Range Break Up: Confirmed upside breakout Range Break Down: Confirmed downside breakout Where it works best This indicator works best on liquid instruments with clear structural levels. On very low timeframes (1-minute and below), the structure may update too frequently to be useful. The acceptance/break confirmation system requires patience—faster traders may find the multi-bar confirmation too slow for scalping. The VWAP fan is session-based and resets daily, which may not suit all trading styles. Indicador Pine Script®por officialjackofalltrades18
FluxPulse Beacon## FluxPulse Beacon FluxPulse Beacon applies a microstructure lens to every bar, combining directional thrust, realized volatility, and multi-timeframe liquidity checks to decide whether the tape is being pushed by real sponsorship or just noise. The oscillator's color-coded columns and adaptive burst thresholds transform complex flow dynamics into a single actionable flux score for futures and equities traders. HOW IT WORKS Momentum Extraction – Price differentials over a configurable pulse distance are smoothed using exponential moving averages to isolate directional thrust without reacting to single prints. Volatility + Liquidity Normalization – The momentum stream is divided by realized volatility and multiplied by both local and higher-timeframe EMA volume ratios, ensuring pulses only appear when volatility and liquidity align. Adaptive Thresholding – A volatility-derived standard deviation of flux is blended with the base threshold so bursts scale automatically between low-volatility and high-volatility market conditions. Divergence Engine – Linear regression slopes compare price vs. flux to tag bullish/bearish divergences, highlighting stealth accumulation or distribution zones. HOW TO USE IT Continuation Entries : Go with the trend when histogram bars stay above the adaptive threshold, the signal line confirms, and trend bias agrees—this is where liquidity-backed follow-through lives. Fade Plays : Watch for divergence alerts and shrinking compression values; when flux prints below zero yet price grinds higher, hidden selling pressure often precedes rollovers. Session Filter : Compression percentage in the diagnostics table instantly tells you whether to trade thin overnight sessions—low compression means stand down. VISUAL FEATURES Dynamic background heat maps flux magnitude, while threshold lines provide a quick read on whether a pulse is statistically significant. Diagnostics table displays live flux, signal, adaptive threshold, and compression for quick reference. Alert-first workflow: The surface is intentionally clean—bursts and divergences are delivered via alerts instead of on-chart clutter. PARAMETERS Trend EMA Length (default: 34): Defines the macro bias anchor; increase for higher-timeframe confirmation. Pulse Distance (default: 8): Controls how sensitive momentum extraction becomes. Volatility Window (default: 21): Sample window for realized volatility normalization. Liquidity Window (default: 55): Volume smoothing window that proxies liquidity expansion. Liquidity Reference TF (default: 60): Select a higher timeframe to cross-check whether current volume matches institutional flows. Adaptive Threshold (default: enabled): Disable for fixed thresholds on slower markets; enable for high-volatility assets. Base Burst Threshold (default: 1.25): Minimum flux magnitude that qualifies as an actionable pulse. ALERTS The indicator includes four alert conditions: Bull Burst: Detects upside liquidity pulses Bear Burst: Detects downside liquidity pulses Bull Divergence: Flags bullish delta divergence Bear Divergence: Flags bearish delta divergence LIMITATIONS This indicator is designed for liquid futures and equity markets. Performance may degrade in low-volume or highly illiquid instruments. The adaptive threshold system works best on timeframes where sufficient volatility history exists (typically 15-minute charts and above). Divergence signals are probabilistic and should be confirmed with price action. INSERT_CHART_SNAPSHOT_URL_HERE --- ## RangeLattice Mapper RangeLattice Mapper constructs a higher-timeframe scaffolding on any intraday chart, locking in structural highs/lows, mid/quarter grids, VWAP confluence, and live acceptance/break analytics. It provides a non-repainting overlay that turns range management into a disciplined process. HOW IT WORKS Structure Harvesting – Using request.security() , the script samples highs/lows from a user-selected timeframe (default 240 minutes) over a configurable lookback to establish the dominant range. Grid Construction – Midpoint and quarter levels are derived mathematically, mirroring how institutional traders map distribution/accumulation zones. Acceptance Detection – Consecutive closes inside the range flip an acceptance flag and darken the cloud, signaling balanced auction conditions. Break Confirmation – Multi-bar closes outside the structure raise break labels and alerts, filtering the countless fake-outs that plague breakout traders. VWAP Fan Overlay – Session VWAP plus ATR-based bands provide a live measure of flow centering relative to the lattice. HOW TO USE IT Range Plays : Fade taps of the outer rails only when acceptance is active and VWAP sits inside the grid—this is where mean-reversion works best. Breakout Plays : Wait for confirmed break labels before entering expansion trades; the dashboard's Width/ATR metric tells you if the expansion has enough fuel. Market Prep : Carry the same lattice from pre-market into regular trading hours by keeping the structure timeframe fixed; alerts keep you notified even when managing multiple tickers. VISUAL FEATURES Range Tap and Mid Pivot markers provide a tape-reading breadcrumb trail for journaling. Cloud fill opacity tightens when acceptance persists, visually signaling balance compressions ready to break. Dashboard displays absolute width, ATR-normalized width, and current state (Balanced vs Transitional) so you can glance across charts quickly. Acceptance Flag toggle: Keep the repeated acceptance squares hidden until you need to audit balance. PARAMETERS Structure Timeframe (default: 240): Choose the timeframe whose ranges matter most (4H for indices, Daily for stocks). Structure Lookback (default: 60): Bars sampled on the structure timeframe. Acceptance Bars (default: 8): How many consecutive bars inside the range confirm balance. Break Confirmation Bars (default: 3): Bars required outside the range to validate a breakout. ATR Reference (default: 14): ATR period for width normalization. Show Midpoint Grid (default: enabled): Display the midpoint and quarter levels. Show Adaptive VWAP Fan (default: enabled): Toggle the VWAP channel for assets where volume distribution matters most. Show Acceptance Flags (default: disabled): Turn the acceptance markers on/off for maximum visual control. Show Range Dashboard (default: enabled): Disable if screen space is limited, re-enable during prep sessions. ALERTS The indicator includes five alert conditions: Range High Tap: Price interacted with the RangeLattice high Range Low Tap: Price interacted with the RangeLattice low Range Mid Tap: Price interacted with the RangeLattice mid Range Break Up: Confirmed upside breakout Range Break Down: Confirmed downside breakout LIMITATIONS This indicator works best on liquid instruments with clear structural levels. On very low timeframes (1-minute and below), the structure may update too frequently to be useful. The acceptance/break confirmation system requires patience—faster traders may find the multi-bar confirmation too slow for scalping. The VWAP fan is session-based and resets daily, which may not suit all trading styles. ---Indicador Pine Script®por officialjackofalltrades23
One for AllOne for All (OFA) - Complete ICT Analysis Suite Version 3.3.0 by theCodeman 📊 Overview One for All (OFA) is a comprehensive TradingView indicator designed for traders who follow Inner Circle Trader (ICT) concepts. This all-in-one tool combines essential ICT analysis features—sessions, kill zones, previous period levels, and higher timeframe candles with Fair Value Gaps (FVGs) and Volume Imbalances (VIs)—into a single, highly customizable indicator. Whether you're a beginner learning ICT concepts or an experienced trader refining your edge, OFA provides the visual structure needed for precise market analysis and execution. ✨ Key Features - 🏷️ Customizable Watermark**: Display your trading identity with customizable titles, subtitles, symbol info, and full style control - 🌍 Trading Sessions**: Visualize Asian, London, and New York sessions with high/low lines, range boxes, and open/close markers - 🎯 Kill Zones**: Highlight 5 critical ICT kill zones with precise timing and visual boxes - 📈 Previous Period H/L**: Track Daily, Weekly, and Monthly highs/lows with customizable styles and lookback periods - 🕐 Higher Timeframe Candles**: Display up to 5 HTF timeframes with OHLC trace lines, timers, and interval labels - 🔍 FVG & VI Detection**: Automatically detect and visualize Fair Value Gaps and Volume Imbalances on HTF candles - ⚙️ Universal Timezone Support**: Works globally with GMT-12 to GMT+14 timezone selection - 🎨 Full Customization**: Control colors, styles, visibility, and layout for every feature 🚀 How to Use Watermark Setup The watermark overlay helps you identify your charts and maintain focus on your trading principles: 1. Enable/disable watermark via "Show Watermark" toggle 2. Customize the title (default: "Name") to display your trading name or account identifier 3. Set up to 3 subtitles (default: "Patience", "Confidence", "Execution") as trading reminders 4. Choose position (9 locations available), size, color, and transparency 5. Toggle symbol and timeframe display as needed Use Case: Display your trading principles or account name for multi-monitor setups or content creation. Trading Sessions Analysis Sessions define market character and liquidity availability: 1. Enable "Show All Sessions" to visualize all three sessions 2. Adjust timezone to match your local market (default: UTC-5 for EST) 3. Customize session times if needed (defaults cover standard hours) 4. Enable session range boxes to see consolidation zones 5. Use session high/low lines to identify key levels for the current session 6. Enable open/close markers to track session transitions Use Case: Identify which session you're trading in, track session highs/lows for liquidity, and anticipate session transition volatility. Kill Zones Trading Kill zones are ICT's high-probability trading windows: 1. Enable individual kill zones or use "Show All Kill Zones" 2. **Asian Kill Zone** (2000-0000 GMT): Early positioning and smart money accumulation 3. **London Kill Zone** (0300-0500 GMT): European market opening volatility 4. **NY AM Kill Zone** (0930-1100 EST): Post-NYSE open expansion 5. **NY Lunch Kill Zone** (1200-1300 EST): Midday consolidation or manipulation 6. **NY PM Kill Zone** (1330-1600 EST): Afternoon positioning and closes 7. Customize colors and times to match your trading style 8. Set max days display to control historical visibility (default: 30 days) Use Case: Focus entries during high-probability windows. Watch for liquidity sweeps at kill zone openings and institutional positioning. Previous Period High/Low Levels Previous period levels act as magnetic price targets and support/resistance: 1. Enable Daily (PDH/PDL), Weekly (PWH/PWL), or Monthly (PMH/PML) levels individually 2. Set lookback period (how many previous periods to display) 3. Choose line style: Solid (current emphasis), Dashed (standard), or Dotted (subtle) 4. Customize colors per timeframe for visual hierarchy 5. Adjust line width (1-5) for visibility preference 6. Enable gradient effect to fade older periods 7. Position labels left or right based on chart layout 8. Customize label text for your preferred notation Use Case: Identify key levels where price is likely to react. Daily levels work on intraday timeframes, Weekly on daily charts, Monthly for swing trading. Higher Timeframe (HTF) Candles HTF candles reveal the larger market context while trading lower timeframes: 1. Enable up to 5 HTF slots simultaneously (default: 5m, 15m, 1H, 4H, Daily) 2. Choose display mode: "Below Chart" (stacked rows) or "Right Side" (compact column) 3. Customize timeframe, colors (bull/bear), and titles for each slot 4. **OHLC Trace Lines**: Visual lines connecting HTF candle levels to chart bars 5. **HTF Timer**: Countdown showing time remaining until HTF candle close 6. **Interval Labels**: Display day of week (Daily+) or time (intraday) on each candle 7. For Daily candles: Choose open time (Midnight, 8:30, 9:30) to match your market structure preference Use Case: Trade lower timeframes while respecting higher timeframe structure. Watch for HTF candle closes to confirm directional bias. FVG & VI Detection Fair Value Gaps and Volume Imbalances highlight inefficiencies that price often revisits: 1. **Fair Value Gaps (FVGs)**: Detected when HTF candle wicks don't overlap between 3 consecutive candles - Bullish FVG: Gap between candle 1 high and candle 3 low (green box by default) - Bearish FVG: Gap between candle 1 low and candle 3 high (red box by default) 2. **Volume Imbalances (VIs)**: Similar detection but focuses on body gaps - Bullish VI: Gap between candle 1 close and candle 3 open - Bearish VI: Gap between candle 1 open and candle 3 close 3. Enable FVG/VI detection per HTF slot individually 4. Customize colors and transparency for each imbalance type 5. Boxes appear on chart at formation and remain visible as retracement targets **Use Case**: Identify high-probability retracement zones. Price often returns to fill FVGs and VIs before continuing the trend. Use as entry zones or profit targets. 🎨 Customization OFA is built for flexibility. Every feature includes extensive customization options: Visual Customization - **Colors**: Independent color control for every element (sessions, kill zones, lines, labels, FVGs, VIs) - **Transparency**: Adjust box and label transparency (0-100%) for clean charts - **Line Styles**: Choose Solid, Dashed, or Dotted for previous period lines - **Sizes**: Control text size, line width, and box borders - **Positions**: Place watermark in 9 positions, labels left/right Layout Control - **HTF Display Mode**: "Below Chart" for detailed analysis, "Right Side" for space efficiency - **Drawing Limits**: Set max days for sessions/kill zones to manage chart clutter - **Lookback Periods**: Control how many previous periods to display (1-10) - **Gradient Effects**: Enable fading for older previous period lines Timing Adjustments - **Timezone**: Universal GMT offset selector (-12 to +14) for global markets - **Session Times**: Customize each session's start/end times - **Kill Zone Times**: Adjust kill zone windows to match your market's characteristics - **Daily Open**: Choose Midnight, 8:30, or 9:30 for Daily HTF candle open time 💡 Best Practices 1. Start Simple: Enable one feature at a time to learn how each element affects your analysis 2. Match Your Timeframe: Use Daily levels on intraday charts, Weekly on daily charts, HTF candles one or two levels above your trading timeframe 3. Kill Zone Focus: Concentrate your trading activity during kill zones for higher probability setups 4. HTF Confirmation: Wait for HTF candle closes before committing to directional bias 5. FVG/VI Entries: Look for price to return to unfilled FVGs/VIs for entry opportunities with favorable risk/reward 6. Customize Colors: Use a consistent color scheme that matches your chart theme and reduces visual fatigue 7. Reduce Clutter: Disable features you're not actively using in your current trading plan 8. Session Context: Understand which session controls the market—trade with session direction or anticipate reversals at session transitions ⚙️ Settings Guide OFA organizes settings into logical groups for easy navigation: - **═══ WATERMARK ═══**: Title, subtitles, position, style, symbol/timeframe display - **═══ SESSIONS ═══**: Enable/disable sessions, times, colors, high/low lines, boxes, markers - **═══ KILL ZONES ═══**: Individual kill zone toggles, times, colors, max days display - **═══ PREVIOUS H/L - DAILY ═══**: Daily high/low lines, style, color, lookback, labels - **═══ PREVIOUS H/L - WEEKLY ═══**: Weekly high/low lines, style, color, lookback, labels - **═══ PREVIOUS H/L - MONTHLY ═══**: Monthly high/low lines, style, color, lookback, labels - **═══ HTF CANDLES ═══**: Global display mode, layout settings - **═══ HTF SLOT 1-5 ═══**: Individual HTF configuration (timeframe, colors, title, FVG/VI detection, trace lines, timer, interval labels) Each setting includes tooltips explaining its function. Hover over any input for detailed guidance. 📝 Final Notes One for All (OFA) represents a complete ICT analysis toolkit in a single indicator. By combining watermark customization, session visualization, kill zone highlighting, previous period levels, and higher timeframe candles with FVG/VI detection, OFA eliminates the need for multiple indicators cluttering your chart. **Version**: 3.3.0 **Author**: theCodeman **Pine Script**: v6 **License**: Mozilla Public License 2.0 Start with default settings to learn the indicator's structure, then customize extensively to match your personal trading style. Remember: tools provide information, but your edge comes from disciplined execution of a proven strategy. Happy Trading! 📈 Indicador Pine Script®por Arslan_cs91
RSI HTF Hardcoded (A/B Presets) + Regimes [CHE]RSI HTF Hardcoded (A/B Presets) + Regimes — Higher-timeframe RSI emulation with acceptance-based regime filter and on-chart diagnostics Summary This indicator emulates a higher-timeframe RSI on the current chart by resolving hardcoded “HTF-like” lengths from a time-bucket mapping, avoiding cross-timeframe requests. It computes RSI on a resolved length, smooths it with a resolved moving average, and derives a histogram-style difference (RSI minus its smoother). A four-state regime classifier is gated by a dead-band and an acceptance filter requiring consecutive bars before a regime is considered valid. An on-chart table reports the active preset, resolved mapping tag, resolved lengths, and the current filtered regime. Pine version: v6 Overlay: false Primary outputs: RSI line, SMA(RSI) line, RSI–SMA histogram columns, reference levels (30/50/70), regime-change alert, info table Motivation Cross-timeframe RSI implementations often rely on `request.security`, which can introduce repaint pathways and additional update latency. This design uses deterministic, on-series computation: it infers a coarse target bucket (or uses a forced bucket) and resolves lengths accordingly. The dead-band reduces noise at the decision boundaries (around RSI 50 and around the RSI–SMA difference), while the acceptance filter suppresses rapid flip-flops by requiring sustained agreement across bars. Differences Baseline: Standard RSI with a user-selected length on the same timeframe, or HTF RSI via cross-timeframe requests. Key differences: Hardcoded preset families and a bucket-based mapping to resolve “HTF-like” lengths on the current chart. No `request.security`; all calculations run on the chart’s own series. Regime classification uses two independent signals (RSI relative to 50 and RSI–SMA difference), gated by a configurable dead-band and an acceptance counter. Always-on diagnostics via a persistent table (optional), showing preset, mapping tag, resolved lengths, and filtered regime. Practical effect: The oscillator behaves like a slower, higher-timeframe variant with more stable regime transitions, at the cost of delayed recognition around sharp turns (by design). How it works 1. Bucket selection: The script derives a coarse “target bucket” from the chart timeframe (Auto) or uses a user-forced bucket. 2. Length resolution: A chosen preset defines base lengths (RSI length and smoothing length). A bucket/timeframe mapping resolves a multiplier, producing final lengths used for RSI and smoothing. 3. Oscillator construction: RSI is computed on the resolved RSI length. A moving average of RSI is computed on the resolved smoothing length. The difference (RSI minus its smoother) is used as the histogram series. 4. Regime classification: Four regimes are defined from: RSI relative to 50 (bullish above, bearish below), with a dead-band around 50 Difference relative to 0 (positive/negative), with a dead-band around 0 These two axes produce strong/weak bull and bear states, plus a neutral state when inside the dead-band(s). 5. Acceptance filter: The raw regime must persist for `n` consecutive bars before it becomes the filtered regime. The alert triggers when the filtered regime changes. 6. Diagnostics and visualization: Histogram columns change shade based on sign and whether the difference is rising/falling. The table displays preset, mapping tag, resolved lengths, and the filtered regime description. Parameter Guide Source — Input series for RSI — Default: Close — Smoother sources reduce noise but add lag. Preset — Base lengths family — Default: A(14/14) — Switch presets to change RSI and smoothing responsiveness. Target Bucket — Auto or forced bucket — Default: Auto — Force a bucket to lock behavior across chart timeframe changes. Table X / Table Y — Table anchor — Default: right / top — Move to avoid covering content. Table Size — Table text size — Default: normal — Increase for presentations, decrease for dense layouts. Dark Mode — Table theme — Default: enabled — Match chart background for readability. Show Table — Toggle diagnostics table — Default: enabled — Disable for a cleaner pane. Epsilon (dead-band) — Noise gate for decisions — Default: 1.0 — Raise to reduce flips near boundaries; lower to react faster. Acceptance bars (n) — Bars required to confirm a regime — Default: 3 — Higher reduces whipsaw; lower increases reactivity. Reading Histogram (RSI–SMA): Above zero indicates RSI is above its smoother (positive momentum bias). Below zero indicates RSI is below its smoother (negative momentum bias). Darker/lighter shading indicates whether the difference is increasing or decreasing versus the previous bar. RSI vs SMA(RSI): RSI’s position relative to 50 provides broad directional bias. RSI’s position relative to its smoother provides momentum confirmation/contra-signal. Regimes: Strong bull: RSI meaningfully above 50 and difference meaningfully above 0. Weak bull: RSI above 50 but difference below 0 (pullback/transition). Strong bear: RSI meaningfully below 50 and difference meaningfully below 0. Weak bear: RSI below 50 but difference above 0 (pullback/transition). Neutral: inside the dead-band(s). Table: Use it to validate the active preset, the mapping tag, the resolved lengths, and the filtered regime output. Workflows Trend confirmation: Favor long bias when strong bull is active; favor short bias when strong bear is active. Treat weak regimes as pullback/transition context rather than immediate reversals, especially with higher acceptance. Structure + oscillator: Combine regimes with swing structure, breakouts, or a baseline trend filter to avoid trading against dominant structure. Use regime change alerts as a “state change” notification, not as a standalone entry. Multi-asset consistency: The bucket mapping helps keep a consistent “feel” across different chart timeframes without relying on external timeframe series. Behavior/Constraints Intrabar behavior: No cross-timeframe requests are used; values can still evolve on the live bar and settle at close depending on your chart/update timing. Warm-up requirements: Large resolved lengths require sufficient history to seed RSI and smoothing. Expect a warm-up period after loading or switching symbols/timeframes. Latency by design: Dead-band and acceptance filtering reduce noise but can delay regime changes during sharp reversals. Chart types: Intended for standard time-based charts. Non-time-based or synthetic chart types (e.g., Heikin-Ashi, Renko, Kagi, Point-and-Figure, Range) can distort oscillator behavior and regime stability. Tuning Too many flips near decision boundaries: Increase Epsilon and/or increase Acceptance bars. Too sluggish in clean trends: Reduce Acceptance bars by one, or choose a faster preset (shorter base lengths). Too sensitive on lower timeframes: Choose a slower preset (longer base lengths) or force a higher Target Bucket. Want less clutter: Disable the table and keep only the alert + plots you need. What it is/isn’t This indicator is a regime and visualization layer for RSI using higher-timeframe emulation and stability gates. It is not a complete trading system and does not provide position sizing, risk management, or execution rules. Use it alongside structure, liquidity/volatility context, and protective risk controls. Disclaimer The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context. Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved. By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk. Best regards and happy trading Chervolino. Indicador Pine Script®por chervolino1127
LibTmFrLibrary "LibTmFr" This is a utility library for handling timeframes and multi-timeframe (MTF) analysis in Pine Script. It provides a collection of functions designed to handle common tasks related to period detection, session alignment, timeframe construction, and time calculations, forming a foundation for MTF indicators. Key Capabilities: 1. **MTF Period Engine:** The library includes functions for managing higher-timeframe (HTF) periods. - **Period Detection (`isNewPeriod`):** Detects the first bar of a given timeframe. It includes custom logic to handle multi-month and multi-year intervals where `timeframe.change()` may not be sufficient. - **Bar Counting (`sinceNewPeriod`):** Counts the number of bars that have passed in the current HTF period or returns the final count for a completed historical period. 2. **Automatic Timeframe Selection:** Offers functions for building a top-down analysis framework: - **Automatic HTF (`autoHTF`):** Suggests a higher timeframe (HTF) for broader context based on the current timeframe. - **Automatic LTF (`autoLTF`):** Suggests an appropriate lower timeframe (LTF) for granular intra-bar analysis. 3. **Timeframe Manipulation and Comparison:** Includes tools for working with timeframe strings: - **Build & Split (`buildTF`, `splitTF`):** Functions to programmatically construct valid Pine Script timeframe strings (e.g., "4H") and parse them back into their numeric and unit components. - **Comparison (`isHigherTF`, `isActiveTF`, `isLowerTF`):** A set of functions to check if a given timeframe is higher, lower, or the same as the script's active timeframe. - **Multiple Validation (`isMultipleTF`):** Checks if a higher timeframe is a practical multiple of the current timeframe. This is based on the assumption that checking if recent, completed HTF periods contained more than one bar is a valid proxy for preventing data gaps. 4. **Timestamp Interpolation:** Contains an `interpTimestamp()` function that calculates an absolute timestamp by interpolating at a given percentage across a specified range of bars (e.g., 50% of the way through the last 20 bars), enabling time calculations at a resolution finer than the chart's native bars. --- **DISCLAIMER** This library is provided "AS IS" and for informational and educational purposes only. It does not constitute financial, investment, or trading advice. The author assumes no liability for any errors, inaccuracies, or omissions in the code. Using this library to build trading indicators or strategies is entirely at your own risk. As a developer using this library, you are solely responsible for the rigorous testing, validation, and performance of any scripts you create based on these functions. The author shall not be held liable for any financial losses incurred directly or indirectly from the use of this library or any scripts derived from it. buildTF(quantity, unit) Builds a Pine Script timeframe string from a numeric quantity and a unit enum. The resulting string can be used with `request.security()` or `input.timeframe`. Parameters: quantity (int) : series int Number to specifie how many `unit` the timeframe spans. unit (series TFUnit) : series TFUnit The size category for the bars. Returns: series string A Pine-style timeframe identifier, e.g. "5S" → 5-seconds bars "30" → 30-minute bars "120" → 2-hour bars "1D" → daily bars "3M" → 3-month bars "24M" → 2-year bars splitTF(tf) Splits a Pine‑timeframe identifier into numeric quantity and unit (TFUnit). Parameters: tf (string) : series string Timeframe string, e.g. "5S", "30", "120", "1D", "3M", "24M". Returns: quantity series int The numeric value of the timeframe (e.g., 15 for "15", 3 for "3M"). unit series TFUnit The unit of the timeframe (e.g., TFUnit.minutes, TFUnit.months). Notes on strings without a suffix: • Pure digits are minutes; if divisible by 60, they are treated as hours. • An "M" suffix is months; if divisible by 12, it is converted to years. autoHTF(tf) Picks an appropriate **higher timeframe (HTF)** relative to the selected timeframe. It steps up along a coarse ladder to produce sensible jumps for top‑down analysis. Mapping → chosen HTF: ≤ 1 min → 60 (1h) ≈ ×60 ≤ 3 min → 180 (3h) ≈ ×60 ≤ 5 min → 240 (4h) ≈ ×48 ≤ 15 min → D (1 day) ≈ ×26–×32 (regular session 6.5–8 h) > 15 min → W (1 week) ≈ ×64–×80 for 30m; varies with input ≤ 1 h → W (1 week) ≈ ×32–×40 ≤ 4 h → M (1 month) ≈ ×36–×44 (~22 trading days / month) > 4 h → 3M (3 months) ≈ ×36–×66 (e.g., 12h→×36–×44; 8h→×53–×66) ≤ 1 day → 3M (3 months) ≈ ×60–×66 (~20–22 trading days / month) > 1 day → 12M (1 year) ≈ ×(252–264)/quantity ≤ 1 week → 12M (1 year) ≈ ×52 > 1 week → 48M (4 years) ≈ ×(208)/quantity = 1 M → 48M (4 years) ≈ ×48 > 1 M → error ("HTF too big") any → error ("HTF too big") Notes: • Inputs in months or years are restricted: only 1M is allowed; larger months/any years throw. • Returns a Pine timeframe string usable in `request.security()` and `input.timeframe`. Parameters: tf (string) : series string Selected timeframe (e.g., "D", "240", or `timeframe.period`). Returns: series string Suggested higher timeframe. autoLTF(tf) Selects an appropriate **lower timeframe LTF)** for intra‑bar evaluation based on the selected timeframe. The goal is to keep intra‑bar loops performant while providing enough granularity. Mapping → chosen LTF: ≤ 1 min → 1S ≈ ×60 ≤ 5 min → 5S ≈ ×60 ≤ 15 min → 15S ≈ ×60 ≤ 30 min → 30S ≈ ×60 > 30 min → 60S (1m) ≈ ×31–×59 (for 31–59 minute charts) ≤ 1 h → 1 (1m) ≈ ×60 ≤ 2 h → 2 (2m) ≈ ×60 ≤ 4 h → 5 (5m) ≈ ×48 > 4 h → 15 (15m) ≈ ×24–×48 (e.g., 6h→×24, 8h→×32, 12h→×48) ≤ 1 day → 15 (15m) ≈ ×26–×32 (regular sessions ~6.5–8h) > 1 day → 60 (60m) ≈ ×(26–32) per day × quantity ≤ 1 week → 60 (60m) ≈ ×32–×40 (≈5 sessions of ~6.5–8h) > 1 week → 240 (4h) ≈ ×(8–10) per week × quantity ≤ 1 M → 240 (4h) ≈ ×33–×44 (~20–22 sessions × 6.5–8h / 4h) ≤ 3 M → D (1d) ≈ ×(20–22) per month × quantity > 3 M → W (1w) ≈ ×(4–5) per month × quantity ≤ 1 Y → W (1w) ≈ ×52 > 1 Y → M (1M) ≈ ×12 per year × quantity Notes: • Ratios for D/W/M are given as ranges because they depend on **regular session length** (typically ~6.5–8h, not 24h). • Returned strings can be used with `request.security()` and `input.timeframe`. Parameters: tf (string) : series string Selected timeframe (e.g., "D", "240", or timeframe.period). Returns: series string Suggested lower TF to use for intra‑bar work. isNewPeriod(tf, offset) Returns `true` when a new session-aligned period begins, or on the Nth bar of that period. Parameters: tf (string) : series string Target higher timeframe (e.g., "D", "W", "M"). offset (simple int) : simple int 0 → checks for the first bar of the new period. 1+ → checks for the N-th bar of the period. Returns: series bool `true` if the condition is met. sinceNewPeriod(tf, offset) Counts how many bars have passed within a higher timeframe (HTF) period. For daily, weekly, and monthly resolutions, the period is aligned with the trading session. Parameters: tf (string) : series string Target parent timeframe (e.g., "60", "D"). offset (simple int) : simple int 0 → Running count for the current period. 1+ → Finalized count for the Nth most recent *completed* period. Returns: series int Number of bars. isHigherTF(tf, main) Returns `true` when the selected timeframe represents a higher resolution than the active timeframe. Parameters: tf (string) : series string Selected timeframe. main (bool) : series bool When `true`, the comparison is made against the chart's main timeframe instead of the script's active timeframe. Optional. Defaults to `false`. Returns: series bool `true` if `tf` > active TF; otherwise `false`. isActiveTF(tf, main) Returns `true` when the selected timeframe represents the exact resolution of the active timeframe. Parameters: tf (string) : series string Selected timeframe. main (bool) : series bool When `true`, the comparison is made against the chart's main timeframe instead of the script's active timeframe. Optional. Defaults to `false`. Returns: series bool `true` if `tf` == active TF; otherwise `false`. isLowerTF(tf, main) Returns `true` when the selected timeframe represents a lower resolution than the active timeframe. Parameters: tf (string) : series string Selected timeframe. main (bool) : series bool When `true`, the comparison is made against the chart's main timeframe instead of the script's active timeframe. Optional. Defaults to `false`. Returns: series bool `true` if `tf` < active TF; otherwise `false`. isMultipleTF(tf) Returns `true` if the selected timeframe (`tf`) is a practical multiple of the active skript's timeframe. It verifies this by checking if `tf` is a higher timeframe that has consistently contained more than one bar of the skript's timeframe in recent periods. The period detection is session-aware. Parameters: tf (string) : series string The higher timeframe to check. Returns: series bool `true` if `tf` is a practical multiple; otherwise `false`. interpTimestamp(offStart, offEnd, pct) Calculates a precise absolute timestamp by interpolating within a bar range based on a percentage. This version works with RELATIVE bar offsets from the current bar. Parameters: offStart (int) : series int The relative offset of the starting bar (e.g., 10 for 10 bars ago). offEnd (int) : series int The relative offset of the ending bar (e.g., 1 for 1 bar ago). Must be <= offStart. pct (float) : series float The percentage of the bar range to measure (e.g., 50.5 for 50.5%). Values are clamped to the range. Returns: series int The calculated, interpolated absolute Unix timestamp in milliseconds.Biblioteca Pine Script®por AustrianTradingMachineAtualizado 3