Market Flow Exit Alerts On ChartThis Market Flow exit signals measures buying and selling pressure using price and volume data.
These signals are designed to help traders lock in profits or avoid reversals by identifying when market momentum may be shifting.
These are Exit Only Signals - No entry signals are given, this is only to help you consider when it may be time to get out of the current trend in the market.
Indicators and strategies
TriTrend Nexus[BullByte]TriTrend Nexus is a comprehensive market analysis tool that consolidates three well-established signals into a single, easy-to-read interface. It is designed to help traders quickly assess the market’s current condition and make more informed decisions about potential trend shifts.
Key Features and Functionality
Composite Signal System
Multi-Faceted Approach :
The indicator combines insights from three distinct market signals into one composite score. This approach provides a more holistic view of market conditions compared to relying on a single indicator.
Clear Classification :
Based on the composite score, TriTrend Nexus categorizes the market into:
Strong Signals : When all three underlying conditions are met, indicating a robust and established trend.
Early Signals : When two out of the three conditions are met, offering an early hint of a potential trend.
Neutral/Choppy : When conditions are ambiguous or conflicting, suggesting a lack of clear market direction.
Trend Qualifiers :
In addition to the composite score, the indicator subtly refines its signal by noting whether a trend is “Rising” or “Fading.” This further aids traders in understanding the momentum behind the signal.
Dynamic Signal Identification
Timely Alerts :
By analyzing the composite data in real time, the indicator quickly identifies when market conditions shift, offering early warning signals that help traders stay ahead of the market.
Adaptive Analysis :
The built-in signal assessment continuously monitors market changes. Whether the market is in the early stages of a move or firmly committed to a trend, TriTrend Nexus adapts its messaging to reflect the evolving conditions.
User-Friendly Dashboard
Integrated Display :
A customizable dashboard provides an at-a-glance summary of key metrics. Users can choose between a detailed view for comprehensive insights or a compact version for a streamlined experience.
Key Metrics Displayed :
Primary Signal : The overall market status, such as “Bullish Strong” or “Bearish Early.”
Composite Nexus Score : A numerical value representing the strength of the current market conditions.
Supporting Data : Essential values that help explain the current signal without overwhelming the trader.
Easy Interpretation :
The dashboard is designed with clarity in mind. Clear labeling and a consistent layout ensure that even traders new to composite indicators can quickly interpret the displayed information.
Visual Clarity and Aesthetic
Color-Coded Signals :
The indicator uses a vibrant color scheme to highlight market conditions:
Bright Green : Signifies a strong bullish trend.
Light Green : Indicates an emerging bullish trend.
Red : Represents a strong bearish trend.
Light Red/Pink : Denotes an early bearish signal.
Gray : Used when market conditions are neutral or choppy.
Graphical Enhancements :
The plotted oscillator visually reinforces the signal classifications with dynamic color transitions. Horizontal markers provide reference points to help traders easily compare the current readings against standard levels.
Customization Options
Adjustable Settings :
Traders can personalize the indicator by modifying input settings such as sensitivity thresholds and period lengths. This flexibility allows the tool to adapt to different market environments and trading styles.
Dashboard Flexibility :
The option to toggle between a full dashboard and a shorter version means that both novice and experienced traders can configure the display to best suit their needs. A more detailed dashboard offers extensive insights, while the compact mode provides a minimalist view for those who prefer simplicity.
Tailored User Experience :
With multiple adjustable parameters, users can fine-tune the indicator to respond precisely to their preferred timeframes and market conditions. This adaptability makes TriTrend Nexus a versatile tool for various trading strategies.
Benefits for Traders
Quick and Informed Decision-Making :
With a single glance at the dashboard and visual cues from the oscillator, traders can quickly gauge whether the market is poised for a strong move, is in the early stages of a trend, or is too volatile for clear signals. This helps in planning timely entries and exits.
Enhanced Market Insight :
By integrating multiple perspectives into one coherent score, the indicator filters out market noise and highlights the prevailing trend more reliably. This can be particularly useful during periods of market uncertainty.
Reduced Analysis Time:
The combination of clear, color-coded signals and an intuitive dashboard reduces the time spent analyzing various individual indicators, allowing traders to focus more on strategy execution.
Customization for Diverse Strategies :
The ability to adjust various input parameters and the dashboard layout ensures that traders can tailor the tool to fit their unique analysis style and market conditions, making it a versatile addition to any trading toolkit.
User-Friendly Interface :
Even for those who are not technically inclined, the clear visual design and straightforward signal descriptions make it easy to understand the current market situation without needing to interpret complex data.
EMA Crossover (Short Focus with Trailing Stop)This strategy utilizes a combination of Exponential Moving Averages (EMA) and Simple Moving Averages (SMA) to generate entry and exit signals for both long and short positions. The core of the strategy is based on the 13-period EMA (short EMA) crossing the 33-period EMA (long EMA) for entering long trades, while a 13-period EMA crossing the 25-period EMA (mid EMA) generates short trade signals. The 100-period SMA and 200-period SMA serve as additional trend indicators to provide context for the market conditions. The strategy aims to capitalize on trend reversals and momentum shifts in the market.
The strategy is designed to execute trades swiftly with an emphasis on entering positions when conditions align in real time. For long entries, the strategy initiates a buy when the 13 EMA is greater than the 33 EMA, indicating a bullish trend. For short entries, the 13 EMA crossing below the 33 EMA signals a bearish trend, prompting a short position. Importantly, the code includes built-in exit conditions for both long and short positions. Long positions are exited when the 13 EMA falls below the 33 EMA, while short positions are closed when the 13 EMA crosses above the 25 EMA.
A key feature of the strategy is the use of trailing stops for both long and short positions. This dynamic exit method adjusts the stop level as the market moves in favor of the trade, locking in profits while reducing the risk of losses. The trailing stop for long positions is based on the high price of the current bar, while the trailing stop for short positions is set using the low price, providing more flexibility in managing risk. This trailing stop mechanism helps to capture profits from favorable market moves while ensuring that positions are exited if the market moves against them.
This strategy works best on the 4H timeframe and is optimized for major cryptocurrency pairs. The daily chart allows for the EMAs to provide more reliable signals, as the strategy is designed to capture broader trends rather than short-term market fluctuations. Using it on major crypto pairs increases its effectiveness as these assets tend to have strong and sustained trends, providing better opportunities for the strategy to perform well.
6F SignalsRelease Notes
"6F Signals (With Labels) - Alternating" is a powerful Pine Script (version 5) indicator designed for TradingView, overlaying directly on your price chart to deliver clear buy and sell signals based on Heikin Ashi (HA) candlestick patterns. This indicator leverages HA’s smoothing capabilities to identify trend reversals and generate alternating signals, making it an intuitive tool for traders seeking precise entry and exit points.
Key Features
Heikin Ashi Integration: Calculates HA values (open, high, low, close) from raw OHLC data to reduce market noise and highlight trends more effectively than traditional candlesticks.
C Candle Detection: Identifies "C Candles" at trend reversal points (bullish to bearish or vice versa), using these as key reference levels for signal generation.
Alternating Signals: Generates buy signals when the HA close crosses above a C Candle’s high and sell signals when it crosses below a C Candle’s low, ensuring only the first signal per trend change is triggered to avoid repetition.
Visual Elements:
Lines: Plots solid blue lines (default) from a C Candle’s high to the buy signal bar and solid red lines (default) from a C Candle’s low to the sell signal bar, both with a 2-pixel width for clarity.
Labels: Displays green "Buy: " labels below the signal bar for buy signals and red "Sell: " labels above the signal bar for sell signals, showing the exact closing price.
Customization: Allows users to adjust the high line color (default blue) and low line color (default red) via input settings, tailoring the visuals to personal chart preferences.
How It Works
Trend Detection: Uses Heikin Ashi close and open prices to determine bullish (close > open) or bearish (close < open) trends.
C Candle Identification: Marks a C Candle when a trend reversal occurs, storing its high and low prices and bar index.
Signal Logic: Triggers a buy signal when the HA close exceeds the C Candle high or a sell signal when it falls below the C Candle low, but only after the C Candle bar and if no prior signal has been triggered for that reversal. Signals alternate to maintain clarity (e.g., a buy follows a sell, not another buy).
Visualization: Draws horizontal lines from the C Candle to the signal bar and adds labels at the signal point, making it easy to spot trading opportunities.
Visual Description
On your chart, you’ll see:
Candlesticks overlaid with blue and red horizontal lines connecting C Candles to signal bars.
Green "Buy: " labels below bullish candles where buy signals occur (e.g., "Buy: 98305").
Red "Sell: " labels above bearish candles where sell signals occur (e.g., "Sell: 91552.88").
Lines are solid, stopping at the signal bar, ensuring a clean and focused display.
Ideal For
Trend Traders: Perfect for those following reversals or momentum shifts using Heikin Ashi.
Visual Learners: Suits traders who prefer clear, labeled signals over complex calculations.
Customizers: Offers flexibility with adjustable line colors to match any chart theme.
Customization Options
High Line Color: Default blue, adjustable in settings.
Low Line Color: Default red, adjustable in settings.
Why Use It?
"6F Signals (With Labels) - Alternating" simplifies trend reversal trading by combining Heikin Ashi’s noise reduction with precise, alternating signals. Its visual clarity—through colored lines and labeled prices—helps traders act confidently without second-guessing. Test it on your charts to enhance your strategy with a straightforward, effective tool tailored for TradingView!
Feb 28
Release Notes
The 6F Signals (With Labels) - Alternating indicator is a versatile and visually intuitive tool designed to help traders identify potential buy and sell opportunities using Heikin Ashi (HA) trend analysis. By smoothing price action and detecting key reversal points, this indicator generates actionable signals overlaid directly on your chart, making it ideal for swing traders and trend followers.
Key Features:
Heikin Ashi-Based Analysis: Calculates its own HA values from raw OHLC data to smooth price fluctuations and enhance trend detection, independent of your chart’s display settings.
C Candle Detection: Identifies "C Candles" at points where the HA trend reverses (e.g., from bullish to bearish or vice versa), marking potential support and resistance zones.
Breakout Signals:
Buy Signal: Triggered when the HA close crosses above the high of the most recent C Candle, suggesting a potential upward breakout.
Sell Signal: Triggered when the HA close crosses below the low of the most recent C Candle, indicating a potential downward breakout.
Alternating Logic: Ensures signals alternate between buy and sell, allowing only one signal per C Candle to capture market swings and prevent consecutive signals of the same type.
Visual Indicators:
Horizontal Lines: Teal lines (high) and maroon lines (low) connect the C Candle’s high and low levels to the signal bar, highlighting key price levels.
Labels: Clear "Buy: " and "Sell: " labels appear at signal points, displaying the raw closing price for precise entry/exit reference.
Customizable Colors: Adjust the high and low line colors via input settings to match your chart preferences.
How It Works:
Trend Reversal Detection: The indicator uses HA calculations to detect trend changes, labeling these points as C Candles based on shifts in bullish (HA close > HA open) or bearish (HA close < HA open) conditions.
Signal Generation:
A buy signal occurs when the HA close breaks above the C Candle’s high.
A sell signal occurs when the HA close breaks below the C Candle’s low.
Signal Control: Only one signal is allowed per C Candle, and signals must alternate (e.g., a buy cannot follow another buy), ensuring a balanced trading approach.
Visualization:
Solid teal lines (width 2) extend from the C Candle’s high to the buy/sell signal bar.
Solid maroon lines (width 2) extend from the C Candle’s low to the signal bar.
Labels are placed below bars for buys (teal, semi-transparent) and above bars for sells (gray, semi-transparent), showing the raw close price.
Usage Tips:
Chart Compatibility: Works on any chart type (regular candlesticks or Heikin Ashi) since it calculates HA values internally from raw OHLC data.
Confirmation: Combine with other indicators (e.g., moving averages, volume) or price action analysis to validate signals and refine your trading strategy.
Customization: Modify the teal (high) and maroon (low) line colors in the settings to suit your visual preferences or chart theme.
Timeframes: Effective on various timeframes, though it shines in swing trading setups on daily or higher charts (e.g., 1D, as seen in BTC/USD examples).
Notes:
Price Display: Labels show the actual (raw) closing price at the signal bar, not the HA close, providing real-world entry/exit levels.
Signal Clarity: Cyan dots mark buy signals, and red dots mark sell signals on some chart setups, enhancing visibility alongside the labels and lines.
This indicator offers a systematic way to spot trend-driven opportunities, leveraging Heikin Ashi’s smoothing effect to reduce noise and focus on significant price movements. Whether you’re trading cryptocurrencies like BTC/USD or other assets, the 6F Signals indicator provides clear, actionable insights with a professional and user-friendly design.
Feb 28
Release Notes
The 6F Signals (With Labels) - Alternating indicator is a versatile and visually intuitive tool designed to help traders identify potential buy and sell opportunities using Heikin Ashi (HA) trend analysis. By smoothing price action and detecting key reversal points, this indicator generates actionable signals overlaid directly on your chart, making it ideal for swing traders and trend followers.
Key Features:
Heikin Ashi-Based Analysis: Calculates its own HA values from raw OHLC data to smooth price fluctuations and enhance trend detection, independent of your chart’s display settings.
C Candle Detection: Identifies "C Candles" at points where the HA trend reverses (e.g., from bullish to bearish or vice versa), marking potential support and resistance zones.
Breakout Signals:
Buy Signal: Triggered when the HA close crosses above the high of the most recent C Candle, suggesting a potential upward breakout.
Sell Signal: Triggered when the HA close crosses below the low of the most recent C Candle, indicating a potential downward breakout.
Alternating Logic: Ensures signals alternate between buy and sell, allowing only one signal per C Candle to capture market swings and prevent consecutive signals of the same type.
Visual Indicators:
Horizontal Lines: Teal lines (high) and maroon lines (low) connect the C Candle’s high and low levels to the signal bar, highlighting key price levels.
Labels: Clear "Buy: " and "Sell: " labels appear at signal points, displaying the raw closing price for precise entry/exit reference.
Customizable Colors: Adjust the high and low line colors via input settings to match your chart preferences.
How It Works:
Trend Reversal Detection: The indicator uses HA calculations to detect trend changes, labeling these points as C Candles based on shifts in bullish (HA close > HA open) or bearish (HA close < HA open) conditions.
Signal Generation:
A buy signal occurs when the HA close breaks above the C Candle’s high.
A sell signal occurs when the HA close breaks below the C Candle’s low.
Signal Control: Only one signal is allowed per C Candle, and signals must alternate (e.g., a buy cannot follow another buy), ensuring a balanced trading approach.
Visualization:
Solid teal lines (width 2) extend from the C Candle’s high to the buy/sell signal bar.
Solid maroon lines (width 2) extend from the C Candle’s low to the signal bar.
Labels are placed below bars for buys (teal, semi-transparent) and above bars for sells (gray, semi-transparent), showing the raw close price.
Usage Tips:
Chart Compatibility: Works on any chart type (regular candlesticks or Heikin Ashi) since it calculates HA values internally from raw OHLC data.
Confirmation: Combine with other indicators (e.g., moving averages, volume) or price action analysis to validate signals and refine your trading strategy.
Customization: Modify the teal (high) and maroon (low) line colors in the settings to suit your visual preferences or chart theme.
Timeframes: Effective on various timeframes, though it shines in swing trading setups on daily or higher charts (e.g., 1D, as seen in BTC/USD examples).
Notes:
Price Display: Labels show the actual (raw) closing price at the signal bar, not the HA close, providing real-world entry/exit levels.
Signal Clarity: Cyan dots mark buy signals, and red dots mark sell signals on some chart setups, enhancing visibility alongside the labels and lines.
This indicator offers a systematic way to spot trend-driven opportunities, leveraging Heikin Ashi’s smoothing effect to reduce noise and focus on significant price movements. Whether you’re trading cryptocurrencies like BTC/USD or other assets, the 6F Signals indicator provides clear, actionable insights with a professional and user-friendly design.
Feb 28
Release Notes
The 6F Signals (With Labels) - Alternating indicator is a versatile and visually intuitive tool designed to help traders identify potential buy and sell opportunities using Heikin Ashi (HA) trend analysis. By smoothing price action and detecting key reversal points, this indicator generates actionable signals overlaid directly on your chart, making it ideal for swing traders and trend followers.
Key Features:
Heikin Ashi-Based Analysis: Calculates its own HA values from raw OHLC data to smooth price fluctuations and enhance trend detection, independent of your chart’s display settings.
C Candle Detection: Identifies "C Candles" at points where the HA trend reverses (e.g., from bullish to bearish or vice versa), marking potential support and resistance zones.
Breakout Signals:
Buy Signal: Triggered when the HA close crosses above the high of the most recent C Candle, suggesting a potential upward breakout.
Sell Signal: Triggered when the HA close crosses below the low of the most recent C Candle, indicating a potential downward breakout.
Alternating Logic: Ensures signals alternate between buy and sell, allowing only one signal per C Candle to capture market swings and prevent consecutive signals of the same type.
Visual Indicators:
Horizontal Lines: Teal lines (high) and maroon lines (low) connect the C Candle’s high and low levels to the signal bar, highlighting key price levels.
Labels: Clear "Buy: " and "Sell: " labels appear at signal points, displaying the raw closing price for precise entry/exit reference.
Customizable Colors: Adjust the high and low line colors via input settings to match your chart preferences.
How It Works:
Trend Reversal Detection: The indicator uses HA calculations to detect trend changes, labeling these points as C Candles based on shifts in bullish (HA close > HA open) or bearish (HA close < HA open) conditions.
Signal Generation:
A buy signal occurs when the HA close breaks above the C Candle’s high.
A sell signal occurs when the HA close breaks below the C Candle’s low.
Signal Control: Only one signal is allowed per C Candle, and signals must alternate (e.g., a buy cannot follow another buy), ensuring a balanced trading approach.
Visualization:
Solid teal lines (width 2) extend from the C Candle’s high to the buy/sell signal bar.
Solid maroon lines (width 2) extend from the C Candle’s low to the signal bar.
Labels are placed below bars for buys (teal, semi-transparent) and above bars for sells (gray, semi-transparent), showing the raw close price.
Usage Tips:
Chart Compatibility: Works on any chart type (regular candlesticks or Heikin Ashi) since it calculates HA values internally from raw OHLC data.
Confirmation: Combine with other indicators (e.g., moving averages, volume) or price action analysis to validate signals and refine your trading strategy.
Customization: Modify the teal (high) and maroon (low) line colors in the settings to suit your visual preferences or chart theme.
Timeframes: Effective on various timeframes, though it shines in swing trading setups on daily or higher charts (e.g., 1D, as seen in BTC/USD examples).
Notes:
Price Display: Labels show the actual (raw) closing price at the signal bar, not the HA close, providing real-world entry/exit levels.
Signal Clarity: Cyan dots mark buy signals, and red dots mark sell signals on some chart setups, enhancing visibility alongside the labels and lines.
This indicator offers a systematic way to spot trend-driven opportunities, leveraging Heikin Ashi’s smoothing effect to reduce noise and focus on significant price movements. Whether you’re trading cryptocurrencies like BTC/USD or other assets, the 6F Signals indicator provides clear, actionable insights with a professional and user-friendly design.
Feb 28
Release Notes
The 6F Signals indicator uses Heikin Ashi candles to identify high-probability buy and sell signals on your chart, perfect for traders of stocks, forex, or cryptocurrencies like Bitcoin. It displays solid teal and maroon lines to mark the high and low of key "C Candles" (trend change points), along with dynamic dashed lines that act as trailing stop-loss levels—teal lines rise for buy signals, and maroon lines fall for sell signals. Optional labels show the exact price of each signal, and you can toggle small triangles to visually highlight buy and sell opportunities. Ideal for spotting trend reversals and managing risk with automatic stop-loss adjustments.
Features:
Buy/Sell Signals: Automatically detects buy signals (blue labels) when the price crosses above the C High, and sell signals (gray labels) when it crosses below the C Low, based on Heikin Ashi calculations.
Trailing Stops: Dashed teal lines step up for buy signals (using Heikin Ashi lows), and dashed maroon lines step down for sell signals (using Heikin Ashi highs), helping you track dynamic stop-loss levels.
Customizable: Adjust the colors of the high and low lines, and toggle labels or arrows for signals via the input settings.
Overlay: Works directly on your price chart, making it easy to see signals alongside price action.
How to Use:
Add the indicator to your chart (e.g., Bitcoin/USD, 1-day timeframe).
Look for blue "Buy" labels or triangles below the price for long opportunities, and gray "Sell" labels or triangles above the price for short opportunities.
Use the trailing stop lines (teal for buys, maroon for sells) to manage your risk and adjust your stop-loss as the price moves.
Customize the colors or toggle labels/arrows in the settings to suit your trading style.
Note: This indicator is designed for educational and informational purposes. Always test it on a demo account before using it in live trading.
Mar 1
Release Notes
Let’s break down “6F Signals”
How It Works: The Nitty-Gritty
The script starts by smoothing out price noise, making trends easier to spot than with regular candlesticks. It checks if the HA close is above or below the HA open to determine if the trend’s bullish (upward) or bearish (downward).
C Candle Detection: This is where the magic happens. The indicator hunts for “C Candles”—key reversal points where the HA trend flips, like from bullish to bearish or vice versa. When it spots one, it locks in the high and low prices of that candle, along with the bar index, as reference levels for signals. These C Candles act like critical support and resistance zones.
Signal Generation: Here’s the play-by-play for the signals:
Buy Signal: A buy signal fires when the HA close breaks above the high of the most recent C Candle. This suggests a potential upward breakout or trend reversal.
Sell Signal: A sell signal triggers when the HA close drops below the low of the most recent C Candle, indicating a possible downward breakout or reversal.
Alternating Logic: The script’s smart—it only allows one signal (buy or sell) per C Candle and ensures signals alternate. So, you won’t get back-to-back buy signals or sell signals, keeping things clean and preventing confusion.
Signal Control & Timing: The indicator tracks whether a signal’s already been triggered for a given C Candle. It won’t fire another signal until a new C Candle forms and the conditions are met. It also checks the bar index to ensure signals only happen after the C Candle bar, keeping everything timed right.
Visualization on Your Chart:
Lines: It draws solid lines from the C Candle’s high and low to the bar where the signal occurs. By default, high lines are blue (or customizable), and low lines are gray (also customizable), with a clean 2-pixel width. These lines stop at the signal bar, giving you a clear visual of the price levels driving the signal.
Labels: When a signal hits, you’ll see green “Buy: ” labels below the bar for buys and gray “Sell: ” labels above the bar for sells. These show the raw closing price at the signal bar—not the HA close—so you get real-world entry/exit levels.
Optional Arrows: You can toggle small triangles—blue for buys (below the bar) and gray for sells (above the bar)—to visually pop those signals if you want extra flair.
Customization & Flexibility: You’re in control, bro. The script lets you tweak the high and low line colors (default blue for buys, gray for sells) via input settings, plus toggle on or off labels, arrows, and even additional data like high/low prices in the labels. It’s built for any chart type (regular candlesticks or HA) since it calculates HA internally, so it’s versatile AF.
Why It’s Fire for Traders
This indicator’s perfect for swing traders or day traders chasing trends in volatile markets, like crypto (think BTC/USD) or forex. It uses HA’s noise-reducing power to focus on big moves, and the alternating signal logic keeps you from getting overwhelmed. The visual cues—lines, labels, and optional arrows—make it easy to spot opportunities, whether you’re on a 1D chart or shorter timeframes. Pair it with other tools like moving averages or volume for confirmation, and you’ve got a solid setup to ride those market waves.
Notes to Keep It Real
The prices in the labels are the raw close, not HA values, so you’re getting actionable levels for trading.
It’s educational and informational—always test it on a demo account before going live, yeah?
Works across assets, but it really shines on charts with clear trends, like swing setups on daily or higher timeframes.
So, there you have it—smooth, detailed, and ready to help you dominate your charts. This “6F Signals” script isn’t just a tool; it’s your trading co-pilot, keeping it clean, sharp, and totally customizable for your style. Let’s crush it!
7 days ago
Release Notes
Overview
"6F Signals (With Labels) - Alternating" is a powerful Pine Script (v5) indicator for TradingView, designed to help traders identify high-probability buy and sell opportunities using Heikin Ashi (HA) trend analysis. By smoothing price action and detecting key reversal points, this indicator overlays clear, alternating signals directly on your chart—perfect for swing traders, trend followers, and visual learners.
Key Features
Heikin Ashi Smoothing: Calculates HA values (open, high, low, close) from raw OHLC data to reduce market noise and enhance trend detection, independent of your chart type.
C Candle Detection: Identifies "C Candles" at trend reversal points (bullish to bearish or vice versa), marking potential support and resistance zones.
Alternating Breakout Signals:
Buy Signal: Triggers when the HA close crosses above the C Candle’s high, suggesting an upward breakout.
Sell Signal: Triggers when the HA close crosses below the C Candle’s low, indicating a downward breakout.
Signals alternate (e.g., a buy follows a sell) to avoid repetition and maintain clarity.
Visual Elements:
Lines: Solid teal lines (high) and maroon lines (low) connect the C Candle’s levels to the signal bar, with a 2-pixel width for visibility.
Labels: Green "Buy: " labels appear below buy signal bars, and red "Sell: " labels appear above sell signal bars, showing the raw closing price.
Optional Arrows: Toggle small triangles (blue for buys, gray for sells) to highlight signals.
Customization: Adjust high and low line colors (default teal and maroon) and toggle labels or arrows via input settings to match your chart preferences.
How It Works
Trend Detection: Uses HA close and open prices to identify bullish (close > open) or bearish (close < open) trends.
C Candle Identification: Marks a C Candle at trend reversals, storing its high, low, and bar index.
Signal Logic: Triggers a buy when the HA close exceeds the C Candle high, or a sell when it falls below the C Candle low. Signals only fire after the C Candle bar and alternate to keep the chart clean.
Visualization: Draws horizontal lines from the C Candle to the signal bar and adds labels (and optional arrows) at the signal point for easy identification.
Visual Description
Candlesticks: Overlaid with teal (high) and maroon (low) lines connecting C Candles to signal bars.
Labels: Green "Buy: " below bullish candles (e.g., "Buy: 98305") and red "Sell: " above bearish candles (e.g., "Sell: 91552.88").
Lines: Solid, stopping at the signal bar for a clean display.
Usage Tips
Chart Compatibility: Works on any chart type (regular candlesticks or Heikin Ashi) since it calculates HA values internally.
Confirmation: Pair with other indicators (e.g., moving averages, volume) or price action analysis to validate signals.
Timeframes: Shines in swing trading on daily or higher charts (e.g., 1D for BTC/USD), but effective across various timeframes.
Customization: Modify line colors or toggle labels/arrows in the settings to suit your style.
Why Use It?
This indicator simplifies trend reversal trading by combining Heikin Ashi’s noise reduction with precise, alternating signals. Its visual clarity—through colored lines, labeled prices, and optional arrows—helps traders act confidently. Whether you’re trading cryptocurrencies like BTC/USD, stocks, or forex, "6F Signals" offers a straightforward, effective tool to enhance your strategy.
Notes
Price Display: Labels show the raw closing price at the signal bar (not HA close) for real-world entry/exit levels.
Signal Clarity: Optional cyan dots (buy) and red dots (sell) can enhance visibility on some setups.
Disclaimer: For educational purposes. Always test on a demo account before live trading.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Ravi_021
Follow
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Momentum Charge Theory (MCT)-(TechnoBlooms)The Momentum Charge Theory (MCT) Indicator is an advanced physics and mathematics-inspired trend detection system designed to identify market energy shifts with precision. Unlike traditional indicators that rely on static formulas, MCT integrates entropy, volatility, kinetic energy, and wavelet transforms to map price dynamics in real time.
Built on Scientific Principles – This indicator applies quantum-inspired charge-discharge mechanics to spot early trend formations and reversals. Think of price action like an energy system: it charges (builds momentum) before an explosive move and discharges when that energy dissipates.
Core Concepts Behind MCT
1️⃣ Directional Market Entropy – Measuring Trend Strength
Entropy quantifies market randomness – is the trend structured or chaotic?
✅ A high-entropy market is uncertain (choppy price action), while a low-entropy market signals a strong directional trend.
✅ MCT normalizes entropy, allowing traders to differentiate trend acceleration from market noise.
2️⃣ Information Flow Volatility – Identifying Breakout Zones
Inspired by Econophysics, this component measures volatility based on information flow rather than simple price movements.
✅ Helps spot high-volatility breakout conditions before they occur.
✅ Filters out false breakouts caused by random market noise.
3️⃣ Kinetic Energy Momentum (KEM) – The Physics of Price Acceleration
Just like in physics, momentum is a function of mass and velocity – in trading, this translates to volume and price change.
✅ Uses kinetic energy equations to identify price acceleration zones.
✅ Helps detect momentum shifts before price visibly reacts.
4️⃣ Hilbert Transform Approximation – Slope & Trend Direction Analysis
Applies Hilbert Transforms to estimate trend angle shifts.
✅ Detects momentum decay and early reversal signals.
✅ Captures the true trend slope rather than relying on lagging moving averages.
5️⃣ Wavelet Transform – Advanced Noise Filtering & Trend Confirmation
Market movements contain multiple frequencies – wavelet transforms isolate dominant trends while removing short-term price noise.
✅ Improves trend clarity by reducing false signals.
✅ Acts as a final confirmation filter before generating Charge & Discharge signals.
Charge & Discharge – The Energy Behind Market Moves
🔹 Charge (Uptrend Activation)
A blue triangle appears below the candle when market conditions align for a strong bullish move.
📈 Indicates momentum buildup, low entropy, and trend strength confirmation.
🔸 Discharge (Downtrend Activation)
A purple triangle appears above the candle when price momentum weakens and market entropy increases.
📉 Suggests a potential trend exhaustion or reversal.
Best Use Cases for Traders
✅ Momentum Traders – Catch trend initiations before they gain full traction.
✅ Breakout Traders – Identify high-information flow zones with volatility-driven signals.
✅ Trend Followers – Avoid false signals by relying on entropy-driven confirmations.
The MCT indicator can be combined with any of your usual indicators for trend confirmation.
Dynamic Volume Profile Oscillator | OpusDynamic Volume Profile Oscillator | Opus 📈
Technical Indicator Overview
The Dynamic Volume Profile Oscillator | Opus is an advanced analytical tool 🛠️ that blends price action with volume analysis to deliver superior trend detection and trade entry signals. By calculating volume-weighted mean price deviations, this indicator adapts to market conditions, identifying overbought, oversold, and momentum shifts with greater precision than traditional oscillators.
Key Features 🌟
Adaptive Volume Profiling ✅: Continuously tracks recent volume concentrations to pinpoint key liquidity zones where price action is likely to react 📊.
Mean Reversion Mode ⚙️: Measures deviations from the volume-weighted average price (VWAP) to detect price exhaustion and potential reversal points ⚡.
Oscillator Smoothing 🚦: Applies a customizable EMA smoothing (default: 5) to reduce noise and enhance signal clarity.
Dynamic Midline & Zones 🌈: Features a self-adjusting midline and adaptive overbought/oversold zones based on historical oscillator values and standard deviation.
Signal Crossovers : Utilizes fast (5-period) and slow (15-period) EMA crossovers to capture early momentum shifts.
Gradient Zone Visualization 🎨: Displays color-coded zones (cyan for bullish, magenta for bearish) with multi-layered gradients to reflect trend strength 💪.
Usage Guidelines 📋
Bullish Momentum (Cyan) ✅ : Enter long positions when the oscillator exceeds the adaptive midline or the fast EMA crosses above the slow EMA, indicating upward momentum 🚀.
Bearish Momentum (Magenta) ❌ : Exit or short when the oscillator falls below the adaptive midline or the fast EMA crosses below the slow EMA, signaling a potential downtrend 🛑.
Overbought/Oversold Detection : Watch for extreme deviations into the gradient zones to anticipate reversals, especially in mean reversion mode ⚠️.
Signal Strength Evaluation : Assess gradient shading—darker zones suggest stronger signals, while lighter shades indicate caution 💡.
Customizable Settings ⚙️
Volume Analysis : Select price source (default: close), volume source (default: volume), lookback period (default: 50), and profile periods (default: 10) 🔧.
Oscillator Settings : Adjust smoothing length (default: 5), sensitivity (default: 1.0), and enable/disable mean reversion mode 🎚️.
Threshold Settings : Toggle adaptive midline (default: on), set midline period (default: 50), and adjust zone width multiplier (default: 1.5) 📏.
Display Options : Enable/disable color bars and customize gradient colors for a tailored visual experience 🖌️.
Applications 🌍
The Dynamic Volume Profile Oscillator | Opus is a versatile tool for traders seeking to combine volume-based insights with oscillator precision. Its adaptive design and gradient visualization excel at identifying liquidity-driven trends, momentum shifts, and reversal opportunities, making it ideal for dynamic markets and varied trading strategies 💼.
Technical Methodology (Bonus Section) 🔍
1. Volume Profile Calculation : Builds a profile of recent price-volume relationships, calculating VWAP and weighted deviation over a lookback period.
2. Oscillator Generation : Normalizes volume or deviation data (depending on mean reversion mode) and applies EMA smoothing for the main oscillator.
3. Signal Processin g: Uses fast and slow EMA crossovers and an adaptive midline (based on standard deviation) to generate trend signals.
4. Visualization : Implements multi-layered gradient fills between zones and midline, with bar coloring to reflect bullish/bearish states.
All under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0) © 2025 Opus Capital 💼.
SMC Structures and FVGThe provided Pine Script code is an indicator for trading platforms, specifically designed to identify and visualize key trading concepts such as Fair Value Gaps (FVG) and market structures. Here is a detailed description of its functionality:
### Overall Purpose
This indicator aims to assist traders in analyzing market dynamics by highlighting important price levels and areas of interest. It combines the identification of FVGs and market structures to provide a comprehensive view of the market.
### Key Features and Functionalities
#### 1. Input Parameters
- **Fair Value Gap (FVG) Settings**:
- `isFvgToShow`: A boolean input to determine whether to display FVGs on the chart.
- `bullishFvgColor` and `bearishFvgColor`: Define the colors for bullish and bearish FVGs respectively.
- `mitigatedFvgColor`: Specifies the color for mitigated FVGs.
- `fvgHistoryNbr`: Determines the number of FVGs to display on the chart (default set to 10).
- `isMitigatedFvgToReduce`: A boolean input to decide whether to reduce the size of mitigated FVGs.
- **Market Structure Settings**:
- `isStructBodyCandleBreak`: A boolean input to indicate whether to consider the candle body for structure breaks.
- `isCurrentStructToShow`: A boolean input to control the display of the current market structure.
- `bullishBosColor` and `bearishBosColor`: Set the colors for bullish and bearish Break of Structure (BOS) lines (both set to green).
- `bosLineStyleOption` and `bosLineWidth`: Define the style and width (set to 2) of BOS lines.
- `bullishChochColor` and `bearishChochColor`: Determine the colors for bullish and bearish Change of Character (CHoCH) lines.
- `chochLineStyleOption` and `chochLineWidth`: Specify the style and width (set to 2) of CHoCH lines.
- `currentStructColor`, `currentStructLineStyleOption`, and `currentStructLineWidth`: Set the color, style, and width (set to 2) of the current market structure lines.
- `structHistoryNbr`: Defines the number of structure breaks to display on the chart.
#### 2. Fair Value Gap (FVG) Detection and Visualization
- **FVG Identification**:
- The code identifies bullish FVGs when the high of the third - previous bar is less than the low of the previous bar (`isBullishFVG`).
- Bearish FVGs are identified when the low of the third - previous bar is greater than the high of the previous bar (`isBearishFVG`).
- **FVG Drawing**:
- For each identified FVG, a box is drawn on the chart with the appropriate color based on its bullish or bearish nature.
- Labels are added to the FVG boxes.
- The code also handles the removal of FVGs that have been mitigated (i.e., when the price crosses the FVG range).
- Mitigated FVGs are colored differently, and an alert can be triggered when an FVG is mitigated.
#### 3. Market Structure Analysis
- **Structure Identification**:
- The code identifies the highest and lowest price levels within a lookback period (default 10 bars).
- It tracks the start index of the current high and low structures.
- Structure breaks are detected based on whether the price crosses the previous high or low structure levels, considering the candle body if `isStructBodyCandleBreak` is set to true.
- **Line Drawing**:
- When a structure break occurs, either a BOS or CHoCH line is drawn on the chart depending on the market direction.
- The lines are drawn with the specified color, style, and width.
- Labels are added to the lines to indicate whether they are BOS or CHoCH lines.
- The current market structure is also displayed on the chart with the defined color, style, and width.
#### 4. Alerts
- **Alert Conditions**:
- Alerts are set for BOS and CHoCH events. When a BOS or CHoCH occurs, an alert is triggered with the corresponding title and message.
In summary, this indicator provides traders with a visual representation of FVGs and market structures, along with alerts for key events, helping them to make more informed trading decisions.
Smart Dynamic Levels [ATR-Based]Smart Dynamic Levels
Automated Support & Resistance Levels Based on Market Volatility
Overview:
This advanced indicator automatically plots dynamic support and resistance levels based on the Average True Range (ATR), creating meaningful price zones that adapt to changing market conditions. Unlike static round-number levels, these volatility-adjusted zones provide more relevant technical reference points.
Key Features:
Volatility-Responsive: Levels automatically adjust based on the asset's ATR
Smart Visualization:
Color gradient shows strength of each level (darker = stronger)
Bullish (green) levels below price, bearish (red) levels above
Customizable Settings:
Adjust ATR length (14-period default)
Modify level sensitivity with ATR multiplier (1.5x default)
Choose number of levels to display (5 above/below default)
Toggle labels and line extensions
How It Works:
Calculates the asset's true volatility using ATR
Rounds to significant price intervals based on current volatility
Plots equidistant levels above and below current price
Colors levels based on their position relative to price
Automatically updates as market conditions change
Recommended Use:
Day Trading: Identify intraday support/resistance zones
Swing Trading: Spot potential reversal areas
Breakout Trading: Watch for moves beyond key levels
Works on all markets: Stocks, Forex, Crypto, Futures
Settings Guide:
ATR Length: Higher values for smoother levels (14-20)
Multiplier: Increase for wider levels (1.5-3x)
Levels Count: More levels for higher timeframes (3-10)
Pro Tips:
Combine with trend analysis - levels are more significant when aligned with trend
Watch for price reactions at these levels for confirmation
Use wider levels (higher multiplier) for volatile assets
TP/SL Percentage & RR Visual ToolThis tool is designed to help traders visually and statistically assess their trade setup by calculating Stop Loss (SL), Take Profit (TP), and Risk-to-Reward (RR) based on percentage inputs from the current price.
🔧 How It Works:
Uses the current candle’s close price as your entry.
Calculates TP and SL as percentage-based levels (e.g., 1% SL, 1.5% TP).
Displays horizontal lines and labels on the chart for TP and SL (only on the latest candle to reduce clutter).
Shows a compact table in the top-right corner with all key values:
Entry Price
Current Price
TP Price (+%)
SL Price (-%)
TP Distance from current price
RR Ratio (e.g., 1:1.5)
💡 Use Cases:
Quickly validate if a trade setup meets your desired RR profile (e.g., 1:2).
Perfect for scalpers, swing traders, and position traders who rely on structured risk management.
Combine with your entry signal strategy to visualize targets and stops without manual calculations.
⚙️ Inputs:
Stop Loss % – Sets how far your SL is from the entry.
Take Profit % – Sets how far your TP is from the entry.
Trend-Based Buy/Sell/Sideways SignalThick trend bands with gradient coloring
✅ Clear "BUY", "SELL", and "SIDEWAYS" signals with labels
✅ Proper visual elements to enhance clarity
Key-level-3.1 ob bb msb fvg
//@version=5
indicator("Key-level-3.1 ob bb msb fvg","key level 3" ,overlay = true, max_lines_count = 66, max_labels_count = 66)
// -----------------------------------------------------------------------------
// edited by berkusa
// -----------------------------------------------------------------------------
showprice= input.bool(true, title = "fiyatlari goster veya gosterme ")
///level func
f_create_level(_type, _start_condition, _active_condition, _global_level_array, _color, _line_width, _line_ext, _line_style, _label_size, _title, _iter, _is_enabled) =>
var float _price = na
var int _start_time = na
var float _hh = na
var float _ll = na
var line _price_line = line.new(x1 = na, y1 = na, x2 = na, y2 = na, xloc = xloc.bar_time, color = _color, width = _line_width, style = _line_style)
var label _price_label = label.new(x = na, y = na, xloc = xloc.bar_time, style = label.style_label_left, color = #00000000, size = _label_size, textcolor = _color)
_end_time = int(time + _line_ext * ta.change(time))
if _type == "open"
if _start_condition
_price := open
_start_time := time
else if _type == "high"
if _start_condition
_price := high
_start_time := time
else if _active_condition
_price := math.max(_price, high)
else if _type == "low"
if _start_condition
_price := low
_start_time := time
else if _active_condition
_price := math.min(_price, low)
else if _type == "eq"
if _start_condition
_hh := high
_ll := low
_price := math.avg(_hh, _ll)
_start_time := time
else if _active_condition
_hh := math.max(_hh, high)
_ll := math.min(_ll, low)
_price := math.avg(_hh, _ll)
float _price_val = _iter == 0 ? _price : ta.valuewhen(_start_condition, _price , _iter - 1)
int _start_time_val = _iter == 0 ? _start_time : ta.valuewhen(_start_condition, _start_time , _iter - 1)
_found_existing = array.indexof(_global_level_array, _price_val) > -1
if _is_enabled
if _found_existing
line.set_xy1(_price_line, x = na, y = na)
line.set_xy2(_price_line, x = na, y = na)
label.set_xy(_price_label, x = na, y = na)
else
array.push(_global_level_array, _price_val)
line.set_xy1(_price_line, x = _start_time_val, y = _price_val)
line.set_xy2(_price_line, x = _end_time, y = _price_val)
label.set_xy(_price_label, x = _end_time, y = _price_val)
label.set_text(_price_label , text = showprice? _title + " : " + str.tostring(_price_val): _title )
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// }
// Necessary Variables {
// -----------------------------------------------------------------------------
// Global arrays used to detect duplicate levels.
// Duplication is detected implicitly by execution order and whether the level has already been placed in the global array.
float global_open_array = array.new_float()
float global_high_array = array.new_float()
float global_low_array = array.new_float()
float global_eq_array = array.new_float()
new_H4 = ta.change(time("240")) != 0
new_day = ta.change(time("D")) != 0
new_week = ta.change(time("W")) != 0
new_month = ta.change(time("M")) != 0
new_quarter = ta.change(time("3M")) != 0
new_year = ta.change(time("12M")) != 0
is_monday = dayofweek == dayofweek.monday
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// }
// Global settings {
// -----------------------------------------------------------------------------
//inp_open_line_style = input.string("Solid", options = , title = "Open Line Style", group = "Global Settings")
//inp_high_line_style = input.string("Dashed", options = , title = "High Line Style", group = "Global Settings")
//inp_low_line_style = input.string("Dashed", options = , title = "Low Line Style", group = "Global Settings")
//inp_eq_line_style = input.string("Dotted", options = , title = "EQ Line Style", group = "Global Settings")
inp_open_line_style = "Solid"// input.string("Solid", options = , title = "Open Line Style", group = "Global Settings")
inp_high_line_style = "Dashed"// input.string("Dashed", options = , title = "High Line Style", group = "Global Settings")
inp_low_line_style = "Dashed"// input.string("Dashed", options = , title = "Low Line Style", group = "Global Settings")
inp_eq_line_style = "Dotted"// input.string("Dotted", options = , title = "EQ Line Style", group = "Global Settings")
inp_text_size = input.string("Small", options = , title = "Text Size", group = "Global Settings")
inp_ext = input.int(30, title = "Line Extension", group = "Global Settings")
text_size = inp_text_size == "Small" ? size.small : inp_text_size == "Normal" ? size.normal : size.large
open_line_style = inp_open_line_style == "Solid" ? line.style_solid : inp_open_line_style == "Dotted" ? line.style_dotted : line.style_dashed
high_line_style = inp_high_line_style == "Solid" ? line.style_solid : inp_high_line_style == "Dotted" ? line.style_dotted : line.style_dashed
low_line_style = inp_low_line_style == "Solid" ? line.style_solid : inp_low_line_style == "Dotted" ? line.style_dotted : line.style_dashed
eq_line_style = inp_eq_line_style == "Solid" ? line.style_solid : inp_eq_line_style == "Dotted" ? line.style_dotted : line.style_dashed
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// }
// H4 and Prev H4
// -----------------------------------------------------------------------------
h4 = input.bool(true, title = "H4", group = "H4 Levels", inline = "1")
inp_show_H4_open = input.bool(true, title = "OPEN", group = "H4 Levels", inline = "1")
inp_show_H4_high = input.bool(false, title = "HIGH", group = "H4 Levels", inline = "1")
inp_show_H4_low = input.bool(false, title = "LOW", group = "H4 Levels", inline = "1")
inp_show_H4_eq = input.bool(false, title = "EQ", group = "H4 Levels", inline = "1")
inp_H4_col = input.color(color.teal, title = "color", group = "H4 Levels", inline = "2")
inp_H4_line_width =1// input.int(1, title = "Line width", minval = 1, group = "H4 Levels", inline = "2")
H4_ok = timeframe.isintraday and timeframe.multiplier < 240
f_create_level("open", new_H4, not new_H4, global_open_array, inp_H4_col, inp_H4_line_width, inp_ext, open_line_style, text_size, "H4-O", 0, inp_show_H4_open and H4_ok and h4 )
f_create_level("high", new_H4, not new_H4, global_high_array, inp_H4_col, inp_H4_line_width, inp_ext, high_line_style, text_size, "H4-H", 0, inp_show_H4_high and H4_ok and h4 )
f_create_level("low", new_H4, not new_H4, global_low_array, inp_H4_col, inp_H4_line_width, inp_ext, low_line_style, text_size, "H4-L", 0, inp_show_H4_low and H4_ok and h4 )
f_create_level("eq", new_H4, not new_H4, global_eq_array, inp_H4_col, inp_H4_line_width, inp_ext, eq_line_style, text_size, "H4-EQ", 0, inp_show_H4_eq and H4_ok and h4 )
prev_H4 = input.bool(true, title = "P-H4", group = "Prev H4 Levels", inline = "1")
inp_show_prev_H4_open = input.bool(true, title = "OPEN", group = "Prev H4 Levels", inline = "1")
inp_show_prev_H4_high = input.bool(false, title = "HIGH", group = "Prev H4 Levels", inline = "1")
inp_show_prev_H4_low = input.bool(false, title = "LOW", group = "Prev H4 Levels", inline = "1")
inp_show_prev_H4_eq = input.bool(false, title = "EQ", group = "Prev H4 Levels", inline = "1")
inp_prev_H4_col = input.color(color.olive, title = "color", group = "Prev H4 Levels", inline = "2")
inp_prev_H4_line_width =1// input.int(1, title = "Line width", minval = 1, group = "Prev H4 Levels", inline = "2")
f_create_level("open", new_H4, not new_H4, global_open_array, inp_prev_H4_col, inp_prev_H4_line_width, inp_ext, open_line_style, text_size, "P-H4-O", 1, inp_show_prev_H4_open and H4_ok and prev_H4)
f_create_level("high", new_H4, not new_H4, global_high_array, inp_prev_H4_col, inp_prev_H4_line_width, inp_ext, high_line_style, text_size, "P-H4-H", 1, inp_show_prev_H4_high and H4_ok and prev_H4)
f_create_level("low", new_H4, not new_H4, global_low_array, inp_prev_H4_col, inp_prev_H4_line_width, inp_ext, low_line_style, text_size, "P-H4-L", 1, inp_show_prev_H4_low and H4_ok and prev_H4)
f_create_level("eq", new_H4, not new_H4, global_eq_array, inp_prev_H4_col, inp_prev_H4_line_width, inp_ext, eq_line_style, text_size, "P-H4-EQ", 1, inp_show_prev_H4_eq and H4_ok and prev_H4)
// -----------------------------------------------------------------------------
// Daily and Prev Daily
// -----------------------------------------------------------------------------
daily = input.bool(true, title = "D", group = "Daily Levels", inline = "1")
inp_show_daily_open = input.bool(true, title = "OPEN", group = "Daily Levels", inline = "1")
inp_show_daily_high = input.bool(true, title = "HIGH", group = "Daily Levels", inline = "1")
inp_show_daily_low = input.bool(true, title = "LOW", group = "Daily Levels", inline = "1")
inp_show_daily_eq = input.bool(true, title = "EQ", group = "Daily Levels", inline = "1")
inp_daily_col = input.color(color.silver, title = "color", group = "Daily Levels", inline = "2")
inp_daily_line_width =1// input.int(1, title = "Line width", minval = 1, group = "Daily Levels", inline = "2")
daily_ok = timeframe.isintraday
f_create_level("open", new_day, not new_day, global_open_array, inp_daily_col, inp_daily_line_width, inp_ext, open_line_style, text_size, "DO", 0, inp_show_daily_open and daily_ok and daily)
f_create_level("high", new_day, not new_day, global_high_array, inp_daily_col, inp_daily_line_width, inp_ext, high_line_style, text_size, "DH", 0, inp_show_daily_high and daily_ok and daily)
f_create_level("low", new_day, not new_day, global_low_array, inp_daily_col, inp_daily_line_width, inp_ext, low_line_style, text_size, "DL", 0, inp_show_daily_low and daily_ok and daily)
f_create_level("eq", new_day, not new_day, global_eq_array, inp_daily_col, inp_daily_line_width, inp_ext, eq_line_style, text_size, "D-EQ", 0, inp_show_daily_eq and daily_ok and daily)
prev_daily = input.bool(true, title = "PD", group = "Prev Daily Levels", inline = "1")
inp_show_prev_daily_open = input.bool(true, title = "OPEN", group = "Prev Daily Levels", inline = "1")
inp_show_prev_daily_high = input.bool(true, title = "HIGH", group = "Prev Daily Levels", inline = "1")
inp_show_prev_daily_low = input.bool(true, title = "LOW", group = "Prev Daily Levels", inline = "1")
inp_show_prev_daily_eq = input.bool(false, title = "EQ", group = "Prev Daily Levels", inline = "1")
inp_prev_daily_col = input.color(color.gray, title = "color", group = "Prev Daily Levels", inline = "2")
inp_prev_daily_line_width = 1//input.int(1, title = "Line width", minval = 1, group = "Prev Daily Levels", inline = "2")
dd = input.int(1, title = "dayback", minval = 1,maxval=7, group = "Prev Daily Levels", inline = "2")
if dd >= 1
f_create_level("open", new_day, not new_day, global_open_array, inp_prev_daily_col, inp_prev_daily_line_width, inp_ext, open_line_style, text_size, "P-DO", 1, inp_show_prev_daily_open and daily_ok and prev_daily )
f_create_level("high", new_day, not new_day, global_high_array, inp_prev_daily_col, inp_prev_daily_line_width, inp_ext, high_line_style, text_size, "P-DH", 1 , inp_show_prev_daily_high and daily_ok and prev_daily )
f_create_level("low", new_day, not new_day, global_low_array, inp_prev_daily_col, inp_prev_daily_line_width, inp_ext, low_line_style, text_size, "P-DL", 1, inp_show_prev_daily_low and daily_ok and prev_daily )
f_create_level("eq", new_day, not new_day, global_eq_array, inp_prev_daily_col, inp_prev_daily_line_width, inp_ext, eq_line_style, text_size, "P-D-EQ", 1, inp_show_prev_daily_eq and daily_ok and prev_daily )
if dd >= 2
f_create_level("open", new_day, not new_day, global_open_array, inp_prev_daily_col, inp_prev_daily_line_width, inp_ext, open_line_style, text_size, "P-DO-2", 2, inp_show_prev_daily_open and daily_ok and prev_daily )
f_create_level("high", new_day, not new_day, global_high_array, inp_prev_daily_col, inp_prev_daily_line_width, inp_ext, high_line_style, text_size, "P-DH-2", 2 , inp_show_prev_daily_high and daily_ok and prev_daily )
f_create_level("low", new_day, not new_day, global_low_array, inp_prev_daily_col, inp_prev_daily_line_width, inp_ext, low_line_style, text_size, "P-DL-2", 2, inp_show_prev_daily_low and daily_ok and prev_daily )
f_create_level("eq", new_day, not new_day, global_eq_array, inp_prev_daily_col, inp_prev_daily_line_width, inp_ext, eq_line_style, text_size, "P-D-EQ-2", 2, inp_show_prev_daily_eq and daily_ok and prev_daily )
if dd >= 3
f_create_level("open", new_day, not new_day, global_open_array, inp_prev_daily_col, inp_prev_daily_line_width, inp_ext, open_line_style, text_size, "P-DO-3", dd, inp_show_prev_daily_open and daily_ok and prev_daily )
f_create_level("high", new_day, not new_day, global_high_array, inp_prev_daily_col, inp_prev_daily_line_width, inp_ext, high_line_style, text_size, "P-DH-3", dd , inp_show_prev_daily_high and daily_ok and prev_daily )
f_create_level("low", new_day, not new_day, global_low_array, inp_prev_daily_col, inp_prev_daily_line_width, inp_ext, low_line_style, text_size, "P-DL-3", dd, inp_show_prev_daily_low and daily_ok and prev_daily )
f_create_level("eq", new_day, not new_day, global_eq_array, inp_prev_daily_col, inp_prev_daily_line_width, inp_ext, eq_line_style, text_size, "P-D-EQ-3", dd, inp_show_prev_daily_eq and daily_ok and prev_daily )
// -----------------------------------------------------------------------------
// Weekly and Prev Weekly
// -----------------------------------------------------------------------------
weekly = input.bool(true, title = "W", group = "Weekly Levels", inline = "1")
inp_show_weekly_open = input.bool(true, title = "OPEN", group = "Weekly Levels", inline = "1")
inp_show_weekly_high = input.bool(true, title = "HIGH", group = "Weekly Levels", inline = "1")
inp_show_weekly_low = input.bool(true, title = "LOW", group = "Weekly Levels", inline = "1")
inp_show_weekly_eq = input.bool(false, title = "EQ", group = "Weekly Levels", inline = "1")
inp_weekly_col = input.color(color.aqua, title = "color", group = "Weekly Levels", inline = "2")
inp_weekly_line_width =1// input.int(1, title = "Line width", minval = 1, group = "Weekly Levels", inline = "2")
weekly_ok = timeframe.isintraday or timeframe.isdaily
f_create_level("open", new_week, not new_week, global_open_array, inp_weekly_col, inp_weekly_line_width, inp_ext, open_line_style, text_size, "WO", 0, inp_show_weekly_open and weekly_ok and weekly )
f_create_level("high", new_week, not new_week, global_high_array, inp_weekly_col, inp_weekly_line_width, inp_ext, high_line_style, text_size, "WH", 0, inp_show_weekly_high and weekly_ok and weekly )
f_create_level("low", new_week, not new_week, global_low_array, inp_weekly_col, inp_weekly_line_width, inp_ext, low_line_style, text_size, "WL", 0, inp_show_weekly_low and weekly_ok and weekly )
f_create_level("eq", new_week, not new_week, global_eq_array, inp_weekly_col, inp_weekly_line_width, inp_ext, eq_line_style, text_size, "W-EQ", 0, inp_show_weekly_eq and weekly_ok and weekly )
prev_weekly = input.bool(true, title = "PW", group = "Prev Weekly Levels", inline = "1")
inp_show_prev_weekly_open = input.bool(true, title = "OPEN", group = "Prev Weekly Levels", inline = "1")
inp_show_prev_weekly_high = input.bool(false, title = "HIGH", group = "Prev Weekly Levels", inline = "1")
inp_show_prev_weekly_low = input.bool(false, title = "LOW", group = "Prev Weekly Levels", inline = "1")
inp_show_prev_weekly_eq = input.bool(false, title = "EQ", group = "Prev Weekly Levels", inline = "1")
inp_prev_weekly_col = input.color(color.blue, title = "color", group = "Prev Weekly Levels", inline = "2")
inp_prev_weekly_line_width = 1//input.int(1, title = "Line width", minval = 1, group = "Prev Weekly Levels", inline = "2")
ww = input.int(1, title = "weekback", minval = 1,maxval=5, group = "Prev Weekly Levels", inline = "2")
f_create_level("open", new_week, not new_week, global_open_array, inp_prev_weekly_col, inp_prev_weekly_line_width, inp_ext, open_line_style, text_size, "P-WO", ww, inp_show_prev_weekly_open and weekly_ok and prev_weekly)
f_create_level("high", new_week, not new_week, global_high_array, inp_prev_weekly_col, inp_prev_weekly_line_width, inp_ext, high_line_style, text_size, "P-WH", ww, inp_show_prev_weekly_high and weekly_ok and prev_weekly)
f_create_level("low", new_week, not new_week, global_low_array, inp_prev_weekly_col, inp_prev_weekly_line_width, inp_ext, low_line_style, text_size, "P-WL", ww, inp_show_prev_weekly_low and weekly_ok and prev_weekly)
f_create_level("eq", new_week, not new_week, global_eq_array, inp_prev_weekly_col, inp_prev_weekly_line_width, inp_ext, eq_line_style, text_size, "P-W-EQ", ww, inp_show_prev_weekly_eq and weekly_ok and prev_weekly)
// Monday and Prev Monday
// -----------------------------------------------------------------------------
// Note : Monday range is a special case and is why the _active_condition is implemented in the function. We only want start on Monday, and ONLY update levels during monday.
monday_open = input.bool(false, title = "MonD", group = "Monday Levels", inline = "1")
inp_show_monday_open = input.bool(false, title = "OPEN", group = "Monday Levels", inline = "1")
inp_show_monday_high = input.bool(false, title = "HIGH", group = "Monday Levels", inline = "1")
inp_show_monday_low = input.bool(false, title = "LOW", group = "Monday Levels", inline = "1")
inp_show_monday_eq = input.bool(false, title = "EQ", group = "Monday Levels", inline = "1")
inp_monday_col = input.color(color.fuchsia, title = "color", group = "Monday Levels", inline = "2")
inp_monday_line_width = 1//input.int(1, title = "Line width", minval = 1, group = "Monday Levels", inline = "2")
monday_ok = timeframe.isintraday
f_create_level("open", new_week, is_monday, global_open_array, inp_monday_col, inp_monday_line_width, inp_ext, open_line_style, text_size, "M.Day-O", 0, inp_show_monday_open and monday_ok and monday_open)
f_create_level("high", new_week, is_monday, global_high_array, inp_monday_col, inp_monday_line_width, inp_ext, high_line_style, text_size, "M.Day-H", 0, inp_show_monday_high and monday_ok and monday_open)
f_create_level("low", new_week, is_monday, global_low_array, inp_monday_col, inp_monday_line_width, inp_ext, low_line_style, text_size, "M.Day-L", 0, inp_show_monday_low and monday_ok and monday_open)
f_create_level("eq", new_week, is_monday, global_eq_array, inp_monday_col, inp_monday_line_width, inp_ext, eq_line_style, text_size, "M.Day-EQ", 0, inp_show_monday_eq and monday_ok and monday_open)
prev_monday = input.bool(false, title = "p-mon", group = "Prev Monday Levels", inline = "1")
inp_show_prev_monday_open = input.bool(false, title = "OPEN", group = "Prev Monday Levels", inline = "1")
inp_show_prev_monday_high = input.bool(false, title = "HIGH", group = "Prev Monday Levels", inline = "1")
inp_show_prev_monday_low = input.bool(false, title = "LOW", group = "Prev Monday Levels", inline = "1")
inp_show_prev_monday_eq = input.bool(false, title = "EQ", group = "Prev Monday Levels", inline = "1")
inp_prev_monday_col = input.color(color.purple, title = "color", group = "Prev Monday Levels", inline = "2")
inp_prev_monday_line_width = 1//input.int(1, title = "Line width", minval = 1, group = "Prev Monday Levels", inline = "2")
f_create_level("open", new_week, is_monday, global_open_array, inp_prev_monday_col, inp_prev_monday_line_width, inp_ext, open_line_style, text_size, "P-M.Day-O", 1, inp_show_prev_monday_open and monday_ok and prev_monday and prev_monday)
f_create_level("high", new_week, is_monday, global_high_array, inp_prev_monday_col, inp_prev_monday_line_width, inp_ext, high_line_style, text_size, "P-M.Day-H", 1, inp_show_prev_monday_high and monday_ok and prev_monday and prev_monday)
f_create_level("low", new_week, is_monday, global_low_array, inp_prev_monday_col, inp_prev_monday_line_width, inp_ext, low_line_style, text_size, "P-M.Day-L", 1, inp_show_prev_monday_low and monday_ok and prev_monday and prev_monday)
f_create_level("eq", new_week, is_monday, global_eq_array, inp_prev_monday_col, inp_prev_monday_line_width, inp_ext, eq_line_style, text_size, "P-M.Day-EQ", 1, inp_show_prev_monday_eq and monday_ok and prev_monday and prev_monday)
// -----------------------------------------------------------------------------
// Monthly and Prev Monthly
// -----------------------------------------------------------------------------
monthly = input.bool(true, title = "M", group = "Monthly Levels", inline = "1")
inp_show_monthly_open = input.bool(true, title = "OPEN", group = "Monthly Levels", inline = "1")
inp_show_monthly_high = input.bool(true, title = "HIGH", group = "Monthly Levels", inline = "1")
inp_show_monthly_low = input.bool(true, title = "LOW", group = "Monthly Levels", inline = "1")
inp_show_monthly_eq = input.bool(false, title = "EQ", group = "Monthly Levels", inline = "1")
inp_monthly_col = input.color(color.lime, title = "color", group = "Monthly Levels", inline = "2")
inp_monthly_line_width = 1//input.int(1, title = "Line width", minval = 1 ,group = "Monthly Levels", inline = "2")
monthly_ok = timeframe.isintraday or timeframe.isdaily
f_create_level("open", new_month, not new_month, global_open_array, inp_monthly_col, inp_monthly_line_width, inp_ext, open_line_style, text_size, "MO", 0, inp_show_monthly_open and monthly_ok and monthly )
f_create_level("high", new_month, not new_month, global_high_array, inp_monthly_col, inp_monthly_line_width, inp_ext, high_line_style, text_size, "MH", 0, inp_show_monthly_high and monthly_ok and monthly )
f_create_level("low", new_month, not new_month, global_low_array, inp_monthly_col, inp_monthly_line_width, inp_ext, low_line_style, text_size, "ML", 0, inp_show_monthly_low and monthly_ok and monthly )
f_create_level("eq", new_month, not new_month, global_eq_array, inp_monthly_col, inp_monthly_line_width, inp_ext, eq_line_style, text_size, "M-EQ", 0, inp_show_monthly_eq and monthly_ok and monthly )
prev_monthly = input.bool(true, title = "PM", group = "Prev Monthly Levels", inline = "1")
inp_show_prev_monthly_open = input.bool(true, title = "OPEN", group = "Prev Monthly Levels", inline = "1")
inp_show_prev_monthly_high = input.bool(false, title = "HIGH", group = "Prev Monthly Levels", inline = "1")
inp_show_prev_monthly_low = input.bool(false, title = "LOW", group = "Prev Monthly Levels", inline = "1")
inp_show_prev_monthly_eq = input.bool(false, title = "EQ", group = "Prev Monthly Levels", inline = "1")
inp_prev_monthly_col = input.color(color.green, title = "color", group = "Prev Monthly Levels", inline = "2")
inp_prev_monthly_line_width =1// input.int(1, title = "Line width", minval = 1, group = "Prev Monthly Levels", inline = "2")
mm = input.int(1, title = "monthback", minval = 1,maxval=13, group = "Prev Monthly Levels", inline = "2")
f_create_level("open", new_month, not new_month, global_open_array, inp_prev_monthly_col, inp_prev_monthly_line_width, inp_ext, open_line_style, text_size, "P-MO", mm, inp_show_prev_monthly_open and monthly_ok and prev_monthly and prev_monthly )
f_create_level("high", new_month, not new_month, global_high_array, inp_prev_monthly_col, inp_prev_monthly_line_width, inp_ext, high_line_style, text_size, "P-MH", mm, inp_show_prev_monthly_high and monthly_ok and prev_monthly and prev_monthly )
f_create_level("low", new_month, not new_month, global_low_array, inp_prev_monthly_col, inp_prev_monthly_line_width, inp_ext, low_line_style, text_size, "P-ML", mm, inp_show_prev_monthly_low and monthly_ok and prev_monthly and prev_monthly )
f_create_level("eq", new_month, not new_month, global_eq_array, inp_prev_monthly_col, inp_prev_monthly_line_width, inp_ext, eq_line_style, text_size, "P-M-EQ", mm, inp_show_prev_monthly_eq and monthly_ok and prev_monthly and prev_monthly )
// -----------------------------------------------------------------------------
// Quarterly and Prev Quarterly
// -----------------------------------------------------------------------------
quarterly = input.bool(false, title = "Q", group = "Quarterly Levels", inline = "1")
inp_show_quarterly_open = input.bool(false, title = "OPEN", group = "Quarterly Levels", inline = "1")
inp_show_quarterly_high = input.bool(false, title = "HIGH", group = "Quarterly Levels", inline = "1")
inp_show_quarterly_low = input.bool(false, title = "LOW", group = "Quarterly Levels", inline = "1")
inp_show_quarterly_eq = input.bool(false, title = "EQ", group = "Quarterly Levels", inline = "1")
inp_quarterly_col = input.color(color.orange, title = "color", group = "Quarterly Levels", inline = "2")
inp_quarterly_line_width = 1//input.int(1, title = "Line width", minval = 1, group = "Quarterly Levels", inline = "2")
quarterly_ok = timeframe.isintraday or timeframe.isdaily or timeframe.isweekly
f_create_level("open", new_quarter, not new_quarter, global_open_array, inp_quarterly_col, inp_quarterly_line_width, inp_ext, open_line_style, text_size, "3M-O", 0, inp_show_quarterly_open and quarterly_ok and quarterly)
f_create_level("high", new_quarter, not new_quarter, global_high_array, inp_quarterly_col, inp_quarterly_line_width, inp_ext, high_line_style, text_size, "3M-H", 0, inp_show_quarterly_high and quarterly_ok and quarterly)
f_create_level("low", new_quarter, not new_quarter, global_low_array, inp_quarterly_col, inp_quarterly_line_width, inp_ext, low_line_style, text_size, "3M-L", 0, inp_show_quarterly_low and quarterly_ok and quarterly)
f_create_level("eq", new_quarter, not new_quarter, global_eq_array, inp_quarterly_col, inp_quarterly_line_width, inp_ext, eq_line_style, text_size, "3M-EQ", 0, inp_show_quarterly_eq and quarterly_ok and quarterly)
prev_quarterly = input.bool(false, title = "PQ", group = "Prev Quarterly Levels", inline = "1")
inp_show_prev_quarterly_open = input.bool(false, title = "OPEN", group = "Prev Quarterly Levels", inline = "1")
inp_show_prev_quarterly_high = input.bool(false, title = "HIGH", group = "Prev Quarterly Levels", inline = "1")
inp_show_prev_quarterly_low = input.bool(false, title = "LOW", group = "Prev Quarterly Levels", inline = "1")
inp_show_prev_quarterly_eq = input.bool(false, title = "EQ", group = "Prev Quarterly Levels", inline = "1")
inp_prev_quarterly_col = input.color(color.yellow, title = "color", group = "Prev Quarterly Levels", inline = "2")
inp_prev_quarterly_line_width = 1//input.int(1, title = "Line width", minval = 1, group = "Prev Quarterly Levels", inline = "2")
qq = input.int(1, title = "Quarterback", minval = 1,maxval=12, group = "Prev Quarterly Levels", inline = "2")
f_create_level("open", new_quarter, not new_quarter, global_open_array, inp_prev_quarterly_col, inp_prev_quarterly_line_width, inp_ext, open_line_style, text_size, "P 3MOpen", mm, inp_show_prev_quarterly_open and quarterly_ok and prev_quarterly and qq)
f_create_level("high", new_quarter, not new_quarter, global_high_array, inp_prev_quarterly_col, inp_prev_quarterly_line_width, inp_ext, high_line_style, text_size, "Prev 3MHIGH", mm, inp_show_prev_quarterly_high and quarterly_ok and prev_quarterly and qq)
f_create_level("low", new_quarter, not new_quarter, global_low_array, inp_prev_quarterly_col, inp_prev_quarterly_line_width, inp_ext, low_line_style, text_size, "P-3MLOW", mm, inp_show_prev_quarterly_low and quarterly_ok and prev_quarterly and qq)
f_create_level("eq", new_quarter, not new_quarter, global_eq_array, inp_prev_quarterly_col, inp_prev_quarterly_line_width, inp_ext, eq_line_style, text_size, "P-3M-EQ", mm, inp_show_prev_quarterly_eq and quarterly_ok and prev_quarterly and qq)
// -----------------------------------------------------------------------------
// Yearly & Prev Yearly
// -----------------------------------------------------------------------------
yearly = input.bool(false, title = "Y", group = "Yearly Levels", inline = "1")
inp_show_yearly_open = input.bool(false, title = "OPEN", group = "Yearly Levels", inline = "1")
inp_show_yearly_high = input.bool(false, title = "HIGH", group = "Yearly Levels", inline = "1")
inp_show_yearly_low = input.bool(false, title = "LOW", group = "Yearly Levels", inline = "1")
inp_show_yearly_eq = input.bool(false, title = "EQ", group = "Yearly Levels", inline = "1")
inp_yearly_col = input.color(color.red, title = "color", group = "Yearly Levels", inline = "2")
inp_yearly_line_width = input.int(1, title = "Line width", minval = 1, group = "Yearly Levels", inline = "2")
yearly_ok = timeframe.isintraday or timeframe.isdaily or timeframe.isweekly or (timeframe.ismonthly and timeframe.multiplier < 12)
f_create_level("open", new_year, not new_year, global_open_array, inp_yearly_col, inp_yearly_line_width, inp_ext, open_line_style, text_size, "YO", 0, inp_show_yearly_open and yearly_ok)
f_create_level("high", new_year, not new_year, global_high_array, inp_yearly_col, inp_yearly_line_width, inp_ext, high_line_style, text_size, "Yearly HIGH", 0, inp_show_yearly_high and yearly_ok)
f_create_level("low", new_year, not new_year, global_low_array, inp_yearly_col, inp_yearly_line_width, inp_ext, low_line_style, text_size, "Yearly LOW", 0, inp_show_yearly_low and yearly_ok)
f_create_level("eq", new_year, not new_year, global_eq_array, inp_yearly_col, inp_yearly_line_width, inp_ext, eq_line_style, text_size, "Yearly EQ", 0, inp_show_yearly_eq and yearly_ok)
prev_yearly = input.bool(false, title = "PY", group = "Prev Yearly Levels", inline = "1")
inp_show_prev_yearly_open = input.bool(false, title = "OPEN", group = "Prev Yearly Levels", inline = "1")
inp_show_prev_yearly_high = input.bool(false, title = "HIGH", group = "Prev Yearly Levels", inline = "1")
inp_show_prev_yearly_low = input.bool(false, title = "LOW", group = "Prev Yearly Levels", inline = "1")
inp_show_prev_yearly_eq = input.bool(false, title = "EQ", group = "Prev Yearly Levels", inline = "1")
inp_prev_yearly_col = input.color(color.maroon, title = "color", group = "Prev Yearly Levels", inline = "2")
inp_prev_yearly_line_width = input.int(1, title = "Line width", minval = 1, group = "Prev Yearly Levels", inline = "2")
yy = input.int(1, title = "yearback", minval = 1, maxval=2, group = "Prev Yearly Levels", inline = "2")
f_create_level("open", new_year, not new_year, global_open_array, inp_prev_yearly_col, inp_prev_yearly_line_width, inp_ext, open_line_style, text_size, "P-YO", yy, inp_show_prev_yearly_open and yearly_ok and prev_yearly)
f_create_level("high", new_year, not new_year, global_high_array, inp_prev_yearly_col, inp_prev_yearly_line_width, inp_ext, high_line_style, text_size, "Prev Yearly HIGH", yy, inp_show_prev_yearly_high and yearly_ok and prev_yearly)
f_create_level("low", new_year, not new_year, global_low_array, inp_prev_yearly_col, inp_prev_yearly_line_width, inp_ext, low_line_style, text_size, "Prev Yearly LOW", yy, inp_show_prev_yearly_low and yearly_ok and prev_yearly)
f_create_level("eq", new_year, not new_year, global_eq_array, inp_prev_yearly_col, inp_prev_yearly_line_width, inp_ext, eq_line_style, text_size, "Prev Yearly EQ", yy, inp_show_prev_yearly_eq and yearly_ok and prev_yearly)
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//imbalance finder
color gray0 = color.new(color.gray, 0)
color yellow0 = color.new(#FFF700, 0)
bool showgreydiamond = input(defval=false, title='İmbalance back test helper' ,group='=== Information ===')
bool showib = input(defval=false, title='İmbalance bar' ,group='=== Information ===')
Imbcol = input.color(yellow0, 'Imbalance Color', inline="1" ,group='=== Information ===')
Dimcol = input.color(gray0, 'Imbalance back test diamond color', inline="1" ,group='=== Information ===')
TopImbalance = low <= open and high >= close
TopImbalancesize = low - high
if TopImbalance and showib and TopImbalancesize > 0
BOX1 = box.new(left=bar_index , top=low , right=bar_index , bottom=high )
box.set_bgcolor(BOX1, na)
box.set_border_color(BOX1, Imbcol )
//plot(TopImbalance and TopImbalancesize > 0 ? low : na , color=Imbcol)
//plot(TopImbalance and TopImbalancesize > 0 ? high : na , color=Imbcol)
BottomImbalance = high >= open and low <= close
BottomImbalancesize = low - high
if BottomImbalance and showib and BottomImbalancesize > 0
BOX2 = box.new(left=bar_index , top=low , right=bar_index , bottom=high )
box.set_bgcolor(BOX2, na )
box.set_border_color(BOX2, Imbcol )
//plot(BottomImbalance and BottomImbalancesize > 0 ? low : na , color=Imbcol)
//plot(BottomImbalance and BottomImbalancesize > 0 ? high : na , color=Imbcol)
DownImbalance = TopImbalance and TopImbalancesize > 0
plotshape(DownImbalance and showgreydiamond, style=shape.diamond, location=location.abovebar, color=Dimcol, size=size.tiny)
UpImbalance = BottomImbalance and BottomImbalancesize > 0
plotshape(UpImbalance and showgreydiamond, style=shape.diamond, location=location.belowbar, color=Dimcol, size=size.tiny)
alertcondition(DownImbalance , title='Down Imbalance', message='Down Imbalance')
alertcondition(UpImbalance , title='Up Imbalance', message='Up Imbalance')
alertcondition(DownImbalance or UpImbalance , title='Imbalance Present ', message='Imbalance Present')
// MBS
//indicator(title='Order Blocks', overlay=true)
bool msb_a_sv = input.bool (true, title='Alert MSB')
bool msb_sv = input.bool (true, title='Plot MSB lines')
color mbs_color1 = input.color(#00e1ff, title='MSB Color Bullish')
color mbs_color2 = input.color(#ff00bf, title='MSB Color Bearish')
bool box_sv = input.bool (false, title='Plot Orderblocks')
color u_s = input.color (color.rgb(255, 0, 0, 90), title='Untested Supply Color')
color t_s = input.color (color.rgb(192, 192, 192, 93), title='Tested Supply Color')
color u_d = input.color (color.rgb(0, 255, 0, 90), title='Untested Demand Color')
color t_d = input.color (color.rgb(192, 192, 192, 93), title='Tested Demand Color')
bool m_sv = input.bool (false, title='Plot Breakerblocks')
color u_b = input.color (color.new(color.blue, 90), title='Untested Breaker Color')
color t_b = input.color (color.rgb(192, 192, 192, 90), title='Tested Breaker Color')
bool ob_a_sv = input.bool (false, title='Alert Orderblock test')
bool bb_a_sv = input.bool (false, title='Alert Breakerblock test')
bool r_a_sv = input.bool (false, title='Alert New Range')
bool rt_a_sv = input.bool (false, title='Alert Range test')
var float pvh1_price = array.new_float (30, na) // high
var int pvh1_time = array.new_int (30, na)
var float pvl1_price = array.new_float (30, na) // low
var int pvl1_time = array.new_int (30, na)
var float pvh2_price = array.new_float (10, na) // higher high
var int pvh2_time = array.new_int (10, na)
var float pvl2_price = array.new_float (10, na) // lower low
var int pvl2_time = array.new_int (10, na)
var float htcmrll_price = na // high that created most recent ll
var int htcmrll_time = na
var float ltcmrhh_price = na // low that created most recent hh
var int ltcmrhh_time = na
var box long_boxes = array.new_box() // orderblocks
var box short_boxes = array.new_box()
var box m_long_boxes = array.new_box() // breakerblocks
var box m_short_boxes = array.new_box()
var line bull_bos_lines = array.new_line() // MSB lines
var line bear_bos_lines = array.new_line()
var line range_h_lines = array.new_line() // Range lines
var line range_25_lines = array.new_line()
var line range_m_lines = array.new_line()
var line range_75_lines = array.new_line()
var line range_l_lines = array.new_line()
var label la_ph2 = array.new_label() // 2nd order pivots
var label la_pl2 = array.new_label()
var float temp_pv_0 = na
var float temp_pv_1 = na
var float temp_pv_2 = na
var int temp_time = na
var float last_range_h = na
var float last_range_l = na
var line range_m = na
var line range_25 = na
var line range_75 = na
var float box_top = na
var float box_bottom = na
var int h_a_time = 0
var int l_a_time = 0
var int mh_a_time = 0
var int ml_a_time = 0
var int rh_a_time = 0
var int rl_a_time = 0
bool pvh = high < high and high > high
bool pvl = low > low and low < low
int pv1_time = bar_index
float pv1_high = high
float pv1_low = low
bool new_ph_2nd = false
bool new_pl_2nd = false
string alert = na
if barstate.isconfirmed
if pvh
array.pop(pvh1_price)
array.pop(pvh1_time)
array.unshift(pvh1_price, pv1_high)
array.unshift(pvh1_time, pv1_time)
if array.size(pvh1_price) > 2
temp_pv_0 := array.get(pvh1_price, 0)
temp_pv_1 := array.get(pvh1_price, 1)
temp_pv_2 := array.get(pvh1_price, 2)
if temp_pv_0 < temp_pv_1 and temp_pv_1 > temp_pv_2
array.pop(pvh2_price)
array.pop(pvh2_time)
array.unshift(pvh2_price, temp_pv_1)
array.unshift(pvh2_time, array.get(pvh1_time, 1))
new_ph_2nd := true
if temp_pv_1 > array.get(pvh2_price, 1)
for i = 0 to array.size(pvl2_time) - 1 by 1
temp_ltcmrhh_time = array.get(pvl2_time, i)
if temp_ltcmrhh_time < array.get(pvh2_time, 0)
ltcmrhh_price := array.get(pvl2_price, i)
ltcmrhh_time := temp_ltcmrhh_time
break
if temp_pv_0 < ltcmrhh_price
if msb_sv
array.push(bear_bos_lines, line.new(x1=ltcmrhh_time, y1=ltcmrhh_price, x2=bar_index, y2=ltcmrhh_price, color=mbs_color2, width=2))
box_top := array.get(pvh2_price, 0)
box_bottom := math.max(low , low )
array.push(short_boxes, box.new(left=array.get(pvh2_time, 0), top=box_top, right=bar_index, bottom=box_bottom, bgcolor= box_sv ? u_s : na , border_color=na, extend=extend.right))
if msb_a_sv
alert := alert + 'Bearish MSB @ ' + str.tostring(ltcmrhh_price) + ' ' + 'New Supply Zone : '+ str.tostring(box_top) + ' - ' + str.tostring(box_bottom) + ' '
ltcmrhh_price := na
if pvl
array.pop(pvl1_price)
array.pop(pvl1_time)
array.unshift(pvl1_price, pv1_low)
array.unshift(pvl1_time, pv1_time)
if array.size(pvl1_price) > 2
temp_pv_0 := array.get(pvl1_price, 0)
temp_pv_1 := array.get(pvl1_price, 1)
temp_pv_2 := array.get(pvl1_price, 2)
if temp_pv_0 > temp_pv_1 and temp_pv_1 < temp_pv_2
array.pop(pvl2_price)
array.pop(pvl2_time)
array.unshift(pvl2_price, temp_pv_1)
array.unshift(pvl2_time, array.get(pvl1_time, 1))
new_pl_2nd := true
if temp_pv_1 < array.get(pvl2_price, 1)
for i = 0 to array.size(pvh2_time) - 1 by 1
temp_htcmrll_time = array.get(pvh2_time, i)
if temp_htcmrll_time < array.get(pvl2_time, 0)
htcmrll_price := array.get(pvh2_price, i)
htcmrll_time := temp_htcmrll_time
break
if temp_pv_0 > htcmrll_price
if msb_sv
array.push(bull_bos_lines, line.new(x1=htcmrll_time, y1=htcmrll_price, x2=bar_index, y2=htcmrll_price, color=mbs_color1, width=2))
box_top := math.min(high , high )
box_bottom := array.get(pvl2_price, 0)
array.push(long_boxes, box.new(left=array.get(pvl2_time, 0), top=box_top, right=bar_index, bottom=box_bottom, bgcolor= box_sv ? u_d : na, border_color=na, extend=extend.right))
if msb_a_sv
alert := alert + 'Bullish MSB @ ' + str.tostring(htcmrll_price) + ' ' + 'New Demand Zone : '+ str.tostring(box_bottom) + ' - ' + str.tostring(box_top) + ' '
htcmrll_price := na
if array.size(short_boxes) > 0
for i = array.size(short_boxes) - 1 to 0 by 1
tbox = array.get(short_boxes, i)
top = box.get_top(tbox)
bottom = box.get_bottom(tbox)
ago = box.get_left(tbox)
if array.get(pvh1_price, 0) > bottom
if box_sv
box.set_bgcolor(tbox, t_s)
if ob_a_sv and close < bottom
if array.get(pvh1_time, 0) != h_a_time
h_a_time := array.get(pvh1_time, 0)
alert := alert + 'Supply Zone Test @ ' + str.tostring(array.get(pvh1_price, 0)) + ' (age = ' + str.tostring(bar_index-ago) + ' bars) '
if array.get(pvl1_price, 0) > top
if m_sv
box.set_bgcolor(tbox, u_b)
array.push(m_long_boxes, tbox)
else
box.delete(tbox)
array.remove(short_boxes, i)
if msb_sv
line.delete(array.get(bear_bos_lines, i))
array.remove(bear_bos_lines, i)
if array.size(long_boxes) > 0
for i = array.size(long_boxes) - 1 to 0 by 1
lbox = array.get(long_boxes, i)
top = box.get_top(lbox)
bottom = box.get_bottom(lbox)
ago = box.get_left(lbox)
if array.get(pvl1_price, 0) < top
if box_sv
box.set_bgcolor(lbox, t_d)
if ob_a_sv and close > top
if array.get(pvl1_time, 0) != l_a_time
l_a_time := array.get(pvl1_time, 0)
alert := alert + 'Demand Zone Test @ ' + str.tostring(array.get(pvl1_price, 0)) + ' (age = ' + str.tostring(bar_index-ago) + ' bars) '
if array.get(pvh1_price, 0) < bottom
if m_sv
box.set_bgcolor(lbox, u_b)
array.push(m_short_boxes, lbox)
else
box.delete(lbox)
array.remove(long_boxes, i)
if msb_sv
line.delete(array.get(bull_bos_lines, i))
array.remove(bull_bos_lines, i)
if array.size(m_short_boxes) > 0
for i = array.size(m_short_boxes) - 1 to 0 by 1
tbox = array.get(m_short_boxes, i)
top = box.get_top(tbox)
bottom = box.get_bottom(tbox)
ago = box.get_left(tbox)
if array.get(pvh1_price, 0) > bottom
box.set_bgcolor(tbox, t_b)
if bb_a_sv and close < bottom
if array.get(pvh1_time, 0) != mh_a_time
mh_a_time := array.get(pvh1_time, 0)
alert := alert + 'Breakerblock Test Up @ ' + str.tostring(array.get(pvh1_price, 0)) + ' (age = ' + str.tostring(bar_index-ago) + ' bars) '
if array.get(pvl1_price, 0) > top
box.delete(tbox)
array.remove(m_short_boxes, i)
if array.size(m_long_boxes) > 0
for i = array.size(m_long_boxes) - 1 to 0 by 1
lbox = array.get(m_long_boxes, i)
top = box.get_top(lbox)
bottom = box.get_bottom(lbox)
ago = box.get_left(lbox)
if array.get(pvl1_price, 0) < top
box.set_bgcolor(lbox, t_b)
if bb_a_sv and close > top
if array.get(pvl1_time, 0) != ml_a_time
ml_a_time := array.get(pvl1_time, 0)
alert := alert + 'Breakerblock Test Down @ ' + str.tostring(array.get(pvl1_price, 0)) + ' (age = ' + str.tostring(bar_index-ago) + ' bars) '
if array.get(pvh1_price, 0) < bottom
box.delete(lbox)
array.remove(m_long_boxes, i)
alert := not na(alert) ? (alert + 'Current price = ' + str.tostring(close) + ' ') : na
exec = not na(alert) ? true : false
if exec==true
alert(alert, alert.freq_once_per_bar_close)
Liquidity Grab (Bullish + Bearish) + 14, 22, 30 Bars + AlertsThis is a Institutional Level alert system. When a liquidity grab level is reached, candles 14, 22, and 30 are lit up to help you enter and exit.
VIX Momentum AnalyzerUsed for detected momentum in VIX to get a better odea of when to short volatility.
Interpreting Signals:
Red Zone (ROC > +20%): VIX spiking → Avoid SVIX.
Yellow Zone (ROC < +10%): Fear easing → Prepare to enter SVIX.
Green Zone (ROC < 0%): VIX dropping → Hold SVIX for profits.
NEW Non-Directional Market StrategyFinal New Non Directional Trading Strategy! which can be used for all markets , the candles will turn grey during the choppy conditions.
TREND and ZL FLOWThis PineScript combines two technical indicators—T3 Slow Trend Histogram and Zero Lag Moving Average to analyze market trends and potential reversals.
Giving credit to original authors of their original indicators: RedKTrader and Bjorgum
I have combined these into one indicator showing when trend is best to be trading...
When all lines are showing Green you are in a buying pressure market.
When all are lines are showing Red then you are in a selling pressure market.
T3 Slow Trend Histogram (Bjorgum):
A smoothed moving average (T3) is calculated using a recursive EMA (Exponential Moving Average) process with a length of 8 and a smoothing factor (b = 0.7). Six layers of EMAs are computed (xe1 to xe6) and combined with weighted coefficients (c1 to c4) to generate the final T3 value (nT3Average).
The histogram visually represents the T3’s momentum: green bars indicate upward momentum (T3 rising) and red bars signal downward momentum (T3 falling). This helps identify trend strength and direction.
ZL Flow (Zero-Lag Moving Average RedKTrader ):
A double-smoothed WMA (Weighted Moving Average) with a length of 9 and smoothing factor of 2 is applied to the price. The final ZLMA line is derived using a formula (2 * priceMA - ta.wma(priceMA, length)) to reduce lag.
The ZLMA line changes color (bright green for upward, red for downward) based on its direction.
Together, the T3 histogram tracks trend dynamics, while the ZL Flow provides early reversal signals, offering a dual approach to trend analysis and trade timing. The script is ideal for traders seeking confirmation of momentum shifts and zero-lag responsiveness.
Trend Magic AlertAdded an alert to the existing Trend Magic script in
This is the Trend Magic indicator with the addition of a price pivot line to show where the trend change would occur.
The original indicator is based on the momentum based oscillator Commodity Channel Index (CCI) and the market volatility Average True Range (ATR) indicators.
The user can customize the CCI period, ATR multiplier, and ATR period values using the input function.
The Commodity Channel Index (CCI) is a technical indicator used to measure the current price level relative to an average price level over a specified period of time. It was developed by Donald Lambert in 1980.
The calculation of CCI involves three main steps:
1: Calculate the Typical Price: The typical price is calculated as the average of the high, low, and close prices of each time period. The formula for typical price is: (High + Low + Close) / 3
(using built in variable hlc3)
2: Calculate the Simple Moving Average (SMA) of the Typical Price: The SMA is calculated over a specified period of time.
3: Calculate the CCI: The CCI is calculated by taking the difference between the typical price and the SMA of the typical price, and then dividing that difference by a multiple of the mean deviation.
The pivot is therefore basically when the price crosses (and closes past) the typical price SMA, so we can easily plot the price the asset would have to reach to flip the trend.
BTC Trading RobotOverview
This Pine Script strategy is designed for trading Bitcoin (BTC) by placing pending orders (BuyStop and SellStop) based on local price extremes. The script also implements a trailing stop mechanism to protect profits once a position becomes sufficiently profitable.
________________________________________
Inputs and Parameter Setup
1. Trading Profile:
o The strategy is set up specifically for BTC trading.
o The systemType input is set to 1, which means the strategy will calculate trade parameters using the BTC-specific inputs.
2. Common Trading Inputs:
o Risk Parameters: Although RiskPercent is defined, its actual use (e.g., for position sizing) isn’t implemented in this version.
o Trading Hours Filter:
SHInput and EHInput let you restrict trading to a specific hour range. If these are set (non-zero), orders will only be placed during the allowed hours.
3. BTC-Specific Inputs:
o Take Profit (TP) and Stop Loss (SL) Percentages:
TPasPctBTC and SLasPctBTC are used to determine the TP and SL levels as a percentage of the current price.
o Trailing Stop Parameters:
TSLasPctofTPBTC and TSLTgrasPctofTPBTC determine when and by how much a trailing stop is applied, again as percentages of the TP.
4. Other Parameters:
o BarsN is used to define the window (number of bars) over which the local high and low are calculated.
o OrderDistPoints acts as a buffer to prevent the entry orders from being triggered too early.
________________________________________
Trade Parameter Calculation
• Price Reference:
o The strategy uses the current closing price as the reference for calculations.
• Calculation of TP and SL Levels:
o If the systemType is set to BTC (value 1), then:
Take Profit Points (Tppoints) are calculated by multiplying the current price by TPasPctBTC.
Stop Loss Points (Slpoints) are calculated similarly using SLasPctBTC.
A buffer (OrderDistPoints) is set to half of the take profit points.
Trailing Stop Levels:
TslPoints is calculated as a fraction of the TP (using TSLTgrasPctofTPBTC).
TslTriggerPoints is similarly determined, which sets the profit level at which the trailing stop will start to activate.
________________________________________
Time Filtering
• Session Control:
o The current hour is compared against SHInput (start hour) and EHInput (end hour).
o If the current time falls outside the allowed window, the script will not place any new orders.
________________________________________
Entry Orders
• Local Price Extremes:
o The strategy calculates a local high and local low using a window of BarsN * 2 + 1 bars.
• Placing Stop Orders:
o BuyStop Order:
A long entry is triggered if the current price is less than the local high minus the order distance buffer.
The BuyStop order is set to trigger at the level of the local high.
o SellStop Order:
A short entry is triggered if the current price is greater than the local low plus the order distance buffer.
The SellStop order is set to trigger at the level of the local low.
Note: Orders are only placed if there is no current open position and if the session conditions are met.
________________________________________
Trailing Stop Logic
Once a position is open, the strategy monitors profit levels to protect gains:
• For Long Positions:
o The script calculates the profit as the difference between the current price and the average entry price.
o If this profit exceeds the TslTriggerPoints threshold, a trailing stop is applied by placing an exit order.
o The stop price is set at a distance below the current price, while a limit (profit target) is also defined.
• For Short Positions:
o The profit is calculated as the difference between the average entry price and the current price.
o A similar trailing stop exit is applied if the profit exceeds the trigger threshold.
________________________________________
Summary
In essence, this strategy works by:
• Defining entry levels based on recent local highs and lows.
• Placing pending stop orders to enter the market when those levels are breached.
• Filtering orders by time, ensuring trades are only taken during specified hours.
• Implementing a trailing stop mechanism to secure profits once the trade moves favorably.
This approach is designed to automate BTC trading based on price action and dynamic risk management, although further enhancements (like dynamic position sizing based on RiskPercent) could be added for a more complete risk management system.
Filtered QQE + EMA + Supertrend (Alternating Signals)used qqe mod + supertrend + 20 ema to build perfectly working script.
RVOL Effort Matrix⚖️ RVOL Effort Matrix is a tiered volume framework that translates crowd participation into structure-aware visual zones. Rather than simply flagging spikes, it measures each bar’s volume as a ratio of its historical average and classifies that effort dynamic tiers to create a real-time map of conviction, exhaustion, and imbalance—before price even confirms.
💪🏻 At its core, the tool builds a histogram of relative volume (RVOL) When enabled, a second layer overlays directional effort by estimating buy vs sell volume using candle body logic. If the candle closes higher, green (buy) volume dominates. If it closes lower, red (sell) volume leads. These components are stacked proportionally and inset beneath a colored cap line—a small but powerful layer that maintains visibility of the true effort tier even when split bars are active. The cap matches the original zone color, preserving context at all times.
Coloration communicates rhythm, tempo, and potential turning points:
• 🔴 = structurally weak effort, i.e. failed moves, fake-outs or trend exhaustion
• 🟡 = neutral volume, as seen in consolidations or pullbacks
• 🟢 = genuine commitment, good for continuation, breakout filters, or early rotation signals
• 🟣 = explosive volume signaling either climax or institutional entry—beware!
Background shading (optional) mirrors these zones across the pane for structural scanning at a glance. Volume bars can be toggled between full-stack mode or clean column view. Every layer is modular—built for composability with tools like ΣVOL or the OBV Intention Bias overlay.
🧐 Ideal use-cases:
• 🕰 HTF bias anchoring → LTF execution
• 🧭 Identifying when structure is being driven by real crowd pressure
• 🚫 Fading green/fuchsia bars that fail to break structure
• ✅ Riding green/fuchsia follow-through in directional moves
🍷 Recommended pairings:
• ΣVOL for statistically significant volume anomaly detection
• OBV Intention Bias ↔️ for directional confirmation of effort zones
• SUPeR TReND 2.718 for structure-congruent entry filtering
• ATR Turbulence Ribbon to distinguish expansion pressure from churn
🥁 RVOL Effort Matrix is all about seeing—how much pressure is behind a move, whether that pressure is sustainable, and whether the crowd is aligned with price. It's volume, but readable. It’s structure, but dynamic. It’s the difference between chasing noise and trading with rhythm.
ΣVOL — Z-Score Volume Heatmapⓩ ΣVOL transforms raw volume into a statistically calibrated heatmap using z-score thresholds. Unlike classic volume indicators that rely on fixed moving average comparisons, ΣVOL calculates how many standard deviations each volume bar deviates from its mean. This makes the reading adaptive across timeframes and assets, helping traders distinguish meaningful crowd behavior from random volatility.
📊 The core display is a five-zone histogram, each encoded by color and statistical depth. Optional background shading mirrors these zones across the entire pane, revealing subtle compression or structural rhythm shifts across time. By grounding the volume reading in volatility-adjusted context, ΣVOL prevents impulsive tactics by compelling the structure to dictate the signal.
🥵 Heatmap Zones:
🌚 Zone 0 (Gray): Suppressed volume — congestion, coil phases
🔹 Zone 1 (Teal): Stable flow — early trend or resting volume
🔸 Zone 2 (Orange): High activity — pressure emerging
💔 Zone 3–4 (Red): Extreme — possible climax or institutional print
A dynamic EMA ribbon overlays the histogram using 21 and 34-period EMAs. The fill between them inverts color on crossover and has adjustable opacity, providing a real-time read on tempo, expansion, or divergence between price structure and crowd effort.
💡 LTF Usage Suggestions:
• Confirm breakout legs when orange or red zones align with range exits
• Fade overextended moves when red bars appear into resistance
• Watch for rising EMAs and orange volume to front-run impulsive moves
• Combine with volatility suppression (e.g. ATR) to catch compression → expansion transitions
🔗 Ideal Pairings:
• OBV Intention Bias — to confirm directional intent behind volume shifts (not shown)
• ATR Turbulence Ribbon — to detect compression phases (not shown)
• SUPeR TReND 2.718 — for directional filters (as shown)
👥 The OBV Intention Bias adds a second dimension to ΣVOL by revealing whether crowd effort is aligning with price direction or diverging beneath the surface. While ΣVOL identifies statistical anomalies in raw volume, this complementary overlay tracks directional commitment using cumulative volume and moving average cross logic. Combine them to spot fake-outs, anticipate structure-confirmed breakouts, or time pullbacks with volume-based conviction.
🔬 ΣVOL isn’t just a volume filter — it’s a structural lens. It reveals when crowd effort is meaningful, when it's fading, and when something is about to shift. Designed for structure-aware traders who care about context, not noise.