Machine Learning Price Target Prediction Signals [AlgoAlpha]Introducing the Machine Learning Price Target Predictions, a cutting-edge trading tool that leverages kernel regression to provide accurate price targets and enhance your trading strategy. This indicator combines trend-based signals with advanced machine learning techniques, offering predictive insights into potential price movements. Perfect for traders looking to make data-driven decisions with confidence.
What is Kernel Regression and How It Works
Kernel regression is a non-parametric machine learning technique that estimates the relationship between variables by weighting data points based on their similarity to a given input. The similarity is determined using a kernel function, such as the Gaussian (RBF) kernel, which assigns higher weights to closer data points and progressively lower weights to farther ones. This allows the model to make smooth and adaptive predictions, balancing recent data and historical trends.
Key Features
🎯 Predictive Price Targets : Uses kernel regression to estimate the magnitude of price movements.
📈 Dynamic Trend Analysis : Multiple trend detection methods, including EMA crossovers, Hull Moving Average, and SuperTrend.
🔧 Customizable Settings : Adjust bandwidth for kernel regression and tweak trend indicator parameters to suit your strategy.
📊 Visual Trade Levels : Displays take-profit and stop-loss levels directly on the chart with customizable colors.
📋 Performance Metrics : Real-time win rate, recommended risk-reward ratio, and training data size displayed in an on-chart table.
🔔 Alerts : Get notified for new trends, take-profit hits, and stop-loss triggers.
How to Use
🛠 Add the Indicator : Add it to your favorites and apply it to your chart. Configure the trend detection method (SuperTrend, HMA, or EMA crossover) and other parameters based on your preferences.
📊 Analyze Predictions : Observe the predicted move size, recommended risk-reward ratio, and trend direction. Use the displayed levels for trade planning.
🔔 Set Alerts : Enable alerts for trend signals, take-profit hits, or stop-loss triggers to stay informed without constant monitoring.
How It Works
The indicator calculates features such as price volatility, relative strength, and trend signals, which are stored during training periods. When a trend change is detected, the kernel regression model predicts the likely price move based on these features. Predictions are smoothed using the specified bandwidth to avoid overfitting while ensuring timely responses to feature changes. Visualized take-profit and stop-loss levels help traders optimize risk management. Real-time metrics like win rate and recommended risk-reward ratios provide actionable insights for decision-making.
Statistics
Accurate Bollinger Bands mcbw_ [True Volatility Distribution]The Bollinger Bands have become a very important technical tool for discretionary and algorithmic traders alike over the last decades. It was designed to give traders an edge on the markets by setting probabilistic values to different levels of volatility. However, some of the assumptions that go into its calculations make it unusable for traders who want to get a correct understanding of the volatility that the bands are trying to be used for. Let's go through what the Bollinger Bands are said to show, how their calculations work, the problems in the calculations, and how the current indicator I am presenting today fixes these.
--> If you just want to know how the settings work then skip straight to the end or click on the little (i) symbol next to the values in the indicator settings window when its on your chart <--
--------------------------- What Are Bollinger Bands ---------------------------
The Bollinger Bands were formed in the 1980's, a time when many retail traders interacted with their symbols via physically printed charts and computer memory for personal computer memory was measured in Kb (about a factor of 1 million smaller than today). Bollinger Bands are designed to help a trader or algorithm see the likelihood of price expanding outside of its typical range, the further the lines are from the current price implies the less often they will get hit. With a hands on understanding many strategies use these levels for designated levels of breakout trades or to assist in defining price ranges.
--------------------------- How Bollinger Bands Work ---------------------------
The calculations that go into Bollinger Bands are rather simple. There is a moving average that centers the indicator and an equidistant top band and bottom band are drawn at a fixed width away. The moving average is just a typical moving average (or common variant) that tracks the price action, while the distance to the top and bottom bands is a direct function of recent price volatility. The way that the distance to the bands is calculated is inspired by formulas from statistics. The standard deviation is taken from the candles that go into the moving average and then this is multiplied by a user defined value to set the bands position, I will call this value 'the multiple'. When discussing Bollinger Bands, that trading community at large normally discusses 'the multiple' as a multiplier of the standard deviation as it applies to a normal distribution (gaußian probability). On a normal distribution the number of standard deviations away (which trades directly use as 'the multiple') you are directly corresponds to how likely/unlikely something is to happen:
1 standard deviation equals 68.3%, meaning that the price should stay inside the 1 standard deviation 68.3% of the time and be outside of it 31.7% of the time;
2 standard deviation equals 95.5%, meaning that the price should stay inside the 2 standard deviation 95.5% of the time and be outside of it 4.5% of the time;
3 standard deviation equals 99.7%, meaning that the price should stay inside the 3 standard deviation 99.7% of the time and be outside of it 0.3% of the time.
Therefore when traders set 'the multiple' to 2, they interpret this as meaning that price will not reach there 95.5% of the time.
---------------- The Problem With The Math of Bollinger Bands ----------------
In and of themselves the Bollinger Bands are a great tool, but they have become misconstrued with some incorrect sense of statistical meaning, when they should really just be taken at face value without any further interpretation or implication.
In order to explain this it is going to get a bit technical so I will give a little math background and try to simplify things. First let's review some statistics topics (distributions, percentiles, standard deviations) and then with that understanding explore the incorrect logic of how Bollinger Bands have been interpreted/employed.
---------------- Quick Stats Review ----------------
.
(If you are comfortable with statistics feel free to skip ahead to the next section)
.
-------- I: Probability distributions --------
When you have a lot of data it is helpful to see how many times different results appear in your dataset. To visualize this people use "histograms", which just shows how many times each element appears in the dataset by stacking each of the same elements on top of each other to form a graph. You may be familiar with the bell curve (also called the "normal distribution", which we will be calling it by). The normal distribution histogram looks like a big hump around zero and then drops off super quickly the further you get from it. This shape (the bell curve) is very nice because it has a lot of very nifty mathematical properties and seems to show up in nature all the time. Since it pops up in so many places, society has developed many different shortcuts related to it that speed up all kinds of calculations, including the shortcut that 1 standard deviation = 68.3%, 2 standard deviations = 95.5%, and 3 standard deviations = 99.7% (these only apply to the normal distribution). Despite how handy the normal distribution is and all the shortcuts we have for it are, and how much it shows up in the natural world, there is nothing that forces your specific dataset to look like it. In fact, your data can actually have any possible shape. As we will explore later, economic and financial datasets *rarely* follow the normal distribution.
-------- II: Percentiles --------
After you have made the histogram of your dataset you have built the "probability distribution" of your own dataset that is specific to all the data you have collected. There is a whole complicated framework for how to accurately calculate percentiles but we will dramatically simplify it for our use. The 'percentile' in our case is just the number of data points we are away from the "middle" of the data set (normally just 0). Lets say I took the difference of the daily close of a symbol for the last two weeks, green candles would be positive and red would be negative. In this example my dataset of day by day closing price difference is:
week 1:
week 2:
sorting all of these value into a single dataset I have:
I can separate the positive and negative returns and explore their distributions separately:
negative return distribution =
positive return distribution =
Taking the 25th% percentile of these would just be taking the value that is 25% towards the end of the end of these returns. Or akin the 100%th percentile would just be taking the vale that is 100% at the end of those:
negative return distribution (50%) = -5
positive return distribution (50%) = +4
negative return distribution (100%) = -10
positive return distribution (100%) = +20
Or instead of separating the positive and negative returns we can also look at all of the differences in the daily close as just pure price movement and not account for the direction, in this case we would pool all of the data together by ignoring the negative signs of the negative reruns
combined return distribution =
In this case the 50%th and 100%th percentile of the combined return distribution would be:
combined return distribution (50%) = 4
combined return distribution (100%) = 10
Sometimes taking the positive and negative distributions separately is better than pooling them into a combined distribution for some purposes. Other times the combined distribution is better.
Most financial data has very different distributions for negative returns and positive returns. This is encapsulated in sayings like "Price takes the stairs up and the elevator down".
-------- III: Standard Deviation --------
The formula for the standard deviation (refereed to here by its shorthand 'STDEV') can be intimidating, but going through each of its elements will illuminate what it does. The formula for STDEV is equal to:
square root ( (sum ) / N )
Going back the the dataset that you might have, the variables in the formula above are:
'mean' is the average of your entire dataset
'x' is just representative of a single point in your dataset (one point at a time)
'N' is the total number of things in your dataset.
Going back to the STDEV formula above we can see how each part of it works. Starting with the '(x - mean)' part. What this does is it takes every single point of the dataset and measure how far away it is from the mean of the entire dataset. Taking this value to the power of two: '(x - mean) ^ 2', means that points that are very far away from the dataset mean get 'penalized' twice as much. Points that are very close to the dataset mean are not impacted as much. In practice, this would mean that if your dataset had a bunch of values that were in a wide range but always stayed in that range, this value ('(x - mean) ^ 2') would end up being small. On the other hand, if your dataset was full of the exact same number, but had a couple outliers very far away, this would have a much larger value since the square par of '(x - mean) ^ 2' make them grow massive. Now including the sum part of 'sum ', this just adds up all the of the squared distanced from the dataset mean. Then this is divided by the number of values in the dataset ('N'), and then the square root of that value is taken.
There is nothing inherently special or definitive about the STDEV formula, it is just a tool with extremely widespread use and adoption. As we saw here, all the STDEV formula is really doing is measuring the intensity of the outliers.
--------------------------- Flaws of Bollinger Bands ---------------------------
The largest problem with Bollinger Bands is the assumption that price has a normal distribution. This is assumption is massively incorrect for many reasons that I will try to encapsulate into two points:
Price return do not follow a normal distribution, every single symbol on every single timeframe has is own unique distribution that is specific to only itself. Therefore all the tools, shortcuts, and ideas that we use for normal distributions do not apply to price returns, and since they do not apply here they should not be used. A more general approach is needed that allows each specific symbol on every specific timeframe to be treated uniquely.
The distributions of price returns on the positive and negative side are almost never the same. A more general approach is needed that allows positive and negative returns to be calculated separately.
In addition to the issues of the normal distribution assumption, the standard deviation formula (as shown above in the quick stats review) is essentially just a tame measurement of outliers (a more aggressive form of outlier measurement might be taking the differences to the power of 3 rather than 2). Despite this being a bit of a philosophical question, does the measurement of outlier intensity as defined by the STDEV formula really measure what we want to know as traders when we're experiencing volatility? Or would adjustments to that formula better reflect what we *experience* as volatility when we are actively trading? This is an open ended question that I will leave here, but I wanted to pose this question because it is a key part of what how the Bollinger Bands work that we all assume as a given.
Circling back on the normal distribution assumption, the standard deviation formula used in the calculation of the bands only encompasses the deviation of the candles that go into the moving average and have no knowledge of the historical price action. Therefore the level of the bands may not really reflect how the price action behaves over a longer period of time.
------------ Delivering Factually Accurate Data That Traders Need------------
In light of the problems identified above, this indicator fixes all of these issue and delivers statistically correct information that discretionary and algorithmic traders can use, with truly accurate probabilities. It takes the price action of the last 2,000 candles and builds a huge dataset of distributions that you can directly select your percentiles from. It also allows you to have the positive and negative distributions calculated separately, or if you would like, you can pool all of them together in a combined distribution. In addition to this, there is a wide selection of moving averages directly available in the indicator to choose from.
Hedge funds, quant shops, algo prop firms, and advanced mechanical groups all employ the true return distributions in their work. Now you have access to the same type of data with this indicator, wherein it's doing all the lifting for you.
------------------------------ Indicator Settings ------------------------------
.
---- Moving average ----
Select the type of moving average you would like and its length
---- Bands ----
The percentiles that you enter here will be pulled directly from the return distribution of the last 2,000 candles. With the typical Bollinger Bands, traders would select 2 standard deviations and incorrectly think that the levels it highlights are the 95.5% levels. Now, if you want the true 95.5% level, you can just enter 95.5 into the percentile value here. Each of the three available bands takes the true percentile you enter here.
---- Separate Positive & Negative Distributions----
If this box is checked the positive and negative distributions are treated indecently, completely separate from each other. You will see that the width of the top and bottom bands will be different for each of the percentiles you enter.
If this box is unchecked then all the negative and positive distributions are pooled together. You will notice that the width of the top and bottom bands will be the exact same.
---- Distribution Size ----
This is the number of candles that the price return is calculated over. EG: to collect the price return over the last 33 candles, the difference of price from now to 33 candles ago is calculated for the last 2,000 candles, to build a return distribution of 2000 points of price differences over 33 candles.
NEGATIVE NUMBERS(<0) == exact number of candles to include;
EG: setting this value to -20 will always collect volatility distributions of 20 candles
POSITIVE NUMBERS(>0) == number of candles to include as a multiple of the Moving Average Length value set above;
EG: if the Moving Average Length value is set to 22, setting this value to 2 will use the last 22*2 = 44 candles for the collection of volatility distributions
MORE candles being include will generally make the bands WIDER and their size will change SLOWER over time.
I wish you focus, dedication, and earnest success on your journey.
Happy trading :)
Smart DCA Invest LiteEnglish description:
📊 Smart DCA Invest – Features Overview
✅ Automated DCA strategy with dynamic profit targets, optimized risk management.
⚙️ Functionality:
🕒 Time Interval Settings
• 📅 Start Date and Time: The strategy activates only after the specified start time.
• 🔄 Auto Restart: Automatically restarts the strategy after a position is closed.
💵 Investment Amounts
• 🟢 Initial Investment Amount: The amount invested when the first position is opened.
• 🔄 Recurring Investment Amount: The amount invested periodically for subsequent purchases.
📊 Purchase Frequency
• ⏱ Interval Between Purchases: Specifies the minimum number of candles between two purchases to avoid overly frequent position expansions.
🛡️ Risk Management
• 📉 Loss Limit: The strategy halts additional purchases if the price does not drop below a predefined loss level, optimizing the average cost reduction.
• 🎯 Take Profit: A predefined profit target percentage, triggering position closure upon reaching it.
📈 Dynamic Take Profit (TP) Settings
• ⏳ TP Increase Frequency: The interval in days for dynamic TP growth.
• 📊 TP Growth Rate: The percentage by which the TP level increases at the end of each interval.
• ⚙️ Enable Dynamic TP: Allows the TP level to increase dynamically over time based on holding duration.
• 🧠 Smart Invest: Accumulates skipped purchases above the average entry or loss limit price and invests them when the price drops below the loss limit.
🎨 Visual Representation
• 📏 Average Price Line: Displays the average entry price in yellow.
• 🛑 Stop Limit Line: Displays the loss limit in red.
• ✅ Take Profit Line: Displays the dynamically updated profit target in green.
🎨 Visual Elements
• 📏 Average Price Line: Visualizes the average cost on the chart.
• 🛑 Stop Limit Line: Visualizes the loss limit level.
• ✅ Take Profit Line: Displays the TP level graphically.
• 📊 Statistics Table: Detailed data summary presented in a table at the end of the strategy.
📊 Statistics Table
• 📈 Average Price: The average entry price of the current position.
• 🛑 Stop Limit: The loss limit value.
• ✅ Take Profit: The profit target value.
• 📦 Position Size: The size of the current position.
• 💵 Max Invested Amount: The highest amount invested.
• ⏳ Longest DCA Period: The longest duration a DCA position was open.
• 💼 Current Investment: The amount currently invested.
• 🔄 Multiplier: Purchase multiplier value.
• 📊 Dynamically Adjusted TP %: The current dynamic Take Profit percentage.
- Recommended for retesting
Hungarian description:
📊 Smart DCA Invest – Funkciók Leírása
✅ Automatizált DCA stratégia dinamikus profitcélokkal, optimalizált kockázatkezeléssel.
⚙️ Működés:
🕒 Időintervallum Beállítások
• 📅 Kezdési dátum és idő: A stratégia csak a meghatározott kezdési időpont után aktiválódik.
• ⏳ Befejezési dátum és idő: A stratégia a meghatározott időpontig működik.
• 🔄 Automatikus újraindítás: Pozíciózárás után a stratégia automatikusan újraindulhat.
💵 Befektetési Összegek
• 🟢 Első befektetési összeg: Az első pozíció nyitásakor befektetett összeg.
• 🔄 Napi vásárlási összeg: Ismételt periódusonkénti vásárlások összege.
📊 Vásárlási Gyakoriság
• ⏱ Intervallum két vásárlás között: Meghatározza a minimális gyertya intervallumot két vásárlás között, elkerülve a túl gyakori pozícióbővítéseket.
🛡️ Kockázatkezelés
• 📉 Loss Limit: Ha az ár nem csökken egy meghatározott veszteségi szint alá, a stratégia nem vásárol tovább, hogy hatékonyabban csökkentse az átlagárat.
• 🎯 Take Profit: Előre meghatározott profitcél százalékos értéke, amely elérésekor a pozíció lezárul.
📈 Dinamikus Take Profit (TP) Beállítások
• ⏳ TP növelési gyakoriság: A dinamikus TP növekedésének időszaka napokban.
• 📊 TP növekedés mértéke: A TP szint százalékos növekedése az intervallum végén.
• ⚙️ Dinamikus TP engedélyezése: A TP szint dinamikusan növekszik a tartási idő függvényében.
• 🧠 Smart Invest: Kihagyott vásárlások felhalmozása (átlagos bekerülési vagy „Loss limit” feletti árfolyamnál), amelyek a „Loss limit” árszint alatt befektetésre kerülnek.
🎨 Vizuális Megjelenítés
• 📏 Átlagár vonal: Sárga színnel jelzi az átlagárat.
• 🛑 Stop Limit vonal: Piros színnel jelzi a veszteségi korlátot.
• ✅ Take Profit vonal: Zöld színnel jelzi a dinamikusan frissülő profitcélt.
🎨 Vizuális Elemek
• 📏 Átlagár vonal: Az átlagár megjelenítése a grafikonon.
• 🛑 Stop Limit vonal: A veszteségkorlátozási szint megjelenítése.
• ✅ Take Profit vonal: A Take Profit szint grafikai megjelenítése.
• 📊 Statisztikai táblázat megjelenítése: A stratégia végén részletes adatok jelennek meg egy táblázatban.
📊 Statisztikai Táblázat
• 📈 Átlagár: Az aktuális pozíció átlagos bekerülési ára.
• 🛑 Stop Limit: A veszteségkorlátozási szint értéke.
• ✅ Take Profit: A profitcél értéke.
• 📦 Pozícióméret: Az aktuális pozíció nagysága.
• 💵 Maximális befektetett összeg: A legnagyobb befektetett érték.
• ⏳ Leghosszabb DCA időszak: A leghosszabb időtartam, amíg egy DCA pozíció nyitva maradt.
• 💼 Aktuális befektetés: Az aktuálisan befektetett összeg.
• 🔄 Multiplikátor: Vásárlási szorzó érték.
• 📊 Dinamikusan beállított TP %: Az aktuálisan érvényes Take Profit százalékos értéke.
momentum indicatorThe Rational Quadratic Smoother uses the Rational Quadratic Kernel to create a non-repainting, adaptive smoothing of price data. This method provides a balance between long-term trends and short-term movements by adjusting the weight of distant data points using a kernel function. Traders can use this indicator to:
Smooth price data for better trend identification.
Filter out noise without introducing lag.
Combine it with other indicators for advanced strategies.
Key Features:
Adjustable Lookback Period: Controls the range of data points considered.
Relative Weighting: Fine-tunes the influence of long-term vs. short-term data.
Customizable smoothing to fit different trading styles (scalping, swing trading, etc.).
Request█ OVERVIEW
This library is a tool for Pine Script™ programmers that consolidates access to a wide range of lesser-known data feeds available on TradingView, including metrics from the FRED database, FINRA short sale volume, open interest, and COT data. The functions in this library simplify requests for these data feeds, making them easier to retrieve and use in custom scripts.
█ CONCEPTS
Federal Reserve Economic Data (FRED)
FRED (Federal Reserve Economic Data) is a comprehensive online database curated by the Federal Reserve Bank of St. Louis. It provides free access to extensive economic and financial data from U.S. and international sources. FRED includes numerous economic indicators such as GDP, inflation, employment, and interest rates. Additionally, it provides financial market data, regional statistics, and international metrics such as exchange rates and trade balances.
Sourced from reputable organizations, including U.S. government agencies, international institutions, and other public and private entities, FRED enables users to analyze over 825,000 time series, download their data in various formats, and integrate their information into analytical tools and programming workflows.
On TradingView, FRED data is available from ticker identifiers with the "FRED:" prefix. Users can search for FRED symbols in the "Symbol Search" window, and Pine scripts can retrieve data for these symbols via `request.*()` function calls.
FINRA Short Sale Volume
FINRA (the Financial Industry Regulatory Authority) is a non-governmental organization that supervises and regulates U.S. broker-dealers and securities professionals. Its primary aim is to protect investors and ensure integrity and transparency in financial markets.
FINRA's Short Sale Volume data provides detailed information about daily short-selling activity across U.S. equity markets. This data tracks the volume of short sales reported to FINRA's trade reporting facilities (TRFs), including shares sold on FINRA-regulated Alternative Trading Systems (ATSs) and over-the-counter (OTC) markets, offering transparent access to short-selling information not typically available from exchanges. This data helps market participants, researchers, and regulators monitor trends in short-selling and gain insights into bearish sentiment, hedging strategies, and potential market manipulation. Investors often use this data alongside other metrics to assess stock performance, liquidity, and overall trading activity.
It is important to note that FINRA's Short Sale Volume data does not consolidate short sale information from public exchanges and excludes trading activity that is not publicly disseminated.
TradingView provides ticker identifiers for requesting Short Sale Volume data with the format "FINRA:_SHORT_VOLUME", where "" is a supported U.S. equities symbol (e.g., "AAPL").
Open Interest (OI)
Open interest is a cornerstone indicator of market activity and sentiment in derivatives markets such as options or futures. In contrast to volume, which measures the number of contracts opened or closed within a period, OI measures the number of outstanding contracts that are not yet settled. This distinction makes OI a more robust indicator of how money flows through derivatives, offering meaningful insights into liquidity, market interest, and trends. Many traders and investors analyze OI alongside volume and price action to gain an enhanced perspective on market dynamics and reinforce trading decisions.
TradingView offers many ticker identifiers for requesting OI data with the format "_OI", where "" represents a derivative instrument's ticker ID (e.g., "COMEX:GC1!").
Commitment of Traders (COT)
Commitment of Traders data provides an informative weekly breakdown of the aggregate positions held by various market participants, including commercial hedgers, non-commercial speculators, and small traders, in the U.S. derivative markets. Tallied and managed by the Commodity Futures Trading Commission (CFTC) , these reports provide traders and analysts with detailed insight into an asset's open interest and help them assess the actions of various market players. COT data is valuable for gaining a deeper understanding of market dynamics, sentiment, trends, and liquidity, which helps traders develop informed trading strategies.
TradingView has numerous ticker identifiers that provide access to time series containing data for various COT metrics. To learn about COT ticker IDs and how they work, see our LibraryCOT publication.
█ USING THE LIBRARY
Common function characteristics
• This library's functions construct ticker IDs with valid formats based on their specified parameters, then use them as the `symbol` argument in request.security() to retrieve data from the specified context.
• Most of these functions automatically select the timeframe of a data request because the data feeds are not available for all timeframes.
• All the functions have two overloads. The first overload of each function uses values with the "simple" qualifier to define the requested context, meaning the context does not change after the first script execution. The second accepts "series" values, meaning it can request data from different contexts across executions.
• The `gaps` parameter in most of these functions specifies whether the returned data is `na` when a new value is unavailable for request. By default, its value is `false`, meaning the call returns the last retrieved data when no new data is available.
• The `repaint` parameter in applicable functions determines whether the request can fetch the latest unconfirmed values from a higher timeframe on realtime bars, which might repaint after the script restarts. If `false`, the function only returns confirmed higher-timeframe values to avoid repainting. The default value is `true`.
`fred()`
The `fred()` function retrieves the most recent value of a specified series from the Federal Reserve Economic Data (FRED) database. With this function, programmers can easily fetch macroeconomic indicators, such as GDP and unemployment rates, and use them directly in their scripts.
How it works
The function's `fredCode` parameter accepts a "string" representing the unique identifier of a specific FRED series. Examples include "GDP" for the "Gross Domestic Product" series and "UNRATE" for the "Unemployment Rate" series. Over 825,000 codes are available. To access codes for available series, search the FRED website .
The function adds the "FRED:" prefix to the specified `fredCode` to construct a valid FRED ticker ID (e.g., "FRED:GDP"), which it uses in request.security() to retrieve the series data.
Example Usage
This line of code requests the latest value from the Gross Domestic Product series and assigns the returned value to a `gdpValue` variable:
float gdpValue = fred("GDP")
`finraShortSaleVolume()`
The `finraShortSaleVolume()` function retrieves EOD data from a FINRA Short Sale Volume series. Programmers can call this function to retrieve short-selling information for equities listed on supported exchanges, namely NASDAQ, NYSE, and NYSE ARCA.
How it works
The `symbol` parameter determines which symbol's short sale volume information is retrieved by the function. If the value is na , the function requests short sale volume data for the chart's symbol. The argument can be the name of the symbol from a supported exchange (e.g., "AAPL") or a ticker ID with an exchange prefix ("NASDAQ:AAPL"). If the `symbol` contains an exchange prefix, it must be one of the following: "NASDAQ", "NYSE", "AMEX", or "BATS".
The function constructs a ticker ID in the format "FINRA:ticker_SHORT_VOLUME", where "ticker" is the symbol name without the exchange prefix (e.g., "AAPL"). It then uses the ticker ID in request.security() to retrieve the available data.
Example Usage
This line of code retrieves short sale volume for the chart's symbol and assigns the result to a `shortVolume` variable:
float shortVolume = finraShortSaleVolume(syminfo.tickerid)
This example requests short sale volume for the "NASDAQ:AAPL" symbol, irrespective of the current chart:
float shortVolume = finraShortSaleVolume("NASDAQ:AAPL")
`openInterestFutures()` and `openInterestCrypto()`
The `openInterestFutures()` function retrieves EOD open interest (OI) data for futures contracts. The `openInterestCrypto()` function provides more granular OI data for cryptocurrency contracts.
How they work
The `openInterestFutures()` function retrieves EOD closing OI information. Its design is focused primarily on retrieving OI data for futures, as only EOD OI data is available for these instruments. If the chart uses an intraday timeframe, the function requests data from the "1D" timeframe. Otherwise, it uses the chart's timeframe.
The `openInterestCrypto()` function retrieves opening, high, low, and closing OI data for a cryptocurrency contract on a specified timeframe. Unlike `openInterest()`, this function can also retrieve granular data from intraday timeframes.
Both functions contain a `symbol` parameter that determines the symbol for which the calls request OI data. The functions construct a valid OI ticker ID from the chosen symbol by appending "_OI" to the end (e.g., "CME:ES1!_OI").
The `openInterestFutures()` function requests and returns a two-element tuple containing the futures instrument's EOD closing OI and a "bool" condition indicating whether OI is rising.
The `openInterestCrypto()` function requests and returns a five-element tuple containing the cryptocurrency contract's opening, high, low, and closing OI, and a "bool" condition indicating whether OI is rising.
Example usage
This code line calls `openInterest()` to retrieve EOD OI and the OI rising condition for a futures symbol on the chart, assigning the values to two variables in a tuple:
= openInterestFutures(syminfo.tickerid)
This line retrieves the EOD OI data for "CME:ES1!", irrespective of the current chart's symbol:
= openInterestFutures("CME:ES1!")
This example uses `openInterestCrypto()` to retrieve OHLC OI data and the OI rising condition for a cryptocurrency contract on the chart, sampled at the chart's timeframe. It assigns the returned values to five variables in a tuple:
= openInterestCrypto(syminfo.tickerid, timeframe.period)
This call retrieves OI OHLC and rising information for "BINANCE:BTCUSDT.P" on the "1D" timeframe:
= openInterestCrypto("BINANCE:BTCUSDT.P", "1D")
`commitmentOfTraders()`
The `commitmentOfTraders()` function retrieves data from the Commitment of Traders (COT) reports published by the Commodity Futures Trading Commission (CFTC). This function significantly simplifies the COT request process, making it easier for programmers to access and utilize the available data.
How It Works
This function's parameters determine different parts of a valid ticker ID for retrieving COT data, offering a streamlined alternative to constructing complex COT ticker IDs manually. The `metricName`, `metricDirection`, and `includeOptions` parameters are required. They specify the name of the reported metric, the direction, and whether it includes information from options contracts.
The function also includes several optional parameters. The `CFTCCode` parameter allows programmers to request data for a specific report code. If unspecified, the function requests data based on the chart symbol's root prefix, base currency, or quoted currency, depending on the `mode` argument. The call can specify the report type ("Legacy", "Disaggregated", or "Financial") and metric type ("All", "Old", or "Other") with the `typeCOT` and `metricType` parameters.
Explore the CFTC website to find valid report codes for specific assets. To find detailed information about the metrics included in the reports and their meanings, see the CFTC's Explanatory Notes .
View the function's documentation below for detailed explanations of its parameters. For in-depth information about COT ticker IDs and more advanced functionality, refer to our previously published COT library .
Available metrics
Different COT report types provide different metrics . The tables below list all available metrics for each type and their applicable directions:
+------------------------------+------------------------+
| Legacy (COT) Metric Names | Directions |
+------------------------------+------------------------+
| Open Interest | No direction |
| Noncommercial Positions | Long, Short, Spreading |
| Commercial Positions | Long, Short |
| Total Reportable Positions | Long, Short |
| Nonreportable Positions | Long, Short |
| Traders Total | No direction |
| Traders Noncommercial | Long, Short, Spreading |
| Traders Commercial | Long, Short |
| Traders Total Reportable | Long, Short |
| Concentration Gross LT 4 TDR | Long, Short |
| Concentration Gross LT 8 TDR | Long, Short |
| Concentration Net LT 4 TDR | Long, Short |
| Concentration Net LT 8 TDR | Long, Short |
+------------------------------+------------------------+
+-----------------------------------+------------------------+
| Disaggregated (COT2) Metric Names | Directions |
+-----------------------------------+------------------------+
| Open Interest | No Direction |
| Producer Merchant Positions | Long, Short |
| Swap Positions | Long, Short, Spreading |
| Managed Money Positions | Long, Short, Spreading |
| Other Reportable Positions | Long, Short, Spreading |
| Total Reportable Positions | Long, Short |
| Nonreportable Positions | Long, Short |
| Traders Total | No Direction |
| Traders Producer Merchant | Long, Short |
| Traders Swap | Long, Short, Spreading |
| Traders Managed Money | Long, Short, Spreading |
| Traders Other Reportable | Long, Short, Spreading |
| Traders Total Reportable | Long, Short |
| Concentration Gross LE 4 TDR | Long, Short |
| Concentration Gross LE 8 TDR | Long, Short |
| Concentration Net LE 4 TDR | Long, Short |
| Concentration Net LE 8 TDR | Long, Short |
+-----------------------------------+------------------------+
+-------------------------------+------------------------+
| Financial (COT3) Metric Names | Directions |
+-------------------------------+------------------------+
| Open Interest | No Direction |
| Dealer Positions | Long, Short, Spreading |
| Asset Manager Positions | Long, Short, Spreading |
| Leveraged Funds Positions | Long, Short, Spreading |
| Other Reportable Positions | Long, Short, Spreading |
| Total Reportable Positions | Long, Short |
| Nonreportable Positions | Long, Short |
| Traders Total | No Direction |
| Traders Dealer | Long, Short, Spreading |
| Traders Asset Manager | Long, Short, Spreading |
| Traders Leveraged Funds | Long, Short, Spreading |
| Traders Other Reportable | Long, Short, Spreading |
| Traders Total Reportable | Long, Short |
| Concentration Gross LE 4 TDR | Long, Short |
| Concentration Gross LE 8 TDR | Long, Short |
| Concentration Net LE 4 TDR | Long, Short |
| Concentration Net LE 8 TDR | Long, Short |
+-------------------------------+------------------------+
Example usage
This code line retrieves "Noncommercial Positions (Long)" data, without options information, from the "Legacy" report for the chart symbol's root, base currency, or quote currency:
float nonCommercialLong = commitmentOfTraders("Noncommercial Positions", "Long", false)
This example retrieves "Managed Money Positions (Short)" data, with options included, from the "Disaggregated" report:
float disaggregatedData = commitmentOfTraders("Managed Money Positions", "Short", true, "", "Disaggregated")
█ NOTES
• This library uses dynamic requests , allowing dynamic ("series") arguments for the parameters defining the context (ticker ID, timeframe, etc.) of a `request.*()` function call. With this feature, a single `request.*()` call instance can flexibly retrieve data from different feeds across historical executions. Additionally, scripts can use such calls in the local scopes of loops, conditional structures, and even exported library functions, as demonstrated in this script. All scripts coded in Pine Script™ v6 have dynamic requests enabled by default. To learn more about the behaviors and limitations of this feature, see the Dynamic requests section of the Pine Script™ User Manual.
• The library's example code offers a simple demonstration of the exported functions. The script retrieves available data using the function specified by the "Series type" input. The code requests a FRED series or COT (Legacy), FINRA Short Sale Volume, or Open Interest series for the chart's symbol with specific parameters, then plots the retrieved data as a step-line with diamond markers.
Look first. Then leap.
█ EXPORTED FUNCTIONS
This library exports the following functions:
fred(fredCode, gaps)
Requests a value from a specified Federal Reserve Economic Data (FRED) series. FRED is a comprehensive source that hosts numerous U.S. economic datasets. To explore available FRED datasets and codes, search for specific categories or keywords at fred.stlouisfed.org Calls to this function count toward a script's `request.*()` call limit.
Parameters:
fredCode (series string) : The unique identifier of the FRED series. The function uses the value to create a valid ticker ID for retrieving FRED data in the format `"FRED:fredCode"`. For example, `"GDP"` refers to the "Gross Domestic Product" series ("FRED:GDP"), and `"GFDEBTN"` refers to the "Federal Debt: Total Public Debt" series ("FRED:GFDEBTN").
gaps (simple bool) : Optional. If `true`, the function returns a non-na value only when a new value is available from the requested context. If `false`, the function returns the latest retrieved value when new data is unavailable. The default is `false`.
Returns: (float) The value from the requested FRED series.
finraShortSaleVolume(symbol, gaps, repaint)
Requests FINRA daily short sale volume data for a specified symbol from one of the following exchanges: NASDAQ, NYSE, NYSE ARCA. If the chart uses an intraday timeframe, the function requests data from the "1D" timeframe. Otherwise, it uses the chart's timeframe. Calls to this function count toward a script's `request.*()` call limit.
Parameters:
symbol (series string) : The symbol for which to request short sale volume data. If the specified value contains an exchange prefix, it must be one of the following: "NASDAQ", "NYSE", "AMEX", "BATS".
gaps (simple bool) : Optional. If `true`, the function returns a non-na value only when a new value is available from the requested context. If `false`, the function returns the latest retrieved value when new data is unavailable. The default is `false`.
repaint (simple bool) : Optional. If `true` and the chart's timeframe is intraday, the value requested on realtime bars may change its time offset after the script restarts its executions. If `false`, the function returns the last confirmed period's values to avoid repainting. The default is `true`.
Returns: (float) The short sale volume for the specified symbol or the chart's symbol.
openInterestFutures(symbol, gaps, repaint)
Requests EOD open interest (OI) and OI rising information for a valid futures symbol. If the chart uses an intraday timeframe, the function requests data from the "1D" timeframe. Otherwise, it uses the chart's timeframe. Calls to this function count toward a script's `request.*()` call limit.
Parameters:
symbol (series string) : The symbol for which to request open interest data.
gaps (simple bool) : Optional. If `true`, the function returns non-na values only when new values are available from the requested context. If `false`, the function returns the latest retrieved values when new data is unavailable. The default is `false`.
repaint (simple bool) : Optional. If `true` and the chart's timeframe is intraday, the value requested on realtime bars may change its time offset after the script restarts its executions. If `false`, the function returns the last confirmed period's values to avoid repainting. The default is `true`.
Returns: ( ) A tuple containing the following values:
- The closing OI value for the symbol.
- `true` if the closing OI is above the previous period's value, `false` otherwise.
openInterestCrypto(symbol, timeframe, gaps, repaint)
Requests opening, high, low, and closing open interest (OI) data and OI rising information for a valid cryptocurrency contract on a specified timeframe. Calls to this function count toward a script's `request.*()` call limit.
Parameters:
symbol (series string) : The symbol for which to request open interest data.
timeframe (series string) : The timeframe of the data request. If the timeframe is lower than the chart's timeframe, it causes a runtime error.
gaps (simple bool) : Optional. If `true`, the function returns non-na values only when new values are available from the requested context. If `false`, the function returns the latest retrieved values when new data is unavailable. The default is `false`.
repaint (simple bool) : Optional. If `true` and the `timeframe` represents a higher timeframe, the function returns unconfirmed values from the timeframe on realtime bars, which repaint when the script restarts its executions. If `false`, it returns only confirmed higher-timeframe values to avoid repainting. The default is `true`.
Returns: ( ) A tuple containing the following values:
- The opening, high, low, and closing OI values for the symbol, respectively.
- `true` if the closing OI is above the previous period's value, `false` otherwise.
commitmentOfTraders(metricName, metricDirection, includeOptions, CFTCCode, typeCOT, mode, metricType)
Requests Commitment of Traders (COT) data with specified parameters. This function provides a simplified way to access CFTC COT data available on TradingView. Calls to this function count toward a script's `request.*()` call limit. For more advanced tools and detailed information about COT data, see TradingView's LibraryCOT library.
Parameters:
metricName (series string) : One of the valid metric names listed in the library's documentation and source code.
metricDirection (series string) : Metric direction. Possible values are: "Long", "Short", "Spreading", and "No direction". Consult the library's documentation or code to see which direction values apply to the specified metric.
includeOptions (series bool) : If `true`, the COT symbol includes options information. Otherwise, it does not.
CFTCCode (series string) : Optional. The CFTC code for the asset. For example, wheat futures (root "ZW") have the code "001602". If one is not specified, the function will attempt to get a valid code for the chart symbol's root, base currency, or main currency.
typeCOT (series string) : Optional. The type of report to request. Possible values are: "Legacy", "Disaggregated", "Financial". The default is "Legacy".
mode (series string) : Optional. Specifies the information the function extracts from a symbol. Possible modes are:
- "Root": The function extracts the futures symbol's root prefix information (e.g., "ES" for "ESH2020").
- "Base currency": The function extracts the first currency from a currency pair (e.g., "EUR" for "EURUSD").
- "Currency": The function extracts the currency of the symbol's quoted values (e.g., "JPY" for "TSE:9984" or "USDJPY").
- "Auto": The function tries the first three modes (Root -> Base currency -> Currency) until it finds a match.
The default is "Auto". If the specified mode is not available for the symbol, it causes a runtime error.
metricType (series string) : Optional. The metric type. Possible values are: "All", "Old", "Other". The default is "All".
Returns: (float) The specified Commitment of Traders data series. If no data is available, it causes a runtime error.
STRX - Correlation DominationThis indicator displays the correlation among three selected assets (for example, Gold, Dollar Index, and Nasdaq) on a custom timeframe. A table positioned at the top-right corner of the chart lets you quickly see the correlation between:
Asset 1 vs Asset 2
Asset 1 vs Asset 3
Asset 2 vs Asset 3
Correlations are calculated using the Pearson correlation function (ta.correlation). If the correlation is greater than or equal to 0.4, the value appears in green (strong positive correlation). If it is less than or equal to -0.4, it appears in red (strong negative correlation). Otherwise, it is displayed in yellow (weak correlation).
Multi-asset and multi-timeframe: Compare up to three instruments at once on your chosen timeframe.
Customizable period: Use the “Correlation Period” setting to adjust the correlation calculation window.
Clear table format: The results are immediately visible in an easy-to-read table.
Disclaimer: This script is provided solely for educational and informational purposes. It does not constitute a recommendation or an invitation to invest. Use it as an additional resource and always conduct thorough market analysis before opening any trading positions. Past performance does not guarantee future results.
QuantFrame | FractalystWhat’s the purpose of this indicator?
The purpose of QuantFrame is to provide traders with a systematic approach to analyzing market structure, eliminating subjectivity, and enhancing decision-making. By clearly identifying and labeling structural breaks, QuantFrame helps traders:
1. Refine Market Analysis: Transition from discretionary market observation to a structured framework.
2. Identify Key Levels: Highlight important liquidity and invalidation zones for potential entries, exits, and risk management.
3. Streamline Multi-Timeframe Analysis: Track market trends and structural changes across different timeframes seamlessly.
4. Enhance Consistency: Reduce guesswork by following a rule-based methodology for identifying structural breaks.
How Does This Indicator Identify Market Structure?
1. Swing Detection
• The indicator identifies key swing points on the chart. These are local highs or lows where the price reverses direction, forming the foundation of market structure.
2. Structural Break Validation
• A structural break is flagged when a candle closes above a previous swing high (bullish) or below a previous swing low (bearish).
• Break Confirmation Process:
To confirm the break, the indicator applies the following rules:
• Valid Swing Preceding the Break: There must be at least one valid swing point before the break.
3. Numeric Labeling
• Each confirmed structural break is assigned a unique numeric ID starting from 1.
• This helps traders track breaks sequentially and analyze how the market structure evolves over time.
4. Liquidity and Invalidation Zones
• For every confirmed structural break, the indicator highlights two critical zones:
1. Liquidity Zone (LIQ): Represents the structural liquidity level.
2. Invalidation Zone (INV): Acts as Invalidation point if the structure fails to hold.
What do the extremities show us on the charts?
When using QuantFrame for market structure analysis, the extremities—Liquidity Level (LIQ) and Invalidation Level (INV)—serve as critical reference points for understanding price behavior and making informed trading decisions.
Here's a detailed explanation of what these extremities represent and how they function:
Liquidity Level (LIQ)
Definition: The Liquidity Level is a key price zone where the market is likely to retest, consolidate, or seek liquidity. It represents areas where orders are concentrated, making it a high-probability reaction zone.
Purpose: Traders use this level to anticipate potential pullbacks or continuation patterns. It helps in identifying areas where price may pause or reverse temporarily due to the presence of significant liquidity.
Key Insight: If a candle closes above or below the LIQ, it results in another break of structure (BOS) in the same direction. This indicates that price is continuing its trend and has successfully absorbed liquidity at that level.
Invalidation Level (INV)
Definition: The Invalidation Level marks the threshold that, if breached, signifies a structural shift in the market. It acts as a critical point where the current market bias becomes invalid.
Purpose: This level is often used as a stop-loss or re-evaluation point for trading strategies. It ensures that traders have a clear boundary for risk management.
Key Insight: If a candle closes above or below the INV, it signals a shift in market structure:
A closure above the INV in a bearish trend indicates a shift from bearish to bullish bias.
A closure below the INV in a bullish trend indicates a shift from bullish to bearish bias.
What does the top table display?
The top table in QuantFrame serves as a multi-timeframe trend overview. Here’s what it provides:
1. Numeric Break IDs Across Multiple Timeframes:
• Each numeric break corresponds to a confirmed structural break on a specific timeframe, helping traders track the most recent breaks systematically.
2. Trend Direction via Text Color:
• The color of the text reflects the current trend direction:
• Blue indicates a bullish structure.
• Red signifies a bearish structure.
3. Higher Timeframe Insights Without Manual Switching:
• The table eliminates the need to switch between timeframes by presenting a consolidated view of the market trend across multiple timeframes, saving time and improving decision-making.
What is the Multi-Timeframe Trend Score (MTTS)?
MTTS is a score that quantifies trend strength and direction across multiple timeframes.
How does MTTS work?
1. Break Detection:
• Analyzes bullish and bearish structural breaks on each timeframe.
2. Trend Scoring:
• Scores each timeframe based on the frequency and quality of bullish/bearish breaks.
3. MTTS Calculation:
• Averages the scores across all timeframes to produce a unified trend strength value.
How is MTTS interpreted?
• ⬆ (Above 50): Indicates an overall bullish trend.
• ⬇ (Below 50): Suggests an overall bearish trend.
• ⇅ (Exactly 50): Represents a neutral or balanced market structure.
How to Use QuantFrame?
1. Implement a Systematic Market Structure Framework:
• Use QuantFrame to analyze market structure objectively by identifying key structural breaks and marking liquidity (LIQ) and invalidation (INV) zones.
• This eliminates guesswork and provides a clear framework for understanding market movements.
2. Leverage MTTS for Directional Bias:
• Refer to the MTTS table to identify the multi-timeframe directional bias, giving you the broader market context.
• Align your trading decisions with the overall trend or structure to improve accuracy and consistency.
3. Apply Your Preferred Entry Model:
• Once the market context is clear, use your preferred entry model to capitalize on the identified structure and trend.
• Manage trades dynamically as price delivers, using the provided liquidity and invalidation zones for risk management.
What Makes QuantFrame Original?
1. Objective Market Structure Analysis:
• Unlike subjective methods, QuantFrame uses a rule-based approach to identify structural breaks, ensuring consistency and reducing emotional decision-making.
2. Multi-Timeframe Integration:
• The MTTS table consolidates trend data across multiple timeframes, offering a bird’s-eye view of market trends without the need to switch charts manually.
• This unique feature allows traders to align strategies with higher-timeframe trends for more informed decision-making.
3. Liquidity and Invalidation Zones:
• Automatically marks Liquidity (LIQ) and Invalidation (INV) zones for every structural break, providing actionable levels for entries, exits, and risk management.
• These zones help traders define their risk-reward setups with precision.
4. Dynamic Trend Scoring (MTTS):
• The Multi-Timeframe Trend Score (MTTS) quantifies trend strength and direction across selected timeframes, offering a single, consolidated metric for market sentiment.
• This score is visualized with intuitive symbols (⬆, ⬇, ⇅) for quick decision-making.
5. Numeric Labeling of Breaks:
• Each structural break is assigned a unique numeric ID, making it easy to track, analyze, and backtest specific market scenarios.
6. Systematic Yet Flexible:
• While it provides a structured framework for market analysis, QuantFrame seamlessly integrates with any trading style. Traders can use it alongside their preferred entry models, adapting it to their unique strategies.
7. Enhanced Market Context:
• By combining structural insights with directional bias (via MTTS), the indicator equips traders with a complete market context, enabling them to make better-informed decisions.
Terms and Conditions | Disclaimer
Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data.
Built-in components, features, and functionalities of our charting tools are the intellectual property of @Fractalyst use, reproduction, or distribution of these proprietary elements is prohibited.
By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer and agrees to respect our intellectual property rights and comply with all applicable laws and regulations.
Advanced OHLCThis indicator is designed to assist traders in identifying significant price levels and potential market behaviors using historical weekly or daily data. It provides a structured approach to understanding price movements through customizable visualizations and precise calculations.
Key Features:
1. Weekly and Daily Levels
2. Displays key levels for either the weekly or daily timeframe, depending on user settings. Offers clear insights into market structure and potential turning points.
3. Adjustable Lookback Period
4. Allows users to set the lookback period for historical data analysis.
Levels are calculated using a mean average, ensuring a balanced view of past market behavior.
Customizable Visualizations
5. Provides fully customizable level lines, enabling users to adjust colors, thickness, and style to suit their preferences and chart aesthetics.
Candle Open and Market Behavior Levels
6. Marks the open price for the current daily candle, providing a reference point for intraday analysis.
7. Identifies potential manipulation and distribution levels, offering insights into possible reversals and trend continuations.
How It Works:
The indicator uses historical price data to calculate levels based on patterns and movements observed over specific periods.
Level Calculations:
For daily levels, the tool analyzes historical data (e.g., the last 60 Mondays for a Monday's levels).
It splits each day into its open, high, low, and close (OHLC) values.
It evaluates how far the price moved against the final direction of the day (manipulation levels) and with the final direction (distribution levels).
Exclusion of Non-Valid Data:
To maintain accuracy, certain edge cases—such as candles without wicks—are excluded from calculations.
When using the indicator on Futures charts please make sure to use ONLY the continuous chart so that there is enough data for the calculations.
Fibonacci Trend [ChartPrime]Fibonacci Trend Indicator
This powerful indicator leverages supertrend analysis to detect market direction while overlaying dynamic Fibonacci levels to highlight potential support, resistance, and optimal trend entry zones. With its straightforward design, it is perfect for traders looking to simplify their workflow and enhance decision-making.
⯁ KEY FEATURES AND HOW TO USE
⯌ Supertrend Trend Identification :
The indicator uses a supertrend algorithm to identify market direction. It displays purple for downtrends and green for uptrends, ensuring quick and clear trend analysis.
⯌ Fibonacci Levels for Current Swings :
Automatically calculates Fibonacci retracement levels (0.236, 0.382, 0.618, 0.786) for the current swing leg.
- These levels act as key zones for potential support, resistance, and trend continuation.
- The high and low swing points are labeled with exact prices, ensuring clarity.
- If the swing range is insufficient (less than five times ATR), Fibonacci levels are not displayed, avoiding irrelevant data.
⯌ Extended Fibonacci Levels :
User-defined extensions project Fibonacci levels into the future, aiding traders in planning price targets or projecting key zones.
⯌ Optimal Trend Entry Zone :
A filled area between 0.618 and 0.786 levels visually highlights the optimal entry zone for trend continuation. This allows traders to refine their entry points during pullbacks.
⯌ Diagonal Trend Line :
A dashed diagonal line connects the swing high and low, visually confirming the range and trend strength of the current swing.
⯌ Visual Labels for Fibonacci Levels :
Each Fibonacci level is marked with a label displaying its value for quick reference.
⯁ HOW TRADERS CAN POTENTIALLY USE THIS TOOL
Fibonacci Retracements:
Use the Fibonacci retracement levels to find key support or resistance zones where the price may pull back before continuing its trend.
Example: Enter long trades when the price retraces to 0.618–0.786 levels in an uptrend.
Fibonacci Extensions:
Use Fibonacci extensions to project future price targets based on the current trend's swing leg. Levels like 127.2% and 161.8% are commonly used as profit-taking zones.
Reversal Identification:
Spot potential reversals by monitoring price reactions at key Fibonacci retracement levels (e.g., 0.236 or 0.382) or the swing high/low.
Optimal Trend Entries:
The filled zone between 0.618 and 0.786 is a statistically strong area for entering a position in the direction of the trend.
Example: Enter long positions during retracements to this range in an uptrend.
Risk Management:
Set stop-losses below key Fibonacci levels or the swing low/high, and take profits at extension levels, enhancing your trade management strategies.
⯁ CONCLUSION
The Fibonacci Trend Indicator is a straightforward yet effective tool for identifying trends and key Fibonacci levels. It simplifies analysis by integrating supertrend-based trend identification with Fibonacci retracements, extensions, and optimal entry zones. Whether you're a beginner or experienced trader, this indicator is an essential addition to your toolkit for trend trading, reversal spotting, and risk management.
CandelaCharts - OHLC Volatility Range Map 📝 Overview
Unlock the power of volatility analysis with the OHLC Volatility Range Map!
Volatility reveals the intensity and speed of price movements, often accompanied by manipulative wicks extending in the opposite direction of a candle’s close.
These sharp moves, common in volatile markets, are designed to mislead traders into taking positions against the prevailing trend. Such manipulation signals potential volatility spikes and offers key insights into market dynamics.
By analyzing these patterns, traders can anticipate the candle's distribution phase, where the price expands to new highs or lows during heightened volatility.
This phase provides crucial clues for spotting liquidity draws, retracement opportunities, and potential reversals, making the OHLC Volatility Range Map an indispensable tool for navigating fast-moving markets.
📦 Features
This tool offers a range of powerful features to enhance your trading analysis:
Real-time Data Feed : Stay updated with live candlestick stats, with each new candle updating OHLC data and performing ongoing historical calculations, even on sub-minute timeframes.
User-Friendly Interface : Designed for advanced traders, the intuitive interface allows easy navigation and customization of display settings, offering a personalized experience for data-driven analysis.
⚙️ Settings
Method: Sets the desired calculation algorithm.
Visualization: Controls the display modes.
Current volatility: Display the current-day volatility.
Use NY Midnight Open: Sets the day start
⚡️ Showcase
Here’s a visual showcase of the tool in action, highlighting its key features and capabilities:
Histogram
Barchart
📒 Usage
Here’s how you can use the OHLC Volatility Range Map to enhance your analysis:
Add OHLC Volatility Range Map to your Tradingview chart.
Watch at high-volatility zones that align with your analysis.
Combine this data with other models and insights to strengthen your trading strategy.
Example 1
By following these steps, you'll unlock powerful insights to refine and elevate your trading strategies.
🔹 Notes
Available calculation methods:
Mean
Median
🚨 Alerts
The indicator does not provide any alerts!
⚠️ Disclaimer
These tools are exclusively available on the TradingView platform.
Our charting tools are intended solely for informational and educational purposes and should not be regarded as financial, investment, or trading advice. They are not designed to predict market movements or offer specific recommendations. Users should be aware that past performance is not indicative of future results and should not rely on these tools for financial decisions. By using these charting tools, the purchaser agrees that the seller and creator hold no responsibility for any decisions made based on information provided by the tools. The purchaser assumes full responsibility and liability for any actions taken and their consequences, including potential financial losses or investment outcomes that may result from the use of these products.
By purchasing, the customer acknowledges and accepts that neither the seller nor the creator is liable for any undesired outcomes stemming from the development, sale, or use of these products. Additionally, the purchaser agrees to indemnify the seller from any liability. If invited through the Friends and Family Program, the purchaser understands that any provided discount code applies only to the initial purchase of Candela's subscription. The purchaser is responsible for canceling or requesting cancellation of their subscription if they choose not to continue at the full retail price. In the event the purchaser no longer wishes to use the products, they must unsubscribe from the membership service, if applicable.
We do not offer reimbursements, refunds, or chargebacks. Once these Terms are accepted at the time of purchase, no reimbursements, refunds, or chargebacks will be issued under any circumstances.
By continuing to use these charting tools, the user confirms their understanding and acceptance of these Terms as outlined in this disclaimer.
CandelaCharts - OHLC Macro Range Map 📝 Overview
Elevate your candlestick analysis with the OHLC Macro Range Map!
Unlike conventional OHLC charts, this advanced indicator weaves Inner Circle Trader (ICT) principles into its design, helping you decode accumulation, manipulation, and distribution patterns—candle by candle.
ICT traders recognize manipulation through wicks that extend against the candle’s closing direction—a deliberate move to mislead participants into unfavorable positions. These deceptive movements often hint at market manipulation phases. By decoding these subtle signals, traders can anticipate the distribution phase of a candle, where price action reveals potential liquidity targets, retracement zones, and key reversal points.
These levels offer valuable insights into order flow, revealing how price interacts with them and the sequence of movements within the market.
To enhance price analysis, the tool also monitors the average duration of manipulation and distribution phases. By blending historical timing patterns with key price levels associated with these phases, traders can conduct deeper analyses and fine-tune their strategies for better decision-making.
Although grounded in historical data, this indicator does not promise that past patterns will replicate in future market conditions. Instead, it provides a data-driven framework to identify moments when candles are likely to reverse after manipulation phases or retrace following completed distributions. This empowers traders to pinpoint potential market turning points with greater accuracy.
📦 Features
This tool offers a range of powerful features to enhance your trading analysis:
Average Range Accuracy : Simplify candlestick analysis with advanced lines and labels to pinpoint manipulation, distribution, and time pivots. Graph average ranges for your chosen timeframe to navigate market volatility and uncover key support and resistance zones.
Custom Timeframe Selection : Align your analysis with your trading strategy by choosing a timeframe that highlights the candle’s manipulation, distribution, and key timing.
Real-time Data Feed : Stay updated with live candlestick stats, with each new candle updating OHLC data and performing ongoing historical calculations, even on sub-minute timeframes.
Historical Mapping : Backtest past market scenarios with ease using the historical mapping feature. Traders can revisit and analyze previous data, refine strategies, and customize label displays for journaling flexibility.
User-Friendly Interface : Designed for advanced traders, the intuitive interface allows easy navigation and customization of display settings, offering a personalized experience for data-driven analysis.
⚙️ Settings
Macros: Sets the timeframe to which will be drawn.
Lookback: Controls period length in days.
Method: Sets the desired calculation algorithm.
History: Display Macro Range Map drawings for previous sessions.
Timezone: Dsiplay the data based on the selected timezone.
Opn: Style for Open line.
Man: Style for Manipulation line.
Dis: Style for Distribution line.
Time: Style for Timeline.
Labels: Controls the size and abbreviations.
Table Position: Manage the Macro Range Map table position
⚡️ Showcase
Here’s a visual showcase of the tool in action, highlighting its key features and capabilities:
Manipilation & Distribution
Time
📒 Usage
Here’s how you can use the OHLC Macro Range Map to enhance your analysis:
Add OHLC Macro Range Map to your Tradingview chart.
Select a timeframe and customize the styles to fit your preferences.
Watch as calculated manipulation, distribution, and delivery times align with your analysis.
Combine this data with other models and insights to strengthen your trading strategy.
Example 1
By following these steps, you'll unlock powerful insights to refine and elevate your trading strategies.
🔹 Notes
On Bullish candles:
Manipulation: Open - Low
Distribution: Open - High
On Bearish candles:
Manipulation: Open - High
Distribution: Open - Low
Available calculation methods:
Mean
Median
Price patterns on OHLC Macro Range Map:
Open - -Man - +Dis
Open - -Man - Open - +Dis
Open - -Man - +Man - +Dis
Open - -Man - +Man - -Dis
Open - +Man - -Dis
Open - +Man - Open - -Dis
Open - +Man - -Man - -Dis
Open - +Man - -Man - +Dis
🚨 Alerts
The indicator does not provide any alerts!
⚠️ Disclaimer
These tools are exclusively available on the TradingView platform.
Our charting tools are intended solely for informational and educational purposes and should not be regarded as financial, investment, or trading advice. They are not designed to predict market movements or offer specific recommendations. Users should be aware that past performance is not indicative of future results and should not rely on these tools for financial decisions. By using these charting tools, the purchaser agrees that the seller and creator hold no responsibility for any decisions made based on information provided by the tools. The purchaser assumes full responsibility and liability for any actions taken and their consequences, including potential financial losses or investment outcomes that may result from the use of these products.
By purchasing, the customer acknowledges and accepts that neither the seller nor the creator is liable for any undesired outcomes stemming from the development, sale, or use of these products. Additionally, the purchaser agrees to indemnify the seller from any liability. If invited through the Friends and Family Program, the purchaser understands that any provided discount code applies only to the initial purchase of Candela's subscription. The purchaser is responsible for canceling or requesting cancellation of their subscription if they choose not to continue at the full retail price. In the event the purchaser no longer wishes to use the products, they must unsubscribe from the membership service, if applicable.
We do not offer reimbursements, refunds, or chargebacks. Once these Terms are accepted at the time of purchase, no reimbursements, refunds, or chargebacks will be issued under any circumstances.
By continuing to use these charting tools, the user confirms their understanding and acceptance of these Terms as outlined in this disclaimer.
CandelaCharts - OHLC Session Range Map 📝 Overview
Master the art of candlestick analysis with the OHLC Session Range Map!
Enhance your TradingView strategies by incorporating this advanced tool for actionable insights. Far beyond standard OHLC visuals, this innovative indicator integrates Inner Circle Trader (ICT) concepts to analyze accumulation, manipulation, and distribution, one candle at a time.
ICT traders identify manipulation through wicks that extend opposite the candle’s close—a tactic designed to mislead market participants into taking positions in the "wrong" direction. These movements often signify potential manipulation phases. By interpreting these signals, traders can anticipate a candle’s distribution phase, where the price expands to higher or lower levels. This provides valuable insights into liquidity targets, retracement zones, and potential reversals.
These levels provide critical insights into order flow, illustrating how price interacts with them and the sequence in which it unfolds.
To refine price analysis further, the tool also tracks the average timing for the completion of manipulation and distribution phases. By combining historical timing patterns with price levels tied to these phases, traders can perform more in-depth analyses and enhance their market strategies.
While rooted in historical data, this indicator does not guarantee that past patterns will repeat in future market conditions. Instead, it offers a data-driven approach to identifying moments when candles are likely to reverse after manipulation phases or retrace following completed distributions, enabling traders to spot potential turning points with greater precision.
📦 Features
This tool offers a range of powerful features to enhance your trading analysis:
Average Range Accuracy : Simplify candlestick analysis with advanced lines and labels to pinpoint manipulation, distribution, and time pivots. Graph average ranges for your chosen timeframe to navigate market volatility and uncover key support and resistance zones.
Custom Timeframe Selection : Align your analysis with your trading strategy by choosing a timeframe that highlights the candle’s manipulation, distribution, and key timing.
Real-time Data Feed : Stay updated with live candlestick stats, with each new candle updating OHLC data and performing ongoing historical calculations, even on sub-minute timeframes.
Historical Mapping : Backtest past market scenarios with ease using the historical mapping feature. Traders can revisit and analyze previous data, refine strategies, and customize label displays for journaling flexibility.
User-Friendly Interface : Designed for advanced traders, the intuitive interface allows easy navigation and customization of display settings, offering a personalized experience for data-driven analysis.
⚙️ Settings
Sessions: Sets the timeframe to which will be drawn.
Lookback: Controls period length in days.
Method: Sets the desired calculation algorithm.
History: Display Session Range Map drawings for previous sessions.
Timezone: Dsiplay the data based on the selected timezone.
Opn: Style for Open line.
Man: Style for Manipulation line.
Dis: Style for Distribution line.
Time: Style for Timeline.
Labels: Controls the size and abbreviations.
Table Position: Manage the Session Range Map table position
⚡️ Showcase
Here’s a visual showcase of the tool in action, highlighting its key features and capabilities:
Manipilation & Distribution
Time
📒 Usage
Here’s how you can use the OHLC Session Range Map to enhance your analysis:
Add OHLC Session Range Map to your Tradingview chart.
Select a timeframe and customize the styles to fit your preferences.
Watch as calculated manipulation, distribution, and delivery times align with your analysis.
Combine this data with other models and insights to strengthen your trading strategy.
Example 1
Example 2
By following these steps, you'll unlock powerful insights to refine and elevate your trading strategies.
🔹 Notes
On Bullish candles:
Manipulation: Open - Low
Distribution: Open - High
On Bearish candles:
Manipulation: Open - High
Distribution: Open - Low
Available calculation methods:
Mean
Median
Price patterns on OHLC Session Range Map:
Open - -Man - +Dis
Open - -Man - Open - +Dis
Open - -Man - +Man - +Dis
Open - -Man - +Man - -Dis
Open - +Man - -Dis
Open - +Man - Open - -Dis
Open - +Man - -Man - -Dis
Open - +Man - -Man - +Dis
🚨 Alerts
The indicator does not provide any alerts!
⚠️ Disclaimer
These tools are exclusively available on the TradingView platform.
Our charting tools are intended solely for informational and educational purposes and should not be regarded as financial, investment, or trading advice. They are not designed to predict market movements or offer specific recommendations. Users should be aware that past performance is not indicative of future results and should not rely on these tools for financial decisions. By using these charting tools, the purchaser agrees that the seller and creator hold no responsibility for any decisions made based on information provided by the tools. The purchaser assumes full responsibility and liability for any actions taken and their consequences, including potential financial losses or investment outcomes that may result from the use of these products.
By purchasing, the customer acknowledges and accepts that neither the seller nor the creator is liable for any undesired outcomes stemming from the development, sale, or use of these products. Additionally, the purchaser agrees to indemnify the seller from any liability. If invited through the Friends and Family Program, the purchaser understands that any provided discount code applies only to the initial purchase of Candela's subscription. The purchaser is responsible for canceling or requesting cancellation of their subscription if they choose not to continue at the full retail price. In the event the purchaser no longer wishes to use the products, they must unsubscribe from the membership service, if applicable.
We do not offer reimbursements, refunds, or chargebacks. Once these Terms are accepted at the time of purchase, no reimbursements, refunds, or chargebacks will be issued under any circumstances.
By continuing to use these charting tools, the user confirms their understanding and acceptance of these Terms as outlined in this disclaimer.
CandelaCharts - OHLC Range Map 📝 Overview
Explore the intricate art of candlestick analysis with the OHLC Range Map!
Elevate your TradingView experience by integrating this dynamic tool into your trading strategies with actionable insights. This cutting-edge indicator transcends standard OHLC visuals, leveraging Inner Circle Trader (ICT) concepts to dissect accumulation, manipulation, and distribution on a candle-by-candle basis.
ICT traders recognize manipulation through the wick extending opposite the candle’s close. This movement often serves to mislead market participants into taking positions in the "wrong" direction, signaling potential manipulation legs. Analysts can use these insights to anticipate a candle’s distribution phase. During distribution, price extends to higher or lower levels, offering key clues for identifying liquidity draws, potential retracements, or reversals.
These levels offer valuable insights into order flow, highlighting how price interacts with them and the sequence of its delivery.
To enhance price mapping, the tool also charts the average timing for the completion of manipulation and distribution phases. This feature empowers traders to combine historical timing patterns with the price levels associated with manipulation and distribution for a deeper analysis.
Like all tools based on historical data, this indicator does not guarantee that past patterns will replicate in future market conditions. Designed with a data-driven edge, it highlights moments when candles are likely to reverse following manipulation phases or retrace after completing defined distributions, helping analysts spot potential turning points.
📦 Features
This tool offers a range of powerful features to enhance your trading analysis:
Average Range Accuracy : Simplify candlestick analysis with advanced lines and labels to pinpoint manipulation, distribution, and time pivots. Graph average ranges for your chosen timeframe to navigate market volatility and uncover key support and resistance zones.
Custom Timeframe Selection : Align your analysis with your trading strategy by choosing a timeframe that highlights the candle’s manipulation, distribution, and key timing.
Real-time Data Feed : Stay updated with live candlestick stats, with each new candle updating OHLC data and performing ongoing historical calculations, even on sub-minute timeframes.
Historical Mapping : Backtest past market scenarios with ease using the historical mapping feature. Traders can revisit and analyze previous data, refine strategies, and customize label displays for journaling flexibility.
User-Friendly Interface : Designed for advanced traders, the intuitive interface allows easy navigation and customization of display settings, offering a personalized experience for data-driven analysis.
⚙️ Settings
Timeframe: Sets the timeframe to which will be drawn.
Period: Controls period length in days.
Algorithm: Sets the desired calculation algorithm.
History: Display Range Map drawings for previous sessions.
Timezone: Dsiplay the data based on the selected timezone.
Use NY Midnight Open: Controls from where a Range Map will start detection.
Opn: Style for Open line.
Man: Style for Manipulation line.
Dis: Style for Distribution line.
Time: Style for Timeline.
Labels: Controls the size and abbreviations.
Line Position: Manage the Range Map line position
Table Position: Manage the Range Map table position
⚡️ Showcase
Here’s a visual showcase of the tool in action, highlighting its key features and capabilities:
Manipilation & Distribution
Time
📒 Usage
Here’s how you can use the OHLC Range Map to enhance your analysis:
Add OHLC Range Map to your Tradingview chart.
Select a timeframe and customize the styles to fit your preferences.
Watch as calculated manipulation, distribution, and delivery times align with your analysis.
Combine this data with other models and insights to strengthen your trading strategy.
Example 1
Example 2
By following these steps, you'll unlock powerful insights to refine and elevate your trading strategies.
🔹 Notes
On Bullish candles:
Manipulation: Open - Low
Distribution: Open - High
On Bearish candles:
Manipulation: Open - High
Distribution: Open - Low
Available calculation methods:
Mean
Median
Price patterns on OHLC Range Map:
Open - -Man - +Dis
Open - -Man - Open - +Dis
Open - -Man - +Man - +Dis
Open - -Man - +Man - -Dis
Open - +Man - -Dis
Open - +Man - Open - -Dis
Open - +Man - -Man - -Dis
Open - +Man - -Man - +Dis
🚨 Alerts
The indicator does not provide any alerts!
⚠️ Disclaimer
These tools are exclusively available on the TradingView platform.
Our charting tools are intended solely for informational and educational purposes and should not be regarded as financial, investment, or trading advice. They are not designed to predict market movements or offer specific recommendations. Users should be aware that past performance is not indicative of future results and should not rely on these tools for financial decisions. By using these charting tools, the purchaser agrees that the seller and creator hold no responsibility for any decisions made based on information provided by the tools. The purchaser assumes full responsibility and liability for any actions taken and their consequences, including potential financial losses or investment outcomes that may result from the use of these products.
By purchasing, the customer acknowledges and accepts that neither the seller nor the creator is liable for any undesired outcomes stemming from the development, sale, or use of these products. Additionally, the purchaser agrees to indemnify the seller from any liability. If invited through the Friends and Family Program, the purchaser understands that any provided discount code applies only to the initial purchase of Candela's subscription. The purchaser is responsible for canceling or requesting cancellation of their subscription if they choose not to continue at the full retail price. In the event the purchaser no longer wishes to use the products, they must unsubscribe from the membership service, if applicable.
We do not offer reimbursements, refunds, or chargebacks. Once these Terms are accepted at the time of purchase, no reimbursements, refunds, or chargebacks will be issued under any circumstances.
By continuing to use these charting tools, the user confirms their understanding and acceptance of these Terms as outlined in this disclaimer.
Drawdown Tracker [SpokoStocks]Drawdown Tracker
The Drawdown Tracker is a powerful tool designed to help traders monitor and visualize the drawdown of symbol. By tracking both current and maximum drawdown levels, this indicator provides valuable insights into risk and potential capital preservation.
Features:
> Current Drawdown:
The current drawdown is calculated as the percentage drop from the record high to the current low, providing a real-time view of the loss from the peak.
> Maximum Drawdown:
The maximum drawdown represents the deepest drop observed from any peak in the historical data, giving an understanding of the worst-case scenario for losses.
> You can choose between two modes:
Full History: Tracks the maximum drawdown from the entire available data.
Rolling Period: Tracks the maximum drawdown within a defined rolling period (default 50 bars), allowing for a shorter-term risk assessment.
> Customizable Rolling Period:
You can adjust the rolling period length through the Rolling Period Length input to reflect different time frames for drawdown calculations.
> Warning Level:
A customizable warning level (default -65%) is plotted on the chart. This acts as a threshold to alert users when the drawdown crosses into a potentially concerning territory.
> Gradient Color Visualization:
The current drawdown is visualized using a gradient color, transitioning from red to yellow as the drawdown increases from -100% to 0%, providing an easy-to-interpret view of the severity of the drawdown.
> New Max Drawdown Marker:
Whenever a new maximum drawdown is recorded, a triangle marker is displayed at the bottom of the chart, along with a label showing the drawdown percentage. This provides clear visual confirmation when a new historical low is reached.
> Alerts:
Warning Level Breach Alert: Alerts you when the drawdown breaches the warning level you’ve set, helping you stay aware of significant risk events.
New Max Drawdown Alert: Triggers when a new maximum drawdown is recorded, allowing you to act quickly if necessary.
Use Cases:
Risk Management: Keep track of how much an asset is down from the peak, helping you make informed decisions about risk and drawdown tolerances.
Risk Disclaimer:
The information provided by this script is for educational and informational purposes only. It is not intended as financial advice and should not be construed as such. All trading and investment activities involve a high level of risk and may result in the loss of capital. The user is solely responsible for any decisions made based on the content provided by this script.
By using this script, you acknowledge and agree that you use it at your own risk. The creator of this script makes no warranties regarding the accuracy, completeness, or reliability of the information, and disclaims any responsibility for any losses or damages arising from its use.
Always conduct your own research and consult with a qualified financial advisor before making any investment decisions.
Trend Reversal Probability [Algoalpha]Introducing Trend Reversal Probability by AlgoAlpha – a powerful indicator that estimates the likelihood of trend reversals based on an advanced custom oscillator and duration-based statistics. Designed for traders who want to stay ahead of potential market shifts, this indicator provides actionable insights into trend momentum and reversal probabilities.
Key Features :
🔧 Custom Oscillator Calculation: Combines a dual SMA strategy with a proprietary RSI-like calculation to detect market direction and strength.
📊 Probability Levels & Visualization: Plots average signal durations and their statistical deviations (±1, ±2, ±3 SD) on the chart for clear visual guidance.
🎨 Dynamic Color Customization: Choose your preferred colors for upward and downward trends, ensuring a personalized chart view.
📈 Signal Duration Metrics: Tracks and displays signal durations with columns representing key percentages (80%, 60%, 40%, and 20%).
🔔 Alerts for High Probability Events: Set alerts for significant reversal probabilities (above 84% and 98% or below 14%) to capture key trading moments.
How to Use :
Add the Indicator: Add Trend Reversal Probability to your favorites by clicking the star icon.
Market Analysis: Use the plotted probability levels (average duration and ±SD bands) to identify overextended trends and potential reversals. Use the color of the duration counter to identify the current trend.
Leverage Alerts: Enable alerts to stay informed of high or extreme reversal probabilities without constant chart monitoring.
How It Works :
The indicator begins by calculating a custom oscillator using short and long simple moving averages (SMA) of the midpoint price. A proprietary RSI-like formula then transforms these values to estimate trend direction and momentum. The duration between trend reversals is tracked and averaged, with standard deviations plotted to provide probabilistic guidance on trend longevity. Additionally, the indicator incorporates a cumulative probability function to estimate the likelihood of a trend reversal, displaying the result in a data table for easy reference. When probability levels cross key thresholds, alerts are triggered, helping traders take timely action.
Best Range (Day Trading)The indicator is based on a formula very similar to that of the ATR. The average volatility of the last candles (a value adjustable via inputs) is calculated, and this value is then divided (a value adjustable via inputs), providing a specific value in terms of RANGE .
Its use is very straightforward. It was primarily designed for stock indices (Nasdaq & SPX). When used on the DAILY timeframe, it provides the recommended RANGE value for day trading with structural logic.
Its goal is to offer a guiding value for setting the chart to a range-based view that is optimal and as effective as possible in identifying breakouts of specific levels , helping traders avoid false breakouts or misleading structures.
We can also observe a division of levels into quartiles (25, 50, 75, 100, 125...). This helps provide reference ranges, allowing the range to be used with rounded numbers .
For example, on Nasdaq , if the indicator set on DAILY provides a value between 200 and 250, then it is advisable to visualize the chart at 200 RANGE for a more aggressive approach or at 250 RANGE for a more conservative approach.
On SPX , which is less volatile, we use increments of 25. If the indicator gives a value between 25 and 50 , then we use 25 for an aggressive approach and 50 for a conservative approach.
Obviously, this refers to FUTURES and the tick movements of MINI contracts.
Stop Loss & TargetHow to Use the SL/TP Indicator
The SL/TP indicator is a versatile tool designed for traders to easily visualize entry, stop-loss (SL), and take-profit (TP) levels on their charts. This guide will walk you through the steps to configure and use the indicator effectively.
Features:
Configure Long Trades and Short Trades independently.
Define Entry Price, Stop Loss, and up to three Take Profit levels for each trade.
Customize line colors for better visualization.
Works for both risk-reward and target-based trading.
Adding the Indicator:
Open the TradingView platform.
Search for the indicator name: SL/TP.
Click the Add to Chart button to apply it.
Configuration:
1. Long Trade Settings
Enable Long Trade: Check this option to activate long trade lines on the chart.
Long Entry Price: Input the price at which you plan to enter the long trade.
Long Stop Loss: Input your stop-loss level for the long trade.
Line Colors: You can customize the colors for the Entry, SL, and TP lines in the Long Trade settings group.
Take Profit Levels (Calculated Automatically):
TP1: 1:1 Risk-Reward ratio (difference between Entry and SL added to Entry).
TP2: 1:2 Risk-Reward ratio.
TP3: 1:3 Risk-Reward ratio.
2. Short Trade Settings
Enable Short Trade: Check this option to activate short trade lines on the chart.
Short Entry Price: Input the price at which you plan to enter the short trade.
Short Stop Loss: Input your stop-loss level for the short trade.
Line Colors: You can customize the colors for the Entry, SL, and TP lines in the Short Trade settings group.
Take Profit Levels (Calculated Automatically):
TP1: 1:1 Risk-Reward ratio (difference between Entry and SL subtracted from Entry).
TP2: 1:2 Risk-Reward ratio.
TP3: 1:3 Risk-Reward ratio.
Visualizing on the Chart:
Once you configure the settings and enable the trade, the indicator will draw horizontal lines on the chart for:
Entry Price
Stop Loss
Take Profit Levels (TP1, TP2, TP3)
Each line will extend to three bars ahead of the current bar index.
Customization:
Adjust colors for better visibility depending on your chart theme.
The width and style of lines can also be modified in the source code if needed.
Example Usage:
Long Trade Example:
Enable Long Trade: Check the box.
Set Entry Price: 100.
Set Stop Loss: 95.
The indicator will draw the following lines:
Entry Line: At 100 (customizable color).
Stop Loss Line: At 95 (customizable color).
TP1 Line: At 105 (1:1 Risk-Reward).
TP2 Line: At 110 (1:2 Risk-Reward).
TP3 Line: At 115 (1:3 Risk-Reward).
Short Trade Example:
Enable Short Trade: Check the box.
Set Entry Price: 200.
Set Stop Loss: 205.
The indicator will draw the following lines:
Entry Line: At 200 (customizable color).
Stop Loss Line: At 205 (customizable color).
TP1 Line: At 195 (1:1 Risk-Reward).
TP2 Line: At 190 (1:2 Risk-Reward).
TP3 Line: At 185 (1:3 Risk-Reward).
Notes:
Ensure that you input valid and realistic price levels for Entry and Stop Loss.
The indicator will only display lines if both the Entry Price and Stop Loss are non-zero.
Use this indicator for planning trades visually but always confirm levels with your trading strategy.
Disclaimer: This indicator is a tool to assist in trading. Use it with proper risk management and your own due diligence.
ADX (levels)This Pine Script indicator calculates and displays the Average Directional Index (ADX) along with the DI+ and DI- lines to help identify the strength and direction of a trend. The script is designed for Pine Script v6 and includes customizable settings for a more tailored analysis.
Features:
ADX Calculation:
The ADX measures the strength of a trend without indicating its direction.
It uses a smoothing method for more reliable trend strength detection.
DI+ and DI- Lines (Optional):
The DI+ (Directional Index Plus) and DI- (Directional Index Minus) help determine the direction of the trend:
DI+ indicates upward movement.
DI- indicates downward movement.
These lines are disabled by default but can be enabled via input settings.
Customizable Threshold:
A horizontal line (hline) is plotted at a user-defined threshold level (default: 20) to highlight significant ADX values that indicate a strong trend.
Slope Analysis:
The slope of the ADX is analyzed to classify the trend into:
Strong Trend: Slope is higher than a defined "medium" threshold.
Moderate Trend: Slope falls between "weak" and "medium" thresholds.
Weak Trend: Slope is positive but below the "weak" threshold.
A background color changes dynamically to reflect the strength of the trend:
Green (light or dark) indicates trend strength levels.
Custom Colors:
ADX color is customizable (default: pink #e91e63).
Background colors for trend strength can also be adjusted.
Independent Plot Window:
The indicator is displayed in a separate window below the price chart, making it easier to analyze trend strength without cluttering the main price chart.
Parameters:
ADX Period: Defines the lookback period for calculating the ADX (default: 14).
Threshold (hline): A horizontal line value to differentiate strong trends (default: 20).
Slope Thresholds: Adjustable thresholds for weak, moderate, and strong trend slopes.
Enable DI+ and DI-: Boolean options to display or hide the DI+ and DI- lines.
Colors: Customizable colors for ADX, background gradients, and other elements.
How to Use:
Identify Trend Strength:
Use the ADX value to determine the strength of a trend:
Below 20: Weak trend.
Above 20: Strong trend.
Analyze Trend Direction:
Enable DI+ and DI- to check whether the trend is upward (DI+ > DI-) or downward (DI- > DI+).
Dynamic Slope Detection:
Use the background color as a quick visual cue to assess trend strength changes.
This indicator is ideal for traders who want to measure trend strength and direction dynamically while maintaining a clean and organized chart layout.
[ADDYad] Google Search Trends - Bitcoin (2012 Jan - 2025 Jan)This Pine Script shows the Google Search Trends as an indicator for Bitcoin from January 2012 to January 2025, based on monthly data retrieved from Google Trends. It calculates and displays the relative search interest for Bitcoin over time, offering a historical perspective on its popularity mainly built for BITSTAMP:BTCUSD .
Important note: This is not a live indicator. It visualizes historical search trends based on Google Trends data.
Key Features:
Data Source : Google Trends (Last retrieved in January 10 2025).
Timeframe : The script is designed to be used on a monthly chart, with the data reflecting monthly search trends from January 2012 to January 2025. For other timeframes, the data is linearly interpolated to estimate the trends at finer resolutions.
Purpose : This indicator helps visualize Bitcoin's search interest over the years, offering insights into public interest and sentiment during specific periods (e.g., major price movements or news events).
Data Handling : The data is interpolated for use on non-monthly timeframes, allowing you to view search trends on any chart timeframe. This makes it versatile for use in longer-term analysis or shorter timeframes, despite the raw data being available only on a monthly basis. However, it is most relevant for Monthly, Weekly, and Daily timeframes.
How It Works:
The script calculates the number of months elapsed since January 1, 2012, and uses this to interpolate Google Trends data values for any given point in time on the chart.
The linear interpolation function adjusts the monthly data to provide an approximate trend for intermediate months.
Why It's Useful:
Track Bitcoin's historic search trends to understand how interest in Bitcoin evolved over time, potentially correlating with price movements.
Correlate search trends with price action and other market indicators to analyze the effects of public sentiment and sentiment-driven market momentum.
Final Notes:
This script is unique because it shows real-world, non-financial dataset (Google Trends) to understand price action of Bitcoin correlating with public interest. Hopefully is a valuable addition to the TradingView community.
ADDYad
Simple Average Price & Target ProfitThis script is designed to help users calculate and visualize the weighted average price of an asset based on multiple entry points, along with the target price and the potential profit. The user can input specific prices for three different entries, along with the percentage of total investment allocated to each price point. The script then calculates the weighted average price based on these entries and displays it on the chart. Additionally, it calculates the potential profit at a given target price, which is plotted on the chart.
Simple COT ReportCOT Net Positions Indicator
Author: © Munkhtur
This indicator provides a comprehensive visualization of the Commitment of Traders (COT) report data, enabling traders to analyze market sentiment and positioning for key market participants.
Key Features:
Dashboard Display: Shows the net positions of Commercial, Noncommercial, and Nonreportable (Retail) traders.
Dynamic Position Tracking: Highlights significant changes in long and short positions for all trader categories based on customizable percentage thresholds.
COT Data Integration: Utilizes Legacy COT report data with clear segregation of long, short, and net positions.
Visual Signals:
Bullish and bearish trends are indicated with customizable colors for better chart visualization.
Displays "open" and "close" position changes directly on the price candles for easier tracking.
Flexible Configuration: Adjustable settings for dashboard location, text size, percentage thresholds, and color schemes.
How to Use:
Load the Script: Add the indicator to your Futures chart only by navigating to the TradingView indicators menu and selecting it from your saved scripts.
Customize Settings:
Dashboard: Enable or disable the dashboard, and set its position (Top Left, Top Right, etc.).
Data on Candle: Turn on/off the visualization of COT data changes on price candles and define the percentage change threshold to focus on significant moves.
Style Options: Customize bullish and bearish colors for better visual differentiation.
Select Trader Group: Choose from Commercial, Noncommercial, or Nonreportable positions in the settings menu to analyze the specific group of market participants.
Interpret Signals:
Green bars indicate opening long positions or bullish sentiment.
Red bars highlight opening short positions or bearish sentiment.
Yellow and purple bars signify the closure of long and short positions, respectively.
Use Cases:
Identify market sentiment shifts by observing net position changes among different trader groups.
Spot potential trend reversals based on COT data dynamics.
Use as a complementary tool to confirm your existing trading strategies.
Disclaimer:
This indicator is a tool for educational and informational purposes only. Always combine it with your own analysis and risk management strategy when trading.
ADR Table BY @ICT_YEROADR Table BY @ICT_YERO
Created by: @ICT_YERO
This custom indicator is designed to provide the Average Daily Range (ADR) for multiple timeframes, including Daily, 4-Hour, and 1-Hour. The indicator is tailored to assist traders in understanding price volatility and making informed trading decisions.
Key Features
Multi-Timeframe ADR Calculation:
Automatically calculates and displays the ADR for Daily, 4-Hour, and 1-Hour timeframes.
Helps traders identify potential price movement ranges for different trading sessions.
Dynamic Range Visualization:
Clear visual representation of the ADR on the chart, making it easy to spot price extremes.
Real-time updates to reflect changes in price movement.
Custom Alerts:
Option to set alerts when the price approaches the ADR high or low.
Useful for identifying potential reversal zones or breakout opportunities.
User-Friendly Interface:
Simple and intuitive settings to customize colors, levels, and display preferences.
Seamlessly integrates with your existing TradingView setup.
ICT-Inspired Methodology:
Designed for traders who follow ICT concepts, focusing on precision and high-probability setups.
Applications
Range Trading: Helps determine the high and low boundaries for scalping or intraday setups.
Volatility Analysis: Understand market behavior during different times of the day or week.
Reversal Zones: Identify areas where price is likely to reverse, based on ADR extremes.
Whether you're a scalper, day trader, or swing trader, this indicator provides a comprehensive overview of price volatility across multiple timeframes, making it an essential tool for your trading arsenal.
Position sizerPosition Sizer Indicator
The "Position Sizer" indicator is a practical tool for traders who need to quickly and accurately calculate position sizes based on their account balance, risk tolerance, and stop-loss level. It ensures real-time updates and supports multiple asset classes like Forex, Indexes, Metals, and Crypto.
Key Features
Dynamic Position Sizing: Automatically calculates position sizes based on the current market price and stop-loss level.
Stop-Loss Adjustment: Allows users to drag the stop-loss level directly on the chart, dynamically updating the position size.
Interactive Table: A single click on the table activates the draggable stop-loss level for easy adjustments.
Multi-Asset Compatibility: Fully supports Forex, Indexes, Metals, and Crypto trading pairs.
How to Use
Deactivate the Indicator:
Turn off the indicator to make it inactive.
Set the Stop-Loss Price:
Copy the stop-loss price or use a price near the current market price.
Reactivate the indicator after inserting the stop-loss price.
Adjust the Stop-Loss Level if needed:
Click once on the table to enable the stop-loss level for dragging.
Move the stop-loss line as needed—position sizes will automatically recalculate.
Important Disclaimer
Verification Required: Always verify the calculated position size before executing trades.
Broker Confirmation: Double-check the point size for your trading symbol with your broker to avoid errors in calculations.
User Responsibility: The creator assumes no responsibility for any trading decisions made based on this indicator.
This tool helps streamline position management, ensuring you can focus on executing your trades with accuracy and speed. Always confirm your calculations before trading.