Fair value and MOSShowing the fair value and margin of safety for a Stock.
Works best with 12 months timeframe.
The calculations are based on historical data for multiple years, up to 10 years.
You will see the following as numbers at the indicator line:
- Forward EPS Growth in %
- Forward PE Calculated
- Forward PE Estimated
The two lines will be shown in green if they are above the current price and in red if the price is bellow the lines.
- The upper line shows the fair value of the stock, calculated with 15% (or 4x in 10 years) expected EPS growth for your investment.
- The lower line shows the margin of safety, calculated at 50% of the fair value.
You can adjust the values at "Forward EPS Growth in %" and "Expected future PE" in order to show your fair price and the price with margin of safety.
Azioni
Stock valuation key metricsKey metrics for Stock valuation.
Following Data will be shown on the right side on top:
- P/E
- EPS
- Dividend
- Debt / FCF
- ROIC median
- ROE median
- ROA median
- EPS growth median
- EPS growth estimated
- FCF growth median
- Equity growth median
- Revenue growth median
Depending on the historical data the medians are calculated for multiple years up to 10 year.
Enhanced Stock Trading StrategyEnhanced Stock Trading Signal bt TopGun1930 - Usage Instructions
Overview
This Pine Script strategy combines technical analysis with fundamental data from Yahoo Finance to provide comprehensive stock trading signals. Since Pine Script cannot directly access external APIs, the script uses a hybrid approach with user-input fundamental data.
Key Features
Combined Analysis: Integrates both technical indicators and fundamental metrics
Signal Strength System: Calculates separate technical and fundamental strength scores (0-100%)
Clear Buy/Sell Signals: Provides explicit trading recommendations with confidence levels
Visual Dashboard: Shows all key indicators and current signal recommendation
Yahoo Finance Integration: Allows input of Yahoo Finance technical outlook and fundamental data
Risk Management: Includes stop-loss and take-profit recommendations
How to Use
Step 1: Load the Script in TradingView
Open TradingView and create a new Pine Script
Copy and paste the entire code from enhanced_stock_trading_strategy.pine
Click "Save" and then "Add to Chart"
Step 2: Input Fundamental Data from Yahoo Finance
Before using the script, you'll need to manually gather fundamental data from Yahoo Finance:
Go to Yahoo Finance and search for your stock
Navigate to different sections to collect the required data:
Summary tab: Current price, 52-week range
Statistics tab: P/E ratio, P/B ratio
Analysis tab: Analyst ratings, price targets, earnings history
Holders tab: Insider transactions
Technical Analysis tab: Technical outlook scores, support/resistance levels
Enter this data into the script's input parameters in the "Fundamental Data" sections
Step 3: Configure Settings
The script includes several customizable parameters:
Technical Indicators: Adjust moving average periods, RSI levels, etc.
Signal Threshold: Set the minimum signal strength (0-100) required for strong signals
Technical vs Fundamental Weighting: Adjust the relative importance (default: 60% technical, 40% fundamental)
Risk Management: Set stop-loss and take-profit percentages
Dashboard Settings: Enable/disable the dashboard and choose its location
Step 4: Interpreting Signals
Strong Buy Signal (Green Triangle Up)
A strong buy signal is generated when:
Combined strength exceeds your threshold (default 70%)
Buy strength is greater than sell strength
A green triangle appears below the price bar
Background turns light green
Buy Suggested
A buy suggestion is shown when:
Buy strength is greater than sell strength but below threshold
No strong signal triangle appears
Dashboard shows "BUY SUGGESTED*"
Strong Sell Signal (Red Triangle Down)
A strong sell signal is generated when:
Combined strength exceeds your threshold (default 70%)
Sell strength is greater than buy strength
A red triangle appears above the price bar
Background turns light red
Sell Suggested
A sell suggestion is shown when:
Sell strength is greater than buy strength but below threshold
No strong signal triangle appears
Dashboard shows "SELL SUGGESTED*"
Dashboard Information
The dashboard provides at-a-glance information:
Technical strength score with buy/sell direction
Fundamental strength score with buy/sell direction
Current market trend (Bullish/Bearish/Neutral)
RSI status (Overbought/Oversold/Neutral)
Price position relative to 52-week range
Current signal recommendation (with asterisk for disclaimer)
Technical Analysis Components
The script analyzes these technical indicators:
Moving Averages: Short-term and long-term trends
RSI: Overbought/oversold conditions and divergences
MACD: Momentum and trend changes
Volume: Unusual activity and surges
Price Position: Location within 52-week range
Support/Resistance: Proximity to key levels
Fundamental Analysis Components
The script incorporates these fundamental factors:
Earnings Data: Surprise percentage, beat/miss history
Analyst Ratings: Consensus rating, recent changes, analyst count
Price Targets: Consensus target vs current price, target range
Insider Activity: Recent buying/selling, overall sentiment
Valuation Metrics: P/E ratio vs sector, P/B ratio, overall valuation
Recent Developments: News impact, SEC filings, upcoming events
Yahoo Finance Technical Outlook Integration
The script can incorporate Yahoo Finance's technical analysis:
Short-term Outlook: Trading outlook for next few days
Mid-term Outlook: Trading outlook for next few weeks
Long-term Outlook: Trading outlook for next few months
Support/Resistance Levels: Key price levels from Yahoo Finance
Signal Strength Calculation
The signal strength is calculated based on multiple factors:
Technical Buy Strength Factors
Trend is up (short MA > long MA): +20%
Bullish MA crossover: +30%
RSI oversold condition: +15%
MACD bullish cross: +15%
MACD line positive: +10%
Price near 52-week low: +15%
Positive volume surge: +10%
RSI bullish divergence: +15%
Price near support level: +15%
Fundamental Buy Strength Factors
Positive earnings surprise: up to +25%
Strong analyst ratings: up to +40%
High price targets: up to +30%
Positive insider sentiment: up to +20%
Favorable valuation: up to +30%
Positive recent developments: up to +10%
The final strength is calculated as a weighted average of technical and fundamental scores.
Recommended Settings for Different Timeframes
Short-term Trading (1h, 4h charts)
Short MA: 5-10
Long MA: 20-30
Signal Threshold: 60-70
Technical Weight: 70-80%
Medium-term Trading (Daily chart)
Short MA: 10-20
Long MA: 30-50
Signal Threshold: 70-80
Technical Weight: 60-70%
Long-term Trading (Weekly chart)
Short MA: 20-30
Long MA: 50-100
Signal Threshold: 80-90
Technical Weight: 40-60%
Best Practices
Update Fundamental Data Regularly: Refresh Yahoo Finance data at least weekly, or after significant events like earnings reports
Adjust the Signal Threshold: Start with 70% and adjust based on your risk tolerance. Lower values generate more signals but include more false positives.
Confirm with Multiple Timeframes: For stronger confirmation, check if signals align across different timeframes.
Use the Dashboard: Pay attention to all information in the dashboard, not just the final signal.
Monitor Signal Strength Trends: Watch how signal strength builds up or fades over time.
Customize for Your Stocks: Different stocks may require different settings. Test and adjust accordingly.
Troubleshooting
Too Many Signals: Increase the signal threshold or increase the technical weight
Too Few Signals: Decrease the signal threshold or increase the fundamental weight
Delayed Signals: Decrease the moving average periods
False Signals: Increase the signal threshold and ensure fundamental data is up to date
Disclaimer
This script provides trading signals based on historical data and user-input fundamental metrics. Investing in markets involves risk, and past performance does not guarantee future results. Always conduct your own research and consider consulting a financial advisor before making investment decisions.
AI Trading Signals - Crypto, Stocks & Forex🧠 AI Trading Signals - for Crypto, Stocks & Forex
A modular signal engine designed for clarity, structure, and real-time adaptability across crypto, stocks, and forex markets.
Overview
The AI Trading Signals Indicator is a flexible, multi-strategy toolkit developed for discretionary traders who need real-time visual feedback on market structure, momentum conditions, and breakout dynamics. It provides contextual confirmation for both trend-following and reversal strategies while allowing users to customize their signal environment.
How It Works
This script is invite-only and closed-source. Below is a technical overview of its structure and logic:
1. Multi-Mode Signal Engine
Users can toggle between several prebuilt modes, each designed to serve a distinct market condition or trading style:
Buy & Sell Mode
Long Only / Short Only
Breakout Strategy
BTC Cycle Detection Mode
Each mode activates internal logic tailored to trend behavior, volatility levels, and confirmation thresholds.
2. Trend & Structure Analysis
EMA Stack (20/50/200) to assess short-, mid-, and long-term trend bias
Detection of crossover events and price position relative to dynamic moving averages
Support/resistance zone awareness to reduce false signals in range-bound markets
3. Momentum-Based Filtering
Custom RSI-VWAP model evaluates real-time momentum strength and exhaustion
Adjusts signal triggers based on the interplay between RSI zones and VWAP deviation
Helps avoid premature entries during volatility traps
4. Breakout & Continuation Signals
LC (Long Continuation) and SC (Short Continuation) labels appear when multi-bar breakout criteria and volume shifts align
S/R breakouts are confirmed through momentum filters and structural follow-through
5. BTC-Specific Cycle Detection
Includes Bitcoin Top Warning, Cycle Squeeze Detection , and macro-trend filters using custom daily moving averages
Designed specifically for long-term BTC market observers
Best used on BTC/USD charts
6. Visual Clarity & Signal Customization
Icons and color-coded labels for Buy, Sell, TP (Take Profit), LC, SC, BTC warnings
Optional SL/TP visuals with customizable percentage levels
Minimalist and non-intrusive chart design
Style tab options allow users to hide non-relevant signals
Use Case & Practical Functionality
This script is not intended to deliver trade entries or guarantees of profitability. Instead, it functions as a signal confirmation layer that supports:
Filtering long/short setups through multiple technical lenses
Confirming market sentiment via Buy/Sell signals alongside Bull/Bear cycle states
Helping traders stay aligned with structural bias and momentum conditions, without creating emotional noise
This design supports both trend-traders and breakout-focused users by allowing signal contextualization , not automation.
Vendor Value Justification
While this indicator utilizes recognizable technical tools (such as EMAs, RSI, VWAP), it’s not a mashup or a repackage of public-domain strategies. The signal logic is original and custom-developed . Key innovations include:
A layered signal engine that dynamically filters and prioritizes signals based on user-selected strategy mode
BTC cycle detection methods not found in public libraries
Real-time adaptive thresholding for breakout and momentum confirmation
Seamless integration between macro- and micro-structure without repainting or lag
The script was purpose-built to solve specific trading problems in a way not currently available in public indicators - primarily reducing chart clutter, eliminating false positives, and enhancing signal readability across asset types.
Originality Note
This script is 100% original and custom-coded - all logic was written from scratch by the author using Pine Script, and no logic was copied from public libraries or other authors.
It is not a mashup of other indicators; instead, it integrates familiar concepts into a purpose-built, cohesive framework that reflects the author’s own trading research and strategy needs.
How to Use
Choose your signal strategy mode (Buy/Sell, Breakout, BTC, etc.)
Customize visuals and alert preferences in the Style tab
Use signal labels (Buy, Sell, TP, LC/SC, BTC Alerts) as confirmation tools , not automatic entries
Apply BTC-specific cycle analysis only on BTC/USD charts for best results
Disclaimer
This script is for educational and informational purposes only.
It does not provide financial advice , and there is no guarantee of accuracy, performance, or results. Traders should do their own research and use this tool at their own discretion.
ORB - Futures and Stocks (Breakouts + Alerts + ORB Selector)This indicator shows the Opening Range Breakout (ORB) based on the time range you choose.
Important:
It only works for intraday trading on time frames less than 1 day (like 1-minute, 5-minute, or hourly charts).
You can use it with any stock or futures, such as US500, NAS100, or GER40.
Inputs:
ORB Range - Your preference.
Session Start
Time Zone Offset
Examples:
for EU Frankfurt, DAX (GER40):
Set your ORB range
Session Start 0900
Time Zone Offset +1
For US Stock Market and US500, NAS100:
Set your ORB range
Session Start 0930
Time Zone Offset -5
Created using ChatGPT
[COG]S&P 500 Weekly Seasonality ProjectionS&P 500 Weekly Seasonality Projection
This indicator visualizes S&P 500 seasonality patterns based on historical weekly performance data. It projects price movements for up to 26 weeks ahead, highlighting key seasonal periods that have historically affected market performance.
Key Features:
Projects price movements based on historical S&P 500 weekly seasonality patterns (2005-2024)
Highlights six key seasonal periods: Jan-Feb Momentum, March Lows, April-May Strength, Summer Strength, September Dip, and Year-End Rally
Customizable forecast length from 1-26 weeks with quick timeframe selection buttons
Optional moving average smoothing for more gradual projections
Detailed statistics table showing projected price and percentage change
Seasonality mini-map showing the full annual pattern with current position
Customizable colors and visual elements
How to Use:
Apply to S&P 500 index or related instruments (daily timeframe or higher recommended)
Set your desired forecast length (1-26 weeks)
Monitor highlighted seasonal zones that have historically shown consistent patterns
Use the projection line as a general guideline for potential price movement
Settings:
Forecast length: Configure from 1-26 weeks or use quick select buttons (1M, 3M, 6M, 1Y)
Visual options: Customize colors, backgrounds, label sizes, and table position
Display options: Toggle statistics table, period highlights, labels, and mini-map
This indicator is designed as a visual guide to help identify potential seasonal tendencies in the S&P 500. Historical patterns are not guarantees of future performance, but understanding these seasonal biases can provide valuable context for your trading decisions.
Note: For optimal visualization, use on Daily timeframe or higher. Intraday timeframes will display a warning message.
[COG]Nasdaq Weekly Seasonality ProjectionNasdaq Weekly Seasonality Projection
This indicator provides a visualization of Nasdaq seasonality patterns based on historical weekly performance data. It projects price movements for up to 26 weeks ahead, highlighting key seasonal periods that have historically affected tech stocks.
Key Features:
Projects price movements based on historical Nasdaq weekly seasonality patterns
Highlights six key seasonal periods: January Effect, March Lows, April-May Strength, Tech Summer Rally, September Dip, and Q4 Tech Rally
Customizable forecast length from 1-26 weeks with quick timeframe selection buttons
Optional moving average smoothing for more gradual projections
Detailed statistics table showing projected price and percentage change
Seasonality mini-map showing the full annual pattern with current position
Customizable colors and visual elements
How to Use:
Apply to Nasdaq indices or tech-focused instruments (daily timeframe or higher recommended)
Set your desired forecast length (1-26 weeks)
Monitor highlighted seasonal zones that have historically shown consistent patterns
Use the projection line as a general guideline for potential price movement
Settings:
Forecast length: Configure from 1-26 weeks or use quick select buttons (1M, 3M, 6M, 1Y)
Visual options: Customize colors, backgrounds, label sizes, and table position
Display options: Toggle statistics table, period highlights, labels, and mini-map
This indicator is designed as a visual guide to help identify potential seasonal tendencies in Nasdaq and tech stocks. Historical patterns are not guarantees of future performance, but understanding these seasonal biases can provide valuable context for your trading decisions.
Note: For optimal visualization, use on Daily timeframe or higher. Intraday timeframes will display a warning message.
FinFluential Global M2 Money Supply // Days Offset =The "Global M2 Money Supply" indicator calculates and visualizes the combined M2 money supply from multiple countries and regions worldwide, expressed in trillions of USD.
M2 is a measure of the money supply that includes cash, checking deposits, and easily convertible near-money assets. This indicator aggregates daily M2 data from various economies, converts them into a common USD base using forex exchange rates, and plots the total as a single line on the chart.
It is designed as an overlay indicator aligned to the right scale, making it ideal for comparing global money supply trends with price action or other market data.
Key Features
Customizable Time Offset: Users can adjust the number of days to shift the M2 data forward or backward (from -1000 to +1000 days) via the indicator settings. This allows for alignment with historical events or forward-looking analysis.
Global Coverage Includes:
Eurozone: Eurozone M2 (converted via EUR/USD)
North America: United States, Canada
Non-EU Europe: Switzerland, United Kingdom, Finland, Russia
Pacific: New Zealand
Asia: China, Taiwan, Hong Kong, India, Japan, Philippines, Singapore
Latin America: Brazil, Colombia, Mexico
Middle East: United Arab Emirates, Turkey
Africa: South Africa
Autocorrelation Price Forecasting [The Quant Science]Discover how to predict future price movements using autocorrelation and linear regression models to identify potential trading opportunities.
An advanced model to predict future price movements using autocorrelation and linear regression. This script helps identify recurring market cycles and calculates potential gains, with clear visual signals for quick and informed decisions.
Main function
This script leverages an autocorrelation model to estimate the future price of an asset based on historical price relationships. It also integrates linear regression on percentage returns to provide more accurate predictions of price movements.
Insights types
1) Red label on a green candle: Bearish forecast and swing trading opportunity.
2) Red label on a red candle: Bearish forecast and trend-following opportunity.
3) Green label on a red candle: Bullish forecast and swing trading opportunity.
4) Green label on a green candle: Bullish forecast and trend-following opportunity.
IMPORTANT!
The indicator displays a future price forecast. When negative, it estimates a future price drop.
When positive, it estimates a future price increase.
Key Features
Customizable inputs
Analysis Length: number of historical bars used for autocorrelation calculation. Adjustable between 1 and 200.
Forecast Colors: customize colors for bullish and bearish signals.
Visual insights
Labels: hypothetical gains or losses are displayed as labels above or below the bars.
Dynamic coloring: bullish (green) and bearish (red) signals are highlighted directly on the chart.
Forecast line: A continuous line is plotted to represent the estimated future price values.
Practical applications
Short-term Trading: identify repetitive market cycles to anticipate future movements.
Visual Decision-making: colored signals and labels make it easier to visualize potential profit or loss for each trade.
Advanced Customization: adjust the data length and colors to tailor the indicator to your strategies.
Limitations
Prediction price models have some limitations. Trading decisions should be made with caution, considering additional market factors and risk management strategies.
Volume Delta & Order Block Suite [QuantAlgo]Upgrade your volume analysis and order flow trading with Volume Delta & Order Block Suite by QuantAlgo, a sophisticated technical indicator that leverages advanced volume delta calculations, along with dynamic order block detection to provide deep insights into market participant behavior. By calculating the distribution of volume between buyers and sellers and tracking pivotal volume zones, the indicator helps traders understand the underlying forces driving price movements. It is particularly valuable for those looking to identify high-probability trading opportunities based on volume imbalances and key price levels where significant activity has occurred.
🟢 Technical Foundation
The Volume Delta & Order Block Suite utilizes sophisticated volume analysis techniques to estimate buying and selling pressure within each price candle. The core volume delta calculation employs a formula that estimates buy volume as: Volume × (Close - Low) ÷ (High - Low) , with sell volume calculated as the remainder of total volume. This approach assumes that when price closes near the high of a candle, most volume represents buying pressure, and when price closes near the low, most volume represents selling pressure.
For order block detection, the indicator implements a multi-step process involving volume pivot identification and price state tracking. It first detects significant volume pivot points using the ta.pivothigh function with a user-defined pivot period. It then tracks the market's order state based on whether the high exceeds the highest high or the low falls below the lowest low. When a volume pivot occurs, the indicator creates order blocks based on price levels at that pivot point. These blocks are continuously monitored for invalidation based on subsequent price action.
🟢 Key Features & Signals
1. Volume Delta Representation on Candles
The Volume Delta visualization on candles shows the buy/sell distribution directly on price bars, creating an immediate visual representation of volume pressure.
When buyers are dominant, candles are colored with the bullish theme color (default: green/teal).
Similarly, when sellers are dominant, candles are colored with the bearish theme color (default: red).
This visualization provides immediate insights into underlying volume pressure without requiring separate indicators, helping traders quickly identify which side of the market is in control.
2. Buy/Sell Pressure Information Table
The Volume Analysis Table provides a comprehensive breakdown of volume metrics across multiple timeframes, helping traders identify shifts in market behavior.
The table is organized into four timeframe columns:
Current Volume
1 Bar Before
1 Day Before
1 Week Before
For each timeframe, the table displays:
Buy volume: The estimated buying volume based on price action
Sell volume: The estimated selling volume based on price action
Total volume: The sum of buy and sell volume
Delta: The difference between buy and sell volume (positive when buyers are dominant, negative when sellers are dominant)
Additionally, the table shows both absolute values and percentage distributions, with trend indicators (Up, Down, or Neutral) at the bottom row of each timeframe column.
This multi-timeframe approach helps traders:
→ Identify volume imbalances between buyers and sellers
→ Track changes in volume delta across different periods
→ Compare current conditions with historical patterns
→ Detect potential reversals by watching for shifts in delta direction
The delta values are particularly useful as they provide a clear indication of market dominance – positive delta (Up) when buyers are dominant, and negative delta (Down) when sellers are dominant.
3. Order Blocks and Their Confluence
Order blocks represent significant price zones where volume pivots occur, potentially indicating areas of significant market participant activity.
The indicator identifies two types of order blocks:
Bullish Order Blocks (support): Highlighted with a green/teal color, these represent potential support areas where price might bounce when revisited
Bearish Order Blocks (resistance): Highlighted with a red color, these represent potential resistance areas where price might reverse when revisited
Each order block is visualized as a colored rectangle with a dashed line showing the average price within the block. The blocks are extended to the right until they are invalidated.
Order blocks can serve as key reference points for trading decisions, for example:
Support/resistance identification
Stop loss placement (beyond the opposite edge of the block)
Potential reversal zones
Target areas for profit-taking
When price approaches an order block, traders should look for confluence with the volume delta on candles and the information in the volume analysis table. Strong setups occur when all three components align – for example, when price approaches a bearish order block with increasing sell volume shown on the candles and in the volume table.
🟢 Practical Usage Tips
→ Volume Analysis and Interpretation: The indicator visualizes the buy/sell volume ratio directly on price candles using color intensity, allowing traders to immediately identify which side (buyers or sellers) is dominant. This information helps in assessing the strength behind price movements and potential continuation or reversal signals.
→ Order Block Trading Strategies: The indicator highlights significant price zones where volume pivots occur, marking these as potential support (bullish order blocks) or resistance (bearish order blocks). Traders can use these levels to identify potential reversal points, stop placement, and profit targets.
→ Multi-timeframe Volume Comparison: Through its comprehensive volume analysis table, the indicator enables traders to compare volume patterns across current, recent, daily, and weekly timeframes. This helps in identifying shifts in market behavior and confirming the strength of ongoing trends.
🟢 Pro Tips
Adjust Pivot Period based on your timeframe:
→ Lower values (3-5) for more frequent order blocks
→ Higher values (7-10) for stronger, less frequent order blocks
Fine-tune Mitigation Method based on your trading style:
→ "Wick" for more conservative invalidation
→ "Close" for more lenient order block survival
Look for confluence between components:
→ Strong volume delta in the expected direction when price touches an order block
→ Corresponding patterns in the volume analysis table
→ Overall market context aligning with the expected direction
Use for multiple trading approaches:
→ Support/resistance trading at order blocks
→ Trend confirmation with volume delta
→ Reversal detection when volume delta changes direction
→ Stop loss placement using order block boundaries
Combine with:
→ Trend analysis using trend-following indicators for trade confirmation
→ Multiple timeframe analysis for strategic context
RSI Trend Bias█ OVERVIEW
The RSI Trend Bias indicator is a custom technical analysis tool that utilizes the Relative Strength Index (RSI) to gauge market momentum and identify potential trend shifts. By monitoring RSI crossovers and crossunders relative to customizable threshold levels, the indicator provides clear visual cues that distinguish between bullish and bearish market conditions. This flexible approach makes it suitable for both short-term scalping and longer-term trend analysis.
█ KEY FEATURES
Dynamic RSI Trend Detection
The indicator dynamically determines market bias by monitoring the RSI for crossovers above the upper threshold and crossunders below the lower threshold. This method ensures that only significant momentum shifts trigger a change in trend, reducing false signals in volatile markets.
Adaptive Visualizations
The RSI Trend Bias indicator enhances clarity by plotting the RSI with colors that reflect current market conditions. Additionally, it offers an optional background color change to further emphasize bullish or bearish states, providing immediate visual feedback to traders.
Clear Threshold Indicators
Upper and lower threshold levels are plotted as constant reference lines, clearly delineating overbought and oversold regions. These markers help traders quickly assess market conditions at a glance.
Customizable Settings
Users have full control over key parameters including the RSI length, threshold levels, and visual settings. This customization allows the indicator to be tailored for different markets and trading styles, ensuring optimal performance across various timeframes.
█ UNDERLYING METHODOLOGY & CALCULATIONS
RSI Calculation
The indicator computes the Relative Strength Index over a user-defined period (default is 14), providing a measure of market momentum that reflects price changes over time.
Trend Determination Logic
By detecting when the RSI crosses above the upper threshold, the indicator signals a shift towards bullish momentum. Conversely, a crossunder below the lower threshold indicates bearish conditions. This straightforward binary approach filters out minor fluctuations, ensuring clarity in trend analysis.
Visual Signal Integration
Based on the detected trend, the RSI line is dynamically colored—green for bullish conditions and red for bearish conditions. An optional background color change further reinforces these signals, offering an immediate visual cue of prevailing market sentiment.
█ HOW TO USE THE INDICATOR
1 — Apply the Indicator
• Add the RSI Trend Bias indicator to a separate pane in your trading platform.
2 — Adjust Settings for Your Market
• RSI Length – Define the period for RSI calculation (default is 14).
• Threshold Levels – Set the upper (default 70) and lower (default 30) thresholds to identify overbought and oversold conditions.
• Visual Customization – Choose the bullish (green) and bearish (red) colors, and enable background color changes to enhance visual trend recognition.
3 — Interpret the Signals
• RSI Line – Observe the dynamically colored RSI line; a shift to green signals bullish momentum, while red indicates bearish conditions.
• Threshold Levels – Use the constant upper and lower lines as reference points for overbought and oversold states.
• Signal Timing – A crossover above the upper threshold or a crossunder below the lower threshold suggests potential entry or exit points.
4 — Integrate with Your Trading Strategy
• Combine RSI Trend Bias signals with other technical analysis tools to confirm market direction.
• Utilize the visual cues for fine-tuning your entry and exit decisions, ensuring robust risk management and optimized trade timing.
█ CONCLUSION
The RSI Trend Bias indicator offers a streamlined yet effective approach to monitoring market momentum. By leveraging the established principles of RSI analysis alongside dynamic visual cues, it enables traders to quickly identify bullish and bearish trends. Its customizable features and clear threshold indicators make it a valuable tool for enhancing technical analysis and making informed trading decisions.
[SHORT ONLY] 10 Bar Low Pullback█ STRATEGY DESCRIPTION
The "10 Bar Low Pullback" strategy is a contrarian short trading system designed to capture pullbacks after a new 10‐bar low is made. it identifies a potential short opportunity when the current bar’s low breaks below the lowest low of the previous 10 bars, provided that the bar exhibits strong internal momentum as measured by its IBS value. An optional trend filter further refines entries by requiring that the close is below a 200-period EMA.
█ WHAT IS INTERNAL BAR STRENGTH (IBS)?
Internal Bar Strength (IBS) measures where the closing price falls within the high-low range of a bar. It is calculated as:
ibs = (close - low) / (high - low)
- Low IBS (≤ 0.2): Indicates the close is near the bar's low, suggesting oversold conditions.
- High IBS (≥ 0.8): Indicates the close is near the bar's high, suggesting overbought conditions.
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The current bar’s low is below the lowest low of the past X bars (default: 10).
The bar’s IBS is greater than the specified threshold (default: 0.85).
The signal occurs within the defined trading window (between Start Time and End Time).
If the EMA Filter is enabled, the close must be below the 200-period EMA.
2. EXIT CONDITION
An exit Signal is generated when the current close falls below the previous bar’s low (close < low ), indicating a potential bearish reversal and prompting the strategy to close its short position.
█ ADDITIONAL SETTINGS
Lookback Period: Defines the number of bars (default is 10) over which the lowest low is calculated.
IBS Threshold: Sets the minimum required IBS value (default is 0.85) to qualify as a pullback.
Trading Window: Trades are only executed between the user-defined Start Time and End Time.
EMA Filter (Optional): When enabled, short entries are only considered if the current close is below the 200-period EMA, with the EMA period being adjustable (default is 200).
█ PERFORMANCE OVERVIEW
Designed for shorting opportunities, this strategy aims to capture pullbacks following an aggressive 10-bar low break.
It leverages a combination of a lookback low and IBS measurement to identify overextended bullish moves that may revert.
The optional EMA filter helps confirm a bearish market environment by ensuring the price remains under the trend line.
Suitable for use on various assets, including stocks and ETFs, on daily or similar timeframes.
Backtesting and parameter optimization are recommended to tailor the strategy to specific market conditions.
[SHORT ONLY] ATR Sell the Rip Mean Reversion Strategy█ STRATEGY DESCRIPTION
The "ATR Sell the Rip Mean Reversion Strategy" is a contrarian system that targets overextended price moves on stocks and ETFs. It calculates an ATR‐based trigger level to identify shorting opportunities. When the current close exceeds this smoothed ATR trigger, and if the close is below a 200-period EMA (if enabled), the strategy initiates a short entry, aiming to profit from an anticipated corrective pullback.
█ HOW IS THE ATR SIGNAL BAND CALCULATED?
This strategy computes an ATR-based signal trigger as follows:
Calculate the ATR
The strategy computes the Average True Range (ATR) using a configurable period provided by the user:
atrValue = ta.atr(atrPeriod)
Determine the Threshold
Multiply the ATR by a predefined multiplier and add it to the current close:
atrThreshold = close + atrValue * atrMultInput
Smooth the Threshold
Apply a Simple Moving Average over a specified period to smooth out the threshold, reducing noise:
signalTrigger = ta.sma(atrThreshold, smoothPeriodInput)
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The current close is above the smoothed ATR signal trigger.
The trade occurs within the specified trading window (between Start Time and End Time).
If the EMA filter is enabled, the close must also be below the 200-period EMA.
2. EXIT CONDITION
An exit Signal is generated when the current close falls below the previous bar’s low (close < low ), indicating a potential bearish reversal and prompting the strategy to close its short position.
█ ADDITIONAL SETTINGS
ATR Period: The period used to calculate the ATR, allowing for adaptability to different volatility conditions (default is 20).
ATR Multiplier: The multiplier applied to the ATR to determine the raw threshold (default is 1.0).
Smoothing Period: The period over which the raw ATR threshold is smoothed using an SMA (default is 10).
Start Time and End Time: Defines the time window during which trades are allowed.
EMA Filter (Optional): When enabled, short entries are only executed if the current close is below the 200-period EMA, confirming a bearish trend.
█ PERFORMANCE OVERVIEW
This strategy is designed for use on the Daily timeframe, targeting stocks and ETFs by capitalizing on overextended price moves.
It utilizes a dynamic, ATR-based trigger to identify when prices have potentially peaked, setting the stage for a mean reversion short entry.
The optional EMA filter helps align trades with broader market trends, potentially reducing false signals.
Backtesting is recommended to fine-tune the ATR multiplier, smoothing period, and EMA settings to match the volatility and behavior of specific markets.
[SHORT ONLY] Consecutive Bars Above MA Strategy█ STRATEGY DESCRIPTION
The "Consecutive Bars Above MA Strategy" is a contrarian trading system aimed at exploiting overextended bullish moves in stocks and ETFs. It monitors the number of consecutive bars that close above a chosen short-term moving average (which can be either a Simple Moving Average or an Exponential Moving Average). Once the count reaches a preset threshold and the current bar’s close exceeds the previous bar’s high within a designated trading window, a short entry is initiated. An optional EMA filter further refines entries by requiring that the current close is below the 200-period EMA, helping to ensure that trades are taken in a bearish environment.
█ HOW ARE THE CONSECUTIVE BULLISH COUNTS CALCULATED?
The strategy utilizes a counter variable, `bullCount`, to track consecutive bullish bars based on their relation to the short-term moving average. Here’s how the count is determined:
Initialize the Counter
The counter is initialized at the start:
var int bullCount = na
Bullish Bar Detection
For each bar, if the close is above the selected moving average (either SMA or EMA, based on user input), the counter is incremented:
bullCount := close > signalMa ? (na(bullCount) ? 1 : bullCount + 1) : 0
Reset on Non-Bullish Condition
If the close does not exceed the moving average, the counter resets to zero, indicating a break in the consecutive bullish streak.
█ SIGNAL GENERATION
1. SHORT ENTRY
A short signal is generated when:
The number of consecutive bullish bars (i.e., bars closing above the short-term MA) meets or exceeds the defined threshold (default: 3).
The current bar’s close is higher than the previous bar’s high.
The signal occurs within the specified trading window (between Start Time and End Time).
Additionally, if the EMA filter is enabled, the entry is only executed when the current close is below the 200-period EMA.
2. EXIT CONDITION
An exit signal is triggered when the current close falls below the previous bar’s low, prompting the strategy to close the short position.
█ ADDITIONAL SETTINGS
Threshold: The number of consecutive bullish bars required to trigger a short entry (default is 3).
Trading Window: The Start Time and End Time inputs define when the strategy is active.
Moving Average Settings: Choose between SMA and EMA, and set the MA length (default is 5), which is used to assess each bar’s bullish condition.
EMA Filter (Optional): When enabled, this filter requires that the current close is below the 200-period EMA, supporting entries in a downtrend.
█ PERFORMANCE OVERVIEW
This strategy is designed for stocks and ETFs and can be applied across various timeframes.
It seeks to capture mean reversion by shorting after a series of bullish bars suggests an overextended move.
The approach employs a contrarian short entry by waiting for a breakout (close > previous high) following consecutive bullish bars.
The adjustable moving average settings and optional EMA filter allow for further optimization based on market conditions.
Comprehensive backtesting is recommended to fine-tune the threshold, moving average parameters, and filter settings for optimal performance.
[SHORT ONLY] Consecutive Close>High[1] Mean Reversion Strategy█ STRATEGY DESCRIPTION
The "Consecutive Close > High " Mean Reversion Strategy is a contrarian daily trading system for stocks and ETFs. It identifies potential shorting opportunities by counting consecutive days where the closing price exceeds the previous day's high. When this consecutive day count reaches a predetermined threshold, and if the close is below a 200-period EMA (if enabled), a short entry is triggered, anticipating a corrective pullback.
█ HOW ARE THE CONSECUTIVE BULLISH COUNTS CALCULATED?
The strategy uses a counter variable called `bullCount` to track how many consecutive bars meet a bullish condition. Here’s a breakdown of the process:
Initialize the Counter
var int bullCount = 0
Bullish Bar Detection
Every time the close exceeds the previous bar's high, increment the counter:
if close > high
bullCount += 1
Reset on Bearish Bar
When there is a clear bearish reversal, the counter is reset to zero:
if close < low
bullCount := 0
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The count of consecutive bullish closes (where close > high ) reaches or exceeds the defined threshold (default: 3).
The signal occurs within the specified trading window (between Start Time and End Time).
2. EXIT CONDITION
An exit Signal is generated when the current close falls below the previous bar’s low (close < low ), prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
Threshold: The number of consecutive bullish closes required to trigger a short entry (default is 3).
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
EMA Filter (Optional): When enabled, short entries are only triggered if the current close is below the 200-period EMA.
█ PERFORMANCE OVERVIEW
This strategy is designed for Stocks and ETFs on the Daily timeframe and targets overextended bullish moves.
It aims to capture mean reversion by entering short after a series of consecutive bullish closes.
Further optimization is possible with additional filters (e.g., EMA, volume, or volatility).
Backtesting should be used to fine-tune the threshold and filter settings for specific market conditions.
[SHORT ONLY] Internal Bar Strength (IBS) Mean Reversion Strategy█ STRATEGY DESCRIPTION
The "Internal Bar Strength (IBS) Strategy" is a mean-reversion strategy designed to identify trading opportunities based on the closing price's position within the daily price range. It enters a short position when the IBS indicates overbought conditions and exits when the IBS reaches oversold levels. This strategy is Short-Only and was designed to be used on the Daily timeframe for Stocks and ETFs.
█ WHAT IS INTERNAL BAR STRENGTH (IBS)?
Internal Bar Strength (IBS) measures where the closing price falls within the high-low range of a bar. It is calculated as:
IBS = (Close - Low) / (High - Low)
- Low IBS (≤ 0.2) : Indicates the close is near the bar's low, suggesting oversold conditions.
- High IBS (≥ 0.8) : Indicates the close is near the bar's high, suggesting overbought conditions.
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The IBS value rises to or above the Upper Threshold (default: 0.9).
The Closing price is greater than the previous bars High (close>high ).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
An exit Signal is generated when the IBS value drops to or below the Lower Threshold (default: 0.3). This prompts the strategy to exit the position.
█ ADDITIONAL SETTINGS
Upper Threshold: The IBS level at which the strategy enters trades. Default is 0.9.
Lower Threshold: The IBS level at which the strategy exits short positions. Default is 0.3.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for Stocks and ETFs markets and performs best when prices frequently revert to the mean.
The strategy can be optimized further using additional conditions such as using volume or volatility filters.
It is sensitive to extreme IBS values, which help identify potential reversals.
Backtesting results should be analyzed to optimize the Upper/Lower Thresholds for specific instruments and market conditions.
Ultimate Volatility Scanner by NHBprod - Requested by Client!Hey Everyone!
I created another script to add to my growing library of strategies and indicators that I use for automated crypto and stock trading! This strategy is for BITCOIN but can be used on any stock or crypto. This was requested by a client so I thought I should create it and hopefully build off of it and build variants!
This script gets and compares the 14-day volatility using the ATR percentage for a list of cryptocurrencies and stocks. Cryptocurrencies are preloaded into the script, and the script will show you the TOP 5 coins in terms of volatility, and then compares it to the Bitcoin volatility as a reference. It updates these values once per day using daily timeframe data from TradingView. The coins are then sorted in descending order by their volatility.
If you don't want to use the preloaded set of coins, you have the option of inputting your own coins AND/OR stocks!
Let me know your thoughts.
Dynamic Weighted Price Flow [QuantAlgo]Experience a brand new way of analyzing price movement with Dynamic Weighted Price Flow , an advanced technical tool that utilizes the uniqueness of weighted price and dynamic momentum analysis to evaluate trends and deliver high-probability signals. Whether you're a long-term investor seeking major trend confirmation or an active trader looking for precise entries and exits, this indicator's sophisticated and innovative approach to price flow analysis offers invaluable market insights you can only find at QuantAlgo !
🟢 Core Architecture
The Dynamic Weighted Price Flow's foundation rests on its innovative weighted price calculation and momentum-based trend scoring system. By implementing a unique price weighting algorithm alongside Hull Moving Average smoothing, each market move is evaluated within a dynamic context while maintaining exceptional responsiveness to price action. This refined approach helps identify genuine trend transitions while filtering out market noise across multiple timeframes and instruments.
🟢 Technical Foundation
Three key components of this indicator are:
Weighted Price Analysis: Utilizes a sophisticated weighting system that prioritizes recent price action
Momentum Range Processing: A comprehensive scoring system that evaluates price momentum across multiple periods
Dynamic Trend State Management: A normalized system that tracks and validates trend transitions
🟢 Practical Usage Tips
Here's how to maximize your use of the Dynamic Weighted Price Flow :
1/ Setup:
Add the indicator to your favorites ⭐️
Start with the default baseline period for balanced analysis
Use the recommended momentum range for optimal signal generation
Keep signal markers enabled for clear trend transitions
Customize accent colors to match your preferences
Enable dynamic price bars for complete visual feedback
2/ Reading Signals:
Monitor for triangle markers indicating trend transitions
Watch the main trend line color for direction confirmation
Observe the gradient fills for trend strength visualization
Use the built-in alert system to catch potential setups
🟢 Pro Tips
Adjust Baseline Period based on your trading style:
→ Lower values (1-5) for more responsive signals
→ Higher values (5-10) for more stable trend identification
Fine-tune Momentum Range based on market conditions:
→ Lower values (20-35) for shorter-term signals
→ Higher values (35-50) for longer-term trend following
Optimize Visual Settings for your strategy:
→ Enable signal markers for clear entry/exit points
→ Use dynamic price bars for enhanced trend visualization
Combine with:
→ Volume indicators for trade confirmation
→ Support/resistance levels for entry refinement
→ Multiple timeframe analysis for strategic context
Statistical Arbitrage Pairs Trading - Long-Side OnlyThis strategy implements a simplified statistical arbitrage (" stat arb ") approach focused on mean reversion between two correlated instruments. It identifies opportunities where the spread between their normalized price series (Z-scores) deviates significantly from historical norms, then executes long-only trades anticipating reversion to the mean.
Key Mechanics:
1. Spread Calculation: The strategy computes Z-scores for both instruments to normalize price movements, then tracks the spread between these Z-scores.
2. Modified Z-Score: Uses a robust measure combining the median and Median Absolute Deviation (MAD) to reduce outlier sensitivity.
3. Entry Signal: A long position is triggered when the spread’s modified Z-score falls below a user-defined threshold (e.g., -1.0), indicating extreme undervaluation of the main instrument relative to its pair.
4. Exit Signal: The position closes automatically when the spread reverts to its historical mean (Z-score ≥ 0).
Risk management:
Trades are sized as a percentage of equity (default: 10%).
Includes commissions and slippage for realistic backtesting.
Bearish Wick Reversal█ STRATEGY OVERVIEW
The "Bearish Wick Reversal Strategy" identifies potential bullish reversals following significant bearish price rejection (long lower wicks). This counter-trend approach enters long positions when bearish candles show exaggerated downside wicks relative to closing prices, then exits on bullish confirmation signals. Includes optional EMA trend filtering for improved reliability.
█ What is a Bearish Wick?
A price rejection pattern where:
Bearish candle (close < open) forms with extended lower wick
Wick represents failed selloff: Low drops significantly below close
Measured as: (Low - Close)/Close × 100 (Negative percentage indicates downward extension)
█ SIGNAL GENERATION
1. LONG ENTRY CONDITION
Bearish candle forms with close < open
Lower wick exceeds user-defined threshold (Default: -1% of close price)
The signal occurs within the specified time window
If enabled, the close price must also be above the 200-period EMA (Exponential Moving Average)
2. EXIT CONDITION
A Sell Signal is generated when the current closing price exceeds the highest high of the previous seven bars (`close > _highest `). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ PERFORMANCE OVERVIEW
Ideal Market: Volatile instruments with frequent price rejections
Key Risk: False signals in sustained bearish trends
Optimization Tip: Test various thresholds
Filter Impact: EMA reduces trades but improves win rate and reduces drawdown
Gap Down Reversal Strategy█ STRATEGY OVERVIEW
The "Gap Down Reversal Strategy" capitalizes on price recovery patterns following bearish gap-down openings. This mean-reversion approach enters long positions on confirmed intraday recoveries and exits when prices breach previous session highs. This strategy is NOT optimized.
█ What is a Gap Down Reversal?
A gap down reversal occurs when:
An instrument opens significantly below its prior session's low (price gap)
Selling pressure exhausts itself during the session
Buyers regain control, pushing price back above the opening level
Creates a candlestick with:
• Open < Prior Session Low (true gap)
• Close > Open (bullish reversal candle)
█ SIGNAL GENERATION
1. LONG ENTRY CONDITION
Previous candle closes BELOW its opening price (bearish candle)
Current session opens BELOW prior candle's low (gap down)
Current candle closes ABOVE its opening price (bullish reversal)
Executes market order at session close
2. EXIT CONDITION
A Sell Signal is generated when the current closing price exceeds the highest high of the previous seven bars (`close > _highest `). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ PERFORMANCE OVERVIEW
Ideal Market: High volatility instruments with frequent gaps
Key Risk: False reversals in sustained downtrends
Optimization Tip: Test varying gap thresholds (1-3% ranges)
3 Down, 3 Up Strategy█ STRATEGY DESCRIPTION
The "3 Down, 3 Up Strategy" is a mean-reversion strategy designed to capitalize on short-term price reversals. It enters a long position after consecutive bearish closes and exits after consecutive bullish closes. This strategy is NOT optimized and can be used on any timeframes.
█ WHAT ARE CONSECUTIVE DOWN/UP CLOSES?
- Consecutive Down Closes: A sequence of trading bars where each close is lower than the previous close.
- Consecutive Up Closes: A sequence of trading bars where each close is higher than the previous close.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The price closes lower than the previous close for Consecutive Down Closes for Entry (default: 3) consecutive bars.
The signal occurs within the specified time window (between Start Time and End Time).
If enabled, the close price must also be above the 200-period EMA (Exponential Moving Average).
2. EXIT CONDITION
A Sell Signal is generated when the price closes higher than the previous close for Consecutive Up Closes for Exit (default: 3) consecutive bars.
█ ADDITIONAL SETTINGS
Consecutive Down Closes for Entry: Number of consecutive lower closes required to trigger a buy. Default = 3.
Consecutive Up Closes for Exit: Number of consecutive higher closes required to exit. Default = 3.
EMA Filter: Optional 200-period EMA filter to confirm long entries in bullish trends. Default = disabled.
Start Time and End Time: Restrict trading to specific dates (default: 2014-2099).
█ PERFORMANCE OVERVIEW
Designed for volatile markets with frequent short-term reversals.
Performs best when price oscillates between clear support/resistance levels.
The EMA filter improves reliability in trending markets but may reduce trade frequency.
Backtest to optimize consecutive close thresholds and EMA period for specific instruments.