The Curved Market Structure [BigBeluga]Curved Market Structure
The Curved Market Structure indicator offers an innovative twist on traditional market structure tools by using curved lines instead of horizontal ones, enabling faster breakout detection for traders.
🔵Key Features:
Curved Market Structure Levels: The indicator identifies high and low pivots and plots curved lines connecting these points, adapting to market dynamics and providing a more intuitive view of potential breakout zones.
Breakout Detection: Breakouts above or below the curved levels are marked with triangle symbols (▲ or ▼), making it easy to spot critical price movements.
Dynamic Target Levels: After a breakout, the indicator plots three target levels, which serve as potential price objectives. Each target is marked with a number and a star (e.g., 1★) upon being reached.
Customizable Line Length and Angle: Users can adjust the length and angle of the curved lines to fit their trading style and timeframe, making the tool versatile and adaptable.
Market Structure Trend Filtering: To maintain a clean chart, the indicator plots curved levels only from high pivots during uptrends and low pivots during downtrends.
🔵How It Works:
The indicator identifies high and low pivots using user-defined parameters (left and right bars).
Curved lines are drawn from these pivot points, showing the structure of the market and potential breakout zones.
When a breakout occurs, the indicator highlights the direction with triangle symbols and dynamically plots three price targets.
Upon reaching these targets, the level is marked with its respective number and a star, helping traders track price progression effectively.
The lines and targets are adjusted based on market conditions, ensuring real-time relevance and accuracy.
🔵Use Cases:
Spotting key breakout zones to identify entry and exit points more effectively.
Setting dynamic target levels for take-profit or stop-loss planning.
Filtering market noise and maintaining a cleaner chart while analyzing trends.
Enhancing traditional market structure analysis with an intuitive curved visualization.
This indicator is ideal for traders who want a modern, dynamic, and visually appealing way to track market structure and breakouts while maintaining chart clarity.
インジケーターとストラテジー
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.
Options Levels Support and ResistanceAre you sometimes clueless of where you are going to find support or resistance for the stock price? Nothing can be more powerful than market positioning via options levels.
This indicator visualizes key institutional options levels including short-term and longer-term Put/Call Walls, and projected implied move ranges.
Key Features:
Displays major support/resistance levels derived from options data
Shows institutional Put Walls (PW) and Call Walls (CW) - areas of significant options activity
Identifies short-term and longer-term gamma levels for more precise trading
Includes an option statistics (IV, Put/Call ratio, trend) in a clean dashboard
Automatically(*) updates throughout the trading day to reflect current market positioning
Currently supporting 440 of the most popular tickers.
Presents gamma flip levels for indexes SPX, RUT, NDX and VIX
Trading Applications:
Identify key price levels where institutional options activity may influence price movement
Gauge market sentiment through IV levels, Put/Call ratios, and options positioning
Plan entries/exits around major Put/Call walls where price reversals are more likely
Monitor changes in institutional positioning through level trends
Levels are calculated externally using comprehensive options data and updated into the indicator multiple times per day. Note that I can't guarantee it will be timely updated since TradingView offers no access to external data nor a way to programmatically update the script.
This code simply renders the levels I calculate using external software. I had to make the code as short as possible to accommodate more tickers, reason why there is no commenting.
The last update time (New York/EST) is shown in the dashboard.
Uptrick: Fisher Eclipse1. Name and Purpose
Uptrick: Fisher Eclipse is a Pine version 6 extension of the basic Fisher Transform indicator that focuses on highlighting potential turning points in price data. Its purpose is to allow traders to spot shifts in momentum, detect divergence, and adapt signals to different market environments. By combining a core Fisher Transform with additional signal processing, divergence detection, and customizable aggressiveness settings, this script aims to help users see when a price move might be losing momentum or gaining strength.
2. Overview
This script uses a Fisher Transform calculation on the average of each bar’s high and low (hl2). The Fisher Transform is designed to amplify price extremes by mapping data into a different scale, making potential reversals more visible than they might be with standard oscillators. Uptrick: Fisher Eclipse takes this concept further by integrating a signal line, divergence detection, bar coloring for momentum intensity, and optional thresholds to reduce unwanted noise.
3. Why Use the Fisher Transform
The Fisher Transform is known for converting relatively smoothed price data into a more pronounced scale. This transformation highlights where markets may be overextended. In many cases, standard oscillators move gently, and traders can miss subtle hints that a reversal might be approaching. The Fisher Transform’s mathematical approach tightens the range of values and sharpens the highs and lows. This behavior can allow traders to see clearer peaks and troughs in momentum. Because it is often quite responsive, it can help anticipate areas where price might change direction, especially when compared to simpler moving averages or traditional oscillators. The result is a more evident signal of possible overbought or oversold conditions.
4. How This Extension Improves on the Basic Fisher Transform
Uptrick: Fisher Eclipse adds multiple features to the classic Fisher framework in order to address different trading styles and market behaviors:
a) Divergence Detection
The script can detect bullish or bearish divergences between price and the oscillator over a chosen lookback period, helping traders anticipate shifts in market direction.
b) Bar Coloring
When momentum exceeds a certain threshold (default 3), bars can be colored to highlight surges of buying or selling pressure. This quick visual reference can assist in spotting periods of heightened activity. After a bar color like this, usually, there is a quick correction as seen in the image below.
c) Signal Aggressiveness Levels
Users can choose between conservative, moderate, or aggressive signal thresholds. This allows them to tune how quickly the indicator flags potential entries or exits. Aggressive settings might suit scalpers who need rapid signals, while conservative settings may benefit swing traders preferring fewer, more robust indications.
d) Minimum Movement Filter
A configurable filter can be set to ensure that the Fisher line and its signal have a sufficient gap before triggering a buy or sell signal. This step is useful for traders seeking to minimize signals during choppy or sideways markets. This can be used to eliminate noise as well.
By combining all these elements into one package, the indicator attempts to offer a comprehensive toolkit for those who appreciate the Fisher Transform’s clarity but also desire more versatility.
5. Core Components
a) Fisher Transform
The script calculates a Fisher value using normalized price over a configurable length, highlighting potential peaks and troughs.
b) Signal Line
The Fisher line is smoothed using a short Simple Moving Average. Crossovers and crossunders are one of the key ways this indicator attempts to confirm momentum shifts.
c) Divergence Logic
The script looks back over a set number of bars to compare current highs and lows of both price and the Fisher oscillator. When price and the oscillator move in opposing directions, a divergence may occur, suggesting a possible upcoming reversal or weakening trend.
d) Thresholds for Overbought and Oversold
Horizontal lines are drawn at user-chosen overbought and oversold levels. These lines help traders see when momentum readings reach particular extremes, which can be especially relevant when combined with crossovers in that region.
e) Intensity Filter and Bar Coloring
If the magnitude of the change in the Fisher Transform meets or exceeds a specified threshold, bars are recolored. This provides a visual cue for significant momentum changes.
6. User Inputs
a) length
Defines how many bars the script looks back to compute the highest high and lowest low for the Fisher Transform. A smaller length reacts more quickly but can be noisier, while a larger length smooths out the indicator at the cost of responsiveness.
b) signal aggressiveness
Adjusts the buy and sell thresholds for conservative, moderate, and aggressive trading styles. This can be key in matching the indicator to personal risk preferences or varying market conditions. Conservative will give you less signals and aggressive will give you more signals.
c) minimum movement filter
Specifies how far apart the Fisher line and its signal line must be before generating a valid crossover signal.
d) divergence lookback
Controls how many bars are examined when determining if price and the oscillator are diverging. A larger setting might generate fewer signals, while a smaller one can provide more frequent alerts.
e) intensity threshold
Determines how large a change in the Fisher value must be for the indicator to recolor bars. Strong momentum surges become more noticeable.
f) overbought level and oversold level
Lets users define where they consider market conditions to be stretched on the upside or downside.
7. Calculation Process
a) Price Input
The script uses the midpoint of each bar’s high and low, sometimes referred to as hl2.
hl2 = (high + low) / 2
b) Range Normalization
Determine the maximum (maxHigh) and minimum (minLow) values over a user-defined lookback period (length).
Scale the hl2 value so it roughly fits between -1 and +1:
value = 2 * ((hl2 - minLow) / (maxHigh - minLow) - 0.5)
This step highlights the bar’s current position relative to its recent highs and lows.
c) Fisher Calculation
Convert the normalized value into the Fisher Transform:
fisher = 0.5 * ln( (1 + value) / (1 - value) ) + 0.5 * fisher_previous
fisher_previous is simply the Fisher value from the previous bar. Averaging half of the new transform with half of the old value smooths the result slightly and can prevent erratic jumps.
ln is the natural logarithm function, which compresses or expands values so that market turns often become more obvious.
d) Signal Smoothing
Once the Fisher value is computed, a short Simple Moving Average (SMA) is applied to produce a signal line. In code form, this often looks like:
signal = sma(fisher, 3)
Crossovers of the fisher line versus the signal line can be used to hint at changes in momentum:
• A crossover occurs when fisher moves from below to above the signal.
• A crossunder occurs when fisher moves from above to below the signal.
e) Threshold Checking
Users typically define oversold and overbought levels (often -1 and +1).
Depending on aggressiveness settings (conservative, moderate, aggressive), these thresholds are slightly shifted to filter out or include more signals.
For example, an oversold threshold of -1 might be used in a moderate setting, whereas -1.5 could be used in a conservative setting to require a deeper dip before triggering.
f) Divergence Checks
The script looks back a specified number of bars (divergenceLookback). For both price and the fisher line, it identifies:
• priceHigh = the highest hl2 within the lookback
• priceLow = the lowest hl2 within the lookback
• fisherHigh = the highest fisher value within the lookback
• fisherLow = the lowest fisher value within the lookback
If price forms a lower low while fisher forms a higher low, it can signal a bullish divergence. Conversely, if price forms a higher high while fisher forms a lower high, a bearish divergence might be indicated.
g) Bar Coloring
The script monitors the absolute change in Fisher values from one bar to the next (sometimes called fisherChange):
fisherChange = abs(fisher - fisher )
If fisherChange exceeds a user-defined intensityThreshold, bars are recolored to highlight a surge of momentum. Aqua might indicate a strong bullish surge, while purple might indicate a strong bearish surge.
This color-coding provides a quick visual cue for traders looking to spot large momentum swings without constantly monitoring indicator values.
8. Signal Generation and Filtering
Buy and sell signals occur when the Fisher line crosses the signal line in regions defined as oversold or overbought. The optional minimum movement filter prevents triggering if Fisher and its signal line are too close, reducing the chance of small, inconsequential price fluctuations creating frequent signals. Divergences that appear in oversold or overbought regions can serve as additional evidence that momentum might soon shift.
9. Visualization on the Chart
Uptrick: Fisher Eclipse plots two lines: the Fisher line in one color and the signal line in a contrasting shade. The chart displays horizontal dashed lines where the overbought and oversold levels lie. When the Fisher Transform experiences a sharp jump or drop above the intensity threshold, the corresponding price bars may change color, signaling that momentum has undergone a noticeable shift. If the indicator detects bullish or bearish divergence, dotted lines are drawn on the oscillator portion to connect the relevant points.
10. Market Adaptability
Because of the different aggressiveness levels and the optional minimum movement filter, Uptrick: Fisher Eclipse can be tailored to multiple trading styles. For instance, a short-term scalper might select a smaller length and more aggressive thresholds, while a swing trader might choose a longer length for smoother readings, along with conservative thresholds to ensure fewer but potentially stronger signals. During strongly trending markets, users might rely more on divergences or large intensity changes, whereas in a range-bound market, oversold or overbought conditions may be more frequent.
11. Risk Management Considerations
Indicators alone do not ensure favorable outcomes, and relying solely on any one signal can be risky. Using a stop-loss or other protections is often suggested, especially in fast-moving or unpredictable markets. Divergence can appear before a market reversal actually starts. Similarly, a Fisher Transform can remain in an overbought or oversold region for extended periods, especially if the trend is strong. Cautious interpretation and confirmation with additional methods or chart analysis can help refine entry and exit decisions.
12. Combining with Other Tools
Traders can potentially strengthen signals from Uptrick: Fisher Eclipse by checking them against other methods. If a moving average cross or a price pattern aligns with a Fisher crossover, the combined evidence might provide more certainty. Volume analysis may confirm whether a shift in market direction has participation from a broad set of traders. Support and resistance zones could reinforce overbought or oversold signals, particularly if price reaches a historical boundary at the same time the oscillator indicates a possible reversal.
13. Parameter Customization and Examples
Some short-term traders run a 15-minute chart, with a shorter length setting, aggressively tight oversold and overbought thresholds, and a smaller divergence lookback. This approach produces more frequent signals, which may appeal to those who enjoy fast-paced trading. More conservative traders might apply the indicator to a daily chart, using a larger length, moderate threshold levels, and a bigger divergence lookback to focus on broader market swings. Results can differ, so it may be helpful to conduct thorough historical testing to see which combination of parameters aligns best with specific goals.
14. Realistic Expectations
While the Fisher Transform can reveal potential turning points, no mathematical tool can predict future price behavior with full certainty. Markets can behave erratically, and a period of strong trending may see the oscillator pinned in an extreme zone without a significant reversal. Divergence signals sometimes appear well before an actual trend change occurs. Recognizing these limitations helps traders manage risk and avoids overreliance on any one aspect of the script’s output.
15. Theoretical Background
The Fisher Transform uses a logarithmic formula to map a normalized input, typically ranging between -1 and +1, into a scale that can fluctuate around values like -3 to +3. Because the transformation exaggerates higher and lower readings, it becomes easier to spot when the market might have stretched too far, too fast. Uptrick: Fisher Eclipse builds on that foundation by adding a series of practical tools that help confirm or refine those signals.
16. Originality and Uniqueness
Uptrick: Fisher Eclipse is not simply a duplicate of the basic Fisher Transform. It enhances the original design in several ways, including built-in divergence detection, bar-color triggers for momentum surges, thresholds for overbought and oversold levels, and customizable signal aggressiveness. By unifying these concepts, the script seeks to reduce noise and highlight meaningful shifts in market direction. It also places greater emphasis on helping traders adapt the indicator to their specific style—whether that involves frequent intraday signals or fewer, more robust alerts over longer timeframes.
17. Summary
Uptrick: Fisher Eclipse is an expanded take on the original Fisher Transform oscillator, including divergence detection, bar coloring based on momentum strength, and flexible signal thresholds. By adjusting parameters like length, aggressiveness, and intensity thresholds, traders can configure the script for day-trading, swing trading, or position trading. The indicator endeavors to highlight where price might be shifting direction, but it should still be combined with robust risk management and other analytical methods. Doing so can lead to a more comprehensive view of market conditions.
18. Disclaimer
No indicator or script can guarantee profitable outcomes in trading. Past performance does not necessarily suggest future results. Uptrick: Fisher Eclipse is provided for educational and informational purposes. Users should apply their own judgment and may want to confirm signals with other tools and methods. Deciding to open or close a position remains a personal choice based on each individual’s circumstances and risk tolerance.
EBL - Enigma BOS LogicThe EBL - Enigma BOS Logic indicator is designed to detect key trend reversal points with precision by leveraging a unique concept based on two-candle price action analysis. Inspired by the balance of pairs in creation, this indicator identifies trend changes by focusing on significant bullish and bearish candle pairs, storing key levels, and waiting for confirmation to provide actionable trade signals. It goes beyond conventional trend-following indicators by offering real-time alerts and clear visual cues for traders.
How It Works
Bullish Setup:
The indicator identifies a bullish candle followed by a bearish candle. It then stores the high of the bullish candle as a potential reversal level.
A bullish confirmation occurs when a future bullish candle closes above the stored high. When this happens:
A green arrow is plotted below the confirming candle.
A horizontal green line is drawn at the stored high level, extending forward by a user-defined number of bars.
An alert is triggered to notify the trader of a confirmed bullish trend.
Bearish Setup:
The indicator identifies a bearish candle followed by a bullish candle. It stores the low of the bearish candle as a potential reversal level.
A bearish confirmation occurs when a future bearish candle closes below the stored low. When this happens:
A red arrow is plotted above the confirming candle.
A horizontal red line is drawn at the stored low level, extending forward by a user-defined number of bars.
An alert is triggered to notify the trader of a confirmed bearish trend.
Touch or Cross Alerts:
In addition to initial trend confirmation, the indicator tracks price movements relative to the drawn horizontal lines.
If the price returns to touch or cross a previously drawn horizontal line, an alert is triggered, indicating a potential re-entry or retracement opportunity.
Customization Options
To make the indicator versatile and adaptable for different trading styles, several customization options are provided:
Line Colors: Traders can customize the colors of the bullish and bearish lines.
Show/Hide Arrows and Lines: Users can choose whether to display the arrows and horizontal lines on the chart.
Line Length: The length of the horizontal lines (number of bars they extend into the future) is user-defined, offering flexibility based on trading timeframes and preferences.
Use Cases
Trend Reversal Detection: EBL is ideal for identifying key trend reversals, allowing traders to enter trades with a high probability of success.
Breakout Confirmation: The indicator provides visual and alert-based confirmation of breakouts beyond critical support or resistance levels.
Re-entry Opportunities: With alerts for price touching or crossing horizontal lines, traders can spot potential re-entry points during retracements.
Conceptual Foundation
The methodology behind this indicator is rooted in the principle that markets often move in pairs of bullish and bearish forces. By tracking the interaction between consecutive bullish and bearish candles and waiting for clear confirmations, this indicator ensures that only high-probability trend changes are signaled. This reduces noise and enhances trading accuracy, making it suitable for scalping, day trading, and swing trading across various timeframes.
How to Use
Apply the indicator to any chart and timeframe of your choice.
Set your preferred customization options, including line colors, arrow display, and line length.
Watch for arrows and listen for alerts to identify confirmed trend changes.
Pay attention to touch or cross alerts on horizontal lines, as these can signal potential re-entry or secondary trade opportunities.
Combine with other analysis: While EBL is powerful on its own, combining it with support/resistance analysis, moving averages, or volume indicators can further enhance its effectiveness.
This indicator is a powerful tool for traders seeking precision in identifying trend changes and actionable trade signals. Its unique logic, real-time alerts, and clear visual cues make it a valuable addition to any trader’s toolkit.
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.
Forex Reversal Strategy [5-Min] – Optimized for Scalping & Intracreated from @AlgoAlpha
📈 Description:
This Forex Reversal Strategy is designed for scalping and short-term trading on the 5-minute timeframe. It leverages reversal signals, trend confirmation, and volatility filters to capture high-probability trading opportunities.
🚀 Key Features:
✅ Reversal Signal Detection – Identifies potential trend reversals using price action.
✅ 200 EMA Trend Filter – Only takes trades in the direction of the trend.
✅ ATR-Based Stop Loss & Take Profit – Dynamically adjusts risk based on market volatility.
✅ ADX Volatility Filter – Avoids low-momentum and sideways markets.
✅ Session Filter (London & NY) – Trades only during high liquidity periods for better performance.
✅ Optimized for Forex Scalping – Ideal for pairs like EUR/USD, GBP/USD, USD/JPY, and XAU/USD.
📌 How It Works:
Long Trades: Enter when a bullish reversal is detected above the 200 EMA and market volatility is high.
Short Trades: Enter when a bearish reversal is detected below the 200 EMA and momentum confirms.
Exit Strategy: Uses ATR-based stop loss & take profit, with a 1.8:1 risk-reward ratio for optimized returns.
⚙ Customization Options:
Adjust Stop Loss ATR Multiplier for tighter or wider risk management.
Modify Risk-Reward Ratio to balance profit potential.
Enable/Disable Session Filter for 24/5 trading.
🔔 Alerts Included – Get notified when a trade opportunity arises!
📊 Recommended Timeframe: 5-Min
💰 Best Used On: Forex Pairs (EUR/USD, GBP/USD, USD/JPY, XAU/USD)
📈 Suggested Market Conditions: Trending and volatile markets.
🔥 Test it in the Strategy Tester and optimize it for your trading style! 🚀
[MAD] Self-Optimizing RSIOverview
This script evaluates multiple RSI lengths within a specified range, calculates performance metrics for each, and identifies the top 3 configurations based on a custom scoring system. It then plots the three best RSI curves and optionally displays a summary table and label.
How It Works
The script calculates a custom RSI for each length in the range.
It simulates entering a long position when RSI crosses below the Buy Value and exits when RSI crosses above the Sell Value.
Each trade's return is stored in the relevant StatsContainer.
Metrics Computation
After all bars have been processed,
* Net Profit,
* Sharpe Ratio, and
* Win Rate
are computed for each RSI length.
A weighted score is then derived using the input weights.
Top 3 Identification
The script finds the three RSI lengths with the highest scores.
The RSI lines for these top 3 lengths are plotted in different colors.
If enabled, a table listing the top 3 results (Rank, RSI length, Sharpe, NetPnL, Win Rate) is shown.
If enabled, a label with the highest-scoring RSI length and its score is placed on the final bar.
Usage Tips
Adjust Min RSI Length and Max RSI Length to explore a narrower or wider range of periods.
Be aware, to high settings will slow down the calculation.
Experiment with different RSI Buy Value and RSI Sell Value settings if you prefer more or fewer trade signals.
Confirm that Min Trades Required aligns with the desired confidence level for the computed metrics.
Modify Weight: Sharpe, Weight: NetProfit, and Weight: WinRate to reflect which metrics are most important.
Troubleshooting
If metrics remain - or NaN, confirm enough trades (Min Trades Required) have occurred.
If no top 3 lines appear, it could mean no valid trades were taken in the specified range, or the script lacks sufficient bars to calculate RSI for some lengths. In this case set better buyvalue and sellvalues in the inputs
Disclaimer
Past performance is not indicative of future results specialy as this indicator can repaint based on max candles in memory which are limited by your subscription
Trading Hub 3TDH3.0
This indicator considerably simplifies the process of identification of market structure for traders based on the TradingHUB-3 technical method.
SMA Crossover with displacement of priceEverytime sma 3 and 7 cross over and a candel showing displacement of price occurs, an arrow pops showing the move
AsianSessionFor traders following SMC principles or liquidity concepts, this tool is perfect for identifying key areas like the Asian High, Asian Low, and strategic moves such as the London Reversal.
Key Features:
🕒 Displays the Asian session with fully customizable time settings.
📈 Allows extending or limiting the high and low levels of the session.
⚙️ Offers configuration options to restrict visibility to specific timeframes (e.g., only for charts under 60 minutes).
A must-have tool to leverage liquidity zones and sharpen your trading strategy! 🔥
Predictive Ranges, SMA, RSI strategyThis strategy combines three powerful technical indicators: Predictive Ranges, Simple Moving Average (SMA), and Relative Strength Index (RSI), to help identify potential market entry and exit points.
Key Features:
Predictive Ranges: The strategy utilizes predictive price levels (such as support and resistance levels) to anticipate potential price movements and possible breakouts. These levels act as critical points for making trading decisions.
SMA (Simple Moving Average): A 200-period SMA is incorporated to determine the overall market trend. The strategy trades in alignment with the direction of the SMA, taking long positions when the price is bellow the SMA and short positions when it is above. This helps ensure the strategy follows the prevailing market trend.
RSI (Relative Strength Index): The strategy uses the RSI (14-period) to gauge whether the market is overbought or oversold. A value above 70 signals that the asset may be overbought, while a value below 30 indicates that it might be oversold. These conditions are used to refine entry and exit points.
Entry & Exit Logic:
Long Entry: The strategy enters a long position when the price crosses above the predictive resistance level (UpLevel1/UpLevel2), and RSI is in the oversold region (below 30), signaling potential upward movement.
Short Entry: The strategy enters a short position when the price crosses below the predictive support level (LowLevel1/LowLevel2), and RSI is in the overbought region (above 70), signaling potential downward movement.
Exit Strategy: The exit levels are determined based on the predictive range levels (e.g., UpLevel1, UpLevel2, LowLevel1, LowLevel2), ensuring that trades are closed at optimal levels. A stop loss and take profit are also applied, based on a user-defined percentage, allowing for automated risk management.
Strategy Advantages:
Trend Following: By using SMA and predictive ranges, this strategy adapts to the prevailing market trend, enhancing its effectiveness in trending conditions.
RSI Filtering: The RSI helps avoid trades in overbought/oversold conditions, refining entry signals and improving the likelihood of success.
Customizable: Traders can adjust parameters such as stop loss, take profit, and predictive range levels, allowing them to tailor the strategy to their preferred risk tolerance and market conditions.
This strategy is designed for traders who prefer a combination of trend-following and mean-reversion techniques, with a focus on predictive market levels and essential momentum indicators to improve trade accuracy.
USOIL H1 Magic CandleThis is an indicator that will show how the magic candle in the H1 timeframe is at a certain hour so you can make an entry for a reversal or continuation of the trend
This indicator is very good with a win accuracy of more than 80%. Are you interested in trying it?
EvoluteTrading - Candle Patterns Pro【CANDLE PATTERNS PRO】
This indicator helps identify multiple Japanese candlestick patterns in real-time, highlighting potential reversal and continuation signals through color-coded bars.
Key Features:
- Detects 13 major candlestick patterns
- Easy-to-read color highlighting system
- Customizable trend period and sensitivity
- Non-repainting signals
Patterns Detected:
✓ Engulfing Patterns (Bullish/Bearish)
✓ Harami Patterns (Bullish/Bearish)
✓ Morning & Evening Stars
✓ Hammer & Inverted Hammer
✓ Shooting Star
✓ Piercing Line & Dark Cloud Cover
✓ Kicker Patterns (Bullish/Bearish)
✓ Hanging Man
Settings:
- Pattern Trend Length: Adjusts the lookback period for trend confirmation
- Doji Size: Controls the sensitivity of pattern detection
This indicator is ideal for both beginners and experienced traders looking to enhance their technical analysis with classical candlestick patterns.
Note: Always use this indicator in conjunction with other forms of analysis and proper risk management.
─────────────────
By EvolueTrading
ALGOX V6_1_24 - Non-RepaintingWorking of the source from @CharlieChanCR
🔹 Fixes Implemented:
✅ Higher Timeframe Data (request.security()) fixed → Uses lookahead = barmerge.lookahead_off
✅ Heikin Ashi Candles Removed → Uses regular close prices
✅ Pivot Highs/Lows (ta.pivothigh() & ta.pivotlow()) replaced → Implements a rolling window method
✅ Process orders on every tick → Ensures real-time accuracy with calc_on_every_tick = true
✅ Ensures Stop Loss & Take Profit don’t repaint → Uses static levels per trade
Now, I'll modify and present the non-repainting version of your script. Stay tuned! 🚀
Fix Repainting Algox
🔧 Fixes Applied:
1️⃣ Fixed Higher Timeframe Data (request.security())
Now uses lookahead = barmerge.lookahead_off to prevent repainting.
2️⃣ Removed Heikin Ashi Candles
The strategy now strictly uses regular candlestick data.
3️⃣ Replaced ta.pivothigh() & ta.pivotlow()
Uses a rolling window method (f_swing_high() and f_swing_low()) to avoid future bar dependency.
4️⃣ Ensured Stop Loss & Take Profit Do Not Repaint
Uses static price levels based on strategy.position_avg_price.
5️⃣ Processes Orders on Every Tick (calc_on_every_tick = true)
Ensures real-time accuracy without modifying past signals.
6️⃣ Added Alerts for Entries & Exits
Get notified when Long/Short Entries or Take Profit levels are reached.
------------------------------------------------
🔥 Why This Version is Better?
✅ No more repainting—what you see in backtests is what happens in real-time.
✅ More reliable entries & exits—no signals disappearing after recalculation.
✅ Better for automation & live trading—consistent results when using bots.
------------------------------------------
ScalpZilla Strategy Claude 0.2 betaStrategy backtester for any MA indicator.
Currently used with ScalpZilla V3.
Contain 5 TPs and SL.
Adaptive Trend Flow [Copy only]only a copy, do not use this one use the original one, i am only copying for backtest purposes.
Check out the original one, i do not own this
Enhanced Divergence Indicator / Strategy (many oscillators)Hi, Guys!
So, I am publishing a divergence script, with the ability to choose from many indicators, which is equipped to serve either as a strategy or an indicator (or both).
In my opinion, trading with indicators is not something that can consistently bring you profit. But one of the most effective ways to use an indicator is precisely divergence, since it also contains information about imbalance in the price action. This is still one of the main tasks of technical analysis of price movements.
That is why I decided to make a script public, which I myself use with some additional functions, and here I am publishing the main ones. Most of its elements can be found in other community scripts, but not quite collected in one, and not all. The main difference is that here I provide an opportunity to refine the divergences, by using a filter for the minimum price difference in the two extremes, the minimum difference in the extremes of the indicator and something else that you will not find anywhere in free code. As far as I can, I have also made a filter for the minimum reverse movement of the indicator between its two extremes, which make up the divergence. In the settings, I have called it "Minimum Oscillator Pullback".
I'm not a programmer, so my script is crude and inelegant, but overall it does the job.
I added the ability to use a few more widespread filters, but with some small additional options. For example, you can display a fast and slow moving average, but the good thing is that among them there is also T3 - one of the best MAs for showing a trend. You should keep in mind, however, that this way of using a trend is not very good when using divergences.
I also added an underestimated indicator as a filter, which could be quite effective here. It is the Stochastic Momentum Index. I have given the option to use a different timeframe for it. Usually, in oscillators, overbought and oversold zones are searched for, but here its more effective use is rather the opposite. It actually shows the strength of the trend. That's why I made an option for its reversed use, and in addition, its limit levels are also variable.
There is also a filter for eliminating trading days and/or trading hours.
To make the code more informative, I have provided an opportunity to test the strategy with leverage.
There is an option to use TP and SL.
Regarding closing a position, there are also several options. I have not seen anyone else use it, but with a lot of testing, I have found that the SMI mentioned and used as a filter is a very good indicator for exiting a position. This is one thing. But something even better that I have found and put in the code is the use of standard deviation. Most algo-traders use Average True Range for exit. Well, I have personally found with a lot of historical data that Standard Deviation is actually much more effective for this.
For variety, and also because such trading systems exist, I have added the option to close after a certain number of candles. Here I have also added an additional functionality - closing on a candle in the opposite direction of the open position, after the specified number of candles have passed.
Apart from this, there is also an option to use VWAP for exit.
You will see that there are more than a dozen indicators to choose from for divergence. I have tested dozens, maybe hundreds of others, which at first glance seem very suitable for this. But in practice I have found that they do not really add anything.
Keep in mind that in different timeframes, in different market conditions, and different assets behave differently. For some, some indicators are better, but in another timeframe they are weak.
In addition, the filters for improving divergence sometimes behave strangely (for example, for an oscillator it may be good to accept a negative and very large value for the minimum movement between its extremes). This is because they are not standardized and have different scales. But if you play around with the options enough, you will understand what works for you.
Now I can't think of anything more to say, inside the options things should be relatively clear. If there are adequate questions that I am able to answer (I remind you that I am an amateur), I will write in the comments. I am sure that this code will be useful for many, but do not rely too much on it and do not take risks without testing - both with historical data and paper trading. As you know, in any case, nothing is guaranteed in the future.
I think I missed something important.
When you use the script as an indicator, a line will always appear when there is a divergence. It may seem strange to you on the price movement, but keep in mind that it shows exactly where the extremes of the oscillator, which is not visible on the chart, are. A sign will appear on this line when the divergence meets your other conditions - the filters and enhancements included.
In addition, there are options to limit the divergence indication to a number of candles. In practice, this is necessary and improves the results. It is very important to understand that in order for the script to indicate the last extreme, which we will use to open a position, it must first have determined that we have already gone in the opposite direction. Therefore, the options specify candles to the left, but also candles to the right after the peak, to verify that this is really a peak (or bottom). Many believe that this makes divergences bad for trading, since the signal is actually received later. Well, this is not entirely true and you can check it yourself. You can safely set the right candles to 0 and you will see that there are many false signals. Usually it is best to use 2 candles on the right for a signal and if the divergence is good, they still give a good entry. In certain conditions it is good with just one candle.
[blackcat] L3 Bullish Grab SignalOVERVIEW
The " L3 Bullish Grab Signal" indicator is designed to identify bullish trends and potential buying opportunities in the market. It uses a combination of moving averages and custom calculations to generate signals. The indicator is set to not overlay on the price chart, meaning it will have its own panel below the main chart, and it updates based on the specified timeframe.
FEATURES
Input Parameters:
shortEmaPeriod: Default value is 13, used for the shorter-term EMA.
longEmaPeriod: Default value is 34, used for the longer-term EMA.
signalEmaPeriod: Default value is 5, used to smooth the difference between the short and long EMAs.
lookbackPeriod: Default value is 60, used to look back over a certain number of bars for specific calculations.
Variable Calculations:
priceWeightedAverage: Calculated as (close * 2 + high + low) / 4 * 10, a custom price point.
shortEma: EMA of priceWeightedAverage over the short period.
longEma: EMA of priceWeightedAverage over the long period.
signalEma: EMA of the difference between shortEma and longEma, smoothed over the signalEmaPeriod.
oscillatorValue: Calculated as 2 * (shortEma - longEma - signalEma) * 5.5, a custom oscillator.
positiveOscillatorValue: Positive part of oscillatorValue, setting negative values to zero.
bullishSignal: True when positiveOscillatorValue increases and was previously negative.
confirmedBullishSignal: True when the bullish signal is confirmed by certain conditions involving the oscillator values and price increases.
priceIncreaseThreshold: Checks if the close price increased by more than 7% from the previous bar.
strongBullishSignal: Combines the bullish signal with the confirmed signal and the price increase threshold.
confirmedStrongBullishSignal: When all conditions for a strong bullish signal are met.
weakBullishSignal: Bullish signal that doesn't meet the strong criteria but still shows some strength.
Plotting:
Oscillator Value: Plots the raw oscillator value in white.
Positive Oscillator Value: Plots only the positive part of the oscillator value in white.
Strong Bullish Signal Stick: Plots a red candlestick when a strong bullish signal is confirmed, using the highest positive oscillator value over the lookback period.
Bullish Signal Stick: Plots a white candlestick for a bullish signal that isn't necessarily strong.
Weak Bullish Signal Stick: Plots a green candlestick for a weak bullish signal.
Positive Trend: Plots yellow candlesticks when the oscillator value is positive.
Negative Trend: Plots fuchsia candlesticks when the oscillator value is negative.
Numbers on Candles: Represents the breakout strength as a percentage change in price.
HOW TO USE
Install the Script: Add the script to your TradingView chart.
Customize Inputs:
Adjust the shortEmaPeriod, longEmaPeriod, signalEmaPeriod, and lookbackPeriod as needed.
Interpret the Charts:
Red Candles: Indicate a strong bullish trend, suggesting a potential buying opportunity.
White Candles: Indicate bullish signals that are not as strong but still suggest a buying opportunity.
Green Candles: Indicate weak bullish signals, suggesting a possible buying opportunity but with less confidence.
Yellow Candles: Indicate a positive trend, suggesting the market is in an uptrend.
Fuchsia Candles: Indicate a negative trend, suggesting the market is in a downtrend.
Numbers on Candles: Show the breakout strength as a percentage change in price.
Analyze Trends and Signals:
Use red candles to identify strong bullish signals, especially if the price has increased by more than 7% from the previous bar.
Monitor white and green candles for potential entries with lower confidence.
Avoid trading during fuchsia candles, as the market is in a downtrend.
MARKET MEANING AND TRADING USAGE
Strong Bullish Signal (Red Candles): Indicates a significant price increase and momentum, suggesting a strong buying opportunity.
Bullish Signal (White Candles): Suggests a buying opportunity but with less confidence compared to strong signals.
Weak Bullish Signal (Green Candles): Indicates a possible buying opportunity with even lower confidence.
Positive Trend (Yellow Candles): Suggests the market is in an uptrend.
Negative Trend (Fuchsia Candles): Suggests the market is in a downtrend.
Trading Strategy:
Buy: When a strong bullish signal is confirmed (red candle), especially if the price has increased by more than 7% from the previous bar.
Monitor: Watch for bullish signals (white candles) and weak bullish signals (green candles) for potential entries with lower confidence.
Avoid: During negative trends (fuchsia candles), as the market is in a downtrend.
LIMITATIONS
Simplicity: The implementation is based on a combination of moving averages and custom calculations, which might not capture all aspects of market dynamics.
Close Price Dependency: Uses close prices to determine trends and signals, which might not reflect intrabar price movements and trade imbalances accurately.
Historical Data: The script is based on historical data and does not guarantee future performance.
NOTES
Educational Tool: The script is designed for educational purposes and should not be considered financial advice.
Backtesting: Users are encouraged to backtest the strategy on a demo account before applying it to live trades.
Complementary Use: Best used in conjunction with other indicators and analysis methods for more accurate trading decisions.
THANKS
Special thanks to the TradingView community for their support and feedback.
Pivot Bsquad (Traditional and Fibonacci)Pivot Bsquad (Traditional & Fibonacci) - XAUUSD Scalping Indicator
The Pivot Bsquad Indicator is designed to provide high-precision support and resistance levels for scalping on XAUUSD (Gold). This tool combines Traditional Pivot Points and Fibonacci-based Pivot Points to help traders identify key price levels where reversals or breakouts are likely to occur.
Key Features:
1. Dual Pivot Calculation Modes:
Traditional Pivots: Calculated using classic formulas based on high, low, and close values, ideal for broader support and resistance zones.
Fibonacci Pivots: Incorporates Fibonacci ratios for more dynamic and nuanced levels, perfect for intraday scalping.
2. Color-Coded Zones:
Clear visual representation of support (S1, S2, S3) and resistance (R1, R2, R3) levels.
Enhanced with key pivot lines for quick decision-making.
3. Scalping-Friendly Design:
Optimized for short timeframes (e.g., 1-minute to 15-minute charts).
Highlights high-probability zones for reversals or continuation patterns.
4. Customizable Settings:
Toggle between Traditional and Fibonacci pivots to suit your trading style.
Adjustable timeframes for pivot calculation (Daily, Weekly, Monthly).
Ideal For
Scalpers looking to capitalize on XAUUSD's volatility.
Intraday traders who rely on precise support and resistance levels.
Technical traders seeking a reliable confluence of pivot strategies.
How to Use:
Select your preferred pivot mode (Traditional or Fibonacci) in the settings.
Observe price action around pivot levels for potential entry and exit points.
Use in conjunction with momentum oscillators or candlestick patterns for confirmation.
Note: While this indicator provides a solid framework for scalping, always consider risk management practices and market conditions.
kurd vipThis Pine Script™ code is a comprehensive trading indicator that combines several strategies, including CCI (Commodity Channel Index), Volume Weighted EMA (Exponential Moving Average), Long/Short signals, Supertrend, and an ATR-based trailing stop system (UT Bot Alerts). Here's an explanation of each component and its benefits for TradingView users:
### Indicator Overview:
1. **CCI with Volume Weighted EMA:**
- **CCI (Commodity Channel Index)** is used to identify cyclical trends in the price data. In this script, it's combined with a volume-weighted moving average to better reflect the price action by considering the volume of trading.
- A custom version of **Volume Weighted EMA** is implemented to smooth the price-volume relationship, which can give a clearer picture of market trends.
- **Long/Short Signals** are generated based on thresholds for CCI, helping traders identify potential entry points.
2. **Supertrend Indicator:**
- The **Supertrend** indicator is a trend-following system based on the Average True Range (ATR). It helps identify the current market trend (uptrend or downtrend) and provides signals to buy or sell accordingly.
- Supertrend lines are plotted on the chart, with green representing an uptrend and red representing a downtrend.
- This can be particularly useful for traders to stay aligned with the market direction and avoid entering trades against the trend.
3. **UT Bot Alerts with ATR Trailing Stop:**
- The **UT Bot** alert system uses an ATR-based trailing stop mechanism to track price movements and trigger buy or sell signals.
- The ATR (Average True Range) is used to determine volatility, which helps in setting dynamic stop levels based on market conditions.
- **Buy/Sell Alerts** are generated when price crosses the trailing stop levels, helping traders to stay in profitable trades while protecting against sudden reversals.
### Key Features and Benefits:
1. **Multi-Timeframe Analysis:**
- This script supports multiple timeframes (15 minutes, 5 minutes, 1 hour, 4 hours) for analyzing CCI and price data across different time horizons.
- It offers flexibility for traders to compare signals from different timeframes and make more informed decisions.
2. **Long and Short Signal Generation:**
- **Long signals** are generated when the CCI crosses above a specified threshold and a reversal condition is met (e.g., a green reversal candle in a lower timeframe).
- **Short signals** are generated when the CCI crosses below a specific threshold and a bearish candle appears, providing traders with opportunities to enter short positions.
3. **Customizable Parameters:**
- The indicator allows users to adjust key parameters such as the CCI length, EMA lengths, thresholds for long and short signals, ATR period, and sensitivity for the UT Bot. This customization gives traders the flexibility to tailor the indicator to their trading style.
4. **Supertrend for Trend Confirmation:**
- The integration of Supertrend offers additional trend confirmation, helping traders filter out false signals and focus on trades that align with the overall market direction.
5. **ATR-Based Trailing Stop:**
- The ATR trailing stop helps manage risk by dynamically adjusting stop levels based on market volatility. This is particularly beneficial for trend-following traders who want to lock in profits while allowing their trades to run.
6. **Visual Clarity:**
- The indicator displays clear and easy-to-understand shapes (e.g., triangles for long signals, labels for buy/sell) and plots (e.g., EMA, Supertrend lines), making it user-friendly and helping traders quickly interpret the data.
7. **Alert System:**
- Alerts are included for **Long**, **Short**, **Supertrend changes**, and **UT Bot signals**, ensuring traders are notified of key events in the market without constantly watching the chart.
### Conclusion:
This comprehensive indicator is well-suited for TradingView users who seek to combine multiple strategies into a single, customizable tool. It provides a complete solution by incorporating volume-weighted indicators, trend-following systems, and advanced risk management features like trailing stops. By using this script, traders can enhance their decision-making process with clear signals, trend confirmation, and dynamic risk management tools.
For anyone seeking to automate their analysis and receive real-time alerts on key trade signals, this script can be a powerful addition to their trading toolkit.