Indicateurs : SMA, BollingerSMA 20 50 100 200 500 + Bollinger ou la SMA 20 est de même couleur que la médiane Bollinger, possibilités de changer les couleurs directement dans les réglages de l'indicateur.
Simple Moving Average (SMA)
Multiple EMA, SMA & VWAPThere is 4 EMAs - 5, 9, 21, 50; 4 SMAs - 5, 10, 50, 200; 1 VWAP which can be edited according yourself
Daily SMAs with LTF updatesThis indicator plots Daily SMAs on lower timeframe charts and updates the SMA on every bar close of the chart's timeframe.
Moving AveragesWhile this "Moving Averages" indicator may not revolutionize technical analysis, it certainly offers a valuable and efficient solution for traders seeking to streamline their chart analysis process. This all-in-one tool addresses a common frustration among traders: the need to constantly search for and compare different types and lengths of moving averages.
Key Features
The indicator allows for the configuration of up to 5 moving averages simultaneously, providing a comprehensive view of price trends. Users can choose from 7 types of moving averages for each line, including SMA, EMA, WMA, VWMA, HMA, SMMA, and TMA. This variety ensures that traders can apply their preferred moving average types without the need for multiple indicators.
Each moving average can be fully customized in terms of length, color, line style, and thickness, allowing for clear visual differentiation. However, what sets this indicator apart is its "Smart Opacity" feature. When activated, this option dynamically adjusts the transparency of the moving average lines based on their direction, with ascending lines appearing more opaque and descending lines more transparent. This subtle yet effective visual cue aids in quickly identifying trend changes and potential trading signals.
Advantages
The primary benefit of this indicator lies in its convenience. By consolidating multiple moving averages into a single, customizable tool, it saves traders valuable time and reduces chart clutter. The Smart Opacity feature, while not groundbreaking, does offer an intuitive way to visualize trend strength and direction at a glance.
Moreover, the indicator's flexibility makes it suitable for various trading styles and experience levels. Whether you're a novice trader learning to interpret basic trend signals or an experienced analyst fine-tuning a complex strategy, this tool can adapt to your needs.
In conclusion, while this "Moving Averages" indicator may not be a game-changer in the world of technical analysis, it represents a thoughtful refinement of a fundamental trading tool. By focusing on user convenience and visual clarity, it offers a practical solution for traders looking to optimize their chart analysis process and make more informed trading decisions.
Fibonacci ATR Fusion - Strategy [presentTrading]Open-script again! This time is also an ATR-related strategy. Enjoy! :)
If you have any questions, let me know, and I'll help make this as effective as possible.
█ Introduction and How It Is Different
The Fibonacci ATR Fusion Strategy is an advanced trading approach that uniquely integrates Fibonacci-based weighted averages with the Average True Range (ATR) to identify and capitalize on significant market trends.
Unlike traditional strategies that rely on single indicators or static parameters, this method combines multiple timeframes and dynamic volatility measurements to enhance precision and adaptability. Additionally, it features a 4-step Take Profit (TP) mechanism, allowing for systematic profit-taking at various levels, which optimizes both risk management and return potential in long and short market positions.
BTCUSD 6hr Performance
█ Strategy, How It Works: Detailed Explanation
The Fibonacci ATR Fusion Strategy utilizes a combination of technical indicators and weighted averages to determine optimal entry and exit points. Below is a breakdown of its key components and operational logic.
🔶 1. Enhanced True Range Calculation
The strategy begins by calculating the True Range (TR) to measure market volatility accurately.
TR = max(High - Low, abs(High - Previous Close), abs(Low - Previous Close))
High and Low: Highest and lowest prices of the current trading period.
Previous Close: Closing price of the preceding trading period.
max: Selects the largest value among the three calculations to account for gaps and limit movements.
🔶 2. Buying Pressure (BP) Calculation
Buying Pressure (BP) quantifies the extent to which buyers are driving the price upwards within a period.
BP = Close - True Low
Close: Current period's closing price.
True Low: The lower boundary determined in the True Range calculation.
🔶 3. Ratio Calculation for Different Periods
To assess the strength of buying pressure relative to volatility, the strategy calculates a ratio over various Fibonacci-based timeframes.
Ratio = 100 * (Sum of BP over n periods) / (Sum of TR over n periods)
n: Length of the period (e.g., 8, 13, 21, 34, 55).
Sum of BP: Cumulative Buying Pressure over n periods.
Sum of TR: Cumulative True Range over n periods.
This ratio normalizes buying pressure, making it comparable across different timeframes.
🔶 4. Weighted Average Calculation
The strategy employs a weighted average of ratios from multiple Fibonacci-based periods to smooth out signals and enhance trend detection.
Weighted Avg = (w1 * Ratio_p1 + w2 * Ratio_p2 + w3 * Ratio_p3 + w4 * Ratio_p4 + Ratio_p5) / (w1 + w2 + w3 + w4 + 1)
w1, w2, w3, w4: Weights assigned to each ratio period.
Ratio_p1 to Ratio_p5: Ratios calculated for periods p1 to p5 (e.g., 8, 13, 21, 34, 55).
This weighted approach emphasizes shorter periods more heavily, capturing recent market dynamics while still considering longer-term trends.
🔶 5. Simple Moving Average (SMA) of Weighted Average
To further smooth the weighted average and reduce noise, a Simple Moving Average (SMA) is applied.
Weighted Avg SMA = SMA(Weighted Avg, m)
- m: SMA period (e.g., 3).
This smoothed line serves as the primary signal generator for trade entries and exits.
🔶 6. Trading Condition Thresholds
The strategy defines specific threshold values to determine optimal entry and exit points based on crossovers and crossunders of the SMA.
Long Condition = Crossover(Weighted Avg SMA, Long Entry Threshold)
Short Condition = Crossunder(Weighted Avg SMA, Short Entry Threshold)
Long Exit = Crossunder(Weighted Avg SMA, Long Exit Threshold)
Short Exit = Crossover(Weighted Avg SMA, Short Exit Threshold)
Long Entry Threshold (T_LE): Level at which a long position is triggered.
Short Entry Threshold (T_SE): Level at which a short position is triggered.
Long Exit Threshold (T_LX): Level at which a long position is exited.
Short Exit Threshold (T_SX): Level at which a short position is exited.
These conditions ensure that trades are only executed when clear trends are identified, enhancing the strategy's reliability.
Previous local performance
🔶 7. ATR-Based Take Profit Mechanism
When enabled, the strategy employs a 4-step Take Profit system to systematically secure profits as the trade moves in the desired direction.
TP Price_1 Long = Entry Price + (TP1ATR * ATR Value)
TP Price_2 Long = Entry Price + (TP2ATR * ATR Value)
TP Price_3 Long = Entry Price + (TP3ATR * ATR Value)
TP Price_1 Short = Entry Price - (TP1ATR * ATR Value)
TP Price_2 Short = Entry Price - (TP2ATR * ATR Value)
TP Price_3 Short = Entry Price - (TP3ATR * ATR Value)
- ATR Value: Calculated using ATR over a specified period (e.g., 14).
- TPxATR: User-defined multipliers for each take profit level.
- TPx_percent: Percentage of the position to exit at each TP level.
This multi-tiered exit strategy allows for partial position closures, optimizing profit capture while maintaining exposure to potential further gains.
█ Trade Direction
The Fibonacci ATR Fusion Strategy is designed to operate in both long and short market conditions, providing flexibility to traders in varying market environments.
Long Trades: Initiated when the SMA of the weighted average crosses above the Long Entry Threshold (T_LE), indicating strong upward momentum.
Short Trades: Initiated when the SMA of the weighted average crosses below the Short Entry Threshold (T_SE), signaling robust downward momentum.
Additionally, the strategy can be configured to trade exclusively in one direction—Long, Short, or Both—based on the trader’s preference and market analysis.
█ Usage
Implementing the Fibonacci ATR Fusion Strategy involves several steps to ensure it aligns with your trading objectives and market conditions.
1. Configure Strategy Parameters:
- Trading Direction: Choose between Long, Short, or Both based on your market outlook.
- Trading Condition Thresholds: Set the Long Entry, Short Entry, Long Exit, and Short Exit thresholds to define when to enter and exit trades.
2. Set Take Profit Levels (if enabled):
- ATR Multipliers: Define how many ATRs away from the entry price each take profit level is set.
- Take Profit Percentages: Allocate what percentage of the position to close at each TP level.
3. Apply to Desired Chart:
- Add the strategy to the chart of the asset you wish to trade.
- Observe the plotted Fibonacci ATR and SMA Fibonacci ATR indicators for visual confirmation.
4. Monitor and Adjust:
- Regularly review the strategy’s performance through backtesting.
- Adjust the input parameters based on historical performance and changing market dynamics.
5. Risk Management:
- Ensure that the sum of take profit percentages does not exceed 100% to avoid over-closing positions.
- Utilize the ATR-based TP levels to adapt to varying market volatilities, maintaining a balanced risk-reward ratio.
█ Default Settings
Understanding the default settings is crucial for optimizing the Fibonacci ATR Fusion Strategy's performance. Here's a precise and simple overview of the key parameters and their effects:
🔶 Key Parameters and Their Effects
1. Trading Direction (`tradingDirection`)
- Default: Both
- Effect: Determines whether the strategy takes both long and short positions or restricts to one direction. Selecting Both allows maximum flexibility, while Long or Short can be used for directional bias.
2. Trading Condition Thresholds
Long Entry (long_entry_threshold = 58.0): Higher values reduce false positives but may miss trades.
Short Entry (short_entry_threshold = 42.0): Lower values capture early short trends but may increase false signals.
Long Exit (long_exit_threshold = 42.0): Exits long positions early, securing profits but potentially cutting trends short.
Short Exit (short_exit_threshold = 58.0): Delays short exits to capture favorable movements, avoiding premature exits.
3. Take Profit Configuration (`useTakeProfit` = false)
- Effect: When enabled, the strategy employs a 4-step TP mechanism to secure profits at multiple levels. By default, it is disabled to allow users to opt-in based on their trading style.
4. ATR-Based Take Profit Multipliers
TP1 (tp1ATR = 3.0): Sets the first TP at 3 ATRs for initial profit capture.
TP2 (tp2ATR = 8.0): Targets larger trends, though less likely to be reached.
TP3 (tp3ATR = 14.0): Optimizes for extreme price moves, seldom triggered.
5. Take Profit Percentages
TP Level 1 (tp1_percent = 12%): Secures 12% at the first TP.
TP Level 2 (tp2_percent = 12%): Exits another 12% at the second TP.
TP Level 3 (tp3_percent = 12%): Closes an additional 12% at the third TP.
6. Weighted Average Parameters
Ratio Periods: Fibonacci-based intervals (8, 13, 21, 34, 55) balance responsiveness.
Weights: Emphasizes recent data for timely responses to market trends.
SMA Period (weighted_avg_sma_period = 3): Smoothens data with minimal lag, balancing noise reduction and responsiveness.
7. ATR Period (`atrPeriod` = 14)
Effect: Sets the ATR calculation length, impacting TP sensitivity to volatility.
🔶 Impact on Performance
- Sensitivity and Responsiveness:
- Shorter Ratio Periods and Higher Weights: Make the weighted average more responsive to recent price changes, allowing quicker trade entries and exits but increasing the likelihood of false signals.
- Longer Ratio Periods and Lower Weights: Provide smoother signals with fewer false positives but may delay trade entries, potentially missing out on significant price moves.
- Profit Taking:
- ATR Multipliers: Higher multipliers set take profit levels further away, targeting larger price movements but reducing the probability of reaching these levels.
- Fixed Percentages: Allocating equal percentages at each TP level ensures consistent profit realization and risk management, preventing overexposure.
- Trade Direction Control:
- Selecting Specific Directions: Restricting trades to Long or Short can align the strategy with market trends or personal biases, potentially enhancing performance in trending markets.
- Risk Management:
- Take Profit Percentages: Dividing the position into smaller percentages at multiple TP levels helps lock in profits progressively, reducing risk and allowing the remaining position to ride further trends.
- Market Adaptability:
- Weighted Averages and ATR: By combining multiple timeframes and adjusting to volatility, the strategy adapts to different market conditions, maintaining effectiveness across various asset classes and timeframes.
---
If you want to know more about ATR, can also check "SuperATR 7-Step Profit".
Enjoy trading.
Engulfing Pattern & Impulse [UAlgo]The Engulfing Pattern & Impulse is a tool designed for technical traders who utilize price action and volume analysis to assess market trends and potential reversals. This indicator identifies two powerful trading signals: Engulfing Patterns and Volume Impulses, which are essential components for evaluating potential bullish or bearish market momentum.
Engulfing Patterns are classic candlestick formations often associated with reversals or trend continuations, depending on the overall trend context. This indicator highlights both bullish and bearish engulfing patterns based on configurable criteria such as trend detection settings, comparison with average body size, and a customizable body multiplier for validation. The Volume Impulse feature signals moments of significant volume compared to historical levels, which often precede substantial price movements. Together, these features provide traders with a versatile tool for better timing entry and exit points.
The indicator also offers an adaptive trend detection system, allowing traders to choose from multiple methods (e.g., SMA50 or SMA50/SMA200 combinations) to assess the trend context, making it ideal for various market conditions.
🔶Key Features
Engulfing Pattern Detection: Identifies bullish and bearish engulfing patterns with customizable parameters, including body length and average size comparison.
Configurable trend basis: Choose between SMA50 or SMA50 with SMA200 to define trend direction.
Body size multiplier: Adjust the size threshold for valid engulfing patterns, providing flexibility based on market conditions.
Volume Impulse Signal: Highlights volume spikes that meet or exceed a specified multiplier, which can indicate increased buying or selling interest.
Customizable volume period and multiplier: Allows you to tailor the volume impulse detection based on the instrument’s average volume behavior.
Trend Detection Options: Select different trend detection methods to suit various trading styles and instruments.
SMA50-based detection: Classifies the trend based on the position of price relative to the 50-period SMA.
SMA50 and SMA200 combination: Incorporates a dual-moving average approach, classifying trends based on the relationship between price, SMA50, and SMA200.
Enhanced Visualization: Distinguishes bullish and bearish signals with customizable colors, providing clear and immediate visual cues for easy interpretation.
Custom label colors: Allows you to set distinct colors for bullish, bearish, and neutral signals for quick identification.
Pattern filtering: Enable or disable specific patterns (Bullish, Bearish, or Both) based on your trading preferences.
🔶 Interpreting Indicator
Bullish Engulfing Pattern: Indicates a potential bullish reversal in a downtrend. This signal occurs when a white candlestick with a body size exceeding a specified multiplier completely engulfs the previous black candlestick. The pattern will display a “BE” label below the candle if it meets the criteria, signaling potential upward momentum.
Bearish Engulfing Pattern: Indicates a potential bearish reversal in an uptrend. A black candlestick with a body size exceeding the specified multiplier fully engulfs the previous white candlestick, signaling possible downward movement. The “BE” label appears above the candle to denote this pattern.
Volume Impulse Up: Displays a “VI” label below the candle when the volume surpasses the defined multiplier, and the price closes higher than it opened, indicating strong upward buying interest.
Volume Impulse Down: Displays a “VI” label above the candle when the volume meets or exceeds the specified threshold, and the price closes lower than it opened, signaling strong selling pressure.
Indicator uses the SMA50 and SMA200 to determine trend direction due to their popularity in technical analysis as indicators of medium- and long-term trends. The SMA50 reflects the average price over the past 50 periods, providing insight into intermediate trends, while the SMA200 is often used to identify the broader trend direction. These SMAs help traders quickly assess whether the market is in an uptrend, downtrend, or consolidation phase, enhancing decision-making for both short-term and long-term strategies.
🔶 Disclaimer
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
SMA- Ashish SinghSMA
This script implements a Simple Moving Average (SMA) crossover strategy using three SMAs: 200-day, 50-day, and 20-day, with buy and sell signals triggered based on specific conditions involving these moving averages. The indicator is overlaid on the price chart, providing visual cues for potential buy and sell opportunities based on moving average crossovers.
Key Features:
Moving Averages:
The 200-day, 50-day, and 20-day SMAs are calculated and plotted on the price chart. These are key levels that traders use to assess trends.
The 200-day SMA represents the long-term trend, the 50-day SMA is used for medium-term trends, and the 20-day SMA is for short-term analysis.
Buy Signal:
A buy signal is triggered when the price is below all three moving averages (200 SMA, 50 SMA, 20 SMA) and the SMAs are in a specific downward trend (200 SMA > 50 SMA > 20 SMA). This is an indication of a potential upward reversal.
The buy signal is marked with a green triangle below the price bar.
Sell Signal:
A sell signal is triggered when the price is above all three moving averages and the SMAs are in a specific upward trend (200 SMA < 50 SMA < 20 SMA). This signals a potential downward reversal.
The sell signal is marked with a red triangle above the price bar.
Trade Information:
After a buy signal, the buy price, bar index, and timestamp are recorded. When a sell signal occurs, the percentage gain or loss is calculated along with the number of days between the buy and sell signals.
The script automatically displays a label on the chart showing the gain or loss percentage along with the number of days the trade lasted. Green labels represent gains, and red labels represent losses.
User-friendly Visuals:
The buy and sell signals are plotted as small triangles directly on the chart for easy identification.
Detailed trade information is provided with well-formatted labels to highlight the profit or loss after each trade.
How It Works:
This strategy helps traders to identify trend reversals by leveraging long-term and short-term moving averages.
A single buy or sell signal is triggered based on price movement relative to the SMAs and their order.
The tool is designed to help traders quickly spot buying and selling opportunities with clear visual indicators and gain/loss metrics.
This indicator is ideal for traders looking to implement a systematic SMA-based strategy with well-defined buy/sell points and automatic performance tracking for each trade.
Disclaimer: The information provided here is for educational and informational purposes only. It is not intended as financial advice or as a recommendation to buy or sell any stocks. Please conduct your own research or consult a financial advisor before making any investment decisions. ProfitLens does not guarantee the accuracy, completeness, or reliability of any information presented.
Pullback Scalp Trade V2Pullback Scalp Trading Indicator
This indicator combines multiple technical analysis tools to identify potential pullback trading opportunities in trending markets. It uses a dual moving average system along with RSI for confirmation, providing a comprehensive approach to trend-following and momentum trading.
Key Features:
1. Trend Identification:
- Uses 50 and 200 period moving averages to define the overall trend
- Visual trend zone highlighting for clear market direction
- Customizable MA periods for different timeframes
2. Signal Generation System:
- Combines RSI crossovers with trend direction
- Buy signals occur when:
* Price is above 200 MA (uptrend)
* RSI crosses above its SMA
* RSI is below the lower threshold (default 50)
- Sell signals occur when:
* Price is below 200 MA (downtrend)
* RSI crosses below its SMA
* RSI is above the upper threshold (default 50)
3. Customizable Parameters:
- Short and Long MA periods
- MA types (SMA, EMA, VWMA)
- RSI length and RSI-SMA length
- RSI signal thresholds
- Trend MA periods
Usage Guidelines:
- Best used on higher timeframes (1H and above) for trend trading
- Wait for price to respect the trend zone before taking trades
- Use additional confirmation from price action or other indicators
- Adjust RSI levels based on market volatility
Limitations:
- Like all indicators, this tool may generate false signals in choppy markets
- Should not be used as a sole decision-making tool
- Past performance does not guarantee future results
----------
Türkçe Açıklama:
Bu indikatör, trendli piyasalarda potansiyel geri çekilme fırsatlarını belirlemek için birden fazla teknik analiz aracını birleştirir. Trend takibi ve momentum ticareti için kapsamlı bir yaklaşım sunan ikili hareketli ortalama sistemi ile RSI'yı bir arada kullanır.
Temel Özellikler:
1. Trend Belirleme:
- Genel trendi tanımlamak için 50 ve 200 periyotlu hareketli ortalamalar
- Görsel trend bölgesi vurgulaması
- Farklı zaman dilimleri için özelleştirilebilir MA periyotları
2. Sinyal Üretim Sistemi:
- RSI kesişimlerini trend yönü ile birleştirir
- Alış sinyalleri şu durumlarda oluşur:
* Fiyat 200 MA'nın üzerinde (yükseliş trendi)
* RSI, SMA'sını yukarı keser
* RSI alt eşiğin altında (varsayılan 50)
- Satış sinyalleri şu durumlarda oluşur:
* Fiyat 200 MA'nın altında (düşüş trendi)
* RSI, SMA'sını aşağı keser
* RSI üst eşiğin üzerinde (varsayılan 50)
3. Özelleştirilebilir Parametreler:
- Kısa ve Uzun MA periyotları
- MA tipleri (SMA, EMA, VWMA)
- RSI uzunluğu ve RSI-SMA uzunluğu
- RSI sinyal seviyeleri
- Trend MA periyotları
Kullanım Önerileri:
- Trend ticareti için yüksek zaman dilimlerinde (1S ve üzeri) kullanılması önerilir
- İşlem almadan önce fiyatın trend bölgesine saygı göstermesini bekleyin
- Fiyat hareketi veya diğer indikatörlerden ek teyit alın
- RSI seviyelerini piyasa volatilitesine göre ayarlayın
Sınırlamalar:
- Tüm indikatörler gibi, dalgalı piyasalarda yanlış sinyaller üretebilir
- Tek başına karar verme aracı olarak kullanılmamalıdır
- Geçmiş performans, gelecekteki sonuçların garantisi değildir
Dynamic Volume-Based Buy/Sell IndicatorThis script provides a powerful volume-based indicator that visualizes buy and sell volumes, issues alerts for volume spikes, and adjusts color intensity dynamically based on volume size. It includes customizable settings for volume averaging and thresholds, making it adaptable to various trading strategies.
Dynamic Score SMA [QuantAlgo]Dynamic Score SMA 📈🌊
The Dynamic Score SMA by QuantAlgo offers a powerful trend-following approach that combines the simplicity of the Simple Moving Average (SMA) with an innovative dynamic trend scoring technique . By continuously evaluating price movement relative to the SMA over a customizable window, this indicator adapts to varying market conditions, providing traders and investors with clearer, more adaptable trend signals. With this dynamic scoring approach, the Dynamic Score SMA helps identify trend shifts, allowing for more strategic decision-making.
🌟 Conceptual Foundation and Innovation
At the core of the Dynamic Score SMA is its dynamic trend score system , which assesses price movements by comparing them to the SMA over a series of historical data points. This technique goes beyond traditional SMA indicators by offering a dynamic, probabilistic evaluation of trend strength, delivering a more responsive and nuanced view of market direction. The integration of this scoring system enables traders and investors to navigate both trending and sideway markets with greater confidence and precision.
⚙️ Technical Composition and Calculation
The Dynamic Score SMA leverages the Simple Moving Average to establish a baseline trend, with customizable SMA length to control the indicator’s sensitivity. The dynamic trend scoring technique then evaluates price behavior relative to the SMA over a specified window, generating a trend score that reflects the current market bias.
When the score crosses the designated uptrend or downtrend thresholds, the indicator signals a potential trend shift. By adjusting the SMA length, window duration, and thresholds, users can refine the indicator’s responsiveness to match their preferred trading or investing strategy, making it suitable for both volatile and steady markets.
📈 Features and Practical Applications
Customizable SMA Length: Set the length of the SMA to control how sensitive the trend is to price changes. Longer lengths produce smoother trends, while shorter lengths increase responsiveness.
Window Length for Dynamic Scoring: Adjust the window length to determine how many data points are considered in the dynamic trend score calculation, allowing for more tailored analysis of recent versus long-term trends.
Uptrend/Downtrend Thresholds: Define thresholds for triggering trend signals. Higher thresholds reduce sensitivity, providing clearer signals in volatile markets, while lower thresholds capture shorter-term movements.
Bar and Background Coloring: Visual cues, including bar coloring and background fills, provide a quick reference for current trend direction, making it easier to monitor market conditions.
Trend Confirmation: The dynamic trend scoring system verifies trend strength, offering more reliable entry and exit points by filtering out potential false signals.
⚡️ How to Use
✅ Add the Indicator: Add the Dynamic Score SMA to your favourites, then apply it to your chart. Customize the SMA length, window size, and thresholds to match your trading or investing preferences.
👀 Monitor Trend Shifts: Observe the trend in relation to the SMA and watch for signals when the score crosses key thresholds. Bar and/or background coloring will help identify the current trend direction and any shifts in momentum.
🔔 Set Alerts: Configure alerts for significant trend crossovers and reversals, enabling you to act on market changes in real-time without needing constant chart observation.
💫 Summary and Usage Tips
The Dynamic Score SMA by QuantAlgo is a sophisticated trend-following indicator that combines the familiarity of the SMA with a dynamic trend scoring system, providing a more adaptable and probabilistic approach to trend analysis. By tailoring the SMA length, scoring window, and thresholds, traders and investors can fine-tune the indicator for both short-term adjustments and long-term trend following. For optimal use, adjust sensitivity based on market volatility, and rely on the visual cues for clear trend confirmation. Whether you’re navigating choppy markets or stable trends, the Dynamic Score SMA offers a refined approach to capturing market direction with enhanced precision.
$TUBR: 7-25-99 Moving Average7, 25, and 99 Period Moving Averages
This indicator plots three moving averages: the 7-period, 25-period, and 99-period Simple Moving Averages (SMA). These moving averages are widely used to smooth out price action and help traders identify trends over different time frames. Let's break down the significance of these specific moving averages from both supply and demand perspectives and a price action perspective.
1. Supply and Demand Perspective:
- 7-period Moving Average (Short-Term) :
The 7-period moving average represents the short-term sentiment in the market. It captures the rapid fluctuations in price and is heavily influenced by recent supply and demand changes. Traders often look to the 7-period SMA for immediate price momentum, with price moving above or below this line signaling short-term strength or weakness.
- Bullish Supply/Demand : When price is above the 7-period SMA, it suggests that buyers are currently in control and demand is higher than supply. Conversely, price falling below this line indicates that supply is overpowering demand, leading to a short-term downtrend.
Is current price > average price in past 7 candles (depending on timeframe)? This will tell you how aggressive buyers are in short term.
- Key Supply/Demand Zones : The 7-period SMA often acts as dynamic support or resistance in a trending market, where traders might use it to enter or exit positions based on how price interacts with this level.
- 25-period Moving Average (Medium-Term) :
The 25-period SMA smooths out more of the noise compared to the 7-period, providing a more stable indication of intermediate trends. This moving average is often used to gauge the market's supply and demand balance over a broader timeframe than the short-term 7-period SMA.
- Supply/Demand Balance : The 25-period SMA reflects the medium-term equilibrium between supply and demand. A crossover between the price and the 25-period SMA may indicate a shift in this balance. When price sustains above the 25-period SMA, it shows that demand is strong enough to maintain an upward trend. Conversely, if the price stays below it, supply is likely exceeding demand.
Is current price > average price in past 25 candles (depending on timeframe)? This will tell you how aggressive buyers are in mid term.
- Momentum Shift : Crossovers between the 7-period and 25-period SMAs can indicate momentum shifts between short-term and medium-term demand. For example, if the 7-period crosses above the 25-period, it often signifies growing short-term demand relative to the medium-term trend, signaling potential buy opportunities. What this crossover means is that if 7MA > 25MA that means in past 7 candles average price is more than past 25 candles.
- 99-period Moving Average (Long-Term):
The 99-period SMA represents the long-term trend and reflects the market's supply and demand over an extended period. This moving average filters out short-term fluctuations and highlights the market's overall trajectory.
- Long-Term Supply/Demand Dynamics : The 99-period SMA is slower to react to changes in supply and demand, providing a more stable view of the market's overall trend. Price staying above this line shows sustained demand dominance, while price consistently staying below reflects ongoing supply pressure.
Is current price > average price in past 99 candles (depending on timeframe)? This will tell you how aggressive buyers are in long term.
- Market Trend Confirmation : When both the 7-period and 25-period SMAs are above the 99-period SMA, it signals a strong bullish trend with demand outweighing supply across all timeframes. If all three SMAs are below the 99-period SMA, it points to a bear market where supply is overpowering demand in both the short and long term.
2. Price Action Perspective :
- 7-period Moving Average (Short-Term Trends):
The 7-period moving average closely tracks price action, making it highly responsive to quick shifts in price. Traders often use it to confirm short-term reversals or continuations in price action. In an uptrend, price typically stays above the 7-period SMA, whereas in a downtrend, price stays below it.
- Short-Term Price Reversals : Crossovers between the price and the 7-period SMA often indicate short-term reversals. When price breaks above the 7-period SMA after staying below it, it suggests a potential bullish reversal. Conversely, a price breakdown below the 7-period SMA could signal a bearish reversal.
- 25-period Moving Average (Medium-Term Trends) :
The 25-period SMA helps identify the medium-term price action trend. It balances short-term volatility and longer-term stability, providing insight into the more persistent trend. Price pullbacks to the 25-period SMA during an uptrend can act as a buying opportunity for trend traders, while pullbacks during a downtrend may offer shorting opportunities.
- Pullback and Continuation: In trending markets, price often retraces to the 25-period SMA before continuing in the direction of the trend. For instance, if the price is in a bullish trend, traders may look for support at the 25-period SMA for potential continuation trades.
- 99-period Moving Average (Long-Term Trend and Market Sentiment ):
The 99-period SMA is the most critical for identifying the overall market trend. Price consistently trading above the 99-period SMA indicates long-term bullish momentum, while price staying below the 99-period SMA suggests bearish sentiment.
- Trend Confirmation : Price action above the 99-period SMA confirms long-term upward momentum, while price action below it confirms a downtrend. The space between the shorter moving averages (7 and 25) and the 99-period SMA gives a sense of the strength or weakness of the trend. Larger gaps between the 7 and 99 SMAs suggest strong bullish momentum, while close proximity indicates consolidation or potential reversals.
- Price Action in Trending Markets : Traders often use the 99-period SMA as a dynamic support/resistance level. In strong trends, price tends to stay on one side of the 99-period SMA for extended periods, with breaks above or below signaling major changes in market sentiment.
Why These Numbers Matter:
7-Period MA : The 7-period moving average is a popular choice among short-term traders who want to capture quick momentum changes. It helps visualize immediate market sentiment and is often used in conjunction with price action to time entries or exits.
- 25-Period MA: The 25-period MA is a key indicator for swing traders. It balances sensitivity and stability, providing a clearer picture of the intermediate trend. It helps traders stay in trades longer by filtering out short-term noise, while still being reactive enough to detect reversals.
- 99-Period MA : The 99-period moving average provides a broad view of the market's direction, filtering out much of the short- and medium-term noise. It is crucial for identifying long-term trends and assessing whether the market is bullish or bearish overall. It acts as a key reference point for longer-term trend followers, helping them stay with the broader market sentiment.
Conclusion:
From a supply and demand perspective, the 7, 25, and 99-period moving averages help traders visualize shifts in the balance between buyers and sellers over different time horizons. The price action interaction with these moving averages provides valuable insight into short-term momentum, intermediate trends, and long-term market sentiment. Using these three MAs together gives a more comprehensive understanding of market conditions, helping traders align their strategies with prevailing trends across various timeframes.
------------- RULE BASED SYSTEM ---------------
Overview of the Rule-Based System:
This system will use the following moving averages:
7-period MA: Represents short-term price action.
25-period MA: Represents medium-term price action.
99-period MA: Represents long-term price action.
1. Trend Identification Rules:
Bullish Trend:
The 7-period MA is above the 25-period MA, and the 25-period MA is above the 99-period MA.
This structure shows that short, medium, and long-term trends are aligned in an upward direction, indicating strong bullish momentum.
Bearish Trend:
The 7-period MA is below the 25-period MA, and the 25-period MA is below the 99-period MA.
This suggests that the market is in a downtrend, with bearish momentum dominating across timeframes.
Neutral/Consolidation:
The 7-period MA and 25-period MA are flat or crossing frequently with the 99-period MA, and they are close to each other.
This indicates a sideways or consolidating market where there’s no strong trend direction.
2. Entry Rules:
Bullish Entry (Buy Signals):
Primary Buy Signal:
The price crosses above the 7-period MA, AND the 7-period MA is above the 25-period MA, AND the 25-period MA is above the 99-period MA.
This indicates the start of a new upward trend, with alignment across the short, medium, and long-term trends.
Pullback Buy Signal (for trend continuation):
The price pulls back to the 25-period MA, and the 7-period MA remains above the 25-period MA.
This indica
tes that the pullback is a temporary correction in an uptrend, and buyers may re-enter the market as price approaches the 25-period MA.
You can further confirm the signal by waiting for price action (e.g., bullish candlestick patterns) at the 25-period MA level.
Breakout Buy Signal:
The price crosses above the 99-period MA, and the 7-period and 25-period MAs are also both above the 99-period MA.
This confirms a strong bullish breakout after consolidation or a long-term downtrend.
Bearish Entry (Sell Signals):
Primary Sell Signal:
The price crosses below the 7-period MA, AND the 7-period MA is below the 25-period MA, AND the 25-period MA is below the 99-period MA.
This indicates the start of a new downtrend with alignment across the short, medium, and long-term trends.
Pullback Sell Signal (for trend continuation):
The price pulls back to the 25-period MA, and the 7-period MA remains below the 25-period MA.
This indicates that the pullback is a temporary retracement in a downtrend, providing an opportunity to sell as price meets resistance at the 25-period MA.
Breakdown Sell Signal:
The price breaks below the 99-period MA, and the 7-period and 25-period MAs are also below the 99-period MA.
This confirms a strong bearish breakdown after consolidation or a long-term uptrend reversal.
3. Exit Rules:
Bullish Exit (for long positions):
Short-Term Exit:
The price closes below the 7-period MA, and the 7-period MA starts crossing below the 25-period MA.
This indicates weakening momentum in the uptrend, suggesting an exit from the long position.
Stop-Loss Trigger:
The price falls below the 99-period MA, signaling the breakdown of the long-term trend.
This can act as a final exit signal to minimize losses if the long-term uptrend is invalidated.
Bearish Exit (for short positions):
Short-Term Exit:
The price closes above the 7-period MA, and the 7-period MA starts crossing above the 25-period MA.
This indicates a potential weakening of the downtrend and signals an exit from the short position.
Stop-Loss Trigger:
The price breaks above the 99-period MA, invalidating the bearish trend.
This signals that the market may be reversing to the upside, and exiting short positions would be prudent.
ZLSMA with Chandelier ExitThe "ZLSMA with Chandelier Exit" indicator integrates two advanced trading tools: the Zero Lag Smoothed Moving Average (ZLSMA) and the Chandelier Exit. The ZLSMA is designed to provide a smoothed trend line that reacts quickly to price changes, making it effective for identifying trends. The Chandelier Exit employs the Average True Range (ATR) to establish trailing stop levels, assisting traders in managing risk.
How to Use This Indicator
Trend Identification: Observe the ZLSMA line. If the price is consistently above the ZLSMA, it indicates a bullish trend; if below, it suggests a bearish trend.
Entry and Exit Signals:
Buy Signal : When the price crosses above the Chandelier Exit level and the ZLSMA is trending upwards, consider entering a long position.
Sell Signal : Conversely, when the price crosses below the Chandelier Exit level and the ZLSMA is trending downwards, consider entering a short position.
Risk Management : Adjust your stop-loss levels based on the Chandelier Exit lines to protect profits and limit losses.
Pros :
Responsive to Market Changes : The ZLSMA provides quicker signals than traditional moving averages, allowing traders to capture trends early.
Risk Management : The Chandelier Exit helps traders set dynamic stop-loss levels based on market volatility, enhancing risk management.
Cons :
Lagging Nature : Despite being faster than standard moving averages, ZLSMA and Chandelier Exit can still lag during highly volatile market conditions.
False Signals : In choppy or sideways markets, the indicator may produce false signals, leading to potential losses.
Complexity : New traders may find it challenging to interpret multiple components of the indicator effectively, making it necessary to practice and refine their understanding.
Overall, this indicator is a powerful tool for traders seeking to combine trend-following strategies with effective risk management, but it requires careful consideration of market conditions and proper risk management practices.
The Exact IndicatorStruggling to get in on a trade? Don't know where to take profits? This indicator might help - it only displays the Buy, Stop Loss and Take profit points when certain conditions are met.
The indicator combines a moving average crossover strategy with trend analysis to identify potential buy opportunities in the market. It utilises a short-term and long-term Simple Moving Average (SMA) to generate buy signals when the short-term SMA crosses above the long-term SMA. Additionally, it displays take profit and stop loss levels, along with a background colour indicating the overall trend strength.
Pros :
Clear Signals : Provides straightforward buy signals based on a well-known crossover strategy, making it easy for traders to identify entry points.
Visual Aids : The inclusion of take profit and stop loss levels, along with background trend colors, enhances decision-making and risk management.
Trend Awareness : The background colour changes based on trend strength, allowing traders to quickly assess market conditions.
Cons :
Lagging Indicator : Moving averages are inherently lagging, which can result in delayed signals, especially in volatile markets.
False Signals : Crossover strategies can produce false signals during sideways or choppy market conditions, leading to potential losses.
Limited Scope : The indicator focuses primarily on buy signals, potentially missing out on other trading opportunities (like short-selling) in a bearish market.
Overall, while this indicator can be a useful tool for identifying bullish trends and potential entry points, traders should use it in conjunction with other analysis methods and risk management strategies to mitigate its limitations.
Multi-Timeframe SMA Plot**Introducing the Multi-Timeframe SMA Plot**
This script is designed to help traders easily visualize multiple Simple Moving Averages (SMAs) across different timeframes, all on a single chart. The Multi-Timeframe SMA Plot allows you to configure up to three different SMAs with customizable lengths, timeframes, colors, line styles, and line thicknesses, providing a versatile tool to analyze market trends in various granularities.
**Key Features**:
1. **Multiple SMA Timeframes**: You can plot SMAs from different timeframes like 15 minutes, 1 hour, daily, weekly, and more, enabling a comprehensive perspective of market movements.
2. **Fully Customizable**: Each SMA comes with options to adjust the length, timeframe, color, line style (solid, dashed, or dotted), and thickness, giving you control over how you visualize trend data.
3. **User-Friendly Inputs**: The script provides intuitive input fields that make it easy to adjust the settings without diving into the code, making it suitable for both beginner and advanced traders.
**How to Use**:
- Select the desired length and timeframe for each SMA (e.g., 50-period SMA on a 1-hour chart).
- Customize the line style and color to match your chart's theme or make distinctions between each SMA.
- Analyze how different SMAs align or cross over time to identify potential support, resistance, or trend changes.
The Multi-Timeframe SMA Plot is ideal for traders who rely on moving averages to gauge trend strength, direction, and potential entry or exit points. By having multiple SMAs from different timeframes on one chart, you can better understand the overall market sentiment and make more informed decisions.
Give this script a try and streamline your technical analysis with clear, customizable SMA lines!
**Code**: Check out the full script and start customizing it to fit your trading style. Your feedback is always welcome!
Crypto Divergence from BTCThis script is used to indicate when price action of a crypto coin is diverging significantly from that of BTC.
Explanation of the Script:
Inputs:
roc_length: The period used for calculating the Rate of Change.
ma_length: The period used for the moving average of the ROC.
threshold: The percentage difference that indicates a divergence.
Price Data:
The script retrieves the current asset's price and Bitcoin's price.
ROC Calculation:
The ROC for both the current asset and BTC is calculated based on the defined roc_length.
Moving Averages:
Simple moving averages (SMA) of the ROC values are calculated to smooth out the data.
Divergence Detection:
The indicator checks if the current asset's ROC MA is significantly higher or lower than Bitcoin's ROC MA based on the specified threshold.
Plotting:
The script plots the ROC values and their moving averages.
It also highlights the background in green when a bullish divergence is detected (when the asset is moving up while BTC is lagging) and in red for a bearish divergence.
Simple RSI stock Strategy [1D] The "Simple RSI Stock Strategy " is designed to long-term traders. Strategy uses a daily time frame to capitalize on signals generated by the Relative Strength Index (RSI) and the Simple Moving Average (SMA). This strategy is suitable for low-leverage trading environments and focuses on identifying potential buy opportunities when the market is oversold, while incorporating strong risk management with both dynamic and static Stop Loss mechanisms.
This strategy is recommended for use with a relatively small amount of capital and is best applied by diversifying across multiple stocks in a strong uptrend, particularly in the S&P 500 stock market. It is specifically designed for equities, and may not perform well in other markets such as commodities, forex, or cryptocurrencies, where different market dynamics and volatility patterns apply.
Indicators Used in the Strategy:
1. RSI (Relative Strength Index):
- The RSI is a momentum oscillator used to identify overbought and oversold conditions in the market.
- This strategy enters long positions when the RSI drops below the oversold level (default: 30), indicating a potential buying opportunity.
- It focuses on oversold conditions but uses a filter (SMA 200) to ensure trades are only made in the context of an overall uptrend.
2. SMA 200 (Simple Moving Average):
- The 200-period SMA serves as a trend filter, ensuring that trades are only executed when the price is above the SMA, signaling a bullish market.
- This filter helps to avoid entering trades in a downtrend, thereby reducing the risk of holding positions in a declining market.
3. ATR (Average True Range):
- The ATR is used to measure market volatility and is instrumental in setting the Stop Loss.
- By multiplying the ATR value by a custom multiplier (default: 1.5), the strategy dynamically adjusts the Stop Loss level based on market volatility, allowing for flexibility in risk management.
How the Strategy Works:
Entry Signals:
The strategy opens long positions when RSI indicates that the market is oversold (below 30), and the price is above the 200-period SMA. This ensures that the strategy buys into potential market bottoms within the context of a long-term uptrend.
Take Profit Levels:
The strategy defines three distinct Take Profit (TP) levels:
TP 1: A 5% from the entry price.
TP 2: A 10% from the entry price.
TP 3: A 15% from the entry price.
As each TP level is reached, the strategy closes portions of the position to secure profits: 33% of the position is closed at TP 1, 66% at TP 2, and 100% at TP 3.
Visualizing Target Points:
The strategy provides visual feedback by plotting plotshapes at each Take Profit level (TP 1, TP 2, TP 3). This allows traders to easily see the target profit levels on the chart, making it easier to monitor and manage positions as they approach key profit-taking areas.
Stop Loss Mechanism:
The strategy uses a dual Stop Loss system to effectively manage risk:
ATR Trailing Stop: This dynamic Stop Loss adjusts based on the ATR value and trails the price as the position moves in the trader’s favor. If a price reversal occurs and the market begins to trend downward, the trailing stop closes the position, locking in gains or minimizing losses.
Basic Stop Loss: Additionally, a fixed Stop Loss is set at 25%, limiting potential losses. This basic Stop Loss serves as a safeguard, automatically closing the position if the price drops 25% from the entry point. This higher Stop Loss is designed specifically for low-leverage trading, allowing more room for market fluctuations without prematurely closing positions.
to determine the level of stop loss and target point I used a piece of code by RafaelZioni, here is the script from which a piece of code was taken
Together, these mechanisms ensure that the strategy dynamically manages risk while offering robust protection against significant losses in case of sharp market downturns.
The position size has been estimated by me at 75% of the total capital. For optimal capital allocation, a recommended value based on the Kelly Criterion, which is calculated to be 59.13% of the total capital per trade, can also be considered.
Enjoy !
SMA Angle AlertsSMA Angle Alerts
Overview:
The "SMA Angle Alerts" indicator measures the angle of the Simple Moving Average (SMA) over a specified number of bars, helping traders identify when the market is gaining or losing momentum. The indicator provides real-time alerts when the angle of the SMA crosses user-defined thresholds, indicating strong upward or downward movements in the trend.
How it works:
SMA Calculation: The indicator calculates the Simple Moving Average (SMA) of the closing price over a customizable length.
Angle Calculation: It determines the slope of the SMA by measuring the price change over a set number of bars and converts that slope into an angle (in degrees).
Alerts: Alerts are triggered when the SMA angle crosses above or below specified thresholds, allowing traders to react to significant trend changes in real time.
Key Features:
Customizable SMA and Angle Threshold:
The length of the SMA and the threshold for the angle can be customized to fit your trading strategy.
Real-Time Alerts:
Alerts are triggered when the angle of the SMA crosses upward or downward by more than the defined threshold, providing actionable insights into trend strength and direction.
Visual Markers:
The chart visually highlights points where the angle of the SMA exceeds the threshold, with "UP" and "DOWN" labels to mark when the angle is steep enough to signal significant trend changes.
Background Color Alerts:
The chart’s background color changes when the angle exceeds the thresholds—green for upward crosses and red for downward crosses—allowing traders to quickly spot moments of interest.
Plotting the Angle:
The slope of the SMA is plotted in degrees, giving traders a visual representation of the market's momentum. Horizontal lines mark the upper and lower angle thresholds, offering a clear view of when price momentum is accelerating or decelerating.
Use Case:
This indicator is ideal for traders looking to catch strong trend reversals, breakouts, or momentum shifts. It can be used across multiple timeframes to monitor market momentum and identify key moments when the trend is gaining strength in either direction.
Customization:
SMA Length: Adjust the length of the SMA to suit different timeframes or asset classes.
Angle Threshold: Define the angle at which alerts are triggered, allowing you to focus on strong upward or downward movements.
Bars to Check: Customize how many bars are used to calculate the slope and angle of the SMA.
Alerts:
Set alerts to notify you when the SMA is angling up or down by more than your specified threshold, ensuring that you never miss a significant trend shift.
ATR Bands with ATR Cross + InfoTableOverview
This Pine Script™ indicator is designed to enhance traders' ability to analyze market volatility, trend direction, and position sizing directly on their TradingView charts. By plotting Average True Range (ATR) bands anchored at the OHLC4 price, displaying crossover labels, and providing a comprehensive information table, this tool offers a multifaceted approach to technical analysis.
Key Features:
ATR Bands Anchored at OHLC4: Visual representation of short-term and long-term volatility bands centered around the average price.
OHLC4 Dotted Line: A dotted line representing the average of Open, High, Low, and Close prices.
ATR Cross Labels: Visual cues indicating when short-term volatility exceeds long-term volatility and vice versa.
Information Table: Displays real-time data on market volatility, calculated position size based on risk parameters, and trend direction relative to the 20-period Smoothed Moving Average (SMMA).
Purpose
The primary purpose of this indicator is to:
Assess Market Volatility: By comparing short-term and long-term ATR values, traders can gauge the current volatility environment.
Determine Optimal Position Sizing: A calculated position size based on user-defined risk parameters helps in effective risk management.
Identify Trend Direction: Comparing the current price to the 20-period SMMA assists in determining the prevailing market trend.
Enhance Decision-Making: Visual cues and real-time data enable traders to make informed trading decisions with greater confidence.
How It Works
1. ATR Bands Anchored at OHLC4
Average True Range (ATR) Calculations
Short-Term ATR (SA): Calculated over a 9-period using ta.atr(9).
Long-Term ATR (LA): Calculated over a 21-period using ta.atr(21).
Plotting the Bands
OHLC4 Dotted Line: Plotted using small circles to simulate a dotted line due to Pine Script limitations.
ATR(9) Bands: Plotted in blue with semi-transparent shading.
ATR(21) Bands: Plotted in orange with semi-transparent shading.
Overlap: Bands can overlap, providing visual insights into changes in volatility.
2. ATR Cross Labels
Crossover Detection:
SA > LA: Indicates increasing short-term volatility.
Detected using ta.crossover(SA, LA).
A green upward label "SA>LA" is plotted below the bar.
SA < LA: Indicates decreasing short-term volatility.
Detected using ta.crossunder(SA, LA).
A red downward label "SA LA, then the market is considered volatile.
Display: Shows "Yes" or "No" based on the comparison.
b. Position Size Calculation
Risk Total Amount: User-defined input representing the total capital at risk.
Risk per 1 Stock: User-defined input representing the risk associated with one unit of the asset.
Purpose: Helps traders determine the appropriate position size based on their risk tolerance and current market volatility.
c. Is Price > 20 SMMA?
SMMA Calculation:
Calculated using a 20-period Smoothed Moving Average with ta.rma(close, 20).
Logic: If the current close price is above the SMMA, the trend is considered upward.
Display: Shows "Yes" or "No" based on the comparison.
How to Use
Step 1: Add the Indicator to Your Chart
Copy the Script: Copy the entire Pine Script code into the TradingView Pine Editor.
Save and Apply: Save the script and click "Add to Chart."
Step 2: Configure Inputs
Risk Parameters: Adjust the "Risk Total Amount" and "Risk per 1 Stock" in the indicator settings to match your personal risk management strategy.
Step 3: Interpret the Visuals
ATR Bands
Width of Bands: Wider bands indicate higher volatility; narrower bands indicate lower volatility.
Band Overlap: Pay attention to areas where the blue and orange bands diverge or converge.
OHLC4 Dotted Line
Serves as a central reference point for the ATR bands.
Helps visualize the average price around which volatility is measured.
ATR Cross Labels
"SA>LA" Label:
Indicates short-term volatility is increasing relative to long-term volatility.
May signal potential breakout or trend acceleration.
"SA 20 SMMA?
Use this to confirm trend direction before entering or exiting trades.
Practical Example
Imagine you are analyzing a stock and notice the following:
ATR(9) Crosses Above ATR(21):
A green "SA>LA" label appears.
The info table shows "Yes" for "Is ATR-based price volatile."
Position Size:
Based on your risk parameters, the position size is calculated.
Price Above 20 SMMA:
The info table shows "Yes" for "Is price > 20 SMMA."
Interpretation:
The market is experiencing increasing short-term volatility.
The trend is upward, as the price is above the 20 SMMA.
You may consider entering a long position, using the calculated position size to manage risk.
Customization
Colors and Transparency:
Adjust the colors of the bands and labels to suit your preferences.
Risk Parameters:
Modify the default values for risk amounts in the inputs.
Moving Average Period:
Change the SMMA period if desired.
Limitations and Considerations
Lagging Indicators: ATR and SMMA are lagging indicators and may not predict future price movements.
Market Conditions: The effectiveness of this indicator may vary across different assets and market conditions.
Risk of Overfitting: Relying solely on this indicator without considering other factors may lead to suboptimal trading decisions.
Conclusion
This indicator combines essential elements of technical analysis to provide a comprehensive tool for traders. By visualizing ATR bands anchored at the OHLC4, indicating volatility crossovers, and providing real-time data on position sizing and trend direction, it aids in making informed trading decisions.
Whether you're a novice trader looking to understand market volatility or an experienced trader seeking to refine your strategy, this indicator offers valuable insights directly on your TradingView charts.
Code Summary
The script is written in Pine Script™ version 5 and includes:
Calculations for OHLC4, ATRs, Bands, SMMA:
Uses built-in functions like ta.atr() and ta.rma() for calculations.
Plotting Functions:
plotshape() for the OHLC4 dotted line.
plot() and fill() for the ATR bands.
Crossover Detection:
ta.crossover() and ta.crossunder() for detecting ATR crosses.
Labeling Crossovers:
label.new() to place informative labels on the chart.
Information Table Creation:
table.new() to create the table.
table.cell() to populate it with data.
Acknowledgments
ATR and SMMA Concepts: Built upon standard technical analysis concepts widely used in trading.
Pine Script™: Leveraged the capabilities of Pine Script™ version 5 for advanced charting and analysis.
Note: Always test any indicator thoroughly and consider combining it with other forms of analysis before making trading decisions. Trading involves risk, and past performance is not indicative of future results.
Happy Trading!
Enhanced Economic Composite with Dynamic WeightEnhanced Economic Composite with Dynamic Weight
Overview of the Indicator :
The "Enhanced Economic Composite with Dynamic Weight" is a comprehensive tool that combines multiple economic indicators, technical signals, and dynamic weighting to provide insights into market and economic health. It adjusts based on current volatility and recession risk, offering a detailed view of market conditions.
What This Indicator Does :
Tracks Economic Health: Uses key economic and market indicators to assess overall market conditions.
Dynamic Weighting: Adjusts the importance of components like stock indices, gold, and bonds based on volatility (VIX) and yield curve inversion.
Technical Signals: Identifies market momentum shifts through key crossovers like the Golden Cross, Death Cross, Silver Cross, and Hospice Cross.
Recession Shading: Marks known recessions for historical context.
Economic Factors Considered :
TIP (Treasury Inflation-Protected Securities): Reflects inflation expectations.
Gold: A safe-haven asset, increases in weight during volatility or rising momentum.
US Dollar Index (DXY): Measures USD strength, fixed weight of 10%, smoothed with EMA.
Commodities (DBC): Indicates global demand; weight increases with momentum or volatility.
Volatility Index (VIX): Reflects market risk, inversely related to market confidence.
Stock Indices (S&P 500, DJIA, NASDAQ, Russell 2000): Represent market performance, with weights reduced during high volatility or negative yield spread.
Yield Spread (10Y - 2Y Treasuries): Predicts recessions; negative spread reduces stock weighting.
Credit Spread (HYG - TLT): Indicates market risk through corporate vs. government bond yields.
How and Why Factors are Weighted:
Stock Indices get more weight in stable markets (low VIX, positive yield spread), while safe-haven assets like gold and bonds gain weight in volatile markets or during yield curve inversions. This dynamic adjustment ensures the composite reflects current market sentiment.
Technical Signals:
Golden Cross: 50 EMA crossing above 200 SMA, signaling bullish momentum.
Death Cross: 50 EMA below 200 SMA, indicating bearish momentum.
Silver Cross: 21 EMA crossing above 50 EMA, plotted only if below the 200-day SMA, signaling potential upside in downtrend conditions.
Hospice Cross: 50 EMA crosses below 21 EMA, plotted only if 21 EMA is below 200 SMA, a leading bearish signal.
Recession Shading:
Recession periods like the Great Recession, Early 2000s Recession, and COVID-19 Recession are shaded to provide historical context.
Benefits of Using This Indicator:
Comprehensive Analysis: Combines economic fundamentals and technical analysis for a full market view.
Dynamic Risk Adjustment: Weights shift between growth and safe-haven assets based on volatility and recession risk.
Early Signals: The Silver Cross and Hospice Cross provide early warnings of potential market shifts.
Recession Forecasting: Helps predict downturns through the yield curve and recession indicators.
Who Can Benefit:
Traders: Identify market momentum shifts early through crossovers.
Long-term Investors: Use recession warnings and dynamic adjustments to protect portfolios.
Analysts: A holistic tool for analyzing both economic trends and market movements.
This indicator helps users navigate varying market conditions by dynamically adjusting based on economic factors and providing early technical signals for market momentum shifts.
Multi-timeframe 24 moving averages + BB+SAR+Supertrend+VWAP █ OVERVIEW
The script allows to display up to 24 moving averages ("MA"'s) across 5 timeframes plus two bands (Bollinger Bands or Supertrend or Parabolic SAR or VWAP bands) each from its own timeframe.
The main difference of this script from many similar ones is the flexibility of its settings:
- Bulk enable/disable and/or change properties of several MAs at once.
- Save 3 of your frequently used templates as presets using CSV text configurations.
█ HOW TO USE
Some use examples:
In order to "show 31, 50, 200 EMAs and 20, 100, 200 SMAs for each of 1H, 4H, D, W, M timeframes using blue for short MA, yellow for mid MA and red for long MA" use the settings as shown on a screenshot below.
In order to "Show a band of chart timeframe MA's of lengths 5, 8, 13, 21, 34, 55, 100 and 200 plus some 1H, 4H, D and W MAs. Be able to quickly switch off the band of chart tf's MAs. For chart timeframe MA's only show labels for 21, 100 and 200 EMAs". You can set TF1 and TF2 to chart's TF and set you fib MAs there and configure fixed higher timeframe MAs using TF3, TF4 and TF5 (e.g. using 1H, D and W timeframes and using 1H 800 in place of 4H 200 MA). However, quicker way may be using CSV - the syntax is very simple and intuitive, see Preset 2 as it comes in the script. You can easily switch chart tf's band of MAs by toggling on/off your chart timeframe TF's (in our example, TF1 and TF2).
The settings are either obvious or explained in tooltips.
Note 1: When using group settings and CSV presets do not forget that individual setting affected will no have any effect. So, if some setting does not work, check whether it is overridden with some group setting or a CSV preset.
Note 2: Sometimes you can notice parts of MA's hanging in the air, not lasting up to the last bar. This is not a bug as explained on this screenshot:
█ FOR DEVELOPERS
The script is a use case of my CSVParser library, which in turn uses Autotable library, both of which I hope will be quite helpful. Autotable is so powerful and comprehensive that you will hardly ever wish to use normal table functions again for complex tables.
The indicator was inspired by Pablo Limonetti's url=https://www.tradingview.com/script/nFs56VUZ/]Multi Timeframe Moving Averages and Raging @RagingRocketBull's # Multi SMA EMA WMA HMA BB (5x8 MAs Bollinger Bands) MAX MTF - RRB
D_Rock's MA IndicatorD_Rock's Moving Average Indicator
This is an indicator version of my strategy linked here
**Overview:**
The basic concept of this indicator is to generate a signal when a faster/shorter length moving average crosses over (for Longs) or crosses under (for Shorts) a medium/longer length moving average. All of which are customizable. This indicator can work on any timeframe, however the daily is the timeframe used for the default settings and screenshots, as it was designed to be a multi-day swing strategy. Once a signal has been confirmed with a candle close, based on user options, the strategy is to enter the trade on the open of the next candle.
The crossover strategy is nothing new to trading, but what can make this strategy unique and helpful, is the addition of further confirmation points before a signal is generated along with the ability to show multiple moving averages on the chart if you choose. Each moving average pair can also be turned into a "cloud" instead of the traditional lines, for additional viewing preferences. Just about everything visual can be toggled on/off as well.
This indicator is a Trend (MA) indicator with optional confirmation points using a Momentum (MACD) indicator. While a Volume-based indicator is not shown here, one could consider using their favorite from that category to further compliment the signal idea.
If you would like to see the backtesting results for your favorite moving average crossover/under, please see my strategy version linked here .
Shoutout given to Ripster's Clouds Indicator as pieces of that code were taken and modified to create both the Cloud visualization effects, and the Moving Average Pair Plots that are implemented in this strategy.
MOVING AVERAGE OPTIONS
Select between and change the length & type of up to 5 pairs (10 total) of moving averages
The "Show Cloud-x" option will display a fill color between the "a" and "b" pairs
All moving averages lines can be toggled on/off in the "Style" tab, as well as adjusting their colors.
Visualization features do not affect calculations, meaning you could have all or nothing on the chart and the strategy will still produce results
SIGNAL CHOICES
Choose the fast/shorter length MA and the medium/longer length MA to determine the entry signal
CONFIRMATION OPTIONS
Both of these have customizable values and can be toggled on/off
A candle close over a slower/much longer length moving average
An additional cross-over (cross-under for Shorts) on the MACD indicator using default MACD values. While the MACD indicator is not necessary to have on the chart, it can help to add that for visualization. The calculations will perform whether the indicator is on the chart or not.
ADDITIONAL PLOTS
MACD (Moving Average Convergence/Divergence):
- The MACD is an optional confirmation indicator for this strategy.
- Plotting the indicator is not necessary for the strategy to work, but it can be helpful to visually see the status and position of the MACD if this feature is enabled in the strategy
- This helps to identify if there is also momentum behind the entry signal
Options Series - NonOverlay_Technical
⭐ 1. Purpose:
The script is designed to show technical indicators in a non-overlay form using candlestick representations. It combines multiple popular technical analysis tools to gauge the market's bullish or bearish conditions.
⭐ 2. Indicators:
The script uses several indicators across different timeframes: Exponential Moving Averages (EMA) for 5, 20, 50 periods. Simple Moving Average (SMA) for 200 periods. RSI (Relative Strength Index) for momentum. VWAP (Volume Weighted Average Price) for average price evaluation. PSAR (Parabolic SAR) for trend direction. Daily and multi-day (2-day and 3-day) data for broader market context.
⭐ 3. Candlestick Representation:
The script uses color-coded candlesticks to visually represent various indicators and their bullish/bearish states: Green candlesticks for bullish conditions. Red candlesticks for bearish conditions. Neutral/transparent for non-significant conditions.
⭐ 4. Important Conditions:
It calculates bullish and bearish conditions for each indicator: MA20: When the price is above or below the 20-period EMA. RSI: When RSI is above or below 50. VWAP: When the price is above or below the VWAP. PSAR: When the price is above or below the PSAR. 2-day and 3-day Moving Averages: Evaluating the broader trend.
⭐ 5. Bullish vs. Bearish Calculation:
The script sums up bullish and bearish signals to determine the overall market condition: Current_logical_bull: Counts the number of bullish indicators. Current_logical_bear: Counts the number of bearish indicators. The script compares these values to conclude whether the market is more bullish or bearish.
⭐ 6. Visual Plotting:
The script uses plotcandle to display the non-overlay signals at different levels for each condition, stacked vertically from MA20 to PSAR. Additionally, a master candle combines all indicators to show an overall market trend.
⭐ 7. Neon Effect on MA20:
It adds a neon-like effect to the MA20 line, making it visually prominent: A standard plot line with the base color. Two additional neon layers with increasing transparency to enhance the effect.
⭐ 8. Daily Timeframes and Lookahead:
The script fetches daily data using the lookahead feature to get a broader view of the market trend. It tracks the previous day’s and two days' data for comparison.
⭐ 9. Labels and Customization:
The script dynamically adds labels to the chart for the different plotted indicators at the last bar, making it easier to identify which indicator is being represented.
🚀 Conclusion:
The script combines multiple technical indicators, such as EMA, RSI, VWAP, PSAR, and multi-day moving averages, to visually assess bullish and bearish market conditions. It uses color-coded candlesticks to represent each indicator and sums up the signals to determine the overall trend.
Flexible Moving Average StrategyThis strategy offers flexibility to choose between SMA and EMA, and allows users to set the review frequency to Daily, Weekly, or Monthly. It adapts to different market conditions by providing full control over the length and timeframe of the Moving Average.
### Key Features:
- **Moving Average Method**: Select between SMA and EMA.
- **Review Frequency**: Choose Daily, Weekly, or Monthly review periods.
- **Customizable**: Set the Moving Average length and timeframe.
- **Entry/Exit Rules**:
- **Enter Long**: When the close price is above the Moving Average at the end of the period.
- **Exit**: When the close price falls below the Moving Average.
### Parameters:
- **Review Frequency**: Daily, Weekly, Monthly
- **Moving Average Method**: SMA or EMA
- **Length & Timeframe**: Fully adjustable
This strategy suits traders who prefer a flexible, trend-following approach based on long-term price movements.