44-SMA-CROSS-INDICATOR-V244-SMA-CROSS-INDICATOR-V2 signals long or short on the basis of 44SMA cross
Media mobile semplice (SMA)
44-SMA-CROSS-INDICATOR44-SMA-CROSS-INDICATOR public indicator to signal long or short if price crosses above or below the 44 SMA
SCALPING (3m) EMA_TREND_METTER & SUPERTRENDthis strategy use 2 indicator ematrendmetter and supper trend
it is good to use in 3m timeframe BTCUSDT
SMA & EMAIndicator displaying SMA and EMA with adjustable periods for trend analysis and price movement, optimized for TradingView.
Multi Timeframe MAsThis Pine Script indicator, titled "Multi Timeframe MAs," allows you to plot Exponential Moving Averages (EMAs) or Simple Moving Averages (SMAs) from multiple timeframes on a single chart. This helps traders and analysts visualize and compare different moving averages across various timeframes without having to switch between charts.
Key Features:
Multiple Timeframes:
The script supports six different timeframes, ranging from minutes to weekly intervals.
Users can input their desired timeframes, including custom settings such as "60" (60 minutes), "D" (daily), and "W" (weekly).
Moving Average Types:
Users can choose between Exponential Moving Averages (EMA) and Simple Moving Averages (SMA) for each timeframe.
The script utilizes a ternary operator to determine whether to calculate an EMA or an SMA based on user input.
Customizable Periods:
Each moving average can have a different period, allowing for flexibility in analysis.
The default periods are set to commonly used values (e.g., 15, 20, 5, 12).
Visibility Controls:
Users can toggle the visibility of each moving average line, enabling or disabling them as needed.
This feature helps declutter the chart when specific moving averages are not required.
Black Stepped Lines:
All moving averages are plotted as black, stepped lines to provide a clear and consistent visual representation.
This makes it easy to distinguish these lines from other elements on the chart.
Example Use Cases:
Trend Analysis: Compare short-term and long-term trends by visualizing moving averages from different timeframes on a single chart.
Support and Resistance Levels: Identify key support and resistance levels across multiple timeframes.
Cross-Timeframe Strategy: Develop and test trading strategies that rely on the confluence of moving averages from different timeframes.
This script offers a powerful tool for traders and analysts who want to gain deeper insights into market movements by examining moving averages across multiple timeframes. With its customizable settings and user-friendly interface, it provides a versatile solution for a wide range of trading and analytical needs.
Caidson Information IndicatorThe Caidson Information Indicator is a fairly simple script that enables users to show the following:
Fast EMA and Slow EMA lines and/or ribbons
3 Simple Moving Average Lines (Fast, Medium, and Slow)
High-Volume Labels for bars/candles where volume exceeds a user defined ratio
New Uptrend labels where the fast EMA crosses over the slow EMA
Suggested Trailing Stop and Stop Loss values based on Average True Range
Bitcoin Pi Cycle TrackerThe Bitcoin Pi Cycle Tracker is based on the widely recognized Pi Cycle Top Indicator, a concept used to identify potential market cycle tops in Bitcoin's price. This implementation combines the 111-day Simple Moving Average (SMA) and the 350-day SMA (multiplied by 2) to detect key crossover points. When the 111-day SMA crosses above the 350-day SMA x2, it signals a potential market peak.
Key Features:
Plots the 111-day SMA (blue) and the 350-day SMA x2 (red) for clear visualization.
Displays visual markers and vertical lines at crossover points to highlight key moments.
Sends alerts for crossovers, helping traders stay ahead of market movements.
This tool is an implementation of the Pi Cycle concept originally popularized by Bitcoin market analysts. Use it to analyze historical price cycles and prepare for significant market events. Please note that while the Pi Cycle Indicator has been historically effective, it should be used alongside other tools for a comprehensive trading strategy.
Multi SMA EMA VWAP1. Moving Average Crossover
This is one of the most common strategies with moving averages, and it involves observing crossovers between EMAs and SMAs to determine buy or sell signals.
Buy signal: When a faster EMA (like a short-term EMA) crosses above a slower SMA, it can indicate a potential upward movement.
Sell signal: When a faster EMA crosses below a slower SMA, it can indicate a potential downward movement.
With 4 EMAs and 5 SMAs, you can set up crossovers between different combinations, such as:
EMA(9) crosses above SMA(50) → buy.
EMA(9) crosses below SMA(50) → sell.
2. Divergence Confirmation Between EMAs and SMAs
Divergence between the EMAs and SMAs can offer additional confirmation. If the EMAs are pointing in one direction and the SMAs are still in the opposite direction, it is a sign that the movement could be stronger and continue in the same direction.
Positive divergence: If the EMAs are making new highs while the SMAs are still below, it could be a sign that the market is in a strong trend.
Negative divergence: If the EMAs are making new lows and the SMAs are still above, you might consider that the market is in a downtrend or correction.
3. Using EMAs as Dynamic Support and Resistance
EMAs can act as dynamic support and resistance in strong trends. If the price approaches a faster EMA from above and doesn’t break it, it could be a good entry point for a long position (buy). If the price approaches a slower EMA from below and doesn't break it, it could be a good point to sell (short).
Buy: If the price is above all EMAs and approaches the fastest EMA (e.g., EMA(9)), it could be a good buy point if the price bounces upward.
Sell: If the price is below all EMAs and approaches the fastest EMA, it could be a good sell point if the price bounces downward.
4. Combining SMAs and EMAs to Filter Signals
SMAs can serve as a trend filter to avoid trading in sideways markets. For example:
Bullish trend condition: If the longer-term SMAs (such as SMA(100) or SMA(200)) are below the price, and the shorter EMAs are aligned upward, you can look for buy signals.
Bearish trend condition: If the longer-term SMAs are above the price and the shorter EMAs are aligned downward, you can look for sell signals.
5. Consolidation Zone Between EMAs and SMAs
When the price moves between EMAs and SMAs without a clear trend (consolidation zone), you can expect a breakout. In this case, you can use the EMAs and SMAs to identify the direction of the breakout:
If the price is in a narrow range between the EMAs and SMAs and then breaks above the fastest EMA, it’s a sign that an upward trend may begin.
If the price breaks below the fastest EMA, it could indicate a potential downward trend.
6. "Golden Cross" and "Death Cross" Strategy
These are classic strategies based on crossovers between moving averages of different periods.
Golden Cross: Occurs when a faster EMA (e.g., EMA(50)) crosses above a slower SMA (e.g., SMA(200)), which suggests a potential bullish trend.
Death Cross: Occurs when a faster EMA crosses below a slower SMA, which suggests a potential bearish trend.
Additional Recommendations:
Combining with other indicators: You can combine EMA and SMA signals with other indicators like the RSI (Relative Strength Index) or MACD (Moving Average Convergence/Divergence) for confirmation and to avoid false signals.
Risk management: Always use stop-loss and take-profit orders to protect your capital. Moving averages are trend-following indicators but don’t guarantee that the price will move in the same direction.
Timeframe analysis: It’s recommended to use different timeframes to confirm the trend (e.g., use EMAs on hourly charts along with SMAs on daily charts).
VWAP
1. VWAP + EMAs for Trend Confirmation
VWAP can act as a trend filter, confirming the direction provided by the EMAs.
Buy Signal: If the price is above the VWAP and the EMAs are aligned in an uptrend (e.g., short-term EMAs are above longer-term EMAs), this indicates that the trend is bullish and you can look for buy opportunities.
Sell Signal: If the price is below the VWAP and the EMAs are aligned in a downtrend (e.g., short-term EMAs are below longer-term EMAs), this suggests a bearish trend and you can look for sell opportunities.
In this case, VWAP is used to confirm the overall trend. For example:
Bullish: Price above VWAP, EMAs aligned to the upside (e.g., EMA(9) > EMA(50) > EMA(200)), buy.
Bearish: Price below VWAP, EMAs aligned to the downside (e.g., EMA(9) < EMA(50) < EMA(200)), sell.
2. VWAP as Dynamic Support and Resistance
VWAP can act as a dynamic support or resistance level during the day. Combining this with EMAs and SMAs helps you refine your entry and exit points.
Support: If the price is above VWAP and starts pulling back to VWAP, it could act as support. If the price bounces off the VWAP and aligns with bullish EMAs (e.g., EMA(9) crossing above EMA(50)), you can consider entering a buy position.
Resistance: If the price is below VWAP and approaches VWAP from below, it can act as resistance. If the price fails to break through VWAP and aligns with bearish EMAs (e.g., EMA(9) crossing below EMA(50)), it could be a good signal for a sell.
Supertrend StatsSupertrend with Probabilistic Stats and MA Filter
Overview: The Supertrend with Probabilistic Stats and MA Filter is a comprehensive TradingView Pine Script indicator designed to enhance trading strategies by combining the trend-detection capabilities of the Supertrend indicator with the trend-confirmation strength of Moving Averages (MA). Additionally, it offers robust statistical tracking to provide traders with valuable insights into the performance and reliability of their trading signals.
Key Features:
Supertrend Indicator Integration:
Trend Detection: Utilizes the Supertrend algorithm to identify prevailing market trends.
Buy/Sell Signals: Generates clear buy and sell signals based on trend reversals.
Customizable Parameters: Allows adjustment of ATR period and multiplier to suit different trading styles and market conditions.
Visual Aids: Plots Supertrend lines on the chart and highlights trend areas for easy visualization.
Moving Average (MA) Filter:
Trend Confirmation: Filters buy signals to occur only when the open price is above the MA and sell signals only when the open price is below the MA.
Customizable MA Types: Supports various MA types, including SMA, EMA, SMMA (RMA), WMA, and VWMA.
Flexible Configuration: Offers options to enable/disable the MA filter, select MA type, set MA length, and adjust MA source and offset.
Statistical Tracking:
Trimmed Mean Calculation: Computes trimmed means for bullish and bearish movements, removing outliers to provide a more accurate average movement.
Success Rate Metrics: Calculates the success rates (%) for both bullish and bearish signals, indicating the percentage of signals that resulted in favorable price movements.
Candle Count Analysis: Tracks the average number of candles each bullish and bearish move lasts, offering insights into the duration of trends.
Data Visualization: Presents all statistical data in a neatly formatted table on the chart, allowing for quick reference and analysis.
Customizable Statistics Table:
Text Color Customization: Provides an option to change the table text color to match personal preferences or chart aesthetics, enhancing readability.
Comprehensive Metrics: Displays key statistics such as Bullish/Bearish Averages, Counts, Success Rates, and Average Candle Counts.
Optional Pinbar Filtering:
Signal Refinement: Adds an additional layer of signal confirmation by filtering buy and sell signals based on pinbar candlestick patterns.
Adjustable Thresholds: Allows customization of the pinbar wick threshold to fine-tune signal accuracy.
Visual Enhancements:
Markers: Optionally displays markers on the first and last candles of bullish and bearish moves for better trend identification.
Highlighter: Shades the chart background to indicate current trend direction, aiding in visual trend recognition.
How It Works:
Trend Identification with Supertrend:
The indicator calculates the Supertrend based on user-defined ATR periods and multipliers.
It plots the Supertrend lines and generates buy/sell signals when the price crosses these lines, indicating a potential trend reversal.
Filtering Signals with Moving Average:
When the MA filter is enabled, the indicator ensures that buy signals are only considered valid if the candle's open price is above the selected MA, and sell signals only if the open price is below the MA.
This additional confirmation aligns trades with the broader market trend, potentially increasing signal reliability.
Statistical Analysis:
Upon triggering a buy or sell signal, the indicator records the entry price and tracks the subsequent price movements.
It calculates trimmed means to assess average movements while excluding extreme outliers.
Success rates are computed by comparing the closing price against the entry price, indicating how often signals result in favorable outcomes.
The average number of candles per move provides insight into trend duration and volatility.
Visualization and Customization:
All statistical data is presented in a table on the chart, with customizable text colors for enhanced readability.
Optional pinbar filtering and visual markers further refine and illustrate trading signals, aiding in decision-making.
Benefits to Traders:
Enhanced Signal Reliability:
By combining Supertrend with an MA filter, the indicator ensures that only signals aligning with the broader market trend are considered, potentially reducing false signals.
Data-Driven Decision Making:
The comprehensive statistical tracking offers traders insights into the performance of their signals, enabling informed adjustments to their trading strategies based on empirical data.
Trend Confirmation and Alignment:
The MA filter acts as a trend confirmation tool, ensuring that trades are placed in the direction of the prevailing trend, which can enhance the probability of successful trades.
Performance Metrics at a Glance:
The statistics table provides all necessary performance metrics in a single view, allowing traders to quickly assess the effectiveness of their strategy without sifting through extensive data.
Customization and Flexibility:
With options to adjust MA types, lengths, and table text colors, traders can tailor the indicator to fit their specific preferences and trading environments.
Visual Clarity and Aids:
The plotted Supertrend lines, MA line, signal markers, and highlighter enhance visual clarity, making it easier to identify trends and potential trade opportunities on the chart.
Usage Instructions:
Adding the Indicator:
Copy the Script: Select and copy the entire Pine Script provided.
Open TradingView: Navigate to TradingView and open your desired asset's chart.
Access Pine Editor: Click on the Pine Editor tab at the bottom of the TradingView interface.
Paste and Add to Chart: Paste the script into the editor and click "Add to Chart" to apply the indicator.
Configuring Settings:
Supertrend Parameters: Adjust the ATR period and multiplier to suit your trading style and the asset's volatility.
MA Filter Settings:
Enable MA Filter: Toggle "Enable MA Filter?" to ON to activate the filter.
Select MA Type: Choose from SMA, EMA, SMMA (RMA), WMA, or VWMA.
Set MA Length: Define the period for the MA calculation.
MA Source and Offset: Choose the price source (default is close) and set any desired plot offset.
Statistical Tracking:
Trimmed Mean Percentage: Set the percentage to trim outliers in mean calculations.
Show Cross Markers: Toggle to display or hide markers on the first and last candles of bullish and bearish moves.
Table Customization:
Table Text Color: Select your preferred text color for the statistics table to match your chart's theme or enhance readability.
Pinbar Filtering (Optional):
Enable Pinbar Filtering: Toggle to refine signals based on pinbar patterns.
Set Pinbar Wick Threshold: Adjust the threshold to define the characteristics of a valid pinbar.
Interpreting the Indicators:
Buy/Sell Signals: Look for labeled "BUY" and "SELL" signals on the chart that align with Supertrend reversals and MA conditions.
Statistics Table: Refer to the table located at the bottom right of the chart to assess:
Bullish/Bearish Averages: Average price movements following signals.
Counts: Total number of bullish and bearish signals.
Success Rates (%): Percentage of signals that resulted in profitable trades.
Candle Averages: Average duration of bullish and bearish moves in terms of candle counts.
Markers and Highlighter: Utilize visual markers and shaded trend areas to better understand market trends and the context of each signal.
Making Informed Decisions:
Assess Signal Performance: Use the success rates and averages to evaluate the effectiveness of your current settings and make necessary adjustments.
Adjust Parameters: Modify Supertrend and MA parameters based on observed performance and changing market conditions to optimize signal accuracy.
Combine with Other Analysis: Integrate insights from this indicator with other technical analysis tools and fundamental factors to form a holistic trading strategy.
Conclusion: The Supertrend with Probabilistic Stats and MA Filter indicator offers a powerful combination of trend detection, signal filtering, and statistical analysis. By providing detailed performance metrics and ensuring that trades align with the broader market trend, this indicator empowers traders to make more informed, data-driven decisions. Whether you're a novice seeking clarity or an experienced trader aiming to refine your strategy, this tool serves as a valuable asset in your trading toolkit.
If you have any further questions or require additional customizations, feel free to reach out!
20/50 SMA Cross 200 SMAThis Pine Script code is designed to identify and visualize crossovers of two shorter-term Simple Moving Averages (SMAs), a 20-period SMA and a 50-period SMA, with a longer-term 200-period SMA on a price chart. It also includes alerts for these crossover events. Here's a breakdown:
**Purpose:**
The core idea behind this script is to detect potential trend changes. Crossovers of shorter-term moving averages over a longer-term moving average are often interpreted as bullish signals, while crossovers below are considered bearish.
**Key Components:**
1. **Moving Average Calculation:**
* `sma20 = ta.sma(close, 20)`: Calculates the 20-period SMA of the closing price.
* `sma50 = ta.sma(close, 50)`: Calculates the 50-period SMA of the closing price.
* `sma200 = ta.sma(close, 200)`: Calculates the 200-period SMA of the closing price.
2. **Crossover Detection:**
* `crossUp20 = ta.crossover(sma20, sma200)`: Returns `true` when the 20-period SMA crosses above the 200-period SMA.
* `crossDown20 = ta.crossunder(sma20, sma200)`: Returns `true` when the 20-period SMA crosses below the 200-period SMA.
* Similar logic applies for `crossUp50` and `crossDown50` with the 50-period SMA.
3. **Recent Crossover Tracking (Crucial Improvement):**
* `lookback = 7`: Defines a lookback period of 7 bars.
* `var bool hasCrossedUp20 = false`, etc.: Declares `var` (persistent) boolean variables to track if a crossover has occurred *within* the last 7 bars. This is the most important correction from previous versions.
* The logic using `ta.barssince()` is the key:
* If a crossover happens (`crossUp20` is true), the corresponding `hasCrossedUp20` is set to `true`.
* If no crossover happens on the current bar, it checks if a crossover happened within the last 7 bars using `ta.barssince(crossUp20) <= lookback`. If so, it keeps `hasCrossedUp20` as `true`. After 7 bars, it becomes `false`.
4. **Plotting Crossovers:**
* `plotshape(...)`: Plots circles on the chart to visually mark the crossovers.
* Green circles below the bars for bullish crossovers (20 and 50).
* Red circles above the bars for bearish crossovers (20 and 50).
* Different shades of green/red (green/lime, red/maroon) distinguish between 20 and 50 SMA crossovers.
5. **Plotting Moving Averages (Optional but Helpful):**
* `plot(sma20, color=color.blue, linewidth=1)`: Plots the 20-period SMA in blue.
* Similar logic for the 50-period SMA (orange) and 200-period SMA (gray).
6. **Alerts:**
* `alertcondition(...)`: Triggers alerts when crossovers occur. This is essential for real-time trading signals.
**How it Works (in Simple Terms):**
The script continuously calculates the 20, 50, and 200 SMAs. It then monitors for instances where the 20 or 50 SMA crosses the 200 SMA. When such a crossover happens, a colored circle is plotted on the chart, and an alert is triggered. The key improvement is that it remembers if a crossover occurred in the last 7 bars and continues to display the circle during that period.
**Use Case:**
Traders use this type of indicator to identify potential entry and exit points in the market. A bullish crossover (shorter SMA crossing above the longer SMA) might be a signal to buy, while a bearish crossover might be a signal to sell.
**Key Improvements over Previous Versions:**
* **Correct Lookback Implementation:** The use of `ta.barssince()` and `var` variables is the correct and efficient way to check for crossovers within a lookback period. This fixes the major flaw in earlier versions.
* **Clear Visualizations:** The use of `plotshape` with distinct colors makes it easy to distinguish between 20 and 50 SMA crossovers.
* **Alerts:** The inclusion of alerts makes the script much more practical for real-time trading.
This improved version provides a robust and useful tool for identifying and tracking SMA crossovers.
SMA Ribbon [A]SMA Ribbon with Adjustable MA200
20, 50, 100, and 200 -period Simple Moving Averages (SMAs) for trend analysis.
The SMA200 dynamically changes color based on its direction—green when rising and red when falling. Additionally, you can lock the SMA200 to the daily timeframe , allowing it to display the 200-day moving average on lower timeframes, such as 4-hour or 1-hour charts.
Features:
Dynamic SMA200 Color: Automatically adjusts to show upward (green) or downward (red) trends.
Daily SMA200 Option: Enables the SMA200 to represent the 200-day moving average on intraday charts for long-term trend insights.
Smart Adaptation: The daily SMA200 setting is automatically disabled on daily or higher timeframes, ensuring accurate period calculations.
How to Use:
Use this script to identify key support/resistance levels and overall market trends.
Adjust the "Daily MA for MA200" option in the settings to toggle between timeframe-specific and daily-locked SMA200.
This script is ideal for traders seeking a clean and customizable tool for long-term and short-term trend analysis.
Bitcoin: Mayer MultipleMayer Multiple Indicator
The Mayer Multiple is a powerful tool designed to help traders assess market conditions and identify optimal buying or selling opportunities. It calculates the ratio between the current price and its 200-day simple moving average (SMA), visualizing key thresholds that indicate value zones, caution areas, and overheated markets.
Key Features:
Dynamic Market Zones: Clearly marked levels like "Smash Buy," "Boost DCA," and "Extreme Euphoria" to guide your trading decisions.
Customizable Input: Adjust the SMA length to fit your strategy.
Color-Coded Signals: Intuitive visualization of market sentiment for quick analysis.
Comprehensive Thresholds: Historical insights into price behavior with plotted reference levels based on probabilities.
This indicator is ideal for traders aiming to enhance their long-term strategies and improve decision-making in volatile markets. Use it to gain an edge in identifying potential turning points and managing risk effectively.
Optimal MA FinderIntroduction to the "Optimal MA Finder" Indicator
The "Optimal MA Finder" is a powerful and versatile tool designed to help traders optimize their moving average strategies. This script combines flexibility, precision, and automation to identify the most effective moving average (MA) length for your trading approach. Whether you're aiming to improve your long-only strategy or implement a buy-and-sell methodology, the "Optimal MA Finder" is your go-to solution for enhanced decision-making.
What Does It Do?
The script evaluates a wide range of moving average lengths, from 10 to 500, to determine which one produces the best results based on historical data. By calculating critical metrics such as the total number of trades and the profit factor for each MA length, it identifies the one that maximizes profitability. It supports both simple moving averages (SMA) and exponential moving averages (EMA), allowing you to tailor the analysis to your preferred method.
The logic works by backtesting each MA length against the price data and assessing the performance under two strategies:
Buy & Sell: Includes both long and short trades.
Long Only: Focuses solely on long positions for more conservative strategies.
Once the optimal MA length is identified, the script overlays it on the chart, highlighting periods when the price crosses over or under the optimal MA, helping traders identify potential entry and exit points.
Why Is It Useful?
This indicator stands out for its ability to automate a task that is often labor-intensive and subjective: finding the best MA length. By providing a clear, data-driven answer, it saves traders countless hours of manual testing while significantly enhancing the accuracy of their strategies. For example, instead of guessing whether a 50-period EMA is more effective than a 200-period SMA, the "Optimal MA Finder" will pinpoint the exact length and type of MA that has historically yielded the best results for your chosen strategy.
Key Benefits:
Precision: Identifies the MA length with the highest profit factor for maximum profitability.
Automation: Conducts thorough backtesting without manual effort.
Flexibility: Adapts to your preferred MA type (SMA or EMA) and trading strategy (Buy & Sell or Long Only).
Real-Time Feedback: Provides actionable insights by plotting the optimal MA directly on your chart and highlighting relevant trading periods.
Example of Use: Imagine you're trading a volatile stock and want to optimize your long-only strategy. By applying the "Optimal MA Finder," you discover that a 120-period EMA results in the highest profit factor. The indicator plots this EMA on your chart, showing you when to consider entering or exiting positions based on price movements relative to the EMA.
In short, the "Optimal MA Finder" empowers traders by delivering data-driven insights and improving the effectiveness of trading strategies. Its clear logic, combined with robust automation, makes it an invaluable tool for both novice and experienced traders seeking consistent results.
OBV + Custom MA StrategyFor a long time, the use of the OBV indicator has been relatively monotonous, with its expression and content lacking diversity. Therefore, I'm considering trying new ways of representation.
This "OBV + Custom MA Strategy" indicator combines the On-Balance Volume (OBV) with customizable moving averages (SMA, EMA, or WMA) to provide advanced insights into market trends. The indicator calculates OBV manually and overlays two moving averages: a short-term and a long-term MA. Key features include:
OBV plotted alongside short-term and long-term moving averages for better trend visualization.
Signals generated when OBV crosses the short-term MA or when the short-term MA crosses the long-term MA.
Alerts for bullish and bearish crossovers to help identify potential buy or sell opportunities.
This indicator is suitable for traders looking to incorporate volume dynamics into their strategy while customizing their moving average type and periods.
中文说明
此“OBV + 自定义均线策略”指标结合了成交量指标OBV与可定制的移动均线(SMA、EMA或WMA),为市场趋势分析提供了更多的视角。该指标手动计算OBV,并叠加短期与长期均线,主要特点包括:
绘制OBV以及短期和长期均线,以更清晰地观察趋势。
当OBV上穿/下穿短期均线或短期均线上穿/下穿长期均线时,生成买卖信号。
提供多种看涨和看跌信号的警报,帮助识别潜在的买入或卖出机会。
此指标适合希望将成交量动态纳入策略的交易者,并支持自定义均线类型和周期以满足个性化需求。
2-Year MA Multiplier [UAlgo]The 2-Year MA Multiplier is a technical analysis tool designed to assist traders and investors in identifying potential overbought and oversold conditions in the market. By plotting the 2-year moving average (MA) of an asset's closing price alongside an upper band set at five times this moving average, the indicator provides visual cues to assess long-term price trends and significant market movements.
🔶 Key Features
2-Year Moving Average (MA): Calculates the simple moving average of the asset's closing price over a 730-day period, representing approximately two years.
Visual Indicators: Plots the 2-year MA in forest green and the upper band in firebrick red for clear differentiation.
Fills the area between the 2-year MA and the upper band to highlight the normal trading range.
Uses color-coded fills to indicate overbought (tomato red) and oversold (cornflower blue) conditions based on the asset's closing price relative to the bands.
🔶 Idea
The concept behind the 2-Year MA Multiplier is rooted in the cyclical nature of markets, particularly in assets like Bitcoin. By analyzing long-term price movements, the indicator aims to identify periods of significant deviation from the norm, which may signal potential buying or selling opportunities.
2-year MA smooths out short-term volatility, providing a clearer view of the asset's long-term trend. This timeframe is substantial enough to capture major market cycles, making it a reliable baseline for analysis.
Multiplying the 2-year MA by five establishes an upper boundary that has historically correlated with market tops. When the asset's price exceeds this upper band, it may indicate overbought conditions, suggesting a potential for price correction. Conversely, when the price falls below the 2-year MA, it may signal oversold conditions, presenting potential buying opportunities.
🔶 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.
Fourier Extrapolation of PriceThis advanced algorithm leverages Fourier analysis to predict price trends by decomposing historical price data into its frequency components. Unlike traditional algorithms that often operate in lower-dimensional spaces, this method harnesses a multidimensional approach to capture intricate market behaviors. By utilizing additional dimensions, the algorithm identifies and extrapolates subtle patterns and oscillations that are typically overlooked, providing a more robust and nuanced forecast.
Ideal for traders seeking a deeper understanding of market dynamics, this tool offers an enhanced predictive capability by aligning its calculations with the complexity of real-world financial systems.
DNSE VN301!, SMA & EMA Cross StrategyDiscover the tailored Pinescript to trade VN30F1M Future Contracts intraday, the strategy focuses on SMA & EMA crosses to identify potential entry/exit points. The script closes all positions by 14:25 to avoid holding any contracts overnight.
HNX:VN301!
www.tradingview.com
Setting & Backtest result:
1-minute chart, initial capital of VND 100 million, entering 4 contracts per time, backtest result from Jan-2024 to Nov-2024 yielded a return over 40%, executed over 1,000 trades (average of 4 trades/day), winning trades rate ~ 30% with a profit factor of 1.10.
The default setting of the script:
A decent optimization is reached when SMA and EMA periods are set to 60 and 15 respectively while the Long/Short stop-loss level is set to 20 ticks (2 points) from the entry price.
Entry & Exit conditions:
Long signals are generated when ema(15) crosses over sma(60) while Short signals happen when ema(15) crosses under sma(60). Long orders are closed when ema(15) crosses under sma(60) while Short orders are closed when ema(15) crosses over sma(60).
Exit conditions happen when (whichever came first):
Another Long/Short signal is generated
The Stop-loss level is reached
The Cut-off time is reached (14:25 every day)
*Disclaimers:
Futures Contracts Trading are subjected to a high degree of risk and price movements can fluctuate significantly. This script functions as a reference source and should be used after users have clearly understood how futures trading works, accessed their risk tolerance level, and are knowledgeable of the functioning logic behind the script.
Users are solely responsible for their investment decisions, and DNSE is not responsible for any potential losses from applying such a strategy to real-life trading activities. Past performance is not indicative/guarantee of future results, kindly reach out to us should you have specific questions about this script.
---------------------------------------------------------------------------------------
Khám phá Pinescript được thiết kế riêng để giao dịch Hợp đồng tương lai VN30F1M trong ngày, chiến lược tập trung vào các đường SMA & EMA cắt nhau để xác định các điểm vào/ra tiềm năng. Chiến lược sẽ đóng tất cả các vị thế trước 14:25 để tránh giữ bất kỳ hợp đồng nào qua đêm.
Thiết lập & Kết quả backtest:
Chart 1 phút, vốn ban đầu là 100 triệu đồng, vào 4 hợp đồng mỗi lần, kết quả backtest từ tháng 1/2024 tới tháng 11/2024 mang lại lợi nhuận trên 40%, thực hiện hơn 1.000 giao dịch (trung bình 4 giao dịch/ngày), tỷ lệ giao dịch thắng ~ 30% với hệ số lợi nhuận là 1,10.
Thiết lập mặc định của chiến lược:
Đạt được một mức tối ưu ổn khi SMA và EMA periods được đặt lần lượt là 60 và 15 trong khi mức cắt lỗ được đặt thành 20 tick (2 điểm) từ giá vào.
Điều kiện Mở và Đóng vị thế:
Tín hiệu Long được tạo ra khi ema(15) cắt trên sma(60) trong khi tín hiệu Short xảy ra khi ema(15) cắt dưới sma(60). Lệnh Long được đóng khi ema(15) cắt dưới sma(60) trong khi lệnh Short được đóng khi ema(15) cắt lên sma(60).
Điều kiện đóng vị thể xảy ra khi (tùy điều kiện nào đến trước):
Một tín hiệu Long/Short khác được tạo ra
Giá chạm mức cắt lỗ
Lệnh chưa đóng nhưng tới giờ cut-off (14:25 hàng ngày)
*Tuyên bố miễn trừ trách nhiệm:
Giao dịch hợp đồng tương lai có mức rủi ro cao và giá có thể dao động đáng kể. Chiến lược này hoạt động như một nguồn tham khảo và nên được sử dụng sau khi người dùng đã hiểu rõ cách thức giao dịch hợp đồng tương lai, đã đánh giá mức độ chấp nhận rủi ro của bản thân và hiểu rõ về logic vận hành của chiến lược này.
Người dùng hoàn toàn chịu trách nhiệm về các quyết định đầu tư của mình và DNSE không chịu trách nhiệm về bất kỳ khoản lỗ tiềm ẩn nào khi áp dụng chiến lược này vào các hoạt động giao dịch thực tế. Hiệu suất trong quá khứ không chỉ ra/cam kết kết quả trong tương lai, vui lòng liên hệ với chúng tôi nếu bạn có thắc mắc cụ thể về chiến lược giao dịch này.
Trend AnalyzerThe Trend Analyzer is designed to help traders identify and analyze market trends. Here's a simple explanation of its logic:
Main Features
Customizable Moving Average: The indicator plots a moving average on the chart. Users can choose from various types (SMA, EMA, WMA, VWMA, HMA, SMMA, TMA) and set the period. This flexibility allows traders to adapt the indicator to different trading styles and timeframes.
Trend Detection: It determines whether the current price is above or below the moving average, providing a clear visual representation of the current trend direction.
Sequence Counter: The indicator counts consecutive candles above or below the moving average. This feature helps traders identify trend strength and persistence, which can be crucial for timing entries and exits.
Statistical Analysis: It calculates probabilities for the next candle's direction based on historical data. This unique feature gives traders a statistical edge in predicting short-term price movements.
Visual Candle Counter: An optional feature that displays the number of consecutive candles above or below the moving average directly on the chart, enhancing visual analysis.
How It Works
The indicator continuously tracks the position of price relative to the chosen moving average.
It maintains a count of how many candles in a row have been above or below the moving average.
For each sequence length, it records historical data on how often the trend continued or reversed in the past.
This historical data is used to calculate probabilities for the next candle's direction, providing a statistical insight into potential price movements.
The indicator displays this information directly on the chart, allowing for quick and easy interpretation.
Practical Applications
Trend Confirmation: Use the indicator to confirm the strength and direction of current trends.
Entry and Exit Signals: The sequence counter and probability calculations can help in timing trades more effectively.
Risk Management: Understanding the statistical likelihood of trend continuation can aid in setting appropriate stop-loss and take-profit levels.
Market Analysis: The indicator provides valuable insights into market behavior and can be used for both short-term and long-term analysis.
While the Trend Analyzer provides valuable insights based on historical data and statistical analysis, it's important to remember that past performance does not guarantee future results. The financial markets are complex and influenced by numerous factors. This indicator should be used as part of a comprehensive trading strategy and not as a sole decision-making tool. Always practice proper risk management and consider seeking advice from financial professionals before making investment decisions.
Adapted RSI w/ Multi-Asset Regime Detection v1.1The relative strength index (RSI) is a momentum indicator used in technical analysis. RSI measures the speed and magnitude of an asset's recent price changes to detect overbought or oversold conditions in the price of said asset.
In addition to identifying overbought and oversold assets, the RSI can also indicate whether your desired asset may be primed for a trend reversal or a corrective pullback in price. It can signal when to buy and sell.
The RSI will oscillate between 0 and 100. Traditionally, an RSI reading of 70 or above indicates an overbought condition. A reading of 30 or below indicates an oversold condition.
The RSI is one of the most popular technical indicators. I intend to offer a fresh spin.
Adapted RSI w/ Multi-Asset Regime Detection
Our Adapted RSI makes necessary improvements to the original Relative Strength Index (RSI) by combining multi-timeframe analysis with multi-asset monitoring and providing traders with an efficient way to analyse market-wide conditions across different timeframes and assets simultaneously. The indicator automatically detects market regimes and generates clear signals based on RSI levels, presenting this data in an organised, easy-to-read format through two dynamic tables. Simplicity is key, and having access to more RSI data at any given time, allows traders to prepare more effectively, especially when trading markets that "move" together.
How we calculate the RSI
First, the RSI identifies price changes between periods, calculating gains and losses from one look-back period to the next. This look-back period averages gains and losses over 14 periods, which in this case would be 14 days, and those gains/losses are calculated based on the daily closing price. For example:
Average Gain = Sum of Gains over the past 14 days / 14
Average Loss = Sum of Losses over the past 14 days / 14
Then we calculate the Relative Strength (RS):
RS = Average Gain / Average Loss
Finally, this is converted to the RSI value:
RSI = 100 - (100 / (1 + RS))
Key Features
Our multi-timeframe RSI indicator enhances traditional technical analysis by offering synchronised Daily, Weekly, and Monthly RSI readings with automatic regime detection. The multi-asset monitoring system allows tracking of up to 10 different assets simultaneously, with pre-configured major pairs that can be customised to any asset selection. The signal generation system provides clear market guidance through automatic regime detection and a five-level signal system, all presented through a sophisticated visual interface with dynamic RSI line colouring and customisable display options.
Quick Guide to Use it
Begin by adding the indicator to your chart and configuring your preferred assets in the "Asset Comparison" settings.
Position the two information tables according to your preference.
The main table displays RSI analysis across three timeframes for your current asset, while the asset table shows a comparative analysis of all monitored assets.
Signals are colour-coded for instant recognition, with green indicating bullish conditions and red for bearish conditions. Pay special attention to regime changes and signal transitions, using multi-timeframe confluence to identify stronger signals.
How it Works (Regime Detection & Signals)
When we say 'Regime', a regime is determined by a persistent trend or in this case momentum and by leveraging this for RSI, which is a momentum oscillator, our indicator employs a relatively simple regime detection system that classifies market conditions as either Bullish (RSI > 50) or Bearish (RSI < 50). Our benchmark between a trending bullish or bearish market is equal to 50. By leveraging a simple classification system helps determine the probability of trend continuation and the weight given to various signals. Whilst we could determine a Neutral regime for consolidating markets, we have employed a 'neutral' signal generation which will be further discussed below...
Signal generation occurs across five distinct levels:
Strong Buy (RSI < 15)
Buy (RSI < 30)
Neutral (RSI 30-70)
Sell (RSI > 70)
Strong Sell (RSI > 85)
Each level represents different market conditions and probability scenarios. For instance, extreme readings (Strong Buy/Sell) indicate the highest probability of mean reversion, while neutral readings suggest equilibrium conditions where traders should focus on the overall regime bias (Bullish/Bearish momentum).
This approach offers traders a new and fresh spin on a popular and well-known tool in technical analysis, allowing traders to make better and more informed decisions from the well presented information across multiple assets and timeframes. Experienced and beginner traders alike, I hope you enjoy this adaptation.
Onchain Analysis - BTCIntroduction
This indicator is designed to equip traders with actionable insights into long-term BITSTAMP:BTCUSD market dynamics through a blend of on-chain metrics and technical tools. It provides a streamlined visualization of market sentiment and critical price levels using unique and proprietary methodologies.
The script features:
NUPL (Net Unrealized Profit/Loss) with advanced bar color coding.
350DMA and 350DMAx2, offering insights into key Bitcoin cycle levels.
Logarithmic Fibonacci Extension, aiding in precise target setting during price discovery phases.
Core Functionality
NUPL Analysis
NUPL reflects the network's aggregate unrealized profit or loss, calculated as (Market Cap − Realized Cap) / Market Cap. Bars are color-coded dynamically to simplify the interpretation of market sentiment. The emotional states (e.g., euphoria, fear) are visually represented for quick analysis, making this indicator particularly valuable for traders monitoring Bitcoin's macro cycles. This implementation improves clarity by aggregating NUPL across all holders rather than separating short- and long-term holders.
350DMA and 350DMAx2
The 350DMAx2 line has historical relevance as a key level during Bitcoin bull cycles, often acting as a resistance point during price rallies. This implementation also includes precise visualization of price interaction with the 350DMA, enabling traders to anticipate potential retracement or breakout zones. Furthermore, to minimize chart clutter, the 350DMA and 350DMAx2 lines are designed to dynamically appear only when the price is near these levels. This ensures that traders can focus on relevant data without unnecessary visual distractions.
Logarithmic Fibonacci Extensions
Unlike traditional Fibonacci extensions, logarithmic levels better suit assets like Bitcoin that grow exponentially. The calculated levels provide traders with clear targets in price discovery phases, enhancing the utility of this feature.
Key Advantages and Unique Features
Enhanced Visualization : NUPL bar color-coding simplifies sentiment analysis, allowing traders to instantly identify key turning points in market psychology.
Historical Context : The script incorporates insights derived from past market cycles, emphasizing the significance of 350DMAx2 levels.
Customization : Traders can adapt settings like lookback periods (e.g., 500 for daily, 100 for weekly) to fit their preferred timeframe and trading strategy.
Proprietary Insights : The script integrates logarithmic Fibonacci levels in a unique manner, optimizing their application to logarithmic assets.
Why This Indicator is Valuable
This indicator is not a simple combination of existing tools; it is a carefully curated suite of functionalities designed to address specific needs of crypto traders. The advanced NUPL representation and integration of logarithmic Fibonacci make it a distinct addition to any trader's toolkit. It provides clarity in interpreting long-term trends and offers actionable insights for navigating Bitcoin's cyclical nature.
How to Use
NUPL Monitoring
Pay close attention to initial color changes, e.g. orange and red, since it may establish clear pull-back. Especially, when bars turn black, it suggests that the market is heavily in profit, often signaling a market top.
350DMAx2 Interaction
If the price is trading below or near the 350DMAx2 level, it often reflects a key resistance zone. Historically, price rejections from this level are common, offering traders critical insights into potential retracement scenarios.
Logarithmic Fibonacci Extensions
Logarithmic Fibonacci extension levels are especially valuable for assets like BITSTAMP:BTCUSD , which exhibit logarithmic growth. These levels provide:
Target Identification: During price discovery phases, the logarithmic Fibonacci levels act as critical resistance or support points, enabling traders to set realistic price targets.
Market Top Detection: When extreme NUPL values (e.g., black bars) align with price interaction near logarithmic Fibonacci levels, the likelihood of a market top increases significantly. This alignment offers a robust method for identifying overbought or overextended market conditions.
Combining Concepts
When NUPL's extreme signals (e.g., red or black bars) align with price movements near the 350DMAx2 level, the likelihood of a significant pullback increases. Additionally, these scenarios can be further validated by observing logarithmic Fibonacci resistance levels, which can provide added confidence in identifying market tops during price discovery phases.
Indicator DashboardThis script creates an 'Indicator Dashboard' designed to assist you in analyzing financial markets and making informed decisions. The indicator provides a summary of current market conditions by presenting various technical analysis indicators in a table format. The dashboard evaluates popular indicators such as Moving Averages, RSI, MACD, and Stochastic RSI. Below, we'll explain each part of this script in detail and its purpose:
### Overview of Indicators
1. **Moving Averages (MA)**:
- This indicator calculates Simple Moving Averages (“SMA”) for 5, 14, 20, 50, 100, and 200 periods. These averages provide a visual summary of price movements. Depending on whether the price is above or below the moving average, it determines the market direction as either “Bullish” or “Bearish.”
2. **RSI (Relative Strength Index)**:
- The RSI helps identify overbought or oversold market conditions. Here, the RSI is calculated for a 14-period window, and this value is displayed in the table. Additionally, the 14-period moving average of the RSI is also included.
3. **MACD (Moving Average Convergence Divergence)**:
- The MACD indicator is used to determine trend strength and potential reversals. This script calculates the MACD line, signal line, and histogram. The MACD condition (“Bullish,” “Bearish,” or “Neutral”) is displayed alongside the MACD and signal line values.
4. **Stochastic RSI**:
- Stochastic RSI is used to identify momentum changes in the market. The %K and %D lines are calculated to determine the market condition (“Bullish” or “Bearish”), which is displayed along with the calculated values for %K and %D.
### Table Layout and Presentation
The dashboard is presented in a vertical table format in the top-right corner of the chart. The table contains two columns: “Indicator” and “Status,” summarizing the condition of each technical indicator.
- **Indicator Column**: Lists each of the indicators being tracked, such as SMA values, RSI, MACD, etc.
- **Status Column**: Displays the current status of each indicator, such as “Bullish,” “Bearish,” or specific values like the RSI or MACD.
The table also includes rounded indicator values for easier interpretation. This helps traders quickly assess market conditions and make informed decisions based on multiple indicators presented in a single location.
### Detailed Indicator Status Calculations
1. **SMA Status**: For each moving average (5, 14, 20, 50, 100, 200), the script checks if the current price is above or below the SMA. The status is determined as “Bullish” if the price is above the SMA and “Bearish” if below, with the value of the SMA also displayed.
2. **RSI and RSI Average**: The RSI value for a 14-period is displayed along with its 14-period SMA, which provides an average reading of the RSI to smooth out volatility.
3. **MACD Indicator**: The MACD line, signal line, and histogram are calculated using standard parameters (12, 26, 9). The status is shown as “Bullish” when the MACD line is above the signal line, and “Bearish” when it is below. The exact values for the MACD line, signal line, and histogram are also included.
4. **Stochastic RSI**: The %K and %D lines of the Stochastic RSI are used to determine the trend condition. If %K is greater than %D, the condition is “Bullish,” otherwise it is “Bearish.” The actual values of %K and %D are also displayed.
### Conclusion
The 'Indicator Dashboard' provides a comprehensive overview of multiple technical indicators in a single, easy-to-read table. This allows traders to quickly gauge market conditions and make more informed decisions. By consolidating key indicators like Moving Averages, RSI, MACD, and Stochastic RSI into one dashboard, it saves time and enhances the efficiency of technical analysis.
This script is particularly useful for traders who prefer a clean and organized overview of their favorite indicators without needing to plot each one individually on the chart. Instead, all the crucial information is available at a glance in a consolidated format.
Simple Moving Average with Regime Detection by iGrey.TradingThis indicator helps traders identify market regimes using the powerful combination of 50 and 200 SMAs. It provides clear visual signals and detailed metrics for trend-following strategies.
Key Features:
- Dual SMA System (50/200) for regime identification
- Colour-coded candles for easy trend visualisation
- Metrics dashboard
Core Signals:
- Bullish Regime: Price < 200 SMA
- Bearish Regime: Price > 200 SMA
- Additional confirmation: 50 SMA Cross-over or Cross-under (golden cross or death cross)
Metrics Dashboard:
- Current Regime Status (Bull/Bear)
- SMA Distance (% from price to 50 SMA)
- Regime Distance (% from price to 200 SMA)
- Regime Duration (bars in current regime)
Usage Instructions:
1. Apply the indicator to your chart
2. Configure the SMA lengths if desired (default: 50/200)
3. Monitor the color-coded candles:
- Green: Bullish regime
- Red: Bearish regime
4. Use the metrics dashboard for detailed analysis
Settings Guide:
- Length: Short-term SMA period (default: 50)
- Source: Price calculation source (default: close)
- Regime Filter Length: Long-term SMA period (default: 200)
- Regime Filter Source: Price source for regime calculation (default: close)
Trading Tips:
- Use bullish regimes for long positions
- Use bearish regimes for capital preservation or short positions
- Consider regime duration for trend strength
- Monitor distance metrics for potential reversals
- Combine with other systems for confluence
#trend-following #moving average #regime #sma #momentum
Risk Management:
- Not a standalone trading system
- Should be used with proper position sizing
- Consider market conditions and volatility
- Always use stop losses
Best Practices:
- Monitor multiple timeframes
- Use with other confirmation tools
- Consider fundamental factors
Version: 1.0
Created by: iGREY.Trading
Release Notes
// v1.1 Allows table overlay customisation
// v1.2 Update to v6 pinescript
Dual Strategy Selector V2 - CryptogyaniOverview:
This script provides traders with a dual-strategy system that they can toggle between using a simple dropdown menu in the input settings. It is designed to cater to different trading styles and needs, offering both simplicity and advanced filtering techniques. The strategies are built around moving average crossovers, enhanced by configurable risk management tools like take profit levels, trailing stops, and ATR-based stop-loss.
Key Features:
Two Strategies in One Script:
Strategy 1: A classic moving average crossover strategy for identifying entry signals based on trend reversals. Includes user-defined take profit and trailing stop-loss options for profit locking.
Strategy 2: An advanced trend-following system that incorporates:
A higher timeframe trend filter to confirm entry signals.
ATR-based stop-loss for dynamic risk management.
Configurable partial take profit to secure gains while letting the trade run.
Highly Customizable:
All key parameters such as SMA lengths, take profit levels, ATR multiplier, and timeframe for the trend filter are adjustable via the input settings.
Dynamic Toggle:
Traders can switch between Strategy 1 and Strategy 2 with a single dropdown, allowing them to adapt the strategy to market conditions.
How It Works:
Strategy 1:
Entry Logic: A long trade is triggered when the fast SMA crosses above the slow SMA.
Exit Logic: The trade exits at either a user-defined take profit level (percentage or pips) or via an optional trailing stop that dynamically adjusts based on price movement.
Strategy 2:
Entry Logic: Builds on the SMA crossover logic but adds a higher timeframe trend filter to align trades with the broader market direction.
Risk Management:
ATR-Based Stop-Loss: Protects against adverse moves with a volatility-adjusted stop-loss.
Partial Take Profit: Allows traders to secure a percentage of gains while keeping some exposure for extended trends.
How to Use:
Select Your Strategy:
Use the dropdown in the input settings to choose Strategy 1 or Strategy 2.
Configure Parameters:
Adjust SMA lengths, take profit, and risk management settings to align with your trading style.
For Strategy 2, specify the higher timeframe for trend filtering.
Deploy and Monitor:
Apply the script to your preferred asset and timeframe.
Use the backtest results to fine-tune settings for optimal performance.
Why Choose This Script?:
This script stands out due to its dual-strategy flexibility and enhanced features:
For beginners: Strategy 1 provides a simple yet effective trend-following system with minimal setup.
For advanced traders: Strategy 2 includes powerful tools like trend filters and ATR-based stop-loss, making it ideal for challenging market conditions.
By combining simplicity with advanced features, this script offers something for everyone while maintaining full transparency and user customization.
Default Settings:
Strategy 1:
Fast SMA: 21, Slow SMA: 49
Take Profit: 7% or 50 pips
Trailing Stop: Optional (disabled by default)
Strategy 2:
Fast SMA: 20, Slow SMA: 50
ATR Multiplier: 1.5
Partial Take Profit: 50%
Higher Timeframe: 1 Day (1D)