IPO Lifecycle Sell Strategy [JARUTIR]IPO Lifecycle Sell Strategy with Dynamic Buy Date and Multiple Sell Rules
This custom TradingView script is designed for traders looking to capitalize on dynamic strategies for IPOs and growth stocks, by implementing several sell rules based on price action and technical indicators. It provides a set of sell rules that are applied dynamically depending on the stock's lifecycle and price action, allowing users to lock in profits and minimize drawdowns based on key technical thresholds.
The four sell strategies incorporated into this script are inspired by the book "The Lifecycle Trade", a resource that focuses on capturing profits while managing risk in different phases of a stock's lifecycle, from IPO to high-growth stages.
Key Features:
Buy Price and Buy Date: You can either manually input your buy price and date or let the script automatically detect the buy date based on the specified buy price.
Multiple Sell Strategies: Choose from 4 predefined sell strategies:
Ascender Rule : Captures strong momentum from IPO stocks by selling portions at specific price levels or technical conditions.
Midterm Rule : Focuses on holding for longer periods, with defensive sell signals triggered when the stock deviates significantly from peak price or key moving averages.
40 Week Rule : Designed for long-term holds, this rule triggers a sell when the stock closes below the 40-week moving average.
Everest Rule : Aggressive strategy for selling into strength based on parabolic moves or gap downs, ideal for high momentum stocks.
Interactive Features:
Horizontal Green Line showing the buy price level from the buy date.
Visual Sell Signals appear only after the buy date to ensure that your analysis is relevant to the stock lifecycle.
Customizable settings, allowing you to choose your preferred sell rule strategy and automate buy date detection.
This script is perfect for traders using a strategic, systematic approach to IPOs and high-growth stocks, whether you're looking for quick exits during momentum phases or holding for longer-term growth.
Usage:
Input your Buy Price and Buy Date, or allow the script to automate the buy date detection.
Select a Sell Rule strategy based on your risk profile and trading style.
View visual signals for selling when specific conditions are met.
Frequently Asked Questions (FAQs):
Q1: How do I input my Buy Price and Buy Date?
The script allows you to either manually input the Buy Price and Buy Date or use the automated detection. If you choose automated detection, the script will automatically assign the buy date when the price crosses above your set Buy Price.
Q2: What is the purpose of the "Sell Rules"?
The script offers four sell strategies to help manage different types of stocks in varying phases of their lifecycle:
Ascender Rule: Targets IPO stocks showing positive momentum.
Midterm Rule: A defensive strategy for stocks in a steady uptrend.
40 Week Rule: Long-term hold strategy designed to ride stocks through extended growth.
Everest Rule: Aggressive strategy to capture profits during parabolic price moves.
Q3: What is the significance of the Green Line at Buy Price?
The Green Line represents your entry point (Buy Price) on the chart. It will appear from the buy date onwards, helping you track the performance of your stock relative to your entry.
Q4: Can I customize the Sell Strategy?
Yes! You can choose from the available Sell Rules (Ascender Rule, Midterm Rule, 40 Week Rule, Everest Rule) via an input option in the script. Each strategy has its own unique triggers based on price action, moving averages, and time-based conditions.
Q5: Does this script work for stocks and crypto?
Yes, this script is designed for both stocks and cryptocurrencies. It works on any asset where price data and timeframes are available.
Q6: How do the Weekly Moving Averages (WSMA) work in this strategy?
The script uses weekly moving averages (WSMA) to track longer-term trends. These are essential for some of the sell rules, such as the Midterm Rule and 40 Week Rule, which rely on the stock's movement relative to the 40-week moving average.
Q7: Will the script plot a Sell Signal immediately after the Buy Date?
No, sell signals will only be plotted after the Buy Date. This ensures that the sell strategy is relevant to your actual holding period and avoids premature triggers.
Q8: How do I interpret the Sell Signal?
The script will plot a Red Sell Signal above the bar when the sell conditions are met, based on the selected strategy. This indicates that it may be a good time to exit the position according to your chosen rule.
Q9: Can I use this strategy on different timeframes?
Yes, you can apply the script to any timeframe. However, some sell strategies, like the Midterm Rule and 40 Week Rule, are designed to work best with weekly data, so it's recommended to use these strategies with longer timeframes.
Q10: Does this script have any alerts?
Yes! The script supports alert conditions that will notify you when the sell conditions are met according to your selected rule. You can set up alerts to stay informed without needing to watch the chart constantly.
Q11: What if I want to disable some of the sell rules?
You can select your preferred sell rule using the "Select Sell Rule" dropdown. If you don’t want to use a particular rule, simply choose a different strategy or leave it inactive.
------------------------------
Disclaimer:
This strategy is intended for educational purposes only. It should not be considered financial advice. Always perform your own research and consult with a professional before making any trading decisions. Trading involves significant risk, and you should never trade with money you cannot afford to lose.
Portföy Yönetimi
Employee Portfolio Generator [By MUQWISHI]▋ INTRODUCTION :
The “Employee Portfolio Generator” simplifies the process of building a long-term investment portfolio tailored for employees seeking to build wealth through investments rather than traditional bank savings. The tool empowers employees to set up recurring deposits at customizable intervals, enabling to make additional purchases in a list of preferred holdings, with the ability to define the purchasing investment weight for each security. The tool serves as a comprehensive solution for tracking portfolio performance, conducting research, and analyzing specific aspects of portfolio investments. The output includes an index value, a table of holdings, and chart plots, providing a deeper understanding of the portfolio's historical movements.
_______________________
▋ OVERVIEW:
● Scenario (The chart above can be taken as an example) :
Let say, in 2010, a newly employed individual committed to saving $1,000 each month. Rather than relying on a traditional savings account, chose to invest the majority of monthly savings in stable well-established stocks. Allocating 30% of monthly saving to AMEX:SPY and another 30% to NASDAQ:QQQ , recognizing these as reliable options for steady growth. Additionally, there was an admired toward innovative business models of NASDAQ:AAPL , NASDAQ:MSFT , NASDAQ:AMZN , and NASDAQ:EBAY , leading to invest 10% in each of those companies. By the end of 2024, after 15 years, the total monthly deposits amounted to $179,000, which would have been the result of traditional saving alone. However, by sticking into long term invest, the value of the portfolio assets grew, reaching nearly $900,000.
_______________________
▋ OUTPUTS:
The table can be displayed in three formats:
1. Portfolio Index Title: displays the index name at the top, and at the bottom, it shows the index value, along with the chart timeframe, e.g., daily change in points and percentage.
2. Specifications: displays the essential information on portfolio performance, including the investment date range, total deposits, free cash, returns, and assets.
3. Holdings: a list of the holding securities inside a table that contains the ticker, last price, entry price, return percentage of the portfolio's total deposits, and latest weighted percentage of the portfolio. Additionally, a tooltip appears when the user passes the cursor over a ticker's cell, showing brief information about the company, such as the company's name, exchange market, country, sector, and industry.
4. Indication of New Deposit: An indication of a new deposit added to the portfolio for additional purchasing.
5. Chart: The portfolio's historical movements can be visualized in a plot, displayed as a bar chart, candlestick chart, or line chart, depending on the preferred format, as shown below.
_______________________
▋ INDICATOR SETTINGS:
Section(1): Table Settings
(1) Naming the index.
(2) Table location on the chart and cell size.
(3) Sorting Holdings Table. By securities’ {Return(%) Portfolio, Weight(%) Portfolio, or Ticker Alphabetical} order.
(4) Choose the type of index: {Assets, Return, or Return (%)}, and the plot type for the portfolio index: {Candle, Bar, or Line}.
(5) Positive/Negative colors.
(6) Table Colors (Title, Cell, and Text).
(7) To show/hide any of selected indicator’s components.
Section(2): Recurring Deposit Settings
(1) From DateTime of starting the investment.
(2) To DateTime of ending the investment
(3) The amount of recurring deposit into portfolio and currency.
(4) The frequency of recurring deposits into the portfolio {Weekly, 2-Weeks, Monthly, Quarterly, Yearly}
(5) The Depositing Model:
● Fixed: The amount for recurring deposits remains constant throughout the entire investment period.
● Increased %: The recurring deposit amount increases at the selected frequency and percentage throughout the entire investment period.
(5B) If the user selects “ Depositing Model: Increased % ”, specify the growth model (linear or exponential) and define the rate of increase.
Section(3): Portfolio Holdings
(1) Enable a ticker in the investment portfolio.
(2) The selected deposit frequency weight for a ticker. For example, if the monthly deposit is $1,000 and the selected weight for XYZ stock is 30%, $300 will be used to purchase shares of XYZ stock.
(3) Select up to 6 tickers that the investor is interested in for long-term investment.
Please let me know if you have any questions
Ticker Tape with Multiple Inputs# Ticker Tape
A customizable multi-symbol price tracker that displays real-time price information in a scrolling ticker format, similar to financial news tickers.
This indicator is inspired from Tradingciew's default tickertape indicator with changes in the way inputs are given.
### Overview
This indicator allows you to monitor up to 15 different symbols simultaneously across any supported exchanges on TradingView. It displays essential price information including current price, price change, and percentage change in an easy-to-read format at the bottom of your chart.
### Features
• Monitor up to 15 different symbols simultaneously
• Support for any exchange available on TradingView
• Real-time price updates
• Color-coded price changes (green for increase, red for decrease)
• Smooth scrolling animation (can be disabled)
• Customizable scroll speed and position offset
### Input Parameters
#### Ticker Tape Controls
• Running: Enable/disable the scrolling animation
• Offset: Adjust the starting position of the ticker tape
#### Symbol Settings
• Exchange (1-15): Enter the exchange name (e.g., NSE, BINANCE, NYSE)
• Symbol (1-15): Enter the symbol name (e.g., BANKNIFTY, RELIANCE, BTCUSDT)
### Display Format
For each symbol, the ticker shows:
1. Symbol Name
2. Current Price
3. Price Change (Absolute and Percentage)
### Example Usage
Input Settings:
Exchange 1: NSE
Symbol 1: BANKNIFTY
Exchange 2: NSE
Symbol 2: RELIANCE
The ticker tape will display:
`NIFTY BANK 46750.00 +350.45 (0.75%) | RELIANCE 2456.85 -12.40 (-0.50%) |`
### Use Cases
1. Multi-Market Monitoring: Track different markets simultaneously without switching between charts
2. Portfolio Tracking: Monitor all your positions in real-time
### Tips for Best Use
1. Group related symbols together for easier monitoring
2. Use the offset parameter to position important symbols in your preferred viewing area
3. Disable scrolling if you prefer a static display
4. Leave exchange field empty for default exchange symbols
### Notes
• Price updates occur in real-time during market hours
• Color coding helps quickly identify price direction
• The indicator adapts to any chart timeframe
• Empty input pairs are automatically skipped
### Performance Considerations
The indicator is optimized for efficiency, but monitoring too many high-frequency symbols might impact chart performance. It's recommended to use only the symbols you actively need to monitor.
Version: 2.0 Stock_Cloud
Last Updated: December 2024
Standard Deviation of Returns: DivergencePurpose:
The "Standard Deviation of Returns: Divergence" indicator is designed to help traders identify potential trend reversals or continuation signals by analyzing divergences between price action and the statistical volatility of returns. Divergences can signal weakening momentum in the prevailing trend, offering insight into potential buying or selling opportunities.
Key Components
1. Returns Calculation:
* The indicator uses logarithmic returns (log(close / close )) to measure relative price changes in a normalized manner.
* Log returns are more effective than simple price differences when analyzing data across varying price levels, as they account for percentage-based changes.
2. Standard Deviation of Returns:
* The script computes the standard deviation of returns over a user-defined lookback period (ta.stdev(returns, lookback)).
* Standard deviation measures the dispersion of returns around their average, effectively quantifying market volatility.
* A higher standard deviation indicates increased volatility, while lower standard deviation reflects a calmer market.
3. Price Action:
* Detects higher highs (new peaks in price) and lower lows (new troughs in price) over the lookback period.
* Price trends are compared to the behavior of the standard deviation.
4. Divergence Detection:
A divergence occurs when price action (higher highs or lower lows) is not confirmed by a corresponding movement in standard deviation:
Bullish Divergence: Price makes a lower low, but the standard deviation does not, signaling potential upward momentum.
Bearish Divergence: Price makes a higher high, but the standard deviation does not, signaling potential downward momentum.
5. Visual Cues:
The script highlights divergence regions directly on the chart:
Green Background: Indicates a bullish divergence (potential buy signal).
Red Background: Indicates a bearish divergence (potential sell signal).
How It Works
Inputs:
* The user specifies the lookback period (lookback) for calculating the standard deviation and detecting divergences.
Calculation:
* Each bar’s returns are computed and used to calculate the standard deviation over the specified lookback period.
* The indicator evaluates price highs/lows and compares these with the highest and lowest values of the standard deviation within the same lookback period.
Highlight of Divergences:
When divergences are detected:
Bullish Divergence: The background of the chart is shaded green.
Bearish Divergence: The background of the chart is shaded red.
Trading Application
Bullish Divergence:
* Occurs when the market is oversold, or downward momentum is weakening.
* Suggests a potential reversal to an uptrend, signaling a buying opportunity.
Bearish Divergence:
* Occurs when the market is overbought, or upward momentum is weakening.
* Suggests a potential reversal to a downtrend, signaling a selling opportunity.
Contextual Use:
* Use this indicator in conjunction with other technical tools like RSI, MACD, or moving averages to confirm signals.
* Effective in volatile or ranging markets to help anticipate shifts in momentum.
Summary
The "Standard Deviation of Returns: Divergence" indicator is a robust tool for spotting divergences that can signal weakening market trends. It combines statistical volatility with price action analysis to highlight key areas of potential reversals. By integrating this tool into your trading strategy, you can gain additional confirmation for entries or exits while keeping a close watch on momentum shifts.
Disclaimer: This is not a financial advise; please consult your financial advisor for personalized advice.
FXC NQ Opening Range Breakout Strategy V2.4Mechanical Strategy that trades breakouts on NQ futures on the 15min timeframe during the NYSE session. It's designed to manage Apex and Top Step accounts with the lowest risk possible.
Risk Disclaimer:
Past results as well as strategy tester reports do not indicate future performance. Guarantees do not exist in trading. By using this strategy you risk losing all your money.
Important:
It only trades on Monday, Wednesday and Friday and takes usually only 1 trade per trading day.
It works on the 15min timeframe only.
The settings are optimised already for NQ but feel free to change them.
How it works:
Every selected trading day it measures the range of the first 15min candle after the NYSE open. As soon as price closes above on the 15min timeframe, it will trade the breakout targeting a set risk to reward ratio. SL on the opposite side of the range. It will trail the SL after a set amount of points and uses a buffer of the set amount of points to trail it.
Settings:
Opening Range Time : This is the time of the day in hours and minutes when the strategy starts looking for trades. It's in the EST/ NY Timezone and set to 9:30-09:45 by default
because that's the NYSE open.
Session Time : This is the time of the day in hours and minutes until the strategy trades. It's in the EST/ NY Timezone and set to 09:45-14:45 by default.
because that's what gave the best results in backtesting. Open trades will get closed automatically once the end of the session is reached. No matter if win or loss. This is just to prevent holding positions over night.
Session Border This setting is to select the border color in which the session box will be plotted.
Opening Range Box This setting is to select the fill color of the opening range box.
Opening Range Border This setting is to select the border color of the session box.
Trade Timeframe This setting determines on which timeframe candle has to close outside the opening range box in order to take a trade. It's set to 15min by default because this is what worked by far the best in backtests and live trading.
Stop Loss Buffer in Points: This is simply the buffer in points that is added to the SL for safety reasons. If you have it on 0, the SL will be at the exact price of the opposite side of the range. By default it's set to 0 pips because this is what delivered the best results in backtests.
Profit Target Factor: This is simply the total SL size in points multiplied by x.
Example: If you put 2, you get a 1:2 Risk to Reward Ratio. By Default it's set to 4 because this gave the best results in backtests, because trades always get closed either by trailing SL or because the end of the session is reached.
Use Trailing Stop Loss: This setting is to enable/ disable the trailing stop loss. It's enabled by default because this is a fundamental part of the strategy.
Trailing Stop Buffer: This setting determines after how many points in profit the trailing SL will be activated.
Risk Type: You can chose either between Fixed USD Amount, Risk per Trade in % or Fixed Contract Size. By default it's set to fixed contract size.
Risk Amount (USD or Contracts): This setting is to set how many USD or how many contracts you want to risk per trade. Make sure to check which risk type you have selected before you chose the risk amount.
Use Limit Orders If enabled, the strategy will place a pending order x points from the current price, instead of a market order. Limit orders are enabled by default for a better performance. Important: It doesn't actually place a limit order. The strategy will just wait for a pullback and then enter with a market order. It's more like a hidden limit order.
Limit Order Distance (points): If you have limit orders enabled, this setting determines how many points from the current price the limit order will be placed.
Trading Days: These checkboxes are to select on which week days the strategy has to trade. Thursday is disabled by default because backtests have shown that Thursday is the least profitable day
Backtest Settings:
For the backtest the commissions ere set to 0.35 USD per mini contract which is the highest amount Tradeovate charges. Margin was not accounted for because typically on Apex accounts you can use way more contracts than you need for the extremely low max drawdown. Margin would be important on personal accounts but even there typically it's not an issue at all especially because this strategy runs on the 15min timeframe so it won't use a lot of contracts anyways.
What makes it unique:
This script is unique because it's designed to be used on Apex and Top Step accounts with extremely strict drawdown rules.
The strategy is optimised to be traded with a fixed contract size instead of using % risk. The reason for that is that the drawdown rules of these Futures Prop Accounts are very strict and the fact that the smallest trade-able contract size is 1.
Why the source code is hidden:
The source code is hidden because I invested a lot of time and money into developing this strategy and optimising it with paid 3rd party software. Also since I use it myself on my Apex accounts and prop firms don't allow copy trading I don't want it to be used by too many traders.
US Recessions OverlayThe US Recessions Overlay indicator highlights the periods of US economic recessions directly on your TradingView chart. Using historical data from the Great Depression to the present, it provides a visual representation of recessions as transparent red backgrounds. This can help traders and analysts correlate market movements with historical economic downturns.
Features:
- Displays US recessions since the Great Depression (1929) as shaded areas.
- Automatically adjusts the background shading to match the date ranges of historical recessions.
- A simple and effective way to observe market behavior during recessionary periods.
- Fully customizable to include new recession periods or modify transparency levels.
How to Use:
Apply the indicator to any chart. Recession periods will appear as red-shaded backgrounds, providing a clear visual cue for market behavior during those times.
Use Case:
Ideal for traders, economists, and market historians who wish to study the impact of recessions on financial markets.
MES Position Sizing EstimatorDescription and Use:
Here is an indicator which aims to help all Micro-ES futures traders who struggle with risk management! I created this indicator designed as a general guideline to help short term traders (designed for 1 minute candles) determine how many contracts to trade on the MES for their desired profit target.
To use the indicator, simply go to MES on the 1 minute timeframe, apply the indicator, and enter your Holding Period (how long you want to have your position open for), Value Per Tick
(usually 1.25 for MES since one point is $5) and your target PnL for the trade in the inputs tab.
It will then show in a table the recommended position sizing, as well as the estimated price change for your holding period. Additionally, there are two plotted lines also showing the position sizing and estimated price change historically.
How the indicator works
On the technical level, I made calculations for this indicator using Python. I downloaded 82 days of 1 minute OHLC data from TradingView, and then ran regression (log-transformed linear regression specifically) to calculate how the average price change in MES futures scales with the amount of time a position is held for, and then ran these regressions for every hour of the day. I then copied the equations from those regressions into Pinescript, and used the assumption that:
position size = target PnL / (estimated price change for time * tick value)
Therefore, Choosing the number of contracts to trade position sizing for Micro E-mini S&P 500 Futures (MES) based on time of day, holding period, and tick value. This tool leverages historical volatility patterns and log-transformed linear regression models to provide precise recommendations tailored to your trading strategy.
If you want to check out how the regression code worked in python, it is all open source and available on my Github repository for it .
Notes:
The script assumes a log-normal distribution of price movements and is intended as an educational tool to aid in risk management.
It is not a standalone trading system and should be used in conjunction with other trading strategies and risk assessments.
Past performance is not indicative of future results, and traders should exercise caution and adjust their strategies based on personal risk tolerance.
This script is open-source and available for use and modification by the TradingView community. It aims to provide a valuable resource for traders seeking to enhance their risk management practices through data-driven insights.
IBD Market School [tradeviZion]IBD Market School Indicator: User Guide and Settings Reference
A comprehensive guide to configuring and using the IBD Market School indicator for TradingView
Introduction
The IBD Market School indicator is an advanced market analysis tool that implements Investor's Business Daily's methodology for identifying optimal trading opportunities. By tracking key market indexes and analyzing price and volume patterns, it provides actionable buy and sell signals based on the CANSLIM investment system.
The indicator offers a comprehensive set of features:
Complete Signal System
10 primary buy signals (B1-B10)
Additional buy-side indicators (HH - Higher High, ED - Expired Days)
14 sell signals (S1-S14)
Index Rise 6% signal for Distribution/Stalling Day expiration
Market Health Tracking
Distribution Day detection and counting
Stalling Day identification and validation
Automatic 25-day signal expiration
6% price rise monitoring for signal clearing
Market Condition Analysis
Rally Day detection (major and minor)
Follow-Through Day confirmation
Dynamic market exposure management (0-100%)
Power Trend analysis with multiple states
Risk Management Features
Circuit Breaker system for major declines
Buy Switch system for exposure control
Customizable volume analysis (Nasdaq/S&P 500)
Distribution day clustering detection
Visual Analysis Tools
IBD-style candle display option
Power Trend state visualization
Signal line drawing system
Customizable tooltips and alerts
Proper configuration of the indicator's settings is essential as it affects:
Signal detection sensitivity and accuracy
Market exposure calculations and adjustments
Volume confirmation requirements
Visual display of market conditions and signals
Alert system behavior and notifications
This guide provides detailed explanations of each component and setting to help you optimize the indicator for your trading strategy while maintaining adherence to IBD's proven methodology.
📊 General Settings
This section controls the indicator's tooltip display, alert behavior, and candle visualization preferences.
The General Settings panel allows you to configure tooltip modes, alert types, and candle appearance.
Tooltip Display Mode
Select how detailed the tooltips should be when hovering over signals and indicators:
The three tooltip display modes: Simple (left), Detailed (center), and Market Analysis (right).
Simple Mode
Displays concise signal definitions
Shows basic entry and exit conditions
Focuses on essential trigger points
Perfect for experienced traders
Detailed Mode
Provides in-depth explanations of each buy/sell signal
Shows complete validation criteria and conditions
Includes volume requirements and percentage thresholds
Explains the context and significance of each signal
Market Analysis Mode
Focuses on broad market health metrics
Shows market exposure percentage and trend
Displays buy switch and power trend status
Tracks distribution days and signal buffers
Note: Choose the tooltip mode based on your needs:
- Simple: Provides quick, essential information on signals for fast decision-making
- Detailed: Breaks down conditions for each buy/sell signal, ideal for users wanting in-depth explanations
- Market Analysis: Focuses on broad market health, including exposure, buy switch, distribution days, and trends
Market Exposure Alert System
The indicator alerts you when market exposure levels change, helping you adjust your positions accordingly.
Alert Types
On Close (Recommended)
Triggers only after bar closes
More reliable signals as price action is confirmed
Real-Time
Triggers immediately when conditions are met
Note: Signals may change by bar close
Setting Up Alerts
Click the "..." (More) button on the indicator label "$tradeviZion - IBD Market School"
Select "Add alert on $tradeviZion - IBD Market School..."
In the Create Alert dialog:
Settings tab:
Verify the symbol and timeframe (e.g., NASDAQ:IXIC , 1D)
Condition: Select "$tradeviZion - IBD Market School"
Alert function: Choose "Any alert() function call"
Expiration: Set to "Open-ended alert"
Alert name will auto-populate
Switch to Notifications tab:
Enable "Notify in app" for push notifications in the mobile app
Enable "Show toast notification" for on-screen alerts
Enable "Play sound" and customize duration (e.g., Thin, 10 seconds)
Optional settings:
Send email (requires profile settings configuration)
Webhook URL for POST requests
Send plain text for alternative email format
Click Create to activate the alert
Alert Messages
Message format: "Market exposure change for : Market exposure from % to %"
Example: "Market exposure change for NASDAQ:IXIC : 📈 Market exposure reduced from 100% to 75%"
📈 Arrow indicates exposure increase
📉 Arrow indicates exposure decrease
Messages include previous and new exposure percentages
Note: These alerts specifically track changes in market exposure levels, helping you stay aligned with market conditions. They are essential for maintaining proper position sizing and risk management.
Chart Style Options
IBD-style Candles
Enable to match Investor's Business Daily chart style
For MarketSmith style setup, right-click on chart and go to Settings
Navigate to Symbol tab
Uncheck Body, Borders, and Wicks
Press Alt+R to restore chart view if zoom affects display
To revert to original style, right-click on chart and go to Settings
Navigate to Symbol tab
Check Body, Borders, and Wicks
Color Based on Previous Close
Colors bars based on close vs. previous close
When enabled, determines colors by comparing current close to previous close
Use blue color for closes above previous
Use pink color for closes below previous
📈 Market Exposure Table Settings
Configure how the market exposure information is displayed on your chart.
The Market Exposure Table Settings panel allows you to customize the appearance and layout of the market status display.
Layout Options
• Hide Table
Completely hides the market status display
• Basic (2 Columns)
Shows main indicators in two columns
Compact view without signal list
Ideal for minimalist chart view
• Detailed (2 Columns with Signals)
Displays main indicators plus signal panel
Shows Buy and Sell signals in separate columns
Provides comprehensive market overview
• Stacked (1 Column, Compact)
Vertical layout with single column
Most space-efficient option
Ideal for smaller chart windows
Color Settings
Background : Dark gray background for the table
Text : White text for general information
Buy Signal : Green highlighting for buy signals
Sell Signal : Red highlighting for sell signals
Additional Options
Show Trading Wisdom: Enable rotating trading messages
Displays empowering trading messages
Helps reinforce disciplined trading practices
Updates every 5 bars with new wisdom
Includes tooltips with comprehensive trading guidance
Customizable yellow text color for messages
💹 Buy Signals Settings
This section controls the visibility and behavior of buy signals and related indicators.
The Buy Signals Settings panel allows you to configure signal visibility, volatility calculations, and visual appearance of buy signals.
Signal Display Options
Buy Signals Display : Choose display mode
Show Selected Signals
Hide All
Compact Signals
Individual Signal Toggles
Primary Buy Signals (B1-B10)
Special Indicators (HH, ED)
Understanding Buy Signals
B1: Follow-Through Day (FTD)
Buy on the initial FTD with volume higher than the previous day. You may use an FTD from an index other than the NASDAQ:IXIC , but if you do, you must stay within that index for future Buy and Sell Signals.
B2: Additional Follow-Through
Buy on all additional follow-through days within 25 days from a rally day that closes above the low of the initial follow-through day.
B3: Low Above EMA21
Buy on an up or flat day when the intraday low is at or above the EMA21. Note: Once you have a B3 or B4, you can't have another until it is reset by an S5.
Special Buy Indicators
HH: Higher High (No FTD after Rally)
Triggers when current close exceeds highest point since last confirmed rally. Must not have a Follow-Through Day (FTD). Buy switch turns on when close exceeds last rally's high and turns off if close drops below that high.
ED: Expired Days
Tracks Distribution and Stalling days that have aged out. Days are tracked for a specific trading period and expired days are removed from the count.
Index Rise Settings
Index Rise 6% from DD & SD
Toggle to enable/disable monitoring of price rises above Distribution and Stalling Days. Default value of 6% (adjustable) for monitoring rises above these days.
Understanding Index Rise
This feature tracks significant market recoveries by monitoring when the index rises substantially above Distribution Days (DD) or Stalling Days (SD). When the index rises 6% or more above the closing price of any DD or SD, it indicates a strong market recovery. This is an important signal because it helps identify when the market has shown enough strength to potentially overcome previous distribution periods. When triggered, this signal reduces the distribution day count, effectively acknowledging that the previous distribution pattern may no longer be as relevant due to the market's strong recovery.
B1 Signal Configuration
Volatility Settings
B1 Auto Volatility: Calculates FTD price requirement based on 200-day volatility
B1 Manual Volatility: Fixed value (default 1.245) when auto is disabled
Visual Settings
Label Size: Small (options: Tiny, Small, Normal, Large)
Signal Color: Light green background for buy signals
Text Color: Customizable text color for signal labels
Important Notes
Signal visibility affects both chart display and calculations
Auto volatility is recommended for most users
Manual volatility should only be adjusted by experienced users
Visual settings apply to all enabled buy signals
Confirmation Rules
Price Requirements
Follow-Through Day (B1) thresholds based on 200-day volatility:
Below 0.4% volatility: 0.7% gain required
0.4% to 0.55% volatility: 0.85% gain required
0.55% to 1% volatility: 1% gain required
Above 1% volatility: 1.245% gain required
EMA Breaks (S5/S6): 0.2% threshold below 21 EMA
Downside Reversal (B9): 1.75% high-to-low spread required
Volume Requirements
Distribution Days: Volume > previous day, with -0.20% or more price decline
Stalling Days: Volume ≥ 95% of previous day
Follow-Through Days (B1/B2): Volume > previous day
Accumulation Days (B7): Volume > previous day, close in upper 25% range
Sell Signals Settings
This section controls the visibility and behavior of sell signals and market weakness indicators.
The Sell Signals Settings panel allows you to configure signal visibility and visual appearance of sell signals and market health indicators.
Signal Display Options
Sell Signals Display: Dropdown with options to control signal visibility:
Show Selected Signals
Hide All
Compact Signals
Individual Signal Toggles
Primary Sell Signals: S1-S14 and CB (Circuit Breaker)
Market Health Indicators:
Distribution Days (DD): Indicative of institutional selling. Occurs when:
Market closes down by at least 0.2%
Volume greater than or equal to prior day
Tracked for 25 trading days
Stalling Days (SD): Sign of heavy volume without upside progress. Occurs when:
Market at/near new highs
Closes with small gain (0% to 0.4%)
High volume in lower half of day's range
Understanding Sell Signals
S1: Follow-Through Day Undercut
Sell if the index closes below the low of the initial follow-through day.
S2: Failed Rally Attempt
Sell if the index undercuts the major low of the rally attempt. Market exposure is reduced to zero and the Buy Switch is turned off.
S2ml: Minor Low Undercut
Minor Low undercut of rally attempt. Market exposure is reduced by two. This does not turn off the Buy Switch.
S3: Full Distribution Minus One
Sell after the distribution count increases to one less than the full distribution count.
S4: Full Distribution
Sell after reaching the full distribution count.
S5: Break Below EMA21
Sell if the index closes 0.2% or more below the EMA21. Note: Once you have an S5, S6, or S7, you can't have another until it is reset by a B3.
S6: Overdue Break Below EMA21
Sell if the index closes down 0.2% or more below the EMA21 after 30 days have passed since the last B3 without triggering an S5.
S7: Trending Below EMA21
Sell after S5 on the 5th consecutive day that the high is below the EMA21 and a down day.
S8: Living Below EMA21
Sell after S5 on the 10th and every 5th consecutive day after that (15th, 20th, 25th, etc.) that the high is below the EMA21.
S9: Break Below 50-Day MA
Sell if the index closes below the 50-Day Moving Average. Triggers only if a B6 signal was previously printed.
S10: Bad Break
Sell if the close is down 2.25% or greater in the bottom 25% of the range. Close below the MA50 or intraday high below EMA21.
S11: Downside Reversal
Sell after a Downside Reversal Day, which occurs with:
New High within 13 weeks
Close in bottom quartile of range
Close Down for the day
Spread of 1.75% or greater
S12: Lower Low
Sell after closing below the last marked low as defined by MarketSmith.
S13: Distribution Cluster
Distribution and stalling days increase to four up to eight days within a rolling eight-day period.
S14: Break Below Higher High
Sell after closing below the last marked high that printed a B8 (Higher High).
CB: Circuit Breaker
Triggers when the index drops 10% from the highest high since the FTD (B1) and falls 5% or more below the 50-Day MA intraday.
Buy/Sell Undercut Lines
This section controls the visibility and appearance of important price level lines on your chart.
The Buy/Sell Undercut Lines panel allows you to configure which signal lines are displayed and their visual appearance.
Line Visibility
Buy Signal Lines :
B8 Line: First high above the last pivot high
HH Line: Close above the prior high since last confirmed rally without FTD
Sell Signal Lines :
S1 Line: Close below the initial follow-through day
S2 Line: Undercut of major low
S2ml Line: Minor low undercut
S12 Line: Close below last marked low
S14 Line: Close below last marked high
Line Appearance
Color Settings :
B8: Green (Buy signal)
HH: Green (Buy signal)
S1: Red (Sell signal)
S2: Red (Sell signal)
S2ml: Orange (Modified sell signal)
S12: Purple (Pivot low signal)
S14: Blue (Close below pivot)
Line Style : Dashed (options: solid, dotted, dashed)
Line Width : 1 (adjustable)
📈 Rally Signal Settings
The Rally Signal Settings panel allows you to configure Rally Day detection and visualization.
Rally Day:
Toggle to enable/disable Rally Day signals. These mark the beginning of potential market uptrends when the market closes higher than the previous day, following a significant decline.
Visual Settings:
Label Size: small (options: tiny, small, normal, large)
Background Color: Customizable background for Rally Day labels
Text Color: Customizable text color for Rally Day labels
Distribution Day Settings:
Use Manual FullDDcount: Option to manually set the minimum combined number of Distribution and Stalling Days
Count Value: Default is 6 days (adjustable when manual mode is enabled)
This setting determines how many Distribution/Stalling Days are required to trigger a new rally
Pivot Point Settings
The Pivot Point Settings panel allows you to configure the display of high/low points and percentage changes between pivots.
Display Options
Display H/L Points
Toggle to show or hide pivot levels (high and low points) on the chart
%Change
Toggle to display percentage changes between pivot points
Color Settings
Positive % Color : Blue (customizable) - Used for positive percentage changes
Negative % Color : Pink (customizable) - Used for negative percentage changes
Precision Settings
Decimal Places: Set the number of decimal places (default: 2) for:
Pivot point price levels
Percentage change calculations
⚡ Power Trend Settings
This section controls how Power Trend information is visualized on your chart.
The Power Trend Settings panel allows you to configure how trend states are displayed and customize their visual appearance.
Example of Power Trend visualization showing both boxes (green background) and trend lines. The boxes indicate trend state while lines show trend transitions.
Display Options
Show Power Trend Line : Display trend states as lines on the chart
Show Boxes : Display trend states as boxes
Show Background : Display trend states as background colors
Power Trend Color Settings
On : Light green - Full power trend active
Resume : Light green - Power trend resuming
Off : Gray - Power trend inactive
With Floor : Yellow - Under pressure with support
No Floor : Orange - Under pressure without support
Power Trend Line Settings
Line Width : Set line thickness (default: 1)
Line Offset : Adjust line position (default: 5)
Power Trend Box Settings
Text Align : Set text alignment (left, center, right)
Text Position : Set vertical position (top, middle, bottom)
Size : Set box size (tiny, small, normal, large)
Color : Customize box background color
Power Trend States
Full Power (On)
Represents strongest market condition with maximum exposure of +7
Base maximum exposure of 5 plus 2 buffer signals
Buffer allows maintaining high exposure during normal pullbacks
2 sell signals reduce count from 7 to 5 without affecting base
Indicates very healthy market that can absorb normal profit-taking
Resume State
Shows successful market recovery after pressure period
Requires 10+ days without S2 minor, S9, or S13 signals
Must reestablish all initial strength conditions
Maintains same benefits as Full Power (+7 max, +2 floor)
Shows as light green in visualization
Under Pressure With Floor
First warning stage triggered by S2 minor or S13 signals
Reduces maximum exposure to +5
Maintains minimal protection with +1 floor
Suggests defensive positioning while keeping core positions
Shows as yellow in visualization
Under Pressure No Floor
Severe warning stage triggered by S9 signal
Maintains +5 maximum exposure but removes floor protection
Indicates higher risk of continued market decline
Requires careful position management
Shows as orange in visualization
Power Trend Off
Triggered by EMA/MA crossdowns with declining price
Can also be activated by S2 or Circuit Breaker signals
Maximum exposure limited to +5 with no buffer signals
Suggests focus on capital preservation
Shows as gray in visualization
Power Trend System Rules
Each state enforces strict exposure limits with automatic floor and ceiling adjustments
Power Trend can activate Buy Switch when entering Full Power state
Restraint Rule limits exposure to +2 until significant progress or B4 signal when starting from zero exposure
State transitions immediately update exposure limits and Buy Switch status
Distribution Cluster (S13) can move Power Trend to Under Pressure With Floor state
System maintains exposure floors to prevent panic selling while allowing flexibility below floor levels
Weekly SMAs Settings
The Weekly SMAs Settings panel allows you to configure the weekly moving averages display and calculations.
SMA 1: 10 periods (enabled), Red
Length: 10
Optional EMA toggle
Width: 1
SMA 2: 20 periods, Pink
Length: 20
Optional EMA toggle
Width: 1
SMA 3: 30 periods, Green
Length: 30
Optional EMA toggle
Width: 1
SMA 4: 40 periods (enabled), White
Length: 40
Optional EMA toggle
Width: 1
SMAs Settings
The SMAs Settings panel allows you to configure the daily moving averages display and calculations.
MA 1: 10 periods, Optional EMA, Pink
Length: 10
Optional EMA toggle
Width: 1
MA 2: 21 periods (enabled), EMA, Green
Length: 21
EMA enabled
Width: 1
MA 3: 50 periods (enabled), SMA, Red
Length: 50
EMA disabled
Width: 1
MA 4: 200 periods (enabled), SMA, White
Length: 200
EMA disabled
Width: 1
Volume Settings (NASDAQ & S&P 500)
This section controls volume data sources for market analysis. Proper volume settings are crucial for confirming market signals and analyzing institutional participation.
The Volume Settings panel allows you to configure volume data sources and custom ticker options for accurate market analysis.
Important Volume Source Information
TradingView's default volume data differs from IBD's Yahoo Finance data source
Current default settings (IXIC and TVOL) provide the most accurate results compared to IBD signals
Volume differences between TradingView and IBD are expected due to different data sources
Custom ticker options are provided for future compatibility with Yahoo Finance volume data
Volume Configuration
Nasdaq Volume Settings
Default Source: NASDAQ:IXIC (Nasdaq Composite Index)
Custom Ticker Option: USI:TVOL.NQ
Enable custom source by checking "Use Custom Nasdaq Ticker?"
Note: Custom ticker must be price-based for accurate volume analysis
S&P 500 Volume Settings
Default Source: TVOL (S&P 500 Total Volume)
Custom Ticker Option: USI:TVOL.NY
Enable custom source by checking "Use Custom S&P 500 Ticker?"
Note: Custom ticker must be price-based for accurate volume analysis
Volume Analysis Impact
Used for Distribution Day confirmation
Required for Follow-Through Day validation
Helps identify institutional buying/selling
Critical for Stalling Day detection
Recommendations
Keep default settings for most accurate current results
Only use custom tickers if you have confirmed price-based volume sources
Be aware that volume-based signals might slightly differ from IBD due to data source differences
Future updates may add Yahoo Finance volume compatibility
Market Status Table
The Market Status Table provides a real-time visual overview of current market conditions and signal status. Users can customize the table's appearance through the Market Exposure Table Settings.
The Market Status Table can be displayed in three different layouts: Basic (left), Detailed (center), and Stacked (right).
Layout Options
Hide Table
Completely hides the market status display
Basic (2 Columns)
Shows main indicators in two columns
Compact view without signal list
Ideal for minimalist chart view
Detailed (2 Columns with Signals)
Displays main indicators plus signal panel
Shows Buy and Sell signals in separate columns
Provides comprehensive market overview
Stacked (1 Column, Compact)
Vertical layout with single column
Most space-efficient option
Ideal for smaller chart windows
Main Indicators
• Market Exposure
Displayed as colored dots: 🟠 🟢 🟢 🟢 🟢
Shows current exposure level (0-100%)
(⚪ ⚪ ⚪ ⚪ ⚪): 0% exposure
(🟠 ⚪ ⚪ ⚪ ⚪): 30% exposure
(🟠 🟡 ⚪ ⚪ ⚪): 55% exposure
(🟠 🟡 🟢 ⚪ ⚪): 75% exposure
(🟠 🟡 🟢 🟢 ⚪): 90% exposure
(🟠 🟡 🟢 🟢 🟢): 100% exposure
• Key Status Indicators
Buy Switch: Shows ON (forced) or OFF status
Power Trend: Displays current state with floor and maximum values
Restraint Rule: Indicates ON or OFF status
Count / Signals Buffer: Shows current count and available buffer (e.g., "7 / (+0)")
Dist. Days / Cluster: Displays distribution day count and cluster status (e.g., "1 / 0")
• Signal Panel (Available in Detailed layout)
Lists all active Buy and Sell signals
Highlighted signals indicate currently active conditions
Green highlighting shows confirmed signals
Provides quick reference for all available signals
Status Indicator Colors
🟢 indicates "ON" or positive conditions (e.g., Buy Switch ON, Power Trend Full Power)
🟡 indicates "Under Pressure" or caution (e.g., Power Trend Under Pressure With Floor)
🟠 indicates "Under Pressure No Floor" or increased caution
🔴 indicates "OFF" or negative conditions (e.g., Buy Switch OFF, Power Trend OFF)
• Signal Colors
Green background for buy signals
Red background for sell signals
Black text on signal backgrounds for better visibility
• Number Formats
Count / Buffer signals shown as "7 / (+2)"
Distribution Days / Cluster count shown as "1 / 0"
Exposure percentage shown with dots (e.g., "90%")
Trading Wisdom - Market Risk Management
"The key to successful trading is not just knowing when to enter, but managing your exposure based on market health. Always check two critical indicators before any trade:
1. Market Exposure Levels
100% (5 dots): Full positions in strong market
90% (4 dots): Slightly reduced positions
75% (3 dots): Moderate positions, more cautious
55% (2 dots): Half positions only
30% (1 dot): Small positions only
0% (0 dots): Stay in cash
2. Distribution Days Risk Levels
1-2 Days: Normal market behavior
3 Days: Caution - reduce new positions
4+ Days: High risk - defensive positioning
5-6 Days: Consider moving to cash
Remember: It's better to miss an opportunity than to catch a falling market. Let the Market Exposure Table be your guide to smart position sizing."
Pro Tip: Make checking these two indicators part of your daily routine. They're your first line of defense against major drawdowns.
Conclusion
The IBD Market School indicator brings William O'Neil's proven methodology to TradingView, providing a comprehensive system for market analysis and risk management. This tool automates the complex task of tracking market signals while maintaining strict adherence to IBD's time-tested principles.
Key Features
Follows IBD's core methodology for identifying market direction
Automates tracking of Distribution Days, Follow-Through Days, and market signals
Provides clear market exposure guidance through the Power Trend system
Helps maintain discipline through systematic Buy Switch control
Offers multiple layers of risk management
Best Practices
Always check Market Exposure and Distribution Day count before making trades
Let the Buy Switch guide your market participation
Follow Power Trend states for proper position sizing
Use the default volume settings for most accurate signal generation
Monitor all confirmation rules for proper signal validation
Remember: This indicator is designed to replicate IBD's methodology as closely as possible within TradingView's environment. While it automates signal detection and exposure management, successful trading still requires discipline, patience, and strict adherence to risk management principles.
"The goal is not to be right about the market - it's to make money by following the market's signals and managing risk."
DCA Valuation & Unrealized GainsThis Pine Script for TradingView calculates and visualizes the relationship between a Dollar Cost Average (DCA) price and the All-Time High (ATH) price for over 50 different cryptocurrencies. Here's what it does:
1. Inputs for DCA Prices:
- Users can manually input DCA prices for specific cryptocurrencies (e.g., BTC, ETH, BNB).
2. Dynamic ATH Calculation:
- Dynamically calculates the ATH price for the current asset using the highest price in the chart's loaded data and persists this value across bars.
3. Percentage Change from DCA to ATH:
- Computes the percentage gain from the DCA price to the ATH price.
4. Visualizations:
- Draws a line at the DCA price and the ATH price, both extended to the right.
- Adds an arrow pointing from the DCA price to the ATH, offset by 10 bars into the future.
- Displays labels for:
- The percentage gain from DCA to ATH.
- "No DCA Configured" if no valid DCA price is set for the asset.
5. Color Coding:
- Labels and arrows are color-coded to indicate positive or negative percentage changes:
- Green for gains.
- Red for losses.
6. Adaptability:
- The script dynamically adjusts to the current asset based on its ticker and uses the corresponding DCA price.
This functionality provides traders with clear insights into their investment's performance relative to its ATH, aiding in decision-making.
-----
To add a new asset to the script:
1. Define the DCA Input: Add a new input for the asset's DCA price using the `input.float` function. For example:
dcaPriceNEW = input.float(title="NEW DCA Price", defval=0.1, tooltip="Set the DCA price for NEW")
2. Add the Asset Logic: Include a conditional check for the new asset in the ticker matching logic:
if str.contains(currentAsset, "NEW") and dcaPriceNEW != 0
dcaPrice := dcaPriceNEW
Where NEW is the ticker symbol of the asset you're adding.
NOTE: SOLO had to be put before SOL because otherwise the indicator was pulling the DCA price from SOL even on the SOLO chart. If you have a similar issue, try that fix.
Adding an asset requires only these two changes. Once done, the script dynamically incorporates the new asset into its calculations and visualizations.
IU VaR (Value at Risk) Historical MethodThis Pine Script indicator calculates the **Value at Risk (VaR)** using the **Historical Method** to help traders understand potential losses during a given period( Chart Timeframe) with a specific level of confidence.
What is Value at Risk (VaR) ?
Value at Risk (VaR) is a measure used in finance to estimate the potential loss in value of an asset, portfolio, or investment over a specific time period, given normal market conditions, and at a certain confidence level.
Example:
Suppose you invest ₹1,00,000 in stocks. A VaR of 5% at a 95% confidence level means:
- There is a **95% chance** that you won’t lose more than **₹5,000** in a day.
- Conversely, there is a **5% chance** that your loss could exceed ₹5,000 in a day.
VaR is a helpful tool for understanding risk and making informed investment decisions!
How It Works:
1. The indicator calculates the percentage difference between consecutive bars.
2. The differences are sorted, and the VaR is determined based on the assurance level you specify.
3. A label displays the VaR value on the chart, indicating the potential maximum loss with the selected assurance level within one period eg - ( 1h, 4h , 1D, 1W, 1M etc as per your chart timeframe )
Key Features:
- Customizable Assurance Level:
Set the confidence level (e.g., 95%) to determine the probability of loss.
-Historical Approach:
Uses the past percentage changes in price to calculate the risk.
-Clear Insights:
Displays the calculated VaR value on the chart with an informative tooltip explaining the risk.
Use this tool to better understand your market exposure and manage risk!
Leveraged Chart with Financing, Portfolio DCA & NormalizationLeveraged Investment Simulator with Portfolio DCA & Performance Metrics
Overview:
This indicator helps simulate leveraged investment strategies, incorporating financing costs, Dollar Cost Averaging (DCA), and performance metrics. Ideal for analyzing leveraged growth on price charts or managing portfolios with periodic contributions.
Key Features:
Dual Simulation Modes:
- Chart Mode: Simulate leveraged growth directly on the price chart.
- Portfolio Mode: Track portfolio performance with periodic DCA contributions.
Leverage & Financing Fees:
- Adjustable leverage multiplier.
- Annual financing fees to model borrowing costs.
Dollar Cost Averaging (DCA):
- Set an initial investment and recurring deposit amounts.
- Choose contribution frequency: Monthly, Quarterly, or Yearly.
Performance Metrics:
- Sharpe Ratio: Evaluate risk-adjusted returns.
- Sortino Ratio: Assess downside risk-adjusted performance.
- Maximum Drawdown: Measure the largest decline from a peak.
Customizable Labels:
- Enable or disable specific sections, such as portfolio details and risk metrics.
Inputs:
Symbol selection (default: AAPL).
Data timeframe (e.g., daily, weekly, monthly).
Leverage multiplier and annual financing fees.
Portfolio options: Initial investment, deposit amounts, and frequencies.
Performance analysis options, including a customizable risk-free rate for Sharpe/Sortino ratios.
Toggleable label sections for focused analysis.
How to Use:
Add the indicator to your chart.
Configure the inputs to match your strategy (e.g., leverage factor, financing rates, DCA settings).
Toggle on/off the label sections to display relevant metrics.
Analyze the results:
Chart Mode: Observe leveraged growth on the price chart.
Portfolio Mode: Track portfolio growth, contributions, and performance metrics.
Benefits:
Simulate realistic scenarios with leverage, financing costs, and periodic investments.
Assess performance with advanced metrics like Sharpe and Sortino Ratios.
Identify risk with Maximum Drawdown analysis.
Customize your view for clarity and focus.
This indicator is perfect for traders and investors looking to optimize leveraged strategies or manage portfolios with DCA contributions effectively.
Adaptive ATR Trailing Stops█ Introduction
This script is based on the average true range (ATR) and has been improved with the HHV or LLV. The script supports the trader to have his stoploss trailed. In this case, the stoploss is dynamic and can be adjusted with each candleclose.
█ What Does This Indicator Do?
The ATR SL Trailing Indicator helps you dynamically adjust your stop-loss levels based on market movements. It uses market volatility to calculate trailing stop-loss levels, ensuring you can secure profits or minimize losses. The indicator creates two lines:
A green/red line for long positions (when you’re betting on prices going up).
A green/red line for short positions (when you’re betting on prices going down).
█ Key Concepts: How Does the Indicator Work?
The Average True Range (ATR) measures market volatility, showing how much the price moves over a specific period.
A high ATR indicates a volatile market (large price swings), while a low ATR indicates a quiet market (smaller price changes).
Why is ATR important? ATR helps dynamically adjust the distance between your stop-loss and the current price. In volatile markets, the stop-loss is placed further away to avoid being triggered by short-term fluctuations. In quieter markets, the stop-loss is set closer to the price.
The HHV is the highest price over a specific period. For long positions, the indicator uses the highest price minus an ATR-based value to determine the stop-loss level.
Why is HHV important? HHV ensures the stop-loss for long positions only moves up when the price reaches new highs. Once the price starts falling, the stop-loss remains unchanged to lock in profits or minimize losses.
The LLV is the lowest price over a specific period. For short positions, the indicator uses the lowest price plus an ATR-based value to determine the stop-loss level.
Why is LLV important? LLV ensures the stop-loss for short positions only moves down when the price reaches new lows. Once the price starts rising, the stop-loss remains unchanged to lock in profits or minimize losses.
█ How Does the Indicator Work?
For Long Positions:
The indicator sets the stop-loss below the current price, based on:
Market volatility (ATR).
The highest price over a specific period (HHV).
The line turns green when the current price is above the stop-loss.
The line turns red when the price drops below the stop-loss, signaling you may need to exit the trade.
For Short Positions:
The indicator sets the stop-loss above the current price, based on:
*Market volatility (ATR).
*The lowest price over a specific period (LLV).
*The line turns green when the current price is below the stop-loss.
*The line turns red when the price moves above the stop-loss, signaling you may need to exit the trade.
█ Advantages of the ATR SL Trailing Indicator
*Dynamic and adaptive: Automatically adjusts stop-loss levels based on market volatility.
*Visual clarity: Green and red lines clearly indicate whether your position is safe or at risk.
*Effective risk management: Helps you lock in profits and minimize losses without the need for constant manual adjustments.
█ When Should You Use This Indicator?
*If you practice trend-based trading and want your stop-losses to automatically adapt to market movements.
*In volatile markets, to avoid being stopped out by short-term fluctuations.
*When you want to implement efficient risk management without manually adjusting your positions.
█ Inputs
The user can set the indicator for both longs and shorts. This is particularly important because the calculation is different. The HHV is used for longs and the LLV for shorts. The user can therefore set the period/length for the ATR on the one hand and the HHV/LLV on the other. He also has a multiplier, which can also be customized. The multiplier multiplies the price change of each individual candle.
█ Color Change
If the SL is trailed and the price breaks a line, the color changes. In this case, it would have executed the SL on an open trade.
ETF-Benchmark AnalyzerHave you ever wondered which ETF performs the best? Which one is the most volatile, or which one has the smallest drawdown?
This Pine Script™ "ETF-Benchmark Analyzer" compares the performance of an ETF (such as SPY, the S&P 500 ETF) against a benchmark, which can also be adjusted by the user. It provides several key financial metrics, such as:
Performance (%): Displays the total return over a specified lookback period (e.g., 1 year). It compares the performance of the ETF against the benchmark and shows the difference.
Alpha (%): Measures the excess return of the ETF over the expected return, which is calculated using the benchmark’s return. Positive alpha indicates that the ETF has outperformed the benchmark, while negative alpha suggests underperformance. This metric is important because it isolates performance that cannot be explained by exposure to the benchmark's movements.
Sharpe Ratio: A risk-adjusted measure of return. It is calculated by dividing the excess return of the ETF (above the risk-free rate) by its standard deviation (volatility). A higher Sharpe ratio indicates better risk-adjusted returns. The Sharpe ratio is calculated for both the ETF and the benchmark, and their difference is displayed as well.
Drawdown: The percentage decrease from the highest price to the lowest price over the lookback period. This is a critical measure of risk, as it shows the largest potential loss an investor might face during a specific period.
Beta: Measures the ETF’s sensitivity to movements in the benchmark. A beta of 1 means the ETF moves in line with the benchmark; greater than 1 means it is more volatile, while less than 1 means it is less volatile.
These metrics provide a holistic view of the ETF’s performance compared to the benchmark, allowing traders to assess the risk and return profile more effectively.
Scientific Sources
Sharpe Ratio: Sharpe, W. F. (1994). The Sharpe Ratio. Journal of Portfolio Management, 21(1), 49-58. This paper defines and develops the Sharpe ratio as a measure of risk-adjusted return.
Alpha and Beta: Jensen, M. C. (1968). The Performance of Mutual Funds in the Period 1945–1964. The Journal of Finance, 23(2), 389-416. This paper discusses the concepts of alpha and beta in the context of mutual fund performance.
Correlation Coefficient [Giang]### **Introduction to the "Correlation Coefficient" Indicator**
#### **Idea behind the Indicator**
The "Correlation Coefficient" indicator was developed to analyze the linear relationship between Bitcoin (**BTCUSD**) and other important economic indices or financial assets, such as:
- **SPX** (S&P 500 Index): Represents the U.S. stock market.
- **DXY** (Dollar Index): Reflects the strength of the USD against major currencies.
- **SPY** (ETF representing the S&P 500): A popular trading instrument.
- **GOLD** (Gold price): A traditional safe-haven asset.
The correlation between these assets can help traders understand how Bitcoin reacts to market movements of traditional financial instruments, providing opportunities for more effective trading decisions.
Additionally, the indicator allows users to **customize asset symbols for comparison**, not limited to the default indices (SPX, DXY, SPY, GOLD). This flexibility enables traders to tailor their analysis to specific goals and portfolios.
---
#### **Significance and Use of Correlation in Trading**
**Correlation** is a measure of the linear relationship between two data series. In the context of this indicator:
- **The correlation coefficient ranges from -1 to 1**:
- **1**: Perfect positive relationship (both increase or decrease together).
- **0**: No linear relationship.
- **-1**: Perfect negative relationship (one increases while the other decreases).
- **Use in trading**:
- Identify **strong relationships or unusual divergences** between Bitcoin and other assets.
- Help determine **market sentiment**: For example, if Bitcoin has a negative correlation with DXY, traders might expect Bitcoin to rise when the USD weakens.
- Provide a foundation for hedging strategies or investments based on inter-asset relationships.
---
#### **Components of the Indicator**
The "Correlation Coefficient" indicator consists of the following key components:
1. **Main Data (BTCUSD)**:
- The closing price of Bitcoin is used as the central asset for calculations.
2. **Comparison Data**:
- Users can select different asset symbols for comparison. By default, the indicator supports:
- **SPX**: Stock market index.
- **DXY**: Dollar Index.
- **SPY**: Popular ETF.
- **GOLD**: Gold price.
3. **Correlation Coefficients**:
- Calculated between BTC and each comparison index, based on a Weighted Moving Average (WMA) over a user-defined period.
4. **Graphical Representation**:
- Displays individual correlation coefficients with each comparison index, making it easier for traders to track and analyze.
---
#### **How to Analyze and Use the Indicator**
**1. Identify Key Correlations:**
- Observe the correlation lines between BTC and the indices to determine positive or negative relationships.
- Example:
- If the **Correlation Coefficient (BTC-DXY)** sharply declines to -1, this indicates that when USD strengthens, Bitcoin tends to weaken.
**2. Analyze the Strength of Correlations:**
- **Strong Correlations**: If the coefficient is close to 1 or -1, the relationship between the two assets is very clear.
- **Weak Correlations**: If the coefficient is near 0, Bitcoin may be influenced by other factors outside the compared index.
**3. Develop Trading Strategies:**
- Use correlations to predict Bitcoin's price movements:
- If BTC has an inverse relationship with **DXY**, traders might consider selling BTC when the USD strengthens.
- If BTC and **SPX** are strongly correlated, traders can monitor the stock market to predict Bitcoin's trend.
**4. Evaluate Changes Over Time:**
- Use different timeframes (daily, weekly) to track the correlation's fluctuations.
- Look for unusual signals, such as a breakdown or shift from positive to negative relationships.
---
#### **Conclusion**
The "Correlation Coefficient" indicator is a powerful tool that helps traders analyze the relationship between Bitcoin and major financial indices. The ability to customize asset symbols for comparison makes the indicator flexible and suitable for various trading strategies. When used correctly, this indicator not only provides insights into market sentiment but also supports the development of intelligent trading strategies and optimized profits.
Momentum BBPCT Z-Score [QuantAlgo]Momentum BBPCT Z-Score 💫📈
The Momentum BBPCT Z-Score by QuantAlgo is an advanced indicator designed to identify statistical extremes and momentum shifts in price action across various timeframes and market conditions. This system combines Bollinger Bands percentage analysis with Z-score calculations and Statistical Momentum evaluation to help traders and investors identify overbought/oversold conditions and trend strength. By evaluating both statistical extremes and momentum together, this tool empowers users to make data-driven decisions, whether they aim to follow trends or capture mean reversion opportunities.
💫 Conceptual Foundation and Innovation
The Momentum BBPCT Z-Score by QuantAlgo provides a unique framework for assessing price action and momentum through a blend of statistical analysis and momentum evaluation. Unlike traditional Bollinger Band indicators that only reflect price position, this system incorporates Z-score normalization to reveal statistically significant deviations, helping users determine whether price movements are extreme relative to historical norms. By combining high-quality momentum analysis with Z-scores of Bollinger Band positioning, it evaluates both statistical probabilities and momentum quality, while Z-scores standardize deviations from historical trends, enabling traders and investors to spot extreme conditions. This dual approach allows users to better identify mean reversion opportunities while respecting strong momentum conditions, enhancing both counter-trend and trend-following strategies.
📊 Technical Composition and Calculation
The Momentum BBPCT Z-Score is composed of several statistical and momentum components that create a dynamic dual scoring model:
Bollinger Bands Percentage (BBPCT) : Measures the relative position of price between bands on a 0-100 scale, providing a normalized view of price extremes relative to the bands.
Z-Score Normalization : Applies statistical normalization to BBPCT values to identify significant deviations from historical means, helping traders and investors quantify the extremity of current market conditions.
Statistical Momentum Analysis : Evaluates price action across multiple periods to determine momentum strength and persistence, adding depth to the analysis beyond simple price positioning.
📈 Key Indicators and Features
The Momentum BBPCT Z-Score combines various statistical and technical tools to deliver a well-rounded analysis of market conditions.
The indicator utilizes dynamic Bollinger Bands with customizable length and standard deviation multipliers to adapt to market volatility. Z-score calculations are applied to normalize the percentage position within these bands, providing clear statistical context for price movements. The Statistical Momentum component evaluates price action across user-defined periods, helping validate trends and identify potential reversals.
The indicator also incorporates multi-layered visualization with gradient color coding to signal both statistical extremes and momentum conditions. These adaptive visual cues, combined with threshold-based alerts for overbought and oversold zones, help traders and investors track both statistical extremes and momentum shifts, adding reliability to both mean-reversion and trend-following strategies.
⚡️ Practical Applications and Examples
✅ Add the Indicator: Add the indicator to your TradingView chart by clicking on the star icon to add it to your favorites ⭐️
👀 Monitor Z-Scores and Momentum: Watch the Z-score values and momentum state to identify statistically significant price movements. During extreme readings, consider mean reversion opportunities, while strong momentum readings may signal trend-following opportunities.
🔔 Set Alerts: Configure alerts for Z-score extremes and momentum shifts, ensuring you can act on significant statistical and trend changes promptly.
🌟 Summary
The Momentum BBPCT Z-Score by QuantAlgo is a highly adaptable tool, designed to support both statistical and momentum analysis across different market environments. By combining Z-score normalized Bollinger Band positioning with Statistical Momentum Analysis, it helps traders and investors identify statistically significant price movements while measuring momentum quality, providing more reliable trading signals. The tool's flexibility across timeframes makes it ideal for both mean reversion and trend-following strategies, allowing users to capture opportunities while maintaining statistical rigor in their analysis.
Volatility and Tick Size DataThis indicator, titled "Tick Information & Standard Deviation Table," provides detailed insights into market microstructure, including tick size, point value, and standard deviation values calculated based on the True Range. It helps visualize essential trading parameters that influence transaction costs, risk management, and portfolio performance, including volatility measures that can guide investment strategies.
Why These Data Points Are Important for Portfolio Management
Tick Size and Point Value:
Tick size refers to the smallest possible price movement in a given asset. It defines the granularity of the price changes, affecting how precise the market price can be at any moment. Point value reflects the monetary value of a single price movement (one tick). These two data points are essential for understanding transaction costs and for evaluating how much capital is at risk per price movement. Smaller tick sizes may lead to more efficient pricing in high-frequency trading strategies (Hasbrouck, 2009).
Reference: Hasbrouck, J. (2009). Empirical Market Microstructure. Foundations and Trends® in Finance, 3(4), 169-272.
Standard Deviations and Volatility:
Standard deviation measures the variability or volatility of an asset's price over a set period. This data point is critical for portfolio management, as it helps to quantify risk and predict potential price movements. True Range and its standard deviations provide a more comprehensive measure of market volatility than just price fluctuations, as they include gaps and extreme price changes. Investors use volatility data to assess the potential risk and adjust portfolio allocations accordingly (Ang, 2006).
Reference: Ang, A. (2006). Asset Management: A Systematic Approach to Factor Investing. Oxford University Press.
Risk Management:
The ability to quantify risk through metrics like the 1st, 2nd, and 3rd standard deviations of the true range is essential for implementing risk controls within a portfolio. By incorporating volatility data, portfolio managers can adjust their strategies for different market conditions, potentially reducing exposure to high-risk environments. These volatility measures help in setting stop-loss levels, optimizing position sizes, and managing the portfolio’s overall risk-return profile (Black & Scholes, 1973).
Reference: Black, F., & Scholes, M. (1973). The Pricing of Options and Corporate Liabilities. Journal of Political Economy, 81(3), 637-654.
Portfolio Diversification and Hedging:
Understanding asset volatility and transaction costs is critical when constructing a diversified portfolio. By using the standard deviations from this indicator, investors can better identify assets that may provide diversification benefits, potentially reducing the overall portfolio risk. Moreover, the point values and tick sizes help assess the cost-effectiveness of various assets, enabling portfolio managers to implement more efficient hedging strategies (Markowitz, 1952).
Reference: Markowitz, H. (1952). Portfolio Selection. The Journal of Finance, 7(1), 77-91.
Conclusion
The Tick Information & Standard Deviation Table provides critical market data that informs the risk management, diversification, and pricing strategies used in portfolio management. By incorporating tick size, point value, and volatility metrics, investors can make more informed decisions, better manage risk, and optimize the returns on their portfolios. The data serves as an essential tool for aligning asset selection and portfolio allocations with the investor's risk tolerance and market conditions.
TOP 20 ALTCOIN INDEXIndicator Description
The "ALT20 INDEX" is a financial analysis tool designed to track the aggregate value of the top 20 cryptocurrencies by market capitalization and closing prices over specific periods. This indicator reflects changes in the combined value of these 20 ALTCOINs, providing an overview of trends in the cryptocurrency market.
=================================
Purpose and Practical Applications
1. Tracking Top Cryptocurrencies:
- The indicator allows monitoring the value of the top 20 ALTCOINs, reflecting the general volatility of the cryptocurrency market.
- Helps investors focus on high-capitalization assets.
2. Performance Comparison:
- Serves as a tool to compare the performance of the ALT20 group against other assets like Bitcoin, Ethereum, or traditional financial indices.
3. Assessing Market Health:
- Enables evaluation of market trends, identifying growth or decline periods.
4. Practical Applications:
- Suitable for fund managers, long-term investors, or trend traders to make decisions based on the overall ALTCOIN market performance.
-------------------------------------------
How the Indicator Works
1. Selection of Top 20 ALTCOINs:
- Cryptocurrencies are selected based on their market capitalization at each rebalancing period.
2. Weight Allocation and Calculation:
- Weight: Determined by the market capitalization of each ALTCOIN relative to the total market capitalization of the top 20.
- Token Quantity: Calculated based on weight, total allocation points (e.g., 100 points for T1, 722.63 points for T2, etc.), and each ALTCOIN's closing price.
Formula: Token Quantity = Weight × Total Allocation Points/Closing Price
3. Periodic Rebalancing:
- Rebalancing frequency: Once a year.
- At each rebalancing period, the weights and token quantities are adjusted based on new market capitalization and prices.
4. Portfolio Value Calculation:
- The value of each ALTCOIN is calculated as:
Token Value = Closing Price × Token Quantity
- Index Total: ALT20 Index = 20∑'i=1'Token Value'i'
------------------------------------------
Rebalancing Periods
T1 (2020-2021): Initial period, token quantities calculated based on weights and a total of 100 points.
T2 (2021-2022): Rebalanced with a total allocation of 722.63 points.
T3 (2022-2023): Total allocation of 252.26 points, reflecting portfolio adjustments based on new prices and market caps.
T4 (2023-2024): Total allocation of 261.43 points.
T5 (2024-Present): Total allocation of 437.42 points, updated to reflect the current market.
-----------------------------------------
Indicator Features
- Displays Index Value Over Time:
+ index_value_T1 to index_value_T5 represent the portfolio value during specific timeframes.
+ Values are calculated based on the daily closing prices of ALTCOINs.
- Visualization:
+ The index for each period is plotted on the chart, enabling easy observation of market trends over time.
---------------------------------------
Practical Applications
- Portfolio Management:
+ The indicator helps track the performance of asset groups within the ALTCOIN portfolio.
- Integration into Trading Systems:
+ Used as a reference for automated or manual trading strategies.
- Market Analysis:
+ Assists analysts in evaluating cryptocurrency market movements based on the top 20 ALTCOINs.
Let me know if further optimization or additional information is needed! Thank!
Confluence ChecklistHOW DOES IT WORK?
The "Confluence Checklist" indicator helps you to stick to your trading plan with your set rules. You have a total of 8 rules that can be set up manually. Using the checkbox, you can check during trading whether your rules are followed or not. You can change the colors of the table on the one hand, and the size and width of the table columns on the other.
█ WHAT MAKES IT UNIQUE?
It is the only checklist indicator on Tradingview that has an integrated checkbox. Thus, you can always check your trading plan.
█ HOW TO USE IT?
The best way to start is to create your personal trading plan based on your trading strategy. Then you can display the trading plan digitally in Tradingview. This way you don't have to write and check your rules on paper anymore. This is very important for scalping, because sometimes you only have a few seconds left for the execution. After creating the trading plan, you can integrate it into the checklist. Before placing an order, you can check the checklist to see if the trade is really valid.
Z The Good Stuff +I created this script to have a couple datapoints that I want to look at when going through charts to find trade ideas. Qullamaggie is one of my biggest inspirations and I built in a couple of his concepts with a touch to help me with sizing properly, all explained below:
Box 1: ADR %, Average Daily Range, gives and indication of how volatile the stock is. It uses the 20 day average % move of the current stock on the chart.
Box 2: LOD Distance, low of day distance is a quality of life element I created. It calculates the low for the current candle and color codes it red or green depending on if it's higher or lower than the daily ADR. The logic is that if a stock has an average speed, buying on a setup it is preferred if the stop distance (assuming a low of day stop) should be less than the ADR to improve the odds of more upside.
Box 3: Todays DV, this shows a rough estimate of how much money was traded on the particular day.
Box 4: ADV 20 days, similar to above this shows the 20 day $ traded average. The point to look at it is to have a better idea what position size is possible to not get stuck in something too illiquid.
Box 5: Market cap, just shows the market cap of the stock to know what size the company is.
Box 6: Number of shares, this is an additional quality of life aspect. If using low of day stops, this part calculates based on the users' inputted portfolio size and portfolio risk preference and then calculates how many stocks to buy to stay within the risk parameters. It is obviously not a sole decision making parameter nor does it guarantee any execution, but if a stock is showing an entry you want to take you can use the number of shares to help you know how many to buy. The preset is a portfolio of 10000 and a risk of 0.25%. This means that the number of shares to buy will be at the current price with lod stop that would result in a 0.25% portfolio loss. OF COURSE the actual loss depends on the execution and if the user places a stop loss order.
Hope you find it useful and feel free to give feedback! Cheers!
Position Sizing Calculator (Real-Time)█ SUMMARY
The following indicator is a Position Sizing Calculator based on Average True Range (ATR), originally developed by market technician J. Welles Wilder Jr., intended for real-time trading.
This script utilizes the user's account size, acceptable risk percentage, and a stop-loss distance based on ATR to dynamically calculate the appropriate position size for each trade in real time.
█ BACKGROUND
Developed for use on the 5-minute timeframe, this script provides traders with continuously updated, dynamic position sizes. It enables traders to instantly determine the exact number of shares and dollar amount to use for entering a trade within their acceptable risk tolerance whenever a trade opportunity arises.
This real-time position sizing tool helps traders make well-informed decisions when planning trade entries and calculating maximum stop-loss levels, ultimately enhancing risk management.
█ USER INPUTS
Trading Account Size: Total dollar value of the user's trading account.
Acceptable Risk (%): Maximum percentage of the trading account that the user is willing to risk per trade.
ATR Multiplier for Stop-Loss: Multiplier used to determine the distance of the stop-loss from the current price, based on the ATR value.
ATR Length: The length of the lookback period used to calculate the ATR value.
Portfolio [Afnan]🚀 Portfolio - Advanced Portfolio Management Indicator 📊
A game-changing portfolio management tool designed to help traders stay on top of their positions and manage risk efficiently. This indicator combines detailed tracking, real-time analytics, and visual clarity to ensure traders are well-equipped for the dynamic world of financial markets.
📈 Key Features 💡
Track up to 14 positions with ease
Real-time Profit & Loss (P&L) updates and risk metrics
Visual representation of entry, stop-loss (SL), and target levels
Alerts for stop-loss breaches and target achievements
Comprehensive portfolio summaries for quick analysis
Customizable options to suit individual trading styles
🔍 Main Components ⚙️
📊 1. Position Tracking
Detailed position data: entry, stop-loss, target levels, and more
Real-time risk-reward ratios
Insights into position size and exposure percentages
Continuous updates on P&L in real-time
📉 2. Visual Indicators
Clear visual markers for entry, SL, and target prices
Price labels with detailed percentage changes
Indicators that show the current position's market status
💼 3. Portfolio Summary
Aggregate account values and exposure
Summarized P&L metrics across all positions
Risk management insights for better decision-making
Daily performance tracking to evaluate strategies
⚠️ 4. Alert System
Instant notifications for stop-loss breaches
Alerts when target prices are hit
Alerts operate for the current chart symbol
⚡ Customization Options 🎨
Show or hide specific data columns
Adjust the table's position and size for better visibility
Personalize color schemes and text styles
Switch between full portfolio view and single symbol focus
📱 How to Use 📝
Input your positions in the indicator's settings
Enable or disable specific positions dynamically
Customize display preferences to your liking
Set up alerts for proactive risk management
Monitor all your trading activities in one comprehensive dashboard
📌 Important Notes ℹ️
Compatible with any trading symbol
Updates seamlessly during market hours
Alerts are specific to the currently active chart symbol
Maximum capacity: 14 simultaneous positions
Created by: @AfnanTAjuddin
⚠️ Disclaimer ⚠️
This indicator is a tool for informational purposes only. Ensure all calculations are verified and consult a financial professional before making investment decisions.
🎯 "Stay disciplined, trade smart, and let data guide your decisions." 📊
Linear Regression Channel Screener [Daveatt]Hello traders
First and foremost, I want to extend a huge thank you to @LonesomeTheBlue for his exceptional Linear Regression Channel indicator that served as the foundation for this screener.
Original work can be found here:
Overview
This project demonstrates how to transform any open-source indicator into a powerful multi-asset screener.
The principles shown here can be applied to virtually any indicator you find interesting.
How to Transform an Indicator into a Screener
Step 1: Identify the Core Logic
First, identify the main calculations of the indicator.
In our case, it's the Linear Regression
Channel calculation:
get_channel(src, len) =>
mid = math.sum(src, len) / len
slope = ta.linreg(src, len, 0) - ta.linreg(src, len, 1)
intercept = mid - slope * math.floor(len / 2) + (1 - len % 2) / 2 * slope
endy = intercept + slope * (len - 1)
dev = 0.0
for x = 0 to len - 1 by 1
dev := dev + math.pow(src - (slope * (len - x) + intercept), 2)
dev
dev := math.sqrt(dev / len)
Step 2: Use request.security()
Pass the function to request.security() to analyze multiple assets:
= request.security(sym, timeframe.period, get_channel(src, len))
Step 3: Scale to Multiple Assets
PineScript allows up to 40 request.security() calls, letting you monitor up to 40 assets simultaneously.
Features of This Screener
The screener provides real-time trend detection for each monitored asset, giving you instant insights into market movements.
It displays each asset's position relative to its middle regression line, helping you understand price momentum.
The data is presented in a clean, organized table with color-coded trends for easy interpretation.
At its core, the screener performs trend detection based on regression slope calculations, clearly indicating whether an asset is in a bullish or bearish trend.
Each asset's price is tracked relative to its middle regression line, providing additional context about trend strength.
The color-coded visual feedback makes it easy to spot changes at a glance.
Built-in alerts notify you instantly when any asset experiences a trend change, ensuring you never miss important market moves.
Customization Tips
You can easily expand the screener by adding more symbols to the symbols array, adapting it to your watchlist.
The regression parameters can be adjusted to match your preferred trading timeframes and sensitivity.
The alert system is already configured to notify you of trend changes, but you can customize the alert messages and conditions to your needs.
Limitations
While powerful, the screener is bound by PineScript's limitation of 40 security calls, capping the maximum number of monitored assets.
Using AI to Help With Conversion
An interesting tip:
You can use AI tools to help convert single-asset indicators to screeners.
Simply provide the original code and ask for assistance in transforming it into a screener format. While the AI output might need some syntax adjustments, it can handle much of the heavy lifting in the conversion process.
Prompt (example) : " Please make a pinescript version 5 screener out of this indicator below or in attachment to scan 20 instruments "
I prefer Claude AI (Opus model) over ChatGPT for pinescript.
Conclusion
This screener transformation technique opens up endless possibilities for market analysis.
By following these steps, you can convert any indicator into a powerful multi-asset scanner, enhancing your trading toolkit significantly.
Remember: The power of a screener lies not just in monitoring multiple assets, but in applying consistent analysis across your entire watchlist in real-time.
Feel free to fork and modify this screener for your own needs.
Happy trading! 🚀📈
Daveatt