Indikatoren und Strategien
Scalping Signal Filter with ATR + Dashboard TableATR as a numerical value, when over a certain value it will tell us we are good to trade
When RSI is above / below a certain level we will know when buys / sells are valid
Volume spike detection system to show volatility
HTF RSI to help with bias
Outcome status telling us when we can trade
Opening Range Break (ORB)📈 Opening Range Break (ORB) with Session Levels & Alerts
This indicator highlights key trading sessions (London, London–NY Overlap, NY PM) with automatic high/low range tracking, optional labels, and breakout alerts.
Features:
✅ Session range plotting (custom time & color)
🟦 Weekly high/low levels (optional)
🔔 Breakout + retest alert system (customizable per session)
📊 200 EMA trend overlay
🔥 Real candle high/low support even when using Heikin Ashi (toggle on/off)
Perfect for intraday traders looking to catch session breakouts or price action around key levels.
BS with PeriodThe “BS with Period” indicator visualizes the balance between buying and selling volume within each candle, and also tracks those volumes accumulated over a specified number of bars.
It first splits a candle’s total volume into two parts based on where the close sits: the closer the close is to the high, the larger the “buying” portion; the closer it is to the low, the larger the “selling” portion. This means that for any given volume you can see whether buyers or sellers were more active.
On the chart you see three column plots:
Gray for total volume
Red for the portion attributed to selling
Teal for the portion attributed to buying
Optionally, it also sums those buying and selling volumes over the last N bars and plots them as two lines. This gives you a medium-term view of which side is dominating: if the buying-volume line stays well above the selling-volume line, buyers are in control, and vice versa.
Traders use it to:
Spot sustained buying or selling pressure when one accumulated-volume line pulls ahead of the other.
Confirm trend accelerations or potential reversals when the balance shifts.
Adjust sensitivity by choosing a shorter period (more responsive, but noisier) or a longer period (smoother, but slower).
Overall, the indicator helps quantify the internal volume structure and the tug-of-war between buyers and sellers both within each candle and over your chosen look-back period.
[blackcat] L1 Multi-Component CCIOVERVIEW
The " L1 Multi-Component CCI" is a sophisticated technical indicator designed to analyze market trends and momentum using multiple components of the Commodity Channel Index (CCI). This script calculates and combines various CCI-related metrics to provide a comprehensive view of price action, offering traders deeper insights into market dynamics. By integrating smoothed deviations, normalized ranges, and standard CCI values, this tool aims to enhance decision-making processes. It is particularly useful for identifying potential reversal points and confirming trend strength. 📈
FEATURES
Multi-Component CCI Calculation: Combines smoothed deviation, normalized range, percent above low, and standard CCI for a holistic analysis, providing a multifaceted view of market conditions.
Threshold Lines: Overbought (200), oversold (-200), bullish (100), and bearish (-100) thresholds are plotted for easy reference, helping traders quickly identify extreme market conditions.
Visual Indicators: Each component is plotted with distinct colors and line styles for clear differentiation, making it easier to interpret the data at a glance.
Customizable Alerts: The script includes commented-out buy and sell signal logic that can be enabled for automated trading notifications, allowing traders to set up alerts based on specific conditions. 🚀
Advanced Calculations: Utilizes a combination of simple moving averages (SMA) and exponential moving averages (EMA) to smooth out price data, enhancing the reliability of the indicator.
HOW TO USE
Apply the Script: Add the script to your chart on TradingView by searching for " L1 Multi-Component CCI" in the indicators section.
Observe the Plotted Lines: Pay close attention to the smoothed deviation, normalized range, percent above low, and standard CCI lines to identify potential overbought or oversold conditions.
Use Threshold Levels: Refer to the overbought, oversold, bullish, and bearish threshold lines to gauge extreme market conditions and potential reversal points.
Confirm Trends: Use the standard CCI line to confirm trend direction and momentum shifts, providing additional confirmation for your trading decisions.
Enable Alerts: If desired, uncomment the buy and sell signal logic to receive automated alerts when specific conditions are met, helping you stay informed even when not actively monitoring the chart. ⚠️
LIMITATIONS
Fixed Threshold Levels: The script uses fixed threshold levels (200, -200, 100, -100), which may need adjustment based on specific market conditions or asset volatility.
No Default Signals: The buy and sell signal logic is currently commented out, requiring manual activation if you wish to use automated alerts.
Complexity: The multi-component approach, while powerful, may be complex for novice traders to interpret, requiring a solid understanding of technical analysis concepts. 📉
Not for Isolation Use: This indicator is not designed for use in isolation; it is recommended to combine it with other tools and indicators for confirmation and a more robust analysis.
NOTES
Smoothing Techniques: The script uses a combination of simple moving averages (SMA) and exponential moving averages (EMA) for smoothing calculations, which helps in reducing noise and enhancing signal clarity.
Multi-Component Approach: The multi-component approach aims to provide a more nuanced view of market conditions compared to traditional CCI, offering a more comprehensive analysis.
Customization Potential: Traders can customize the script further by adjusting the parameters of the moving averages and other components to better suit their trading style and preferences. ✨
THANKS
Thanks to the TradingView community for their support and feedback on this script! Special thanks to those who contributed ideas and improvements, making this tool more robust and user-friendly. 🙏
V2_Livermore-Seykota Breakout)V2_ Livermore-Seykota Breakout Strategy
Objective: Execute breakout trades inspired by Jesse Livermore, filtered by trend confirmation (Ed Seykota) and risk-managed with ATR (Paul Tudor Jones style).
Entry Conditions:
Long Entry:
Close price breaks above recent pivot high.
Price is above main EMA (EMA50).
EMA20 > EMA200 (uptrend confirmation).
Current volume > 20-period SMA (volume confirmation).
Short Entry:
Close price breaks below recent pivot low.
Price is below main EMA (EMA50).
EMA20 < EMA200 (downtrend confirmation).
Current volume > 20-period SMA.
Exit Conditions:
Stop-loss: ATR × 3 from entry price.
Trailing stop: activated with offset of ATR × 2.
Strengths:
Trend-aligned entries with volume breakout confirmation.
Dynamic ATR-based risk management.
Inspired by principles of three legendary traders.
Scalping EMA + RSI Strategy (Long & Short)Scalping EMA with RSI Strategy.
Entry Criteria: Indicators, price action, or patterns triggering entries.
Stop Loss (SL): Fixed pips, ATR-based, or swing low/high.
Take Profit (TP): Fixed reward, trailing stop, or dynamic levels.
RRR Target: e.g., 1:1.5 or 1:2.
Histogram Ichimoku Cloud📘 Description
This is a simplified version of the Ichimoku Cloud indicator. Instead of lines and clouds, it shows the trend using a histogram (colored bars). It helps you quickly see the direction of the market.
📈 How To Use
Green = Uptrend (good time to look for buy opportunities)
Red = Downtrend (good time to look for sell opportunities)
Gray = No clear trend (wait and watch)
NY Open Range Tracker with Customizable EMA Cloudmarks the 5min opening range, waits for a 5min candle to open/close outside of the opening range placing a stop on the wick and a tp 150ticks away (customizable)
Bullish Bearish Signal with EMA Color + Labels Bullish & Bearish Signal with Dynamic EMA + MACD/RSI Confluence
This indicator provides clear BUY and SELL signals based on the confluence of trend, momentum, and strength — perfect for traders who want high-probability entries with minimal noise.
🔍 Key Features:
Dynamic EMA 200 Color
The EMA line changes color based on market bias:
🔵 Blue = Bullish Trend
🔴 Red = Bearish Trend
⚪ Gray = Neutral
BUY Signal Conditions:
Price is above EMA 200 (uptrend confirmation)
MACD line crosses above the Signal line (momentum shift)
RSI is above 50 (bullish strength)
SELL Signal Conditions:
Price is below EMA 200 (downtrend confirmation)
MACD line crosses below the Signal line
RSI is below 50 (bearish strength)
Stylish BUY/SELL Labels
Clean, readable markers appear directly on the chart at key turning points.
🎯 Ideal For:
Trend-following strategies
Scalpers and swing traders looking for cleaner entries
Confirming signals from your existing setup
Let the market tell you when it's ready — this tool helps you enter only when trend, momentum, and strength agree.
Happy trading! 🚀
Swing Exit System with Legend Dashboard — Smart + Stylish“They say it’s more important when you buy than when you sell — but this script begs to differ.”
In the real world of trading, the exit is often more important than the entry. A bad exit can turn a winning trade into a loss. A late exit can leave you bag-holding. A premature exit can cause regret as the trade runs without you. That’s where this script steps in — built to guide you through intelligent, data-driven exits with visual clarity and confidence.
🧠 What This Script Does
This is a swing trade exit assistant, not just a signal plotter. It uses seven distinct exit conditions — all grounded in technical structure and momentum — to alert you when it's time to consider reducing or closing a position. Each condition is visualized using a unique, color-coded triangle on the chart for quick interpretation. All signals are also listed in a dynamic legend panel.
🎯 The Exit Signals Include:
10 SMA Break (🟠) – Signals short-term momentum loss
20 SMA Break (🔵) – Stronger loss of trend support
SMA Cross (🔴) – Fast SMA crossing below slow SMA = trend weakening
ATR Stop Hit (🟥) – Price breaks below a trailing ATR stop
RSI Momentum Fade (🟣) – RSI drops below 50 after being overbought
RSI Bearish Divergence (🟪) – Momentum diverges from price
Lower High / Lower Low (⚫️) – Classic bearish market structure
Each triangle matches the color of its entry in the exit legend dashboard, which appears as a floating table on the lower right of the screen for maximum clarity without clutter.
📊 Also Displayed:
Live ATR value – Helps evaluate volatility and stop distance
Fast SMA (10) & Slow SMA (20) – See trend context and potential crossovers
Upper/lower ATR bands for visual trailing stops
🧰 Why This Matters
This script isn’t about blindly following signals — it’s about supporting decision-making. It helps you exit trades with intention, not emotion. It’s built for:
Swing traders who hold for 2–10 bars
Traders using multi-condition filters
Visual thinkers who want signal and structure in sync
Exit too early and you leave money on the table. Exit too late and you give it all back. This tool gives you the structure to exit when the chart says so, not when your nerves do.
AMMA JAMMA'S SNEAKY LITTLE ALPHAAmma Jamma has a nifty SWING guidance video with a sneaky tip...
This script will plot a signal when the RSI crosses above the midline. You can adjust the midline to where you want the signals. Can be used for numerous strategies, I thought about adding various other features like crossing under the upper band, etc.
In A/J style, keeping this one simple.
Set alerts if that's your thing.
This is experimental and still in testing.
Version 1
EMA Scalping ToolUsing EMA for quick scalping trading.
EMA is an underrated moving averages for scalping. Using this method, we'll be using EMA9 and EMA21 as our support and resistance level. Use EMA21 as a mid trend and EMA9 as our entry and exit points.
Triple Stochastic Confluence by AtallaTriple Stochastic Confluence by Atalla - Indicator Summary
Overview
The "Triple Stochastic Confluence by Atalla" is a technical indicator for TradingView that identifies potential trading opportunities using the confluence of three Stochastic oscillators with different timeframes. The indicator focuses exclusively on the %D lines (signal lines) of the Stochastics.
Key Components
Three Stochastic Oscillators
Short-term Stochastic: Period 9, %K Smoothing 1, %D Period 3
Medium-term Stochastic: Period 14, %K Smoothing 1, %D Period 3
Long-term Stochastic: Period 60, %K Smoothing 1, %D Period 10
Visual Display
White lines for the first two Stochastics (%D lines)
Yellow line for the third (long-term) Stochastic (%D line)
Background color changes to highlight trading opportunities:
Yellow background: Bullish signal
Red background: Bearish signal
Trading Signals Logic
Bullish Signal (Yellow Background)
A bullish signal occurs when any Stochastic %D line is in the oversold zone (≤25%) while at least one of the other %D lines is in the overbought zone (≥75%).
Bearish Signal (Red Background)
A bearish signal occurs when any Stochastic %D line is in the overbought zone (≥75%) while at least one of the other %D lines is in the oversold zone (≤25%).
Configurable Parameters
Stochastic periods and smoothing values
Overbought level (default: 75%)
Oversold level (default: 25%)
Alert Conditions
The indicator includes alert conditions for both bullish and bearish confluence signals, allowing users to set up automated notifications for trading opportunities.
Trading Philosophy
This indicator leverages the concept of momentum divergence across different timeframes. When oscillators at different timeframes show opposing extreme readings (one in oversold and another in overbought), it may indicate a potential reversal point in the market. The indicator's strength lies in identifying these confluences automatically and providing clear visual signals.
MACD SignalsHere's my version of a customizable MACD with easy to set alerts and signals.
I wanted to get push notifications on specific changes on the MACD but couldn't find a version with easy to set alerts. So here's my experimental version that is still in testing.
You can turn on/off the alerts and signals. I've included a few different strategies to use the alerts:
Bullish/Bearish crossover: Trend continuation after pullback.
Bullish/Bearish crossover while over/under the 0 line: possible support and resistance bounce.
MACD crossing 0 line: Trend changing from bullish to bearish or vice versa.
*These should NOT be used and entry or exit signals. These are simply speculations to get my attention to the chart and look for other confirmations and determine a plan from there.
If you use the alerts, note that "once every minute" alerts will cause false signals since the current candle isn't closed. "Once every bar close" is better for this.
Version 1
SMA + Range Breakout StrategySimple Moving Average with Range Breakout with RSI confirmation having Trailing Stop Loss
Trailing Stop-Loss
RSI Confirmation Filter
Breakout Alerts
[blackcat] L2 Angle Trend TrackerOVERVIEW
The " L2 Angle Trend Tracker" is a sophisticated technical analysis tool designed to monitor trend direction and momentum using multiple Exponential Moving Averages (EMAs) with different periods. 📈 This script calculates the angles of 5 EMAs (5, 8, 10, 12, and 15 periods) and displays them with gradient colors, providing a comprehensive view of market momentum. When all EMAs cross above or below specified threshold levels, it generates Buy or Sell signals with visual alerts. The indicator helps traders identify trend reversals, potential entry/exit points, and market sentiment shifts with precision. 🚀 This powerful tool is particularly useful for traders who want to combine multiple timeframe analysis with angle-based momentum confirmation.
FEATURES
Calculates angles for 5 EMAs with customizable periods (5, 8, 10, 12, and 15)
Displays angle values with distinct colors for each EMA (Green, Blue, Purple, Orange, and Red)
Generates Buy signals when all EMAs cross above the lower threshold
Generates Sell signals when all EMAs cross below the upper threshold
Shows a zero line and threshold lines for easy reference
Customizable threshold levels for Buy/Sell signals
Visual alerts with "Buy" and "Sell" labels at the point of signal generation
The script uses a mathematical formula to calculate the angle of each EMA relative to its position 11 bars ago
Angle values are converted from radians to degrees for easier interpretation
The zero line represents no change in the EMA angle
The indicator is not overlayed on the price chart by default, but can be adjusted in the script settings 📊
HOW TO USE
Adjust the EMA periods to match your trading strategy 🛠️
Shorter periods (5, 8) are more sensitive to price changes
Longer periods (10, 12, 15) provide smoother trend confirmation
Set appropriate threshold values for Buy/Sell signals based on your risk tolerance
Default thresholds are 70 for upper threshold and -70 for lower threshold
Consider adjusting thresholds based on market volatility
Watch for Buy signals when all EMAs cross above the lower threshold (default: -70)
The signal appears as a green "Buy" label on the chart
This indicates a potential trend reversal to the upside
Watch for Sell signals when all EMAs cross below the upper threshold (default: 70)
The signal appears as a red "Sell" label on the chart
This indicates a potential trend reversal to the downside
Combine with other indicators for confirmation before making trading decisions 🧠
Consider using volume confirmation, support/resistance levels, or other oscillators
The angle tracker works well with trend-following strategies
Use the angle values to gauge momentum strength
Steeper angles indicate stronger momentum
Flatter angles suggest weakening momentum or consolidation
CONFIGURATION
EMA Periods: The script uses five different EMA periods that can be customized:
EMA Period 5: Short-term trend indicator
EMA Period 8: Medium-short term trend indicator
EMA Period 10: Medium-term trend indicator
EMA Period 12: Medium-long term trend indicator
EMA Period 15: Long-term trend indicator
Threshold Settings:
Threshold Top: Sets the upper boundary for Sell signals (default: 70)
Threshold Bot: Sets the lower boundary for Buy signals (default: -70)
These thresholds can be adjusted based on market conditions and trading style
LIMITATIONS
The script may generate false signals in ranging markets or during periods of high volatility
All EMAs must cross the threshold for a signal to appear, which may filter some valid signals
The angle calculation uses a 11-bar lookback period, which may not be suitable for all timeframes
Works best in trending markets and may produce whipsaws in choppy conditions ⚠️
The indicator is more effective on higher timeframes (4H, 1D) than on very short timeframes (1M, 5M)
Signal generation requires confirmation from multiple EMAs, which may delay entry/exit points
The angle calculation method may not be suitable for all financial instruments
ADVANCED TIPS
Use multiple instances of this indicator with different EMA settings for multi-timeframe analysis
Combine with volume analysis to confirm the strength of signals
Look for confluence with support and resistance levels for more reliable signals
Consider using the angle values as a filter for other trading strategies
The indicator can be used to identify momentum exhaustion points when angles flatten
For swing trading, consider using the Buy and Sell signals as potential entry/exit points
For day trading, you may want to use shorter EMA periods and adjust threshold values accordingly
NOTES
The script uses a mathematical formula to calculate the angle of each EMA relative to its position 11 bars ago
The angle values are converted from radians to degrees for easier interpretation
The zero line represents no change in the EMA angle
The indicator is not overlayed on the price chart by default, but can be adjusted in the script settings 📊
The angle calculation provides a dynamic view of momentum that traditional moving averages don't offer
The threshold values are based on empirical testing and can be fine-tuned for specific instruments
THANKS
Special thanks to the TradingView community for their support and feedback on this indicator. If you find this script helpful, please consider leaving a comment or sharing your experiences with it. Your feedback helps improve the tool for everyone. 🙏
Also, a nod to the original concept developers who pioneered angle-based trend analysis. This script builds upon those foundational ideas to provide a more comprehensive view of market momentum. 🌟
Trend Finder Using Pull Back Method {Darkoexe}This indicator predicts trends using pull backs structure to predict the trend direction. It builds off the flag pattern concept but it uses precise precise measurements to determine trend direction.
A pull back occurs every time the price direction switches then closes either below or above the open of the previous candle depending on the type of pull back, bullish or bearish.
For an up trend to be a defined, when a bullish pull back occurs and does not go below the previous low, if the price then passes above the start of the pull back, an up trend signal will be printed. Only bullish pull backs will be displayed during an up trend.
For a down trend to be defined, when a bearish pull back occurs and does not go above the previous high, if the price then passes below the start of the pull back, a down trend signal will be printed. Only bearish pull backs will be displayed during a down trend.
If the conditions for an up trend or down trend are not met, no trend will be printed. Both bearish and bullish pull backs will be displayed during a no trend.
All the labels colors can be changed.
//Darkoexe
Trend Finder {Darkoexe}This indicator displays the end and start of trends using an ATR factor.
The ATR with trend factor is used to determine the minimum length for a trend to be considered a trend.
The ATR against trend factor is used to determine the minimum length price needs to move against a trend for it to break the trend.
The ATR factors are multiplied with the ATR to determine these lengths.
The labels indicate the starts and ends of trends;
The green label indicates the start of an up trend.
The red label indicates the start of a down trend.
The black/gray label indicates the start of a trend and the end of another trend at the same location.
The purple/pink label indicates the end of a trend.
All the label colors can be changed.
IMPORTANT NOTE: This is a repainting indicator, it should only be used to back test and analyze previous trends. Do not use this indicator for live trading.
Sunday OpenSunday Open – Weekly Open Levels
Description
The "Sunday Open" indicator automatically displays the market open levels for Sunday. These levels are often used by traders as potential support and resistance zones. The script requires no manual data input and works on any timeframe.
Functionality
- Displays the N most recent Sunday Open levels, including the current and previous ones.
- The color of the current level differs from the older ones, making it easier to identify on the chart.
- Lines can be customized by style, thickness, and label visibility.
- Alerts are triggered when the price crosses any Sunday Open level (either up or down).
User Settings
- Number of levels to display (1–100)
- Color for the current and past levels
- Line style: solid, dashed, dotted
Line thickness
- Display text labels on the chart
- Enable/disable alerts for price crossing
Useful For
- Quickly identifying key reference points at the beginning of the week
- Setting up trading scenarios around the open zone
- Receiving signals for breakouts or touches of the levels
Important !
All elements are created automatically—no manual drawing required.
If you want to create alerts for when the price crosses a Sunday Open level, you need to go to "Alerts" at the top of the screen and select "SO" in the "Condition" field.
PRODE-NMIt is a force impulse system that is designed to give you entries into assets that can move substantially. Works well with volatile instruments. If there is a lot of whipsaws in the instrument plot, a Moving Average on the Prode-M Line, and use it in the place of the PRODE-M Line. Use it with Super-Trend (10,4.5) or Super-trend(10,3) and Super-trend(10,1.25), on the trading time frame. Ideal trades are taken when the price first breaks above or below Super-Trend(10,1.25) and Super-trend(10,3) or Super-Trend (10,4.5) . For Bullish entries let the PRODE-M come below the Zero-Line and go back up, after price breaks above the two Super-Trends. While the Prode-M line goes down below the Zero-Line and come back up the Super-Trend (10,3) or Super-Trend (10,4.5) should not turn Red. It is not a problem if the Super-Trend (10,1.25) turns red. Take entry when Prode-M line breaks above the Zero line and both Super-Trends are green. Stop-Loss is the Super-Trend(10,1.25) initially and one break even is achieved trail with Super-Trend(10,3) or Super-Trend (10,4.5). Vice Versa for Short entries. Cheers :)
RESHAIndicator Name: RESHA – Static Price Levels
Description:
The RESHA indicator is a simple tool that allows traders to manually define multiple horizontal price levels on the chart. These levels are displayed as horizontal lines, each extending a customizable number of candles forward. Traders can input a comma-separated list of prices, which are then plotted automatically on the chart.
Features:
📍 Custom input box for price levels (comma-separated).
📏 Adjustable line length in bars.
Visual price labels at the end of each level.
Clean and minimalistic design, perfect for support/resistance zones or static analysis.
This tool is ideal for traders who want to keep key price zones visible at all times without relying on dynamic calculations or automated indicators.
OHLCVRangeXThe OHLCVRange library provides modular range-building utilities for Pine Script v6 based on custom conditions like time, price, volatility, volume, and pattern detection. Each function updates a persistent range (OHLCVRange) passed in from the calling script, based on live streaming candles.
This library is designed to support dynamic windowing over incoming OHLCV bars, with all persistent state handled externally (in the indicator or strategy). The library merely acts as a filter and updater, appending or clearing candles according to custom logic.
📦
export type OHLCVRange
OHLCV.OHLCV candles // Sliding window of candles
The OHLCVRange is a simple container holding an array of OHLCV.OHLCV structures.
This structure should be declared in the indicator using var to ensure persistence across candles.
🧩 Range Updater Functions
Each function follows this pattern:
export updateXxxRange(OHLCVRange r, OHLCV.OHLCV current, ...)
r is the range to update.
current is the latest OHLCV candle (typically from your indicator).
Additional parameters control the behavior of the range filter.
🔁 Function List
1. Fixed Lookback Range
export updateFixedRange(OHLCVRange r, OHLCV.OHLCV current, int barsBack)
Keeps only the last barsBack candles.
Sliding window based purely on number of bars.
2. Session Time Range
export updateSessionRange(OHLCVRange r, OHLCV.OHLCV current, int minuteStart, int minuteEnd)
Keeps candles within the [minuteStart, minuteEnd) intraday session.
Clears the range once out of session bounds.
3. Price Zone Range
export updatePriceZoneRange(OHLCVRange r, OHLCV.OHLCV current, float minP, float maxP)
Retains candles within the vertical price zone .
Clears when a candle exits the zone.
4. Consolidation Range
export updateConsolidationRange(OHLCVRange r, OHLCV.OHLCV current, float thresh)
Stores candles as long as the candle range (high - low) is less than or equal to thresh.
Clears on volatility breakout.
5. Volume Spike Range
export updateVolumeSpikeRange(OHLCVRange r, OHLCV.OHLCV current, float avgVol, float mult, int surround)
Triggers a new range when a volume spike ≥ avgVol * mult occurs.
Adds candles around the spike (total surround * 2 + 1).
Can be used to zoom in around anomalies.
6. Engulfing Pattern Range
export updateEngulfingRange(OHLCVRange r, OHLCV.OHLCV current, int windowAround)
Detects bullish or bearish engulfing candles.
Stores 2 * windowAround + 1 candles centered around the pattern.
Clears if no valid engulfing pattern is found.
7. HTF-Aligned Range
export updateHTFAlignedRange(OHLCVRange r, OHLCV.OHLCV current, OHLCV.OHLCV prevHtf)
Used when aligning lower timeframe candles to higher timeframe bars.
Clears and restarts the range on HTF bar transition (compare prevHtf.bar_index with current).
Requires external management of HTF candle state.
💡 Usage Notes
All OHLCVRange instances should be declared as var in the indicator to preserve state:
var OHLCVRange sessionRange = OHLCVRange.new()
sessionRange := OHLCVRange.updateSessionRange(sessionRange, current, 540, 900)
All OHLCV data should come from the OHLCVData library (v15 or later):
import userId/OHLCVData/15 as OHLCV
OHLCV.OHLCV current = OHLCV.getCurrentChartOHLCV()
This library does not use var internally to enforce clean separation of logic and persistence.
📅 Planned Enhancements
Fib zone ranges: capture candles within custom Fibonacci levels.
Custom event ranges: combine multiple filters (e.g., pattern + volume spike).
Trend-based ranges: windowing based on moving average or trend breaks.