INTELLECT_city - US Presidential Elections Dates (USA)(EN)
It is interesting to compare Halvings Cycles and Presidential elections.
This indicator shows all presidential elections in the USA from the period 2008, and future ones to the date 2044. The indicator will automatically show all future dates of presidential elections.
--
To apply it to your chart it is very easy:
Select:
1) Exchange: BITSTAMP
2) Pair BTC \ USD (Without "T" at the end)
3) Timeframe 1 day
4) In the Browser, switch the chart to Logarithmic (on the right bottom, click the "L" button)
or on mobile, switch to "Logarithmic" we look on the chart: "Gear" - and switch to "Logarithmic"
------------------
(RU)
Интересно сопоставить Циклы Halvings и Президентские выборы.
Данный индикатор показывает все президентские выборы в США с периода 2008 года, и будущие к дате 2044 года. Индикатор будет автоматически показывать все будущие даты .
--
Что бы применить у себя на графике это очень легко:
Выберите:
1) Биржа: BITSTAMP
2) Пара BTC \ USD (Без "T" в конце)
3) Timeframe 1 дневной
4) В Браузере переключить график на Логарифмический (с право внизу кнопка "Л")
или на мобильно переключить на "Логарифмический" ищем на графике: "Шестеренку" — и переключаем на "Логарифмический"
-------------------
(DE)
Es ist interessant, die Halbierungszyklen und die Präsidentschaftswahlen zu vergleichen.
Dieser Indikator zeigt alle US-Präsidentschaftswahlen seit 2008 und zukünftige bis zum Datum 2044. Der Indikator zeigt automatisch alle zukünftigen Präsidentschaftswahltermine an.
--
Es ist sehr einfach, dies auf Ihr Diagramm anzuwenden:
Wählen:
1) Austausch: BITSTAMP
2) Paar BTC \ USD (Ohne das „T“ am Ende)
3) Zeitrahmen 1 Tag
4) Schalten Sie im Browser das Diagramm auf Logarithmisch um (die Schaltfläche „L“ unten rechts).
oder auf dem Mobilgerät auf „Logarithmisch“ umschalten, in der Grafik nach „Getriebe“ suchen – und auf „Logarithmisch“ umschalten
インジケーターとストラテジー
Advanced Pattern Detector**Script Overview**
**Indicator Name:** Advanced Pattern Detector
**Pine Script Version:** v5
**Indicator Type:** Overlaid on the chart (overlay=true)
**Main Features:**
- Detection and visualization of various technical patterns.
- Generation of BUY and SELL signals based on detected patterns.
- Display of Fibonacci levels to identify potential support and resistance levels.
- Ability to enable or disable each pattern through the indicator settings.
---
**Indicator Settings**
**Switches to Enable/Disable Patterns**
At the top of the indicator, there are parameters that allow the user to select which patterns will be displayed on the chart:
- Three Drives
- Rounding Top
- Rounding Bottom
- ZigZag Pattern
- Inverse Head and Shoulders
- Fibonacci Retracement
**Parameters for ZigZag**
Settings are also available for the ZigZag pattern, such as the depth of peak and trough detection, allowing the user to adjust the indicator's sensitivity to price changes.
---
**Pattern Detection**
Each pattern is implemented with its own logic, which checks specific conditions on the current bar (candle). Below are the main patterns:
1. **Three Drives**
- **Description:** This pattern consists of three consecutive price movements in one direction (up or down). It can signal the continuation of the current trend or its reversal.
- **How It Works:**
- **Upward Drive:** The indicator checks that the closing price of each subsequent candle is higher than the previous one for three bars.
- **Downward Drive:** The indicator checks that the closing price of each subsequent candle is lower than the previous one for three bars.
2. **Rounding Top**
- **Description:** A pattern representing a smooth decrease in maximum prices over several bars, which may indicate a potential downward trend reversal.
- **How It Works:**
- The indicator checks that the maximum prices of the last five bars are gradually decreasing, and the current bar shows a decrease in the maximum price.
3. **Rounding Bottom**
- **Description:** A pattern characterized by a smooth increase in minimum prices over several bars, signaling a possible upward trend reversal.
- **How It Works:**
- The indicator checks that the minimum prices of the last five bars are gradually increasing, and the current bar shows an increase in the minimum price.
4. **ZigZag Pattern**
- **Description:** Used to identify corrective movements on the chart. The pattern shows peak and trough points connected by lines, helping to visualize the main price movement.
- **How It Works:**
- The indicator uses a function to determine local maxima and minima based on the specified depth.
- Detected peaks and troughs are connected by lines to create a visual zigzag structure.
5. **Inverse Head and Shoulders**
- **Description:** An inverted head and shoulders formation signals a possible reversal of a downward trend to an upward one.
- **How It Works:**
- The indicator looks for three local minima: the left shoulder, the head (the lowest minimum), and the right shoulder.
- It checks that the left and right shoulders are approximately at the same level and below the head.
6. **Fibonacci Retracement Levels**
- **Description:** Automatically builds key Fibonacci levels based on the maximum and minimum prices over the last 50 bars. These levels are often used as potential support and resistance levels.
- **How It Works:**
- Daily, the minimum and maximum prices over the last 50 bars are calculated.
- Based on these values, Fibonacci levels are drawn: 100%, 23.6%, 38.2%, 50%, 61.8%, and 0%.
- Old levels are removed when a new day begins to keep the chart clean and up-to-date.
---
**Generation of Buy and Sell Signals**
The indicator combines the results of detected patterns to generate trading signals:
- **Buy Signals (BUY):**
- Rounding Bottom
- Three Drives Up
- Inverse Head and Shoulders
- ZigZag Low
- **Sell Signals (SELL):**
- Rounding Top
- Three Drives Down
- Inverse Head and Shoulders
- ZigZag High
**How It Works:**
- If one or more buy conditions are met, a "BUY" label is displayed below the corresponding bar on the chart.
- If one or more sell conditions are met, a "SELL" label is displayed above the corresponding bar on the chart.
---
**Visualization of Patterns on the Chart**
Each detected pattern is visualized using various graphical elements, allowing traders to easily identify them on the chart:
- **Three Drives Up:** Green upward triangle below the bar.
- **Three Drives Down:** Red downward triangle above the bar.
- **Rounding Top:** Orange "RT" label above the bar.
- **Rounding Bottom:** Blue "RB" label below the bar.
- **Inverse Head and Shoulders:** Turquoise "iH&S" label below the bar.
- **ZigZag High/Low:** Purple circles at the peaks and troughs of the zigzag.
---
**Displaying Fibonacci Levels**
Fibonacci levels are displayed as horizontal lines on the chart with corresponding labels. These levels help traders determine potential entry and exit points, as well as support and resistance levels.
---
**Drawing ZigZag Lines**
ZigZag lines connect the detected peaks and troughs, visualizing corrective movements. To avoid cluttering the chart, the number of lines is limited, and old lines are automatically removed as new ones are added.
ICT Candle Block (fadi)ICT Candle Block
When trading using ICT concepts, it is often beneficial to treat consecutive candles of the same color as a single entity. This approach helps traders identify Order Blocks, liquidity voids, and other key trading signals more effectively.
However, in situations where the market becomes choppy or moves slowly, recognizing continuous price movement can be challenging.
The ICT Candle Block indicator addresses these challenges by combining consecutive candles of the same color into a single entity. It redraws the resulting candles, making price visualization much easier and helping traders quickly identify key trading signals.
FVGs and Blocks
In the above snapshot, FVGs/Liquidity Voids, Order Blocks, and Breaker Blocks are easily identified. By analyzing the combined candles, traders can quickly determine the draw on liquidity and potential price targets using ICT concepts.
Unlike traditional higher timeframes that rigidly combine lower timeframe candles based on specific start and stop times, this indicator operates as a "mixed timeframe." It combines all buying and all selling activities into a single candle, regardless of when the transactions started and ended.
Limitations
There are currently TradingView limitations that affect the functionality of this indicator:
TradingView does not have a Candle object; therefore, this indicator relies on using boxes and lines to mimic the candles. This results in wider candles than expected, leading to misalignment with the time axis below (plotcandle is not the answer).
There is a limit on the number of objects that can be drawn on a chart. A maximum of 500 candles has been set.
A rendering issue may cause a sideways box to appear across the chart. This is a display bug in TradingView; scroll to the left until it clears.
FVG - NibzDescription: Fair Value Gap (FVG) Indicator - Nibz
This Pine Script identifies and visualizes Fair Value Gaps (FVGs) on your TradingView chart. FVGs are price inefficiencies left behind when the market moves too quickly, skipping price levels that might not be tested. These gaps often act as magnets, attracting price for potential reversals or continuations.
The script works by detecting upward (bullish) and downward (bearish) price imbalances based on specific candlestick criteria and then marks these zones on your chart using customizable shaded boxes. This tool is essential for traders looking to identify key areas of market inefficiency that could signify support/resistance levels, potential reversal zones, or areas to monitor for market rebalancing.
How It Works
1. Bullish FVG Detection
The script identifies an upward imbalance when:
The low of the candlestick two bars back is less than or equal to the open of the previous bar.
The high of the current candlestick is greater than or equal to the close of the previous bar.
When this condition is met and the size of the imbalance is greater than zero, a green box is drawn from the low of the second candlestick back to the high of the current candlestick.
2. Bearish FVG Detection
The script identifies a downward imbalance when:
The high of the candlestick two bars back is greater than or equal to the open of the previous bar.
The low of the current candlestick is less than or equal to the close of the previous bar.
When this condition is met and the size of the imbalance is greater than zero, a red box is drawn from the low of the current candlestick to the high of the second candlestick back.
Customization Options
This script is highly customizable, allowing you to tailor the appearance of the FVG boxes to suit your trading style and chart aesthetics:
Bullish FVG:
Fill color and transparency.
Border color and transparency.
Bearish FVG:
Fill color and transparency.
Border color and transparency.
The settings are user-friendly, with intuitive sliders for transparency and color pickers for customization.
How to Use the Indicator
Adding the Script:
Add the indicator to your chart, and it will automatically mark bullish (green) and bearish (red) FVGs.
Interpreting FVGs:
Bullish FVGs (green zones): These often act as support or areas of potential price rebalancing on retracement.
Bearish FVGs (red zones): These often act as resistance or areas of interest for short entries.
Trade Ideas:
Use FVG zones to confirm other trade signals or strategies.
Watch for price interaction with these zones to time entries and exits.
Key Features
Automated detection of Fair Value Gaps.
Customizable visual representation to match your chart preferences.
Enhances trading precision by identifying price inefficiencies.
Suitable for scalping, day trading, or swing trading strategies.
This script provides a powerful tool to highlight important price levels and inefficiencies in the market, enabling traders to make informed decisions. Whether you're using it as a standalone indicator or combining it with other tools, the 'FVG - Nibz' indicator is a valuable addition to any trader's toolkit!
SMA200 & RSI [Tarun]The SMA200 & RSI Signal Indicator is a powerful tool designed for traders who want to identify potential entry zones based on a combination of price action and momentum. This indicator combines two essential trading components:
SMA200 (Simple Moving Average): A widely used trend-following tool that highlights the overall direction of the market.
RSI (Relative Strength Index): A momentum oscillator that measures the speed and change of price movements.
How It Works:
Price Above SMA200: Indicates bullish market conditions.
RSI Between 40 and 20: Suggests that the asset is in a potential oversold or pullback zone within a bullish trend.
When both conditions are met, the indicator triggers:
Background Highlight: The chart background turns green to indicate a potential signal zone.
Disclaimer:
This indicator is not a standalone trading strategy. Use it in conjunction with other analysis methods such as support and resistance, candlestick patterns, or volume analysis. Always practice proper risk management.
Z-ScoreThe z-score (also known as the standard score) measures how many standard deviations a data point is from the mean of a dataset. It helps determine whether a data point is typical or unusual compared to the dataset.
The formula for the z-score is:
z = \frac{x - \mu}{\sigma}
Where:
• x = the value being evaluated
• \mu = the mean of the dataset
• \sigma = the standard deviation of the dataset
Interpretation:
• A positive z-score indicates the data point is above the mean.
• A negative z-score indicates the data point is below the mean.
• A z-score of 0 means the data point is exactly at the mean.
NUTJP CDC ActionZone 20241. Core Components of the Strategy
• Fast EMA and Slow EMA:
• The Fast EMA (shorter period) is more reactive to recent price changes.
• The Slow EMA (longer period) reacts slower and provides a smoother view of the overall trend.
• Relationship Between Fast EMA and Slow EMA:
• When the Fast EMA is above the Slow EMA, the market is considered Bullish.
• When the Fast EMA is below the Slow EMA, the market is considered Bearish.
2. Zones Based on Price and EMAs
The strategy defines six zones based on the position of the price, Fast EMA, and Slow EMA:
1. Green Zone (Buy):
• Bullish trend (Fast EMA > Slow EMA)
• Price is above the Fast EMA.
• Indicates a strong uptrend and suggests buying.
2. Blue and Light Blue Zones (Pre-Buy):
• Price is above the Fast EMA but below or near the Slow EMA.
• Represents potential bullish signals but not strong enough to trigger a buy.
3. Red Zone (Sell):
• Bearish trend (Fast EMA < Slow EMA)
• Price is below the Fast EMA.
• Indicates a strong downtrend and suggests selling or avoiding long trades.
4. Orange and Yellow Zones (Pre-Sell):
• Price is below the Fast EMA but above or near the Slow EMA.
• Represents potential bearish signals but not strong enough to trigger a sell.
These zones help traders visualize the market conditions and determine whether to buy, hold, or sell.
3. Buy and Sell Conditions
• Buy Condition:
A buy signal is triggered when:
• The price enters the Green Zone (Bullish trend and price > Fast EMA).
• It’s the first green candle after a non-green candle.
• Sell Condition:
A sell signal is triggered when:
• The price enters the Red Zone (Bearish trend and price < Fast EMA).
• It’s the first red candle after a non-red candle.
4. Trade Execution Logic
• Buy:
The strategy enters a long position (buy) when the above buy condition is met.
• Sell:
The strategy exits the long position when the sell condition is met.
Note: It doesn’t support short trades, meaning it doesn’t enter sell positions.
5. Momentum-Based Signals (Optional)
The indicator also includes momentum signals using Stochastic RSI to provide additional buy/sell signals:
• These are based on oversold and overbought levels of the Stochastic RSI.
• It filters signals depending on whether the trend is Bullish or Bearish.
6. Visual Features
The indicator is designed to make the trading zones and signals visually intuitive:
• Bar Colors:
Candlesticks are colored based on the current zone (e.g., Green for Buy, Red for Sell).
• EMA Lines:
The Fast EMA and Slow EMA are plotted, making it easy to see crossover points.
• Buy/Sell Signals:
Marked with shapes (e.g., circles) below/above bars for clarity.
7. Strategy Assumptions
• Trend-Following Nature:
This strategy assumes that trends persist. It works best in trending markets but might give false signals in ranging markets.
• Lagging Nature of EMAs:
As EMAs are lagging indicators, buy and sell signals may occur after significant moves have already begun or ended.
• Momentum Confirmation (Optional):
Adding momentum signals can help filter false signals, though it’s not part of the core logic.
8. Usage Recommendations
• Timeframes:
Works on various timeframes but may perform better on higher timeframes (e.g., 1H, Daily) to reduce noise.
• Markets:
Can be applied to stocks, forex, and cryptocurrencies.
• Backtesting and Optimization:
Before live trading, backtest the strategy with different EMA periods and other parameters to find optimal settings for your market and timeframe.
[SGM Auto Regressiv - significant lags only]This Pine Script™ is designed for traders seeking advanced statistical analysis based on autoregressive (AR) models, with automatic filtering of significant lags according to a customizable confidence threshold.
Key Features:
AR(p) Model with Significance Filtering:
Only statistically significant lags (based on the selected confidence level) are included in the model calculations.
Coefficient Weighting Options:
Uniform weighting.
Weighting based on the t-statistic.
Visualization of Key Indicators:
Dynamic plotting of autoregressive values, upper and lower bounds (based on standard deviation).
Buy ("Buy") and Sell ("Sell") signals when values exceed the defined bounds.
Robust Analysis:
Calculation of statistical parameters: T-stat, p-value, skewness, kurtosis, r², and the Jarque-Bera test to assess the robustness and normality of residuals.
Summary of results displayed in a visual table for simplified interpretation.
Interactive Tables:
Display of lags, coefficients, t-statistics, p-values, and their significance via a dynamic table.
Overall robustness indicator and interpretation of results ("Good," "Non-significant," etc.).
Easy Customization:
Adjustable confidence level (90% to 99%).
Configurable lengths for moving average and standard deviation to fine-tune signal thresholds.
Benefits for Traders:
Effortless Analysis:
Automatically identifies significant relationships between past and present values, removing unnecessary assumptions.
Enhanced Accuracy:
Filters signals based on rigorous statistical criteria to avoid false signals.
Clear Visualization:
Interactive tables and plots to quickly understand critical parameters.
Default Configuration:
Confidence level: 95%.
Lag weighting: Uniform.
Moving average length: 20 periods.
Standard deviation length: 15 periods.
Usage Recommendations:
Ideal for analyzing volatile assets or identifying potential reversal zones.
Use alongside other indicators to confirm signals.
QuantifyPS - 1Library "QuantifyPS"
normdist(z)
Parameters:
z (float) : (float): The z-score for which the CDF is to be calculated.
Returns: (float): The cumulative probability corresponding to the input z-score.
Notes:
- Uses an approximation method for the normal distribution CDF, which is computationally efficient.
- The result is accurate for most practical purposes but may have minor deviations for extreme values of `z`.
Formula:
- Based on the approximation formula:
`Φ(z) ≈ 1 - f(z) * P(t)` if `z > 0`, otherwise `Φ(z) ≈ f(z) * P(t)`,
where:
`f(z) = 0.3989423 * exp(-z^2 / 2)` (PDF of standard normal distribution)
`P(t) = Σ [c * t^i]` with constants `c` and `t = 1 / (1 + 0.2316419 * |z|)`.
Implementation details:
- The approximation uses five coefficients for the polynomial part of the CDF.
- Handles both positive and negative values of `z` symmetrically.
Constants:
- The coefficients and scaling factors are chosen to minimize approximation errors.
gamma(x)
Parameters:
x (float) : (float): The input value for which the Gamma function is to be calculated.
Must be greater than 0. For x <= 0, the function returns `na` as it is undefined.
Returns: (float): Approximation of the Gamma function for the input `x`.
Notes:
- The Lanczos approximation provides a numerically stable and efficient method to compute the Gamma function.
- The function is not defined for `x <= 0` and will return `na` in such cases.
- Uses precomputed Lanczos coefficients for accuracy.
- Includes handling for small numerical inaccuracies.
Formula:
- The Gamma function is approximated as:
`Γ(x) ≈ sqrt(2π) * t^(x + 0.5) * e^(-t) * Σ(p / (x + k))`
where `t = x + g + 0.5` and `p` is the array of Lanczos coefficients.
Implementation details:
- Lanczos coefficients (`p`) are precomputed and stored in an array.
- The summation iterates over these coefficients to compute the final result.
- The constant `g` controls the precision of the approximation (commonly `g = 7`).
t_cdf(t, df)
Parameters:
t (float) : (float): The t-statistic for which the CDF value is to be calculated.
df (int) : (int): Degrees of freedom of the t-distribution.
Returns: (float): Approximate CDF value for the given t-statistic.
Notes:
- This function computes a one-tailed p-value.
- Relies on an approximation formula using gamma functions and standard t-distribution properties.
- May not be as accurate as specialized statistical libraries for extreme values or very high degrees of freedom.
Formula:
- Let `x = df / (t^2 + df)`.
- The approximation formula is derived using:
`CDF(t, df) ≈ 1 - * x^((df + 1) / 2) / 2`,
where Γ represents the gamma function.
Implementation details:
- Computes the gamma ratio for normalization.
- Applies the t-distribution formula for one-tailed probabilities.
tStatForPValue(p, df)
Parameters:
p (float) : (float): P-value for which the t-statistic needs to be calculated.
Must be in the interval (0, 1).
df (int) : (int): Degrees of freedom of the t-distribution.
Returns: (float): The t-statistic corresponding to the given p-value.
Notes:
- If `p` is outside the interval (0, 1), the function returns `na` as an error.
- The function uses binary search with a fixed number of iterations and a defined tolerance.
- The result is accurate to within the specified tolerance (default: 0.0001).
- Relies on the cumulative density function (CDF) `t_cdf` for the t-distribution.
Formula:
- Uses the cumulative density function (CDF) of the t-distribution to iteratively find the t-statistic.
Implementation details:
- `low` and `high` define the search interval for the t-statistic.
- The midpoint (`mid`) is iteratively refined until the difference between the cumulative probability
and the target p-value is smaller than the tolerance.
jarqueBera(n, s, k)
Parameters:
n (float) : (series float): Number of observations in the dataset.
s (float) : (series float): Skewness of the dataset.
k (float) : (series float): Kurtosis of the dataset.
Returns: (float): The Jarque-Bera test statistic.
Formula:
JB = n *
Notes:
- A higher JB value suggests that the data deviates more from a normal distribution.
- The test is asymptotically distributed as a chi-squared distribution with 2 degrees of freedom.
- Use this value to calculate a p-value to determine the significance of the result.
skewness(data)
Parameters:
data (float) : (series float): Input data series.
Returns: (float): The skewness value.
Notes:
- Handles missing values (`na`) by ignoring invalid points.
- Includes error handling for zero variance to avoid division-by-zero scenarios.
- Skewness is calculated as the normalized third central moment of the data.
kurtosis(data)
Parameters:
data (float) : (series float): Input data series.
Returns: (float): The kurtosis value.
Notes:
- Handles missing values (`na`) by ignoring invalid points.
- Includes error handling for zero variance to avoid division-by-zero scenarios.
- Kurtosis is calculated as the normalized fourth central moment of the data.
regression(y, x, lag)
Parameters:
y (float) : (series float): Dependent series (observed values).
x (float) : (series float): Independent series (explanatory variable).
lag (int) : (int): Number of lags applied to the independent series (x).
Returns: (tuple): Returns a tuple containing the following values:
- n: Number of valid observations.
- alpha: Intercept of the regression line.
- beta: Slope of the regression line.
- t_stat: T-statistic for the beta coefficient.
- p_value: Two-tailed p-value for the beta coefficient.
- r_squared: Coefficient of determination (R²) indicating goodness of fit.
- skew: Skewness of the residuals.
- kurt: Kurtosis of the residuals.
Notes:
- Handles missing data (`na`) by ignoring invalid points.
- Includes basic error handling for zero variance and division-by-zero scenarios.
- Computes residual-based statistics (skewness and kurtosis) for model diagnostics.
Trading the TrendTrading the Trend Indicator by Andrew Abraham (TASC, 1998)
The Trading the Trend indicator, developed by Andrew Abraham, combines volatility and trend-following principles to identify market direction. It uses a 21-period weighted average of the True Range (ATR) to measure volatility and define uptrends and downtrends.
Calculation: The True Range (highest high minus lowest low) is smoothed using a 21-period weighted moving average. This forms the basis for the trend filter, setting dynamic thresholds for trend identification.
Uptrend: Higher highs are confirmed when price stays above the upper threshold, signaling long opportunities.
Downtrend: Lower lows are identified when price stays below the lower threshold, favoring short positions.
This system emphasizes trading only in the direction of the prevailing trend, filtering out market noise and focusing on sustained price movements.
The trendline changes her color. When there is an uptrend the trendline is blue and when the trend is downward the trendline is yellow.
ADX Breakout Strategy█ OVERVIEW
The ADX Breakout strategy leverages the Average Directional Index (ADX) to identify and execute breakout trades within specified trading sessions. Designed for the NQ and ES 30-minute charts, this strategy aims to capture significant price movements while managing risk through predefined stop losses and trade limits.
This strategy was taken from a strategy that was posted on YouTube. I would link the video, but I believe is is "against house rules".
█ CONCEPTS
The strategy is built upon the following key concepts:
ADX Indicator: Utilizes the ADX to gauge the strength of a trend. Trades are initiated when the ADX value is below a certain threshold, indicating potential for trend development.
Trade Session Management: Limits trading to specific hours to align with optimal market activity periods.
Risk Management: Implements a fixed dollar stop loss and restricts the number of trades per session to control exposure.
█ FEATURES
Customizable Stop Loss: Set your preferred stop loss amount to manage risk effectively.
Trade Session Configuration: Define the trading hours to focus on the most active market periods.
Entry Conditions: Enter long positions when the price breaks above the highest close in the lookback window and the ADX indicates potential trend strength.
Trade Limits: Restrict the number of trades per session to maintain disciplined trading.
Automated Exit: Automatically closes all positions at the end of the trading session to avoid overnight risk.
█ HOW TO USE
Configure Inputs :
Stop Loss ($): Set the maximum loss per trade.
Trade Session: Define the active trading hours.
Highest Lookback Window: Specify the number of bars to consider for the highest close.
Apply the Strategy :
Add the ADX Breakout strategy to your chart on TradingView.
Ensure you are using a 30-minute timeframe for optimal performance.
█ LIMITATIONS
Market Conditions: The strategy is optimized for trending markets and may underperform in sideways or highly volatile conditions.
Timeframe Specific: Designed specifically for 30-minute charts; performance may vary on different timeframes.
Single Asset Focus: Primarily tested on NQ and ES instruments; effectiveness on other symbols is not guaranteed.
█ DISCLAIMER
This ADX Breakout strategy is provided for educational and informational purposes only. It is not financial advice and should not be construed as such. Trading involves significant risk, and you may incur substantial losses. Always perform your own analysis and consider your financial situation before using this or any other trading strategy. The source material for this strategy is publicly available in the comments at the beginning of the code script. This strategy has been published openly for anyone to review and verify its methodology and performance.
BeautifulStochRSIBeautifulStochRSI: A Unique and Clear Approach to Stochastic RSI
Introducing the BeautifulStochRSI, an colorfull approach to the popular Stochastic RSI indicator. This script goes beyond the standard representation by offering visually distinct and intuitive signals to enhance your trading experience.
The BeautifulStochRSI is ideal for traders who value both precision and simplicity. It combines functional enhancements with a polished design, ensuring that crucial market insights are presented clearly and effectively. Created by rektbyhielke, this script leverages the capabilities of Pine Script™ v5 for optimal performance.
By sharing this script, the aim is not only to provide a practical trading solution but also to inspire others to create indicators that are both beautiful and efficient.
the script includes fully customizable parameters for RSI length, stochastic length, and smoothing factors, allowing traders to tailor the indicator to their specific strategies. Overbought and oversold zones are marked with dots at levels 80 and 20, complemented by a subtle teal background fill to emphasize these areas.
Dual Timeframe Stochastic Momentum Index w/buy sell signalsThis indicator combines momentum analysis across two timeframes to identify high-probability trading opportunities. It plots the Stochastic Momentum Index (SMI) for both the chart timeframe and a higher timeframe (default 10 minutes) to help traders align with the broader market trend.
Key Features
Displays SMI and its EMA for both timeframes
Background shading indicates favorable trading conditions
Signal dots mark potential entry points
Customizable parameters for fine-tuning
Signals Explained
Bullish Signals (Green Dots)
Appear when the chart timeframe SMI crosses above its EMA
Only trigger during periods when the higher timeframe shows:
SMI is above its EMA (increasing momentum)
SMI is between -40 and +40 (not overbought/oversold)
Bearish Signals (Red Dots)
Appear when the chart timeframe SMI crosses below its EMA
Only trigger during periods when the higher timeframe shows:
SMI is below its EMA (decreasing momentum)
SMI is between -40 and +40 (not overbought/oversold)
Settings
%K Length: Lookback period for SMI calculation (default: 10)
%D Length: Smoothing period for primary calculation (default: 3)
EMA Length: Smoothing period for signal line (default: 3)
Alternative Timeframe: Higher timeframe for trend analysis (default: 10 minutes)
Best Practices
Use higher timeframe signals to determine market bias
Wait for signal dots in the chart timeframe for entry timing
Avoid trades when higher timeframe SMI is in extreme zones (above 40 or below -40)
Consider additional confirmation from price action or other indicators
Note: This indicator combines trend and momentum analysis but should be used as part of a complete trading strategy that includes proper risk management.
Good Candles with Risk TableThis custom Pine Script indicator highlights bullish and bearish candles based on the highest and lowest close prices over the past specified number of candles (look-back period).
Bullish candles are marked with an orange color when the close is higher than the highest close from the previous candle.
Bearish candles are marked with a purple color when the close is lower than the lowest close from the previous candle.
The indicator also draws two lines for each colored candle:
Midline: A horizontal line drawn at the midpoint between the open and close of the candle, which helps visualize the candle's body.
Open line: A horizontal line drawn at the open price, offering an additional reference point for market action.
Lines are visible for the last 5 colored candles (either bullish or bearish), with old lines being removed to avoid clutter on the chart.
Additionally, the Risk Table at the top right of the chart shows the calculated units to buy for the specified risk amount (default value of $0.1), based on the distance between the candle’s close and its midpoint. This allows users to manage their risk effectively by knowing how many units they should purchase to match their desired risk level.
OrderBlocksLibrary "OrderBlocks"
This is a library I created that creates order blocks. It's originated from my indicator "Order blocks" (). It will return a Zone object that can be used to draw an order block. If you want to see how that is done you can check out my indicar that uses the same logic.
Create(settings)
Creates an order block if one is found according to the settings parameter.
Parameters:
settings (Settings) : set all values in this parameter to define the settings for the order block creation.
Returns: a Zone object if an order block is found, na otherwise
Zone
Fields:
Time (series int)
TimeClose (series int)
High (series float)
Low (series float)
ReactionLimit (series float)
TouchedZone (Zone type from mickes/Touched/14)
Type (series int)
Zones
Fields:
Index (series int)
Maximum (series int)
Zones (array)
Remove (Zone)
Settings
Fields:
TakeOut (series bool)
ReactionFactor (series float)
Type (series string)
ConsecutiveRisingOrFalling (series bool)
FairValueGap (series bool)
OutofOptionsHelperLibraryLibrary "OutofOptionsHelperLibrary"
Helper library for my indicators/strategies
isUp(i)
is Up candle
Parameters:
i (int)
Returns: bool
isDown(i)
is Down candle
Parameters:
i (int)
Returns: bool
TF(t)
format time into date/time string
Parameters:
t (int)
Returns: string
S(s)
format data to string
Parameters:
s (float)
Returns: string
S(s)
format data to string
Parameters:
s (int)
Returns: string
S(s)
format data to string
Parameters:
s (bool)
Returns: string
barClose(price, up, strict)
Determine if candle closed above/below price
Parameters:
price (float)
up (bool)
strict (bool) : bool if close over is required or if close at the price is good enough
Returns: bool
processSweep(L, price, up, leftB)
Determine how many liquidity sweeps were made
Parameters:
L (array)
price (float)
up (bool)
leftB (int)
Returns: int
liquidity
Fields:
price (series float)
time (series int)
oprice (series float)
otime (series int)
sweeps (series int)
bars_swept (series int)
FRAMA Channel [BigBeluga]This is a trend-following indicator that utilizes the Fractal Adaptive Moving Average (FRAMA) to create a dynamic channel around the price. The FRAMA Channel helps identify uptrends, downtrends, and ranging markets by examining the relationship between the price and the channel's boundaries. It also marks trend changes with arrows, optionally displaying either price values or average volume at these key points.
🔵 IDEA
The core idea behind the FRAMA Channel indicator is to use the fractal nature of markets to adapt to different market conditions. By creating a channel around the FRAMA line, it not only tracks price trends but also adapts its sensitivity based on market volatility. When the price crosses the upper or lower bands of the channel, it signals a potential shift in trend direction. If the price remains within the channel and crosses over the upper or lower bands without a breakout, the market is likely in a ranging phase with low momentum. This adaptive approach makes the FRAMA Channel effective in both trending and ranging market environments.
🔵 KEY FEATURES & USAGE
◉ Dynamic FRAMA Channel with Trend Signals:
The FRAMA Channel uses a fractal-based moving average to create an adaptive channel around the price. When the price crosses above the upper band, it signals an uptrend and plots an upward arrow with the price (or average volume) value. Conversely, when the price crosses below the lower band, it signals a downtrend and marks the point with a downward arrow. This dynamic adaptation to market conditions helps traders identify key trend shifts effectively.
◉ Ranging Market Detection:
If the price remains within the channel, and only the high crosses the upper band or the low crosses the lower band, the indicator identifies a ranging market with low momentum. In this case, the channel turns gray, signaling a neutral trend. This is particularly useful for avoiding false signals during periods of market consolidation.
◉ Color-Coded Candles and Channel Bands:
Candles and channel bands are color-coded to reflect the current trend direction. Green indicates an upward trend, blue shows a downward trend, and gray signals a neutral or ranging market. This visual representation makes it easy to identify the market condition at a glance, helping traders make informed decisions quickly.
◉ Customizable Display of Price or Average Volume:
On trend change signals, the indicator allows users to choose whether to display the price at the point of trend change or the average volume of 10 bars. This flexibility enables traders to focus on the information that is most relevant to their strategy, whether it's the exact price entery or the volume context of the market shift. Displaying the average volume allows to see the strength of the trend change.
Price Data:
Average Volume of points:
🔵 CUSTOMIZATION
Length & Bands Distance: Adjust the length for the FRAMA calculation to control the sensitivity of the channel. A shorter length makes the channel more reactive to price changes, while a longer length smooths it out. The Bands Distance setting determines how far the bands are from the FRAMA line, helping to define the breakout and ranging conditions.
Signals Data: Choose between displaying the price or the average volume on trend change arrows. This allows traders to focus on either the exact price level of trend change or the market volume context.
Color Settings: Customize the colors for upward momentum, downward momentum, and neutral states to suit your charting preferences. You can also toggle whether to color the candles based on the momentum for a clearer visual of the trend direction.
The FRAMA Channel indicator adapts to market conditions, providing a versatile tool for identifying trends and ranging markets with clear visual cues.
ICT Macro Sessions by @zeusbottradingICT Macro Sessions Indicator
The ICT Macro Sessions Indicator is a powerful tool designed for traders who follow the ICT (Inner Circle Trader) methodology and want to optimize their trading during specific high-probability time intervals. This indicator highlights all the key macro sessions throughout the trading day in the GMT+8 (Hong Kong) time zone.
What Does the Indicator Do?
This indicator visually marks ICT Macro Sessions on your trading chart using background colors and optional labels. Each session corresponds to specific time intervals when institutional activity is most likely to drive price action. By focusing on these periods, traders can align their strategies with market volatility and liquidity, increasing their chances of success.
Highlighted Sessions
The indicator covers all major ICT Macro Sessions, each with a unique color for easy identification:
London Macro 1 (15:33–16:00 GMT+8):
- Marks the early London session, often characterized by strong directional moves.
London Macro 2 (17:03–17:30 GMT+8):
- Captures the mid-London session, where price frequently reacts to liquidity levels.
New York AM Macro 1 (22:50–23:10 GMT+8):
- Highlights the start of the New York session, a prime time for price reversals or continuations.
New York AM Macro 2 (23:50–00:10 GMT+8):
- Focuses on late-morning New York activity, often aligning with key news releases.
New York Lunch Macro (00:50–01:10 GMT+8):
- Covers the lunch period in New York, where price may consolidate or set up for afternoon moves.
New York PM Macro 1 (02:10–02:40 GMT+8):
- Tracks post-lunch activity in New York, often featuring renewed volatility.
New York PM Macro 2 (04:15–04:45 GMT+8):
- Captures late-session moves as institutional traders finalize their positions.
Features of the Indicator
Fixed Time: The indicator is pre-configured for GMT+8 but it will adapt automatically to your timezone. No need to change anything in the code.
Background Highlighting: Each session is visually marked with a unique background color for quick recognition.
Optional Labels: Traders can enable or disable labels for each session, providing flexibility in how information is displayed.
Session Toggles: You can choose which sessions to display based on your trading preferences and strategy.
Intraday Timeframes: The indicator is optimized for intraday charts with timeframes of 45 minutes or less. You can change it to anything you like.
Why Use This Indicator?
The ICT Macro Sessions Indicator helps traders focus on the most critical times of the trading day when institutional activity is at its peak. These periods often coincide with significant price movements, making them ideal for scalping, day trading, or even swing trading setups. By visually highlighting these sessions, the indicator eliminates guesswork and allows traders to plan their trades with precision.
2 bars BarsInputs:
The script allows you to specify the values for each state (HH, HL, LL, LH) for two bars.
Labels as Bars:
Instead of line.new, this script uses label.new to simulate a pseudo-bar chart.
Bars are visually represented as labels, with distinct positions and colors.
Offset Logic:
The offset ensures that each category has its labels (bars) placed at the correct horizontal distance.
Custom Categories:
The categories array ("HH", "HL", "LL", "LH") links to their respective values.
DB369 - Directional Bias 369
DB369 - Directional Bias 369 Indicator
The **DB369** indicator helps traders identify key market levels and trends by combining multiple timeframes' price action analysis. It highlights important **pivot points** on the chart and provides visual cues to help you make more informed buy and sell decisions based on the overall market direction.
Key Features
1. Pivot Points Across Multiple Timeframes**:
- The indicator calculates and displays pivot points for the **Monthly**, **Weekly**, **Daily**, **4-Hour**, and **1-Hour** timeframes (or 30-minute equivalent if desired). These pivots represent significant price levels where the market may retest.
2. **Trend Detection**:
- The indicator evaluates the relationship between the current price and the pivot point for each timeframe. Based on this comparison, it classifies the market as **Bullish**, **Bearish**, or **Neutral** on each timeframe.
3. **Pivot Lines**:
- Horizontal lines are drawn to mark the key pivot points for each selected timeframe. These lines extend into the future and adjust dynamically as the market moves in real time.
- **Customizable**: You can choose which timeframes to display pivot points by enabling/disabling them in the settings.
4. **Trend Table**:
- A **table** is displayed at the top-right of the chart to show the trend for the **Daily**, **4-Hour**, and **30-Minute** timeframes. It provides an easy-to-read view of the trend direction across these timeframes.
5. **Buy/Sell Arrows**:
- **Buy Arrow**: A green arrow will appear when the **Daily**, **4-Hour**, and **30-Minute** trends are all **Bullish** (aligned in the same direction).
- **Sell Arrow**: A red arrow will appear when all three timeframes show a **Bearish** trend.
- These arrows appear only once per alignment change and can be enabled or disabled for alerts. This helps avoid clutter on the chart and ensures that you only see a signal when the alignment occurs or changes.
### **How to Use the DB369 Indicator**:
1. **Pivot Points**:
- The pivot points represent significant price levels where the market might retest in the future. For instance:
- **Bullish Market**: If the price is above the pivot point, the market is considered bullish.
- **Bearish Market**: If the price is below the pivot point, the market is considered bearish.
- **Neutral Market**: When the price is near the pivot point, the market is neither strongly bullish nor bearish.
2. **Trend Alignment**:
- When the **Daily**, **4-Hour**, and **30-Minute** timeframes all show the same trend direction (either **Bullish** or **Bearish**), this alignment signifies a stronger trend.
- You will receive a **Buy Arrow** when all three timeframes are aligned bullish, and a **Sell Arrow** when they are aligned bearish.
- These arrows are displayed at the point when the alignment is first detected and can also trigger **alerts**.
3. **Alerts**:
- You can choose to enable alerts for when a **Buy** or **Sell** arrow appears on the chart. This allows you to be notified in real-time when the alignment conditions are met.
4. **Using the Pivot Points for Entry**:
- **Buy Trade**: Look for a buy trade when the price is near the **pivot line** of the higher timeframes, particularly when the trend across all three timeframes is **Bullish**.
- **Sell Trade**: Similarly, look for a sell trade when the price is near a **pivot line** and the trend is **Bearish**.
5. **Customization**:
- You can customize which timeframes' pivots are shown on the chart by toggling the visibility of the **Monthly**, **Weekly**, **Daily**, **4-Hour**, and **1-Hour** pivots in the settings.
- The indicator automatically adjusts the pivot levels in real-time as the market progresses.
**Important Notes**:
- This indicator does not guarantee successful trades; it is intended to assist in identifying potential trade opportunities based on the alignment of higher timeframe trends.
- Always combine the information from the DB369 indicator with other technical analysis tools and risk management strategies to ensure more accurate trade decisions.
Optimized Grid with KNN_2.0Strategy Overview
This strategy, named "Optimized Grid with KNN_2.0," is designed to optimize trading decisions using a combination of grid trading, K-Nearest Neighbors (KNN) algorithm, and a greedy algorithm. The strategy aims to maximize profits by dynamically adjusting entry and exit thresholds based on market conditions and historical data.
Key Components
Grid Trading:
The strategy uses a grid-based approach to place buy and sell orders at predefined price levels. This helps in capturing profits from market fluctuations.
K-Nearest Neighbors (KNN) Algorithm:
The KNN algorithm is used to optimize entry and exit points based on historical price data. It identifies the nearest neighbors (similar price movements) and adjusts the thresholds accordingly.
Greedy Algorithm:
The greedy algorithm is employed to dynamically adjust the stop-loss and take-profit levels. It ensures that the strategy captures maximum profits by adjusting thresholds based on recent price changes.
Detailed Explanation
Grid Trading:
The strategy defines a grid of price levels where buy and sell orders are placed. The openTh and closeTh parameters determine the thresholds for opening and closing positions.
The t3_fast and t3_slow indicators are used to generate trading signals based on the crossover and crossunder of these indicators.
KNN Algorithm:
The KNN algorithm is used to find the nearest neighbors (similar price movements) in the historical data. It calculates the distance between the current price and historical prices to identify the most similar price movements.
The algorithm then adjusts the entry and exit thresholds based on the average change in price of the nearest neighbors.
Greedy Algorithm:
The greedy algorithm dynamically adjusts the stop-loss and take-profit levels based on recent price changes. It ensures that the strategy captures maximum profits by adjusting thresholds in real-time.
The algorithm uses the average_change variable to calculate the average price change of the nearest neighbors and adjusts the thresholds accordingly.
Correlation Confluence Trend IndicatorCorrelation Confluence Trend Indicator
Overview
The Correlation Confluence Trend Indicator combines exponential moving averages (EMAs) and statistical correlation measures to identify high-confidence trend alignments between an asset and a benchmark. By filtering signals through correlation strength, this indicator highlights opportunities when the asset and benchmark move together. In other words, it defines a trend and then uses correlation strength and the trend of a second asset to identify high-confidence trends.
Key Features
Dual EMA Trend Analysis :
Calculates fast and slow EMAs for both the asset and the selected benchmark (e.g., SPY) to identify bullish and bearish trends.
Correlation Strength Filtering :
Evaluates correlation between the asset and benchmark, identifying stronger-than-average relationships based on the mean and standard deviation.
Background Color Coding :
- Green : Strong correlation, both asset and benchmark bullish.
- Aqua : Weak correlation, both asset and benchmark bullish.
- Red : Strong correlation, both asset and benchmark bearish.
- Fuchsia : Weak correlation, both asset and benchmark bearish.
- Orange : Strong correlation, benchmark bullish, asset bearish.
- Yellow : Weak correlation, benchmark bullish, asset bearish.
- Purple : Strong correlation, benchmark bearish, asset bullish.
- Lime : Weak correlation, benchmark bearish, asset bullish.
Visual Trend Indicators :
Plots fast and slow EMAs for the asset, dynamically colored based on aggregate trend signals. The color of this corresponds to the main trend signal.
Inputs
Benchmark Symbol : Symbol of the benchmark asset to compare against.
Fast EMA Length : Period for the fast EMA calculation.
Slow EMA Length : Period for the slow EMA calculation.
Correlation Length : Number of bars for correlation calculation.
Correlation Mean Length : Number of bars for mean and standard deviation calculation.
Std Dev Multiplier : Multiplier for standard deviation to define correlation strength. When the correlation is Std Dev Multiplier standard deviations above the mean, it counts as a strong correlation.
Set Background Color : Toggle background coloring on or off.
Notes
This indicator is primarily designed for trend-following strategies. By combining trend analysis and correlation filtering, it ensures that signals occur during aligned market conditions, reducing false signals.
Before incorporating this indicator into your trading strategy:
Always backtest on historical data to evaluate its performance before committing capital.
Use proper risk management to control position sizes and mitigate potential losses.
Remember that no indicator guarantees success. I'm quite proud of this one, but it's not the holy grail.
Non-Psychological Levels🟩 Non-Psychological Levels is a structural analysis tool that segments price action into objective ranges, identifying Broken and Unbroken levels without relying on psychological or time-based assumptions. By emphasizing mechanically derived price behavior, it provides traders with a clear framework for analyzing support and resistance in a consistent and unbiased manner across various market conditions.
This indicator introduces a new approach to understanding market structure by focusing on price movement within defined segments, free from behavioral patterns, round numbers, or specific time intervals. While the indicator is time-agnostic in design, it works within the natural time progression of the chart, ensuring that segmentation aligns with the inherent structure of price movement. Broken levels, where price has breached a structural boundary, and Unbroken levels, which remain intact, are visualized with horizontal lines. These structural zones are complemented by dynamically boxed segments that contextualize both historical and ongoing price behavior.
By offering an objective perspective, the Non-Psychological Levels indicator complements psychology-based tools, helping traders explore market dynamics from multiple angles. When structural levels align with psychological zones, they reinforce critical price areas; when they differ, they provide opportunities to analyze price behavior from an alternative lens. This indicator is designed as both an educational framework and a practical tool, encouraging a deeper understanding of structural price behavior in technical analysis.
⭕ THEORY AND CONCEPT ⭕
The Non-Psychological Levels indicator is grounded in the principle of analyzing price behavior without reliance on psychological assumptions or time-based factors. Its primary purpose is to provide a structural framework for identifying support and resistance levels by focusing solely on price movement within mechanically defined segments. By removing external influences such as sentiment, time intervals, or market sessions, the indicator offers an unbiased lens through which traders can observe price dynamics.
Non-psychology, as defined here, refers to an approach that excludes behavioral and emotional patterns—like fear, greed, or herd mentality—from price analysis. Traditional tools often depend on these patterns to identify zones such as pivots or Fibonacci retracements, but these methods can be inconsistent in volatile markets. In contrast, the Non-Psychological Levels indicator focuses entirely on what price is doing, free from assumptions about trader behavior or external time constraints.
The indicator’s time-agnostic and mechanically driven design segments price action into consistent ranges, highlighting "Broken" levels (where price breaches structural boundaries) and "Unbroken" levels (where price holds). These structural zones remain unaffected by subjective or external influences, ensuring clarity and consistency across different markets and timeframes. By doing so, the indicator reveals a pure view of price structure, independent of psychological biases.
Importantly, the Non-Psychological Levels indicator is not intended to replace psychology-based tools but to complement them. When its structural levels align with psychological zones like round numbers or session highs/lows, the significance of these areas is reinforced. Conversely, when the levels differ, the contrast provides traders with alternative insights into market dynamics. This dual perspective—blending mechanical objectivity with behavioral analysis—enhances the depth and flexibility of market evaluation.
The following principles outline the theoretical foundation of the indicator and its unique contribution to structural price analysis:
Time-Agnostic Design : The indicator avoids reliance on time-based factors like daily opens, session intervals, or specific events. Instead, it segments price action using bar indexes, ensuring that structural levels are identified independently of external time variables. While the x-axis of a chart inherently represents time, this indicator abstracts away its influence, allowing traders to focus purely on price movement without the bias of temporal context.
Mechanical and Neutral Framework : Every calculation within the indicator is predetermined by a set of mechanical rules, ensuring no subjective input or interpretation affects the results. This objectivity guarantees that levels are derived solely from observed price behavior, providing a reliable framework that traders can trust to remain consistent across different assets, timeframes, and market conditions.
Broken and Unbroken Levels : Broken levels represent zones where price has breached a structural boundary, while Unbroken levels highlight areas where price has consistently respected its range. This distinction provides a clear and systematic method for identifying key support and resistance levels, offering insights into where future price interactions are most likely to occur.
Neutral Price Behavior : By dividing price action into equal segments, the indicator removes the influence of external factors like trader sentiment or psychological expectations. Each segment independently determines significant levels based purely on price action, enabling a structural view of the market that abstracts away behavioral or emotional biases.
Complement to Psychological Tools : While the indicator itself avoids behavioral assumptions, its levels can align with psychological zones like round numbers, pivots, or Fibonacci levels. When these structural and psychological levels overlap, it reinforces the importance of key areas, while divergences offer opportunities to examine price behavior from a new perspective.
Educational Value : The indicator encourages traders to explore the contrast between structural and psychological analysis. By introducing a framework that isolates price behavior from external influences, it challenges traditional methods of technical analysis, fostering deeper insights into market structure and behavior.
🔍 UNDERSTANDING STRUCTURAL LEVELS 🔍
The Non-Psychological Levels indicator offers a straightforward yet powerful way to understand market structure by segmenting price action into mechanically defined ranges. This segmentation highlights two key elements: "Broken" levels, where price has breached structural boundaries, and "Unbroken" levels, which remain intact and respected by price action. Together, these components create a framework for identifying potential areas of support and resistance.
Broken Levels : These are structural boundaries that price has surpassed, indicating areas where previous support or resistance failed. Broken levels often signal transitions in price behavior, such as shifts in momentum or the start of trending movements. They provide insight into zones where price has already tested and moved beyond.
Unbroken Levels : These levels remain intact within a given price segment, marking areas where price has consistently respected boundaries. Unbroken levels are particularly useful for identifying potential reversal points or zones of continued support or resistance. Their persistence across price action often makes them reliable indicators of market structure.
The visual segmentation of price action into distinct ranges allows traders to observe how price transitions between structural zones. For example:
- Clusters of Unbroken levels near the current price may suggest strong support or resistance, offering areas of interest for reversals or breakouts.
- Gaps between Unbroken levels highlight areas of price inefficiency or low interaction, which may become significant if revisited.
By focusing solely on structural price behavior, the Non-Psychological Levels indicator enables traders to analyze price independently of time or psychological factors. This makes it a valuable tool for understanding price dynamics objectively, whether used on its own or alongside other indicators.
🛠️ SETTINGS 🛠️
The Non-Psychological Levels indicator offers various customizable settings to help users tailor its visualization to their specific trading style and market conditions. These settings allow adjustments to sensitivity, level projection, and the source of price calculations (e.g., wicks or closing prices). Below, we outline each setting and its impact on the chart, along with examples to illustrate their functionality.
Custom Settings
Sensitivity : This setting adjusts the balance between detailed and broader structural levels by controlling the number of segments. Higher values result in more segments, revealing finer price levels, while lower values consolidate segments to highlight major price movements.
Source : Allows the user to choose between 'Wick' or 'Close' for detecting levels. Selecting 'Wick' emphasizes the absolute highs and lows of price action, while 'Close' focuses on closing prices within each segment.
Level Labels : Configures the visual representation of price levels, allowing users to toggle between price values, symbols (▲ ▼), or disabling labels altogether. This setting ensures clarity in how Broken and Unbroken levels are displayed on the chart.
Unbroken Levels : - - - Users can customize the colors and label styles for Unbroken levels, which highlight areas where price has respected structural boundaries.
Broken Levels : -|- Similar to Unbroken levels, users can specify the visual appearance of Broken levels, including color customization for Broken highs and lows. These settings help distinguish areas where price has breached a structural boundary.
Projection Options : This setting allows users to control how broken and unbroken levels are visually extended on the chart. The Future option projects lines forward to the right of the current price, showing potential future relevance of levels. The All option extends lines both forward and backward, providing a comprehensive view of how levels align with historical and potential future price action. The None option disables projections, keeping the chart focused solely on current segment levels without any extensions.
Segments : Includes options for customizing the segment visualization:
- Live Segment : Toggles the display of a highlighted box representing the current developing segment, helping users focus on ongoing price action.
- Boxes : Allows users to display filled boxes around each segment for additional visual emphasis.
- Segment Colors : Users can define separate colors for support (lower) and resistance (upper) segments, making it easier to interpret directional trends.
- Boundaries : Enables or disables vertical lines to mark segment boundaries, providing a clearer view of structural divisions.
Repaint : This setting allows users to enable or disable triangle labels within the live segment. When enabled, the triangles dynamically update to reflect real-time price behavior during the live bar but will repaint until the bar is fully confirmed. Disabling this option prevents the triangles from appearing during the live bar, reducing potential confusion as they may otherwise flash on and off during price updates. This setting ensures users can choose their preferred visualization while maintaining clarity in real-time analysis.
Color Settings : Offers extensive customization for all visual elements, including Broken and Unbroken levels, segment boundaries, and live segments. These settings ensure the indicator can adapt to individual preferences for chart readability.
🖼️ CHART EXAMPLES 🖼️
The following chart examples illustrate different configurations and features of the Non-Psychological Levels indicator. These examples highlight how the indicator’s settings influence the visualization of structural price behavior, helping traders understand its functionality in various scenarios.
Broken and Unbroken Levels : Orange prices are Broken HIghs. Blue prices are Broken Lows. Green and Red are Unbroken.
Boundaries : Enable Boundaries to visualize segments.
High Sensitivity Setting : A high sensitivity setting produces fewer segments and levels, emphasizing broader price ranges and major structural zones. This configuration is better suited for higher timeframes or identifying overarching trends.
Low Sensitivity Setting : A low sensitivity setting results in a greater number of segments and levels, offering a granular view of price structure. This configuration is ideal for analyzing detailed price movements on lower timeframes.
Live Segment with Triangles Enabled : This example shows the live segment box with triangle labels enabled. These triangles update dynamically during the live bar but may repaint until the bar is confirmed, helping traders observe real-time price behavior.
Broken and Unbroken Levels : This example highlights Broken levels (where price has breached structural boundaries and are drawn through subsequent price action) and Unbroken levels (where price has respected structural boundaries). These distinctions visually identify areas of potential support and resistance.
Broken and Unbroken Levels with Projection: All : This example demonstrates the "Project All" feature, where broken and unbroken levels are extended both forward and backward on the chart. This visualization highlights historical and potential future support and resistance zones, helping traders better understand how price interacts with these structural levels over time.
Segment Boxes with Boundaries : Filled boxes around individual segments visually distinguish each price interval, offering clarity in observing structural price transitions.
📊 SUMMARY 📊
The Non-Psychological Levels indicator provides a unique framework for analyzing structural price behavior through the identification of Broken and Unbroken levels. These levels act as a mechanical representation of support and resistance, independent of psychological biases or time-based factors. By focusing purely on price movement within defined segments, the indicator offers a neutral and consistent approach to understanding market dynamics.
This method complements traditional tools by providing an unbiased perspective. When structural levels align with psychological zones—such as round numbers or session-based highs and lows—they reinforce the significance of these areas as key price zones. When they diverge, the indicator introduces an alternative view, prompting further exploration of price behavior. This dual perspective enhances the depth of analysis by combining the mechanical and behavioral aspects of price action.
The Non-Psychological Levels indicator is not designed to generate trading signals or predict future price movements but serves as a visual and educational tool. Its adaptability across all markets and timeframes allows traders to integrate it into their broader strategies. By highlighting structural price dynamics, the indicator offers a fresh perspective on market analysis while remaining compatible with other technical tools.
⚙️ COMPATIBILITY AND LIMITATIONS ⚙️
Asset Compatibility :
The Non-Psychological Levels indicator is compatible with all asset classes, including cryptocurrencies, forex, stocks, and commodities. It can be applied to any chart or timeframe, making it a flexible tool for structural price analysis. Users should adjust the Sensitivity setting to ensure the segmentation aligns with the price behavior of the specific asset being analyzed. For instance, higher sensitivity values are more suitable for assets with large price ranges, while lower values work well for assets with tighter ranges.
Visual Range Dependency :
The indicator is optimized to perform calculations only within the visible range of the chart. This is a significant advantage, as it prevents unnecessary calculations and maintains efficient performance. However, because of this dependency, levels may appear to "recalculate" when the chart is zoomed in or out quickly or shifted abruptly. While this does not affect the integrity of the levels, it may cause a temporary lag as the indicator adjusts to the new visual range.
Persistence of Levels Beyond Visibility :
Even if levels are not visible on the chart due to zoom or scroll settings, they still exist in the background and are recalculated when revisited. This ensures that the structural price analysis remains consistent, regardless of the chart view.
Box Limitations in Pine Script :
The indicator is subject to Pine Script's inherent limitation of 500 boxes. This means that no more than 500 segments or level boxes can be drawn on the chart simultaneously. For most configurations, this limitation is mitigated by focusing on the visual range, but users employing very low sensitivity settings may exceed the limit. In such cases, only the most recent 500 boxes will be displayed, potentially omitting earlier segments.
Lag with Low Sensitivity Settings :
When sensitivity is set to a low value, the indicator creates many more segments, resulting in finer granularity and a higher number of boxes. While this provides detailed structural levels, it may increase the likelihood of exceeding Pine Script’s 500-box limit or cause a temporary lag when rendering a dense set of boxes over a wide visual range. Users should adjust sensitivity to balance detail with performance, especially on assets with high volatility or broad price ranges.
Live Segment Caution :
The live segment box updates in real time to reflect price movements as the segment is still developing. Since the segment high and segment low are not yet finalized, users should interpret this feature as a dynamic visualization of current price behavior rather than a definitive structural analysis. This ensures clarity during ongoing price action while maintaining the integrity of the indicator's framework.
Cross-Market Versatility :
The indicator’s time-agnostic and mechanical design ensures that it functions identically across all markets and timeframes. However, users should consider the unique characteristics of different markets when interpreting the results, as certain assets (e.g., highly volatile cryptocurrencies) may require sensitivity adjustments for optimal segmentation.
Visual Range Dependency: Levels recalculate efficiently within the chart's visible range but may lag temporarily when zooming or scrolling quickly.
These considerations ensure that the Non-Psychological Levels indicator remains robust and versatile while highlighting some inherent limitations of Pine Script and real-time recalculations. Users can mitigate these constraints by carefully adjusting sensitivity and understanding how the visual range dependency affects performance.
⚠️ DISCLAIMER ⚠️
The Non-Psychological Levels indicator is a visual analysis tool and is not designed as a predictive or trading signal indicator. Its primary purpose is to highlight structural price levels, providing an objective framework for understanding support and resistance within mechanically segmented price action.
The indicator operates within the visible range of the chart to ensure efficiency and adaptiveness, but this recalculation should not be interpreted as a forecast of future price behavior. While the structural levels may align with significant price zones in hindsight, they are purely a reflection of observed price dynamics and should not be used as standalone trading signals.
This indicator is intended as an educational and visual aid to complement other analysis methods. Users are encouraged to integrate it into a broader trading strategy and make adjustments to the settings based on their individual needs and market conditions.
🧠 BEYOND THE CODE 🧠
The Non-Psychological Levels indicator, like other xxattaxx indicators , is designed with education and community collaboration in mind. Its open-source nature encourages exploration, experimentation, and the development of new approaches to price analysis. By focusing on structural price behavior rather than psychological or time-based factors, this indicator introduces a fresh perspective for users to study.
Beyond its visual utility, the indicator serves as an educational framework for understanding the concept of non-psychological analysis. It offers traders an opportunity to explore price dynamics in a purely mechanical way, challenging conventional methods and fostering deeper insights into structural behavior. This approach is especially valuable for those interested in exploring new concepts or seeking alternative perspectives on market analysis.
Your comments, suggestions, and discussions are invaluable in shaping the future of this project. We actively encourage your feedback and contributions, which will directly help us refine and improve the Non-Psychological Levels indicator. We look forward to seeing the creative ways in which you use and enhance this tool. MVS