Asset Rotation System [InvestorUnknown]Overview
This system creates a comprehensive trend "matrix" by analyzing the performance of six assets against both the US Dollar and each other. The objective is to identify and hold the asset that is currently outperforming all others, thereby focusing on maintaining an investment in the most "optimal" asset at any given time.
- - - Key Features - - -
1. Trend Classification:
The system evaluates the trend for each of the six assets, both individually against USD and in pairs (assetX/assetY), to determine which asset is currently outperforming others.
Utilizes five distinct trend indicators: RSI (50 crossover), CCI, SuperTrend, DMI, and Parabolic SAR.
Users can customize the trend analysis by selecting all indicators or choosing a single one via the "Trend Classification Method" input setting.
2. Backtesting:
Calculates an equity curve for each asset and for the system itself, which assumes holding only the asset deemed optimal at any time.
Customizable start date for backtesting; by default, it begins either 5000 bars ago (the maximum in TradingView) or at the inception of the youngest asset included, whichever is shorter. If the youngest asset's history exceeds 5000 bars, the system uses 5000 bars to prevent errors.
The equity curve is dynamically colored based on the asset held at each point, with this coloring also reflected on the chart via barcolor().
Performance metrics like returns, standard deviation of returns, Sharpe, Sortino, and Omega ratios, along with maximum drawdown, are computed for each asset and the system's equity curve.
3 Alerts:
Supports alerts for when a new, confirmed optimal asset is identified. However, due to TradingView limitations, the specific asset cannot be included in the alert message.
- - - Usage - - -
1. Select Assets/Tickers:
Choose which assets or tickers you want to include in the rotation system. Ensure that all selected tickers are denominated in USD to maintain consistency in analysis.
2. Configure Trend Classification:
Decide on the trend classification method from the available options (RSI, CCI, SuperTrend, DMI, or Parabolic SAR, All) and adjust the settings to your preferences. This customization allows you to tailor the system to different market conditions or your specific trading strategy.
3. Utilize Backtesting for Calibration:
Use the backtesting results, including equity curves and performance metrics, to fine-tune your chosen trend indicators.
Be cautious not to overemphasize performance maximization, as this can lead to overfitting. The goal is to achieve a robust system that performs well across various market conditions, rather than just optimizing for past data.
- - - Parameters - - -
Tickers:
Asset 1: Select the symbol for the first asset.
Asset 2: Select the symbol for the second asset.
Asset 3: Select the symbol for the third asset.
Asset 4: Select the symbol for the fourth asset.
Asset 5: Select the symbol for the fifth asset.
Asset 6: Select the symbol for the sixth asset.
General Settings:
Trend Classification Method: Choose from RSI, CCI, SuperTrend, DMI, PSAR, or "All" to determine how trends are analyzed.
Use Custom Starting Date for Backtest: Toggle to use a custom date for beginning the backtest.
Custom Starting Date: Set the custom start date for backtesting.
Plot Perf. Metrics Table: Option to display performance metrics in a table on the chart.
RSI (Relative Strength Index):
RSI Source: Choose the price data source for RSI calculation.
RSI Length: Set the period for the RSI calculation.
CCI (Commodity Channel Index):
CCI Source: Select the price data source for CCI calculation.
CCI Length: Determine the period for the CCI.
SuperTrend:
SuperTrend Factor: Adjust the sensitivity of the SuperTrend indicator.
SuperTrend Length: Set the period for the SuperTrend calculation.
DMI (Directional Movement Index):
DMI Length: Define the period for DMI calculations.
Parabolic SAR:
PSAR Start: Initial acceleration factor for the Parabolic SAR.
PSAR Increment: Increment value for the acceleration factor.
PSAR Max Value: Maximum value the acceleration factor can reach.
Notes/Recommendations:
While this system is operational, it's important to recognize that it relies on "basic" indicators, which may not be ideal for generating trading signals on their own. I strongly suggest that users delve into the code to grasp the underlying logic of the system. Consider customizing it by integrating more sophisticated and higher-quality trend-following indicators to enhance its performance and reliability.
Disclaimer:
This system's backtest results are historical and do not predict future performance. Use for educational purposes only; not investment advice.
Statistics
Autocorrelation Price Forecasting [ScrimpleAI]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.
Key Features
1. 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.
2. Price Autocorrelation: uses the ta.correlation function to measure price autocorrelation, detecting significant cycles when the value exceeds a defined threshold ( signal_threshold = 0.50 ).
3. Linear Regression on Returns: calculates percentage returns and applies linear regression to identify the future projected price value.
4. Hypothetical Gain Assessment: evaluates potential profit by comparing the estimated future price with the current price.
5. Visual Alerts:
- 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.
💡 What do you think about this model?
If you already use autocorrelation-based analysis or want to try predictive strategies, leave a comment with your feedback!
Volatility & Big Market MovesThis indicator shows the volatility per candle, and highlights candles where volatility exceeds a defined threshold.
Data shown:
Furthest %-distance from the previous candle's closing price to the top (positive histogram).
Furthest %-distance from the previous candle's closing price to the bottom (negative histogram).
[COG] Advanced School Run StrategyAdvanced School Run Strategy (ASRS) – Explanation
Overview: The Advanced School Run Strategy (ASRS) is an intraday trading approach designed to identify breakout opportunities based on specific time and price patterns. This script applies the concepts of the Advanced School Run Strategy as outlined in Tom Hougaard's research, adapted to work seamlessly on TradingView charts. It leverages 5-minute candlestick data to set actionable breakout levels and provides traders with visual cues and alerts to make informed decisions.
Features:
Dynamic Breakout Levels: Automatically calculates high and low levels based on the market's behavior during the initial trading minutes.
Custom Visualization: Highlights breakout zones with customizable colors and transparency, providing clear visual feedback for bullish and bearish breakouts.
Configurable Alerts: Includes alert conditions for both bullish and bearish breakouts, ensuring traders never miss a trading opportunity.
Reset Logic: Resets breakout levels daily at the market open to ensure accurate signal generation for each session.
How It Works:
The script identifies key levels (high and low) after a configurable number of minutes from the market open (default: 25 minutes).
If the price breaks above the high level or below the low level, a corresponding breakout is detected.
The script draws breakout zones on the chart and triggers alerts based on the breakout direction.
All levels and signals reset at the start of each new trading session, maintaining relevance to current market conditions.
Customization Options:
Line and box colors for bullish and bearish breakouts.
Transparency levels for breakout visualizations.
Alert settings to receive notifications for detected breakouts.
Acknowledgment: This script is inspired by Tom Hougaard's Advanced School Run Strategy. The methodology has been translated into Pine Script for TradingView users, adhering to TradingView’s policies and community guidelines. This script does not redistribute proprietary content from the original research but implements the principles for educational and analytical purposes.
Dynamic Price Change Percentage TrackerSet price in plugin's configuration and watch the percentage change between the configured price and the current ticker's price.
Moon Phases by Shailesh DesaiTrading Strategy Based on Lunar Phases
This custom trading indicator leverages the power of lunar cycles to provide unique market insights based on the four primary moon phases: New Moon, First Quarter, Full Moon, and Third Quarter. By aligning your trades with the natural rhythm of the moon, this strategy offers a different perspective to trading and can help enhance decision-making based on the cyclical nature of the market.
Key Features:
1. Moon Phase Identification:
o The indicator automatically identifies the current moon phase based on the user's selected timeframe and marks it on the chart.
o Each phase is visualized with a specific symbol and color to help traders easily recognize the current moon phase:
New Moon/Waxing Moon: Represented by a circle (colored as per user input).
First Quarter: Represented by a cross (colored as per user input).
Full Moon/Waning Moon: Represented by a circle (colored as per user input).
Third Quarter: Represented by a cross (colored as per user input).
2. Automatic Moon Phase Transition Detection:
o The indicator tracks and highlights when a phase change occurs. This feature ensures you are always aware of when the market moves from one phase to another.
o Moon phase changes are only visualized on the first bar of each new phase to avoid cluttering the chart.
3. Background Color Indicators:
o The background color dynamically changes according to the current moon phase, helping to reinforce the phase context for the trader. This feature makes it easy to see at a glance which phase the market is in.
4. Customizable Appearance:
o Customize the color of each moon phase to suit your preferences. Adjust the colors for the New Moon, First Quarter, Full Moon, and Third Quarter to align with your visual strategy.
5. Avoids Unsupported Timeframes:
o This indicator does not support monthly timeframes, ensuring that it operates smoothly only on timeframes that are compatible with the lunar cycle.
How to Use:
• The moon phases are thought to have an influence on human behavior and the market's psychology, making this indicator useful for traders who wish to integrate lunar cycles into their strategy.
• Traders can use the phase changes as an indicator of potential market momentum or reversal points. For example:
o New Moon may indicate the beginning of a new cycle, signaling a potential upward or downward move.
o Full Moon might suggest a peak or significant shift in market direction.
o First Quarter and Third Quarter phases may represent moments of consolidation or decision points.
Ideal for:
• Traders interested in cycle-based strategies or looking to experiment with new approaches.
• Those who believe in the influence of natural forces, including moon phases, on market movements.
• Technical analysts who want to add another layer of insights to their chart analysis.
Important Notes:
• The indicator uses precise astronomical calculations to identify the correct phase, ensuring accuracy.
• It’s important to understand that moon phase-based trading is not a standalone strategy but should ideally be combined with other technical analysis tools for maximum effectiveness.
Anomaly DetectorPrice Anomaly Detector
This is a script designed to identify unusual price movements. By analyzing deviations from typical price behavior, this tool helps traders spot potential trading opportunities and manage risks effectively.
---
Features
- Anomaly Detection: Flags price points that significantly deviate from the average.
- Visual Indicators: Highlights anomalies with background colors and cross markers.
- Customizable Settings: Adjust sensitivity and window size to match your trading strategy.
- Real-Time Analysis: Continuously updates anomaly signals as new data is received.
---
Usage
After adding the indicator to your chart:
1. View Anomalies: Red backgrounds and cross markers indicate detected anomalies.
2. Adjust Settings: Modify the `StdDev Threshold` and `Window Length` to change detection sensitivity.
3. Interpret Signals:
- Red Background: Anomaly detected on that bar.
- Red Cross: Specific point of anomaly.
---
Inputs
- StdDev Threshold: Higher values reduce anomaly sensitivity. Default: 2.0.
- Window Length: Larger windows smooth data, reducing false positives. Default: 20.
---
Limitations
- Approximation Method: Uses a simple method to detect anomalies, which may not capture all types of unusual price movements.
- Performance: Extremely large window sizes may impact script performance.
- Segment Detection: Does not group consecutive anomalies into segments.
---
Disclaimer : This tool is for educational purposes only. Trading involves risk, and you should perform your own analysis before making decisions. The author is not liable for any losses incurred.
Z PLUS take profit & Stop lose Here’s a breakdown of the provided Pine Script code for the ZPLUS indicator, which combines a moving average strategy with ATR (Average True Range) and swing detection for trading signals.
Overview of the Code
1. Indicator Setup
- The script is set to overlay on the price chart and specifies a maximum look-back period for bars.
```pinescript
indicator('ZPLUS', overlay=true, max_bars_back=4000)
```
2. Moving Average Strategy
- The moving average strategy is implemented with user-defined parameters like `timer`, `MTP` (Multiplier for ATR), and `sf` (smoothing factor).
- An exponential smoothing technique is applied to the source data, which is defined as the average of high and low prices (`hl2`).
```pinescript
timer = 8
source = hl2
MTP = 5.0
sf = 0.2
avg = 0.
srca = sf * source + (1 - sf) * nz(avg , source)
```
3. ATR Calculation
- The script calculates the ATR based on a specified length. This ATR value is used to determine the upper and lower bounds (`upa` and `dna`) for potential entry points.
```pinescript
atrsecond = ta.sma(ta.tr, timer)
atr = changeATR ? ta.atr(timer) : atrsecond
upa = srca - MTP * atr
dna = srca + MTP * atr
```
4. Trend Detection
- The script detects the trend based on the close price relative to the calculated upper and lower bands.
- The RSI (Relative Strength Index) is also incorporated to confirm the trend signals.
```pinescript
rsiPeriod = 14
rsiValue = ta.rsi(close, rsiPeriod)
trenda := trenda == -1 and close > dn1a and rsiValue > rsiOversold ? 1 : trenda == 1 and close < up1a and rsiValue < rsiOverbought ? -1 : trenda
```
5. Signal Generation
- Long and short signals are generated based on the trend detection logic.
```pinescript
LongSignal = trenda == 1 and trenda == -1
ShortSignal = trenda == -1 and trenda == 1
```
6. ATR Stop and Swing High/Low TP
- The script calculates trailing stops based on ATR and determines swing high and low points for setting take profit (TP) levels.
```pinescript
up = hl2 - m * ta.atr(atrLen)
dn = hl2 + m * ta.atr(atrLen)
```
7. Plotting
- The calculated ATR trend and take profit levels are plotted on the chart. Signals for long and short positions are visually represented.
```pinescript
plot(stop, color=lineColor, style=plot.style_line, linewidth=1, title='ATR Trend')
```
8. Alerts for Trading Signals
- Alerts are set up to notify users when long or short signals are generated, including details like entry price and stop loss levels.
```pinescript
if LongSignal
alert(message, alert.freq_once_per_bar_close)
```
9. Dynamic Table Display
- A table is created to display the current signal, entry price, and take profit/stop loss levels dynamically on the chart.
```pinescript
var tbl = table.new(position = position.top_right, columns = 7, rows = 10, frame_color = color.blue, frame_width = 3, border_color = color.blue, border_width = 3)
```
Summary
The ZPLUS indicator combines several technical analysis techniques, including moving averages, ATR for volatility, and swing detection, to generate trading signals. It aims to provide a structured approach for identifying potential buy and sell opportunities based on market behavior.
Suggestions for Improvement
1. Parameter Flexibility: Consider allowing users to input their own parameters for ATR length, smoothing factor, and RSI levels to customize the indicator for different trading styles.
2. Visual Enhancements: You might want to incorporate more distinct visual cues, such as arrows or different shapes for buy/sell signals, to enhance usability.
3. Backtesting: Incorporating a backtesting feature would be beneficial for traders to evaluate the performance of the strategy over historical data.
If you have specific questions about the code or need modifications, feel free to ask!
Takion2TVPlots Takion trades execution.
Takion's "Execution" window -> Select All -> Clipboard -> Paste into the main indicator's text area (settings) -> Enjoy.
JC StrategyThe strategy focuses on maintaining control over exposure while seeking profitable opportunities based on the spread between bid and ask prices . The strategy operates with specific constants, including maximum long and short exposure levels, a fixed order limit, and a defined spread threshold necessary for profitability. It targets a dynamic trading environment where real-time price adjustments are crucial.
Professor The Trader [AIS]Professor The Trader
Your Ultimate Bank Nifty Trading Assistant
Professor The Trader is a comprehensive indicator designed specifically for trading Bank Nifty, equipped with all the essential tools to make trading decisions easier, more precise, and profitable.
Key Features:
Candle Color Change for Entry Signal:
Once entry conditions are met, the candle color changes to purple, signaling a potential entry.
Wait for the entry candle to close to confirm and execute the trade.
Automatic Target and Stop-Loss Plotting:
Targets and stop-loss levels are automatically plotted based on default values.
These values can be customized in the settings for your preferred risk-reward ratio.
Strike Price Logic for Easy Premium Targets:
Entry conditions are evaluated for strike prices above ₹600 premium, and the system recommends entering a strike price close to a ₹900 premium.
This ensures the default target is achieved with ease.
Dynamic Background Alerts:
The background color changes to indicate a pre-entry alert.
This signals that an entry opportunity might arise, helping you prepare in advance.
Timeframe Synchronization:
Compatible with both 3-minute and 5-minute timeframes.
If a trade is active in one timeframe (e.g., 3m), entries on the other timeframe (e.g., 5m) are automatically ignored to avoid conflict.
Support & Resistance (S&R) Levels:
Automatically plots key support and resistance levels.
Green color: Indicates entry is possible.
Red color: Indicates entry is not possible.
Additional Features for Enhanced Trading:
Trendline and Moving S&R: Dynamic tools to visualize market structure.
Instruction Box: Toggleable instructions to guide you on using the indicator effectively.
Re-Entry Option: Enable or disable re-entry alerts based on your strategy.
Why Use Professor The Trader?
This indicator simplifies your Bank Nifty trades with a clear and actionable approach. Whether you're a beginner or an experienced trader, it helps you focus on high-probability trades, minimize risks, and achieve consistent results.
Take control of your Bank Nifty trading with Professor The Trader—because trading should be as sharp as a professor’s wisdom!
Rolling CAGRRolling CAGR (Compound Annual Growth Rate) Indicator
This indicator calculates and plots the rolling Compound Annual Growth Rate (CAGR) for any selected data source. CAGR represents the mean annual growth rate of an investment over a specified time period, taking into account the effect of compounding.
Features:
• Customizable data source (default: close price)
• Adjustable time period in years
• Configurable trading days per year (252 for stocks, 365 for crypto)
• Results displayed as percentage values
• Works on daily timeframes
Input Parameters:
• Data Source: Select the price or indicator data to analyze
• Number of Years: Set the lookback period for CAGR calculation
• Trading Days in a Year: Adjust based on market type (252 for stocks, 365 for crypto)
Usage:
Perfect for analyzing long-term growth rates and comparing investment performance across different periods. The indicator provides a rolling view of compound growth, helping traders and investors understand the sustained growth rate of an asset over their chosen timeframe.
Note: This indicator is designed for daily timeframes as CAGR calculations are most meaningful over longer periods.
Formula Used:
CAGR = (End Value / Start Value)^(1/number of years) - 1
Independent Dynamic Trailing Stop Loss %% trailing stop loss lines. Green for long. Red for short trend lines. Default values of 5%,10% and 15% were given. When candle closes below long line, short line starts. when candle closes above short line, long line starts.
Quantitative Breakout Bands (AIBitcoinTrend)Quantitative Breakout Bands (AIBitcoinTrend) is an advanced indicator designed to adapt to dynamic market conditions by utilizing a Kalman filter for real-time data analysis and trend detection. This innovative tool empowers traders to identify price breakouts, evaluate trends, and refine their trading strategies with precision.
👽 What Are Quantitative Breakout Bands, and Why Are They Unique?
Quantitative Breakout Bands combine advanced filtering techniques (Kalman Filters) with statistical measures such as mean absolute error (MAE) to create adaptive price bands. These bands adjust to market conditions dynamically, providing insights into volatility, trend strength, and breakout opportunities.
What sets this indicator apart is its ability to incorporate both position (price) and velocity (rate of price change) into its calculations, making it highly responsive yet smooth. This dual consideration ensures traders get reliable signals without excessive lag or noise.
👽 The Math Behind the Indicator
👾 Kalman Filter Estimation:
At the core of the indicator is the Kalman Filter, a recursive algorithm used to predict the next state of a system based on past observations. It incorporates two primary elements:
State Prediction: The indicator predicts future price (position) and velocity based on previous values.
Error Covariance Adjustment: The process and measurement noise parameters refine the prediction's accuracy by balancing smoothness and responsiveness.
👾 Breakout Bands Calculation:
The breakout bands are derived from the mean absolute error (MAE) of price deviations relative to the filtered trendline:
float upperBand = kalmanPrice + bandMultiplier * mae
float lowerBand = kalmanPrice - bandMultiplier * mae
The multiplier allows traders to adjust the sensitivity of the bands to market volatility.
👾 Slope-Based Trend Detection:
A weighted slope calculation measures the gradient of the filtered price over a configurable window. This slope determines whether the market is trending bullish, bearish, or neutral.
👾 Trailing Stop Mechanism:
The trailing stop employs the Average True Range (ATR) to calculate dynamic stop levels. This ensures positions are protected during volatile moves while minimizing premature exits.
👽 How It Adapts to Price Movements
Dynamic Noise Calibration: By adjusting process and measurement noise inputs, the indicator balances smoothness (to reduce noise) with responsiveness (to adapt to sharp price changes).
Trend Responsiveness: The Kalman Filter ensures that trend changes are quickly identified, while the slope calculation adds confirmation.
Volatility Sensitivity: The MAE-based bands expand and contract in response to changes in market volatility, making them ideal for breakout detection.
👽 How Traders Can Use the Indicator
👾 Breakout Detection:
Bullish Breakouts: When the price moves above the upper band, it signals a potential upward breakout.
Bearish Breakouts: When the price moves below the lower band, it signals a potential downward breakout.
The trailing stop feature offers a dynamic way to lock in profits or minimize losses during trending moves.
👾 Trend Confirmation:
The color-coded Kalman line and slope provide visual cues:
Bullish Trend: Positive slope, green line.
Bearish Trend: Negative slope, red line.
👽 Why It’s Useful for Traders
Dynamic and Adaptive: The indicator adjusts to changing market conditions, ensuring relevance across timeframes and asset classes.
Noise Reduction: The Kalman Filter smooths price data, eliminating false signals caused by short-term noise.
Comprehensive Insights: By combining breakout detection, trend analysis, and risk management, it offers a holistic trading tool.
👽 Indicator Settings
Process Noise (Position & Velocity): Adjusts filter responsiveness to price changes.
Measurement Noise: Defines expected price noise for smoother trend detection.
Slope Window: Configures the lookback for slope calculation.
Lookback Period for MAE: Defines the sensitivity of the bands to volatility.
Band Multiplier: Controls the band width.
ATR Multiplier: Adjusts the sensitivity of the trailing stop.
Line Width: Customizes the appearance of the trailing stop line.
Disclaimer: This indicator is designed for educational purposes and does not constitute financial advice. Please consult a qualified financial advisor before making investment decisions.
Fair BasisFair Bazis — это полезный инструмент для наглядного анализа справедливого базиса между фьючерсами и акциями Московской Биржи, созданный для работы с графиками типа:
FUT-SPOT*RATIO или FUT-SPOT (если ratio равен 1).
Этот индикатор автоматически извлекает данные из названия тикера графика и вычисляет справедливую раздвижку (базис) с учётом:
Ставки репо, которую можно задать вручную (по умолчанию 21%).
Даты экспирации фьючерса (по умолчанию 20 марта 2025 года)
Работает только на графиках формата FUT-SPOT*RATIO или FUT-SPOT.
Обязательно с префиксом - "RUS:" например: RUS:SRH2025-RUS:SBER*100 или RUS:YDH2025-RUS:YDEX
Только мосбиржа
НЕ УЧИТЫВАЕТ ДИВИДЕНТЫ.
Multi-Indicator Trading System with ConfirmationWe have used the following indicators EMA cross over, RSI , VWAP, bollinger bands,support and resistance levels, that a regular trader uses to get a confirmation to sell or buy, this custom indicator givesa buy or sell signal when atleast 3 of the avove indicators give confirmation.
9:30-10:30 Range stats time and price (MEDIANS) v2
www.youtube.com
^^MEDIANS VERSION OF THIS
Medians is more accurate according to data science
Imagine you're watching a special clock between 9:30 and 10:30. During this time, we mark the highest and lowest numbers, like marking how high and low a roller coaster goes.
When the numbers go below our lowest mark, we can check what usually happens next by looking at past patterns:
In the last three times this happened, the numbers never went back up to the highest mark
We can even see what time the lowest point usually happens (around 1:49)
We can measure how far down the numbers usually go (about 0.52% lower)
This helps us make better guesses about where the numbers might go next, kind of like knowing that after a big drop on a roller coaster, there's usually a small climb before another drop. But remember - just because something happened before doesn't mean it will happen exactly the same way again!
Range Averages [Blu_Ju]Using Ranges
A popular analysis technique among traders is to use statistical price data over a given time range. For example, a trader might want to examine the average price range for the time period of 9:30 am - 10:00 am EST (commonly referred to as the Opening Range), and compare the average range to the current, live range as it forms.
What this Script Does
This script allows a user to monitor the current price range against the average price range of up to six different periods of time (sessions). The data is presented in a table in the chart window, with four stats listed per session:
Range: This is the most recent (or current) price range for the session. This value is updated in real-time as the price range forms.
Avg: This is the average price range for the session. (See below for how this is calculated.)
Diff: This is the price difference between the most recent (or current) price range of the session and the average price range of the session. When the most recent price range is smaller than the average, this will be a negative number. This value is updated in real-time as the price range forms.
Range %: This is the percent value of the most recent (or current) price range of the session compared to the average price range of the session. For example, If the most recent price range was half that of the average price range, the Range % would be 50%. If the most recent price range was twice that of the average price range, the Range % would be 200%. A Range % value of 100% indicates that the most recent price range is equal to the average price range. This value is updated in real-time as the price range forms.
What Makes this Script Unique
While this is not the only publicly available average range script, what makes it unique is the complete user control over up to six sessions (including overlapping sessions) and the display of that data.
Scope of this Script
This script is intended for use on intraday timeframes only. It will not calculate properly on daily or higher timeframes. Additionally, for the calculation to be correct, the input session must be evenly divisible by the chart timeframe. For example, if the user inputs a session that is 30 minutes long (e.g., 9:30 am - 10:00 am), then the calculations would be correct on the 1, 2, 3, 5, 10, 15, and 30-minute timeframes only.
User Inputs
This script was written to provide the user with maximum control over the range data and how that data is displayed. These are the user inputs:
Data - Input the number of days used to calculate the average price range of the sessions. This input is applied to all six sessions. The default value is 10.
Sessions - There are six sessions the user can set. Checking the box next to a session will cause that session data to be calculated and displayed. This allows the user to turn on or off a session at their discretion. The default value are displayed in the chart image above.
Visibility - Checking this box will cause the range data to be displayed only when the range is currently forming (i.e., live price is within the session). This allows the user to display the data from multiple sessions only when needed.
Visual Styles - This section has controls for how the data table is displayed. The user can select the table position, colors and border, and text size.
Última Vela del Día con Medidor de Fuerza de Tendencia Este indicador combina la simplicidad de la visualización de la última vela diaria con un análisis detallado de la fuerza y la tendencia del mercado. Ideal para traders que buscan un enfoque visual y técnico robusto, este script ofrece:
Visualización de Niveles Clave: Dibuja líneas y etiquetas para los niveles de máximo, mínimo y medio de la última vela diaria, proporcionando referencias claras y precisas.
Análisis de Tendencia con EMAs: Calcula tres medias exponenciales (9, 26 y 50) para identificar tendencias alcistas, bajistas o neutrales.
Medidor de Fuerza de Tendencia: Integra el volumen promedio y las EMAs para evaluar la fuerza del mercado en porcentajes, destacando condiciones de volumen alto o bajo.
Interactividad Personalizable: Permite ajustar la distancia de las líneas y etiquetas para adaptarse a tu estilo gráfico.
Diseño Estético y Funcional: Líneas y etiquetas con colores suaves y claros para mantener un gráfico limpio y profesional.
Smart Money Breakout Signals [AlgoAlpha]Introducing the Smart Money Breakout Signals, a cutting-edge trading indicator designed to identify key structural shifts and breakout opportunities in the market. This tool leverages a blend of smart money concepts like Break of Structure (BOS) and Change of Character (CHoCH) to provide traders with actionable insights into market direction and potential entry or exit points.
Key Features :
✨ Market Structure Analysis : Automatically detects and labels BOS and CHoCH for trend confirmation and reversals.
🎨 Customizable Visualization : Tailor bullish and bearish colors for breakout lines and signals to suit your preferences.
📊 Dynamic Take-Profit Targets : Displays three tiered take-profit levels based on breakout volatility.
🔔 Real-Time Alerts : Stay ahead of the game with notifications for bullish and bearish breakouts.
📋 Performance Dashboard : Monitor signal statistics, including win rates and total signals, directly on your chart.
How to Use :
Add the Indicator : Add the script to your favourites ⭐ and customize settings like market structure horizon and confirmation type.
Monitor Breakouts : Observe BOS and CHoCH labels to identify potential trend shifts. Use the breakout lines and tiered take-profit levels to plan trades effectively.
Set Alerts : Enable alerts for bullish or bearish breakouts to act on opportunities without constant monitoring.
How It Works :
The indicator identifies market structure by analyzing pivot highs and lows over a user-defined time horizon. A breakout is confirmed based on either candle closes or wicks surpassing previous pivot points. Upon detection, the script generates signals with breakout lines and calculates take-profit targets based on the distance from the breakout level. A built-in dashboard tracks performance metrics like total signals and win rates, giving traders real-time feedback on strategy effectiveness.
KalmanFilterKalman Filter Library for Trading Applications
Description:
A comprehensive implementation of the Kalman Filter algorithm specifically designed for financial market analysis and trading. This library provides adaptive state estimation and noise filtering capabilities for price series data.
Key Features:
• Basic Kalman Filter implementation with state and covariance tracking
• Adaptive measurement noise calculation
• Enhanced trading signals with velocity estimation
• Built-in variance calculation methods
• Trading-specific signal generation
Main Functions:
1. initialize(): Sets up initial state and covariance with noise parameters
2. update(): Core Kalman Filter update function
3. calculate_measurement_noise(): Adaptive noise calculation
4. update_trading(): Enhanced version with velocity tracking and signal generation
Usage Example:
//@version=5
indicator("Kalman Filter Example")
import Rocky-Studio/KalmanFilter/1 as kf
= kf.initialize(close, 0.01, 0.1)
= kf.update_trading(state, 0, covariance, close, 20)
Parameter Recommendations:
• process_noise: 0.01-0.1 (lower for smoother output)
• measurement_noise: 0.1-1.0 (higher for noisier data)
• volatility_window: 20-50 (adjust based on timeframe)
Applications:
• Price trend filtering
• Noise reduction in technical indicators
• Signal generation for trading strategies
• Adaptive volatility estimation
• Momentum tracking
Created by: Rocky-Studio
Version: 1.0
License: Mozilla Public License 2.0
For questions or support:
Contact through TradingView: @Rocky-Studio
200 EMA Breakout & Retest Strategy200 EMA Breakout & Retest Strategy
This script is designed for traders who rely on the 200 EMA as a key indicator for trend direction and trade setups. The strategy identifies potential buy and sell opportunities based on breakouts and subsequent retests of the 200 EMA.
How It Works
EMA Breakout Detection:
The script monitors when the price crosses and closes above or below the 200 EMA.
No signal is generated immediately upon the breakout.
Retest Confirmation:
After the breakout, the price must retrace to touch the 200 EMA.
A valid signal occurs only when the price touches the EMA and the candle closes above (for buy) or below (for sell).
Trade Signal Generation:
Once the retest is confirmed:
A Buy Signal is generated if the price closes above the 200 EMA after the retest.
A Sell Signal is generated if the price closes below the 200 EMA after the retest.
The script calculates:
Stop Loss: Placed at the low of the candle for a buy signal and at the high of the candle for a sell signal.
Take Profit: Based on a customizable Risk-Reward Ratio (default is 1:2).
Visual Indicators:
The 200 EMA is plotted on the chart for reference.
Buy/Sell signals are displayed as labels on the chart.
Stop loss and take profit levels are drawn using dotted lines.
Customization Options
EMA Length: Adjustable (default is 200).
Risk-Reward Ratio: Customizable to suit different trading styles.
Who Is This For?
This strategy is ideal for traders who:
Prefer trading with the trend using EMA-based strategies.
Look for precise entry points with confirmation from retests.
Require automated calculation of risk-reward levels.
9:30-10:30 Range level stats
youtu.be
Every day between 9:30 and 10:30, we watch for the highest and lowest numbers. When the numbers drop below the lowest point, we look at past patterns. Often (like 3 out of 3 times), the numbers don't go back up to hit the highest point again.
To help decide when to "bet" that numbers will go down (take a short), we use special percentage levels (like -0.15%, -0.25%, etc.). These levels are like stairs going down - some stairs are better spots to make our bet than others.
The indicator shows us which of these "stairs" have worked well in the past. For example, if a certain level has worked 8 out of 10 times, that might be a good spot to watch!
But remember - just because something worked before doesn't mean it will work every time. It's like knowing where a basketball player usually shoots from - it helps you guess, but doesn't guarantee what will happen next!