Trend Following Strategy with TP/SL taimoortaimoorchutiya is a strategy that follows trend structure
Ciclos
Optimized Order Flow Strategy//@version=5
indicator("Optimized Order Flow Strategy", overlay=true)
// تنظیمات ورودی
lookback = input(5, title="Lookback Period for Highs/Lows")
fvgLength = input(20, title="FVG Zone Length")
showOrderBlocks = input(true, title="Show Order Blocks")
showFVG = input(true, title="Show FVG Zones")
// شناسایی بالاترین و پایینترین قیمت
highs = high >= ta.highest(high, lookback) ? high : na
lows = low <= ta.lowest(low, lookback) ? low : na
// شناسایی اوردر بلاکها
orderBlockLow = ta.valuewhen(lows, low, 0)
orderBlockHigh = ta.valuewhen(highs, high, 0)
validOrderBlockLow = not na(orderBlockLow)
validOrderBlockHigh = not na(orderBlockHigh)
// فیلتر حجم
volumeFilter = volume > ta.sma(volume, 10)
// سیگنال خرید و فروش
buySignal = validOrderBlockLow and close < orderBlockLow and ta.crossover(close, orderBlockLow) and volumeFilter
sellSignal = validOrderBlockHigh and close > orderBlockHigh and ta.crossunder(close, orderBlockHigh) and volumeFilter
// نمایش سیگنالها
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="Buy")
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="Sell")
// هشدارها
alertcondition(buySignal, title="Buy Alert", message="Buy Signal Detected!")
alertcondition(sellSignal, title="Sell Alert", message="Sell Signal Detected!")
Sri Yantra-Scret Geometry - AYNETExplanation of the Script
Inputs:
periods: Number of bars used for calculating the moving average and standard deviation.
yloc: Chooses the display location (above or below the bars).
Moving Average and Standard Deviation:
ma: Moving average of the close price for the specified period.
std: Standard deviation, used to set the range for the Sri Yantra triangle points.
Triangle Points:
p1, p2, and p3 are the points for constructing the triangle, with p1 and p2 set at two standard deviations above and below the moving average, and p3 at the moving average itself.
Sri Yantra Triangle Drawing:
Three lines form a triangle, with the moving average line serving as the midpoint anchor.
The triangle pattern shifts across bars as new moving average values are calculated.
Moving Average Plot:
The moving average is plotted in red for visual reference against the triangle pattern.
This basic script emulates the Sri Yantra pattern using price data, creating a spiritual and aesthetic overlay on price charts, ideal for users looking to incorporate sacred geometry into their technical analysis.
Support and Resistance Lines)Main Features:
Support and Resistance Lines: The indicator looks for a period of 4 candles where no new low (for support) or no new high (for resistance) is created. Once this is detected, the first low of the last 4 candles is used for the support level and the first high is used for the resistance level.
Line Extension: The support and resistance lines are extended both to the left and right of the chart as well as up and down (in points). The length of the lines is flexible and can be adjusted.
Labels: You can add text labels to the lines that display the exact value of the support or resistance. These labels can also be positioned flexibly.
Alert Function: Alerts can be set to notify you when a new support or resistance line is created or when the price crosses above or below these lines.
Thickness and Color: Both the lines and labels can be customized in terms of color and thickness.
Customizable Parameters:
Line Length: You can adjust the length of the lines to the right and left.
Line Color and Thickness: You can change the colors and thickness of the support and resistance lines.
Label Position and Color: The position and color of the support and resistance labels can also be adjusted.
Alert Options: Alerts can be enabled to notify you about specific events, such as the creation of a new line or the price breaking through a line.
Usage:
This indicator can be useful for identifying and monitoring key price levels (support and resistance). It can also serve as the foundation for other trading strategies, such as trend analysis or breakout strategies.
Mandala Visualization-Secret Geometry-AYNETCode Explanation
Dynamic Center:
The center Y coordinate is dynamic and defaults to the close price.
You can change it to a fixed level if desired.
Concentric Rings:
The script draws multiple circular rings spaced evenly using ring_spacing.
Symmetry Lines:
The Mandala includes num_lines radial symmetry lines emanating from the center.
Customization Options:
num_rings: Number of concentric circles.
ring_spacing: Distance between each ring.
num_lines: Number of radial lines.
line_color: Color of the rings and lines.
line_width: Thickness of the rings and lines.
How to Use
Add the script to your TradingView chart.
Adjust the input parameters to fit the Mandala within your chart view.
Experiment with different numbers of rings, lines, and spacing for unique Mandala patterns.
Let me know if you'd like additional features or visual tweaks!
Day High/Low and Horizontal Lines with Custom Increments How It Works:
Day High and Day Low: The indicator tracks and displays the highest and lowest prices of the current trading day. These values are updated dynamically throughout the day.
Custom Horizontal Lines: The user specifies a starting price and an increment value. The indicator then plots multiple horizontal lines above and below the starting price, spaced at the given increment. Up to 15 lines can be drawn in both directions (above and below).
Alerts: Alerts are triggered when the price crosses any of the horizontal lines, helping traders monitor potential breakouts or reversals.
Use Case:
This indicator is useful for traders who want to:
Track the Day High/Low: Easily reference the high and low of the current day as key price levels.
Monitor Key Price Levels: Draw and observe custom horizontal levels above and below a specific price, such as support/resistance levels or price targets.
Set Alerts: Receive notifications when the price crosses these key levels, helping identify potential breakout or breakdown points in the market.
Why Use This Indicator:
Day Trading: Traders can monitor the high and low of the current trading day to see if the price breaks through key levels.
Breakout Strategy: The custom horizontal lines provide reference points for potential breakout levels, with alerts helping traders act in real-time.
Support and Resistance: The plotted lines can represent predefined support or resistance levels, allowing traders to plan their entries and exits effectively.
The indicator gives a structured way to visualize price movements, highlight important price levels, and react quickly with alerts when the price crosses those levels.
Holt-Winters Forecast BandsDescription:
The Holt-Winters Adaptive Bands indicator combines seasonal trend forecasting with adaptive volatility bands. It uses the Holt-Winters triple exponential smoothing model to project future price trends, while Nadaraya-Watson smoothed bands highlight dynamic support and resistance zones.
This indicator is ideal for traders seeking to predict future price movements and visualize potential market turning points. By focusing on broader seasonal and trend data, it provides insight into both short- and long-term market directions. It’s particularly effective for swing trading and medium-to-long-term trend analysis on timeframes like daily and 4-hour charts, although it can be adjusted for other timeframes.
Key Features:
Holt-Winters Forecast Line: The core of this indicator is the Holt-Winters model, which uses three components — level, trend, and seasonality — to project future prices. This model is widely used for time-series forecasting, and in this script, it provides a dynamic forecast line that predicts where price might move based on historical patterns.
Adaptive Volatility Bands: The shaded areas around the forecast line are based on Nadaraya-Watson smoothing of historical price data. These bands provide a visual representation of potential support and resistance levels, adapting to recent volatility in the market. The bands' fill colors (red for upper and green for lower) allow traders to identify potential reversal zones without cluttering the chart.
Dynamic Confidence Levels: The indicator adapts its forecast based on market volatility, using inputs such as average true range (ATR) and price deviations. This means that in high-volatility conditions, the bands may widen to account for increased price movements, helping traders gauge the current market environment.
How to Use:
Forecasting: Use the forecast line to gain insight into potential future price direction. This line provides a directional bias, helping traders anticipate whether the price may continue along a trend or reverse.
Support and Resistance Zones: The shaded bands act as dynamic support and resistance zones. When price enters the upper (red) band, it may be in an overbought area, while the lower (green) band may indicate oversold conditions. These bands adjust with volatility, so they reflect the current market conditions rather than fixed levels.
Timeframe Recommendations:
This indicator performs best on daily and 4-hour charts due to its reliance on trend and seasonality. It can be used on lower timeframes, but accuracy may vary due to increased price noise.
For traders looking to capture swing trades, the daily and 4-hour timeframes provide a balance of trend stability and signal reliability.
Adjustable Settings:
Alpha, Beta, and Gamma: These settings control the level, trend, and seasonality components of the forecast. Alpha is generally the most sensitive setting for adjusting responsiveness to recent price movements, while Beta and Gamma help fine-tune the trend and seasonal adjustments.
Band Smoothing and Deviation: These settings control the lookback period and width of the volatility bands, allowing users to customize how closely the bands follow price action.
Parameters:
Prediction Length: Sets the length of the forecast, determining how far into the future the prediction line extends.
Season Length: Defines the seasonality cycle. A setting of 14 is typical for bi-weekly cycles, but this can be adjusted based on observed market cycles.
Alpha, Beta, Gamma: These parameters adjust the Holt-Winters model's sensitivity to recent prices, trends, and seasonal patterns.
Band Smoothing: Determines the smoothing applied to the bands, making them either more reactive or smoother.
Ideal Use Cases:
Swing Trading and Trend Following: The Holt-Winters model is particularly suited for capturing larger market trends. Use the forecast line to determine trend direction and the bands to gauge support/resistance levels for potential entries or exits.
Identifying Reversal Zones: The adaptive bands act as dynamic overbought and oversold zones, giving traders potential reversal areas when price reaches these levels.
Important Notes:
No Buy/Sell Signals: This indicator does not produce direct buy or sell signals. It’s intended for visual trend analysis and support/resistance identification, leaving trade decisions to the user.
Not for High-Frequency Trading: Due to the nature of the Holt-Winters model, this indicator is optimized for higher timeframes like the daily and 4-hour charts. It may not be suitable for high-frequency or scalping strategies on very short timeframes.
Adjust for Volatility: If using the indicator on lower timeframes or more volatile assets, consider adjusting the band smoothing and prediction length settings for better responsiveness.
TrendTracker - Table Trend FREETrendTracker
The TrendTracker is a powerful indicator designed to help you quickly identify market trends (bullish or bearish) across the timeframes of your choice. It generates an intuitive and customizable table directly on your chart, displaying the trend status for your selected periods.
Key Features:
Clear trend identification: Easily see if the market is in a bullish (uptrend) or bearish (downtrend) state across your chosen timeframes.
Full customization: Adjust table colors, timeframes, and even its position on the chart directly within the indicator settings.
Clean and functional design: Built to provide quick insights without cluttering your chart.
Whether you're a beginner or an experienced trader, the TrendTracker is an essential tool to help you make more informed decisions and better seize market opportunities.
Enjoyed the Indicator?
If you found the TrendTracker useful, how about buying me a coffee? 🚀☕
Send any amount to my Metamask wallet (BSC): 0x74d57109eE016514Bc8b054ceae34740c34941A9
Thanks for your support, and happy trading! 💹
Platonic Solids Visualization-Scret Geometry-AYNETExplanation:
Input Options:
solid: Choose the type of Platonic Solid (Tetrahedron, Cube, Octahedron, etc.).
size: Adjust the size of the geometry.
color_lines: Choose the color for the edges.
line_width: Set the width of the edges.
Geometry Calculations:
Each solid is drawn based on predefined coordinates and connected using the line.new function.
Geometric Types Supported:
Tetrahedron: A triangular pyramid.
Cube: A square-based 2D projection.
Octahedron: Two pyramids joined at the base.
Unsupported Solids:
Dodecahedron and Icosahedron are geometrically more complex and not rendered in this basic implementation.
Visualization:
The chosen Platonic Solid will be drawn relative to the center position (center_y) on the chart.
Adjust the size and center_y inputs to position the shape correctly.
Let me know if you need improvements or have a specific geometry to implement!
Crypto Momentum StrategyPruena de ña esytategoa rara la idea es probarño y que aimente e fprofit factpr
Cicli DAX Multi-Timeframe//@version=5
indicator("Cicli DAX Multi-Timeframe", overlay=false)
// Input per la durata dei cicli
cycleWeekly = input(5, title="Durata Ciclo Settimanale")
cycleMonthly = input(20, title="Durata Ciclo Mensile")
cycleQuarterly = input(60, title="Durata Ciclo Trimestrale")
cycleSixMonths = input(120, title="Durata Ciclo Semestrale")
cycleAnnual = input(240, title="Durata Ciclo Annuale")
cycleBiennial = input(480, title="Durata Ciclo Biennale")
// Funzione per calcolare il ciclo
calcCycle(period) =>
ta.sma(close, period)
// Calcolo dei cicli
weeklyCycle = calcCycle(cycleWeekly)
monthlyCycle = calcCycle(cycleMonthly)
quarterlyCycle = calcCycle(cycleQuarterly)
sixMonthCycle = calcCycle(cycleSixMonths)
annualCycle = calcCycle(cycleAnnual)
biennialCycle = calcCycle(cycleBiennial)
// Traccia i cicli
plot(weeklyCycle, color=color.blue, title="Ciclo Settimanale", linewidth=1)
plot(monthlyCycle, color=color.green, title="Ciclo Mensile", linewidth=1)
plot(quarterlyCycle, color=color.red, title="Ciclo Trimestrale", linewidth=1)
plot(sixMonthCycle, color=color.orange, title="Ciclo Semestrale", linewidth=1)
plot(annualCycle, color=color.purple, title="Ciclo Annuale", linewidth=1)
plot(biennialCycle, color=color.yellow, title="Ciclo Biennale", linewidth=1)
Last Freemans Ver1This script is a technical indicator for TradingView that combines three popular tools for analyzing price movements:
Relative Strength Index (RSI): This measures the momentum of recent price changes and indicates potential overbought or oversold conditions. The script allows you to adjust the RSI length (default 14) and define overbought (default 70) and oversold (default 30) levels.
Moving Average Convergence Divergence (MACD): This indicator helps identify trend direction and potential turning points. It uses two moving averages (fast and slow) and a signal line. The script lets you customize the lengths of the MACD lines (fast: 12, slow: 26, signal: 9).
Exponential Moving Average (EMA): This is a smoothing indicator used to identify the underlying trend by filtering out price noise. You can adjust the EMA length (default 200) in the script.
Additionally, the script generates Buy/Sell signals based on the following conditions:
Buy Signal:
MACD line crosses above the signal line (indicating a potential uptrend).
RSI is below the oversold level (suggesting room for price increase).
Closing price is below the EMA (potentially indicating a price pullback before an upswing).
Sell Signal:
MACD line crosses below the signal line (indicating a potential downtrend).
RSI is above the overbought level (suggesting potential for a price decrease).
Closing price is above the EMA (potentially indicating a price breakout before a decline).
Visualization:
The script plots the following on the chart:
RSI line (blue) with overbought and oversold levels as dashed lines (red and green, respectively).
MACD line (red) and signal line (blue).
EMA line (orange).
Green triangle up (below the bar) for Buy signals.
Red triangle down (above the bar) for Sell signals.
Important Note:
This script provides trading signals based on technical indicators, but keep in mind that these are not guaranteed predictions of future price movements. Always conduct your own research and consider other factors before making trading decisions.
Performance-INDIA & GLOBAL MARKETS-MADGrowth vs. Stability: India is expected to maintain relatively strong economic growth compared to many other global markets, which are facing slower growth or even recession risks. The Indian economy is benefiting from a large domestic market, young population, and rising digital and infrastructure investments.
Volatility: Indian markets are often more volatile due to domestic factors, such as political changes, policy announcements, and inflationary pressures. Global markets, on the other hand, tend to experience volatility based on external economic factors and geopolitical risks.
Inflation and Interest Rates: Both India and global markets are dealing with inflation, but India’s central bank (RBI) is seen as being proactive in controlling inflation through interest rate hikes. Globally, major central banks like the Fed and ECB are tightening their monetary policies, which is contributing to global economic slowdown concerns.
Central Bank Liquidity YOY % Change - Second DerivativeThis indicator measures the acceleration or deceleration in the yearly growth rate of central bank liquidity.
By calculating the year-over-year percentage change of the YoY growth rate, it highlights shifts in the pace of liquidity changes, providing insights into market momentum or potential reversals influenced by central bank actions.
This can help reveal impulses in liquidity by identifying changes in the growth rate's acceleration or deceleration. When central bank liquidity experiences a rapid increase or decrease, the second derivative captures these shifts as sharp upward or downward movements.
These impulses often signal pivotal liquidity shifts, which may correspond to major policy changes, market interventions, or financial stability measures, offering an early signal of potential market impacts.
CAGR ProjectionThe CAGR Projection Indicator is a tool designed to visualize the potential growth of an asset over time based on a specified annual growth rate. This indicator overlays a projection line on the price chart, allowing traders and investors to compare actual price movements with a hypothetical growth trajectory.
One of the key features of this indicator is the ability for users to input their expected annual growth rate as a percentage. This flexibility allows for various scenarios to be modeled, from conservative estimates to more optimistic projections. Additionally, the indicator allows users to set a specific start date for the projection, enabling analysis from any chosen point in time.
The projection calculation is dynamic, adjusting for different timeframes and updating with each new bar on the chart. The indicator initializes either at the specified start date or when the first valid price is encountered. Using the initial price as a base, the indicator calculates the projected price for each subsequent bar using the compound growth formula. The calculation accounts for the specific timeframe of the chart, ensuring accurate projections regardless of whether the chart displays daily, weekly, or other intervals.
The projected growth is plotted as a blue line on the chart, providing a clear visual comparison between the actual price movement and the hypothetical growth trajectory. This visual representation makes it easy for users to quickly assess how an asset is performing relative to the expected growth rate.
This tool has several practical applications. Investors can use it to set realistic growth targets for their investments. By comparing actual price movements to the projection line, users can quickly assess if an asset is outperforming or underperforming relative to the expected growth rate. Furthermore, multiple instances of the indicator can be used with different growth rates to visualize various potential outcomes, facilitating scenario analysis.
The indicator also offers customization options, such as displaying a label showing the annual growth rate used for the projection, and the ability to adjust the color of the projection line to suit individual preferences or chart setups.
In summary, this CAGR Projection indicator serves as a valuable tool for both long-term investors and traders, offering a simple yet effective way to visualize potential growth scenarios and assess investment performance over time. It combines ease of use with powerful analytical capabilities, making it a useful addition to any trader's or investor's toolkit.
Crypto Wallets Profitability & Performance [LuxAlgo]The Crypto Wallets Profitability & Performance indicator provides a comprehensive view of the financial status of cryptocurrency wallets by leveraging on-chain data from IntoTheBlock. It measures the percentage of wallets profiting, losing, or breaking even based on current market prices.
Additionally, it offers performance metrics across different timeframes, enabling traders to better assess market conditions.
This information can be crucial for understanding market sentiment and making informed trading decisions.
🔶 USAGE
🔹 Wallets Profitability
This indicator is designed to help traders and analysts evaluate the profitability of cryptocurrency wallets in real-time. It aggregates data gathered from the blockchain on the number of wallets that are in profit, loss, or breaking even and presents it visually on the chart.
Breaking even line demonstrates how realized gains and losses have changed, while the profit and the loss monitor unrealized gains and losses.
The signal line helps traders by providing a smoothed average and highlighting areas relative to profiting and losing levels. This makes it easier to identify and confirm trading momentum, assess strength, and filter out market noise.
🔹 Profitability Meter
The Profitability Meter is an alternative display that visually represents the percentage of wallets that are profiting, losing, or breaking even.
🔹 Performance
The script provides a view of the financial health of cryptocurrency wallets, showing the percentage of wallets in profit, loss, or breaking even. By combining these metrics with performance data across various timeframes, traders can gain valuable insights into overall wallet performance, assess trend strength, and identify potential market reversals.
🔹 Dashboard
The dashboard presents a consolidated view of key statistics. It allows traders to quickly assess the overall financial health of wallets, monitor trend strength, and gauge market conditions.
🔶 DETAILS
🔹 The Chart Occupation Option
The chart occupation option adjusts the occupation percentage of the chart to balance the visibility of the indicator.
🔹 The Height in Performance Options
Crypto markets often experience significant volatility, leading to rapid and substantial gains or losses. Hence, plotting performance graphs on top of the chart alongside other indicators can result in a cluttered display. The height option allows you to adjust the plotting for balanced visibility, ensuring a clearer and more organized chart.
🔶 SETTINGS
The script offers a range of customizable settings to tailor the analysis to your trading needs.
Chart Occupation %: Adjust the occupation percentage of the chart to balance the visibility of the indicator.
🔹 Profiting Wallets
Profiting Percentage: Toggle to display the percentage of wallets in profit.
Smoothing: Adjust the smoothing period for the profiting percentage line.
Signal Line: Choose a signal line type (SMA, EMA, RMA, or None) to overlay on the profiting percentage.
🔹 Losing Wallets
Losing Percentage: Toggle to display the percentage of wallets in loss.
Smoothing: Adjust the smoothing period for the losing percentage line.
Signal Line: Choose a signal line type (SMA, EMA, RMA, or None) to overlay on the losing percentage.
🔹 Breaking Even Wallets
Breaking-Even Percentage: Toggle to display the percentage of wallets breaking even.
Smoothing: Adjust the smoothing period for the breaking-even percentage line.
🔹 Profitability Meter
Profitability Meter: Enable or disable the meter display, set its width, and adjust the offset.
🔹 Performance
Performance Metrics: Choose the timeframe for performance metrics (Day to Date, Week to Date, etc.).
Height: Adjust the height of the chart visuals to balance the visibility of the indicator.
🔹 Dashboard
Block Profitability Stats: Toggle the display of profitability stats.
Performance Stats: Toggle the display of performance stats.
Dashboard Size and Position: Customize the size and position of the performance dashboard on the chart.
🔶 RELATED SCRIPTS
Market-Sentiment-Technicals
Multi-Chart-Widget
Exposure Oscillator (Cumulative 0 to ±100%)
Exposure Oscillator (Cumulative 0 to ±100%)
This Pine Script indicator plots an "Exposure Oscillator" on the chart, which tracks the cumulative market exposure from a range of technical buy and sell signals. The exposure is measured on a scale from -100% (maximum short exposure) to +100% (maximum long exposure), helping traders assess the strength of their position in the market. It provides an intuitive visual cue to aid decision-making for trend-following strategies.
Buy Signals (Increase Exposure Score by +10%)
Buy Signal 1 (Cross Above 21 EMA):
This signal is triggered when the price crosses above the 21-period Exponential Moving Average (EMA), where the current bar closes above the EMA21, and the previous bar closed below the EMA21. This indicates a potential upward price movement as the market shifts into a bullish trend.
buySignal1 = ta.crossover(close, ema21)
Buy Signal 2 (Trending Above 21 EMA):
This signal is triggered when the price closes above the 21-period EMA for each of the last 5 bars, indicating a sustained bullish trend. It confirms that the price is consistently above the EMA21 for a significant period.
buySignal2 = ta.barssince(close <= ema21) > 5
Buy Signal 3 (Living Above 21 EMA):
This signal is triggered when the price has closed above the 21-period EMA for each of the last 15 bars, demonstrating a strong, prolonged uptrend.
buySignal3 = ta.barssince(close <= ema21) > 15
Buy Signal 4 (Cross Above 50 SMA):
This signal is triggered when the price crosses above the 50-period Simple Moving Average (SMA), where the current bar closes above the 50 SMA, and the previous bar closed below it. It indicates a shift toward bullish momentum.
buySignal4 = ta.crossover(close, sma50)
Buy Signal 5 (Cross Above 200 SMA):
This signal is triggered when the price crosses above the 200-period Simple Moving Average (SMA), where the current bar closes above the 200 SMA, and the previous bar closed below it. This suggests a long-term bullish trend.
buySignal5 = ta.crossover(close, sma200)
Buy Signal 6 (Low Above 50 SMA):
This signal is true when the lowest price of the current bar is above the 50-period SMA, indicating strong bullish pressure as the price maintains itself above the moving average.
buySignal6 = low > sma50
Buy Signal 7 (Accumulation Day):
An accumulation day occurs when the closing price is in the upper half of the daily range (greater than 50%) and the volume is larger than the previous bar's volume, suggesting buying pressure and accumulation.
buySignal7 = (close - low) / (high - low) > 0.5 and volume > volume
Buy Signal 8 (Higher High):
This signal occurs when the current bar’s high exceeds the highest high of the previous 14 bars, indicating a breakout or strong upward momentum.
buySignal8 = high > ta.highest(high, 14)
Buy Signal 9 (Key Reversal Bar):
This signal is generated when the stock opens below the low of the previous bar but rallies to close above the previous bar’s high, signaling a potential reversal from bearish to bullish.
buySignal9 = open < low and close > high
Buy Signal 10 (Distribution Day Fall Off):
This signal is triggered when a distribution day (a day with high volume and a close near the low of the range) "falls off" the rolling 25-bar period, indicating the end of a bearish trend or selling pressure.
buySignal10 = ta.barssince(close < sma50 and close < sma50) > 25
Sell Signals (Decrease Exposure Score by -10%)
Sell Signal 1 (Cross Below 21 EMA):
This signal is triggered when the price crosses below the 21-period Exponential Moving Average (EMA), where the current bar closes below the EMA21, and the previous bar closed above it. It suggests that the market may be shifting from a bullish trend to a bearish trend.
sellSignal1 = ta.crossunder(close, ema21)
Sell Signal 2 (Trending Below 21 EMA):
This signal is triggered when the price closes below the 21-period EMA for each of the last 5 bars, indicating a sustained bearish trend.
sellSignal2 = ta.barssince(close >= ema21) > 5
Sell Signal 3 (Living Below 21 EMA):
This signal is triggered when the price has closed below the 21-period EMA for each of the last 15 bars, suggesting a strong downtrend.
sellSignal3 = ta.barssince(close >= ema21) > 15
Sell Signal 4 (Cross Below 50 SMA):
This signal is triggered when the price crosses below the 50-period Simple Moving Average (SMA), where the current bar closes below the 50 SMA, and the previous bar closed above it. It indicates the start of a bearish trend.
sellSignal4 = ta.crossunder(close, sma50)
Sell Signal 5 (Cross Below 200 SMA):
This signal is triggered when the price crosses below the 200-period Simple Moving Average (SMA), where the current bar closes below the 200 SMA, and the previous bar closed above it. It indicates a long-term bearish trend.
sellSignal5 = ta.crossunder(close, sma200)
Sell Signal 6 (High Below 50 SMA):
This signal is true when the highest price of the current bar is below the 50-period SMA, indicating weak bullishness or a potential bearish reversal.
sellSignal6 = high < sma50
Sell Signal 7 (Distribution Day):
A distribution day is identified when the closing range of a bar is less than 50% and the volume is larger than the previous bar's volume, suggesting that selling pressure is increasing.
sellSignal7 = (close - low) / (high - low) < 0.5 and volume > volume
Sell Signal 8 (Lower Low):
This signal occurs when the current bar's low is less than the lowest low of the previous 14 bars, indicating a breakdown or strong downward momentum.
sellSignal8 = low < ta.lowest(low, 14)
Sell Signal 9 (Downside Reversal Bar):
A downside reversal bar occurs when the stock opens above the previous bar's high but falls to close below the previous bar’s low, signaling a reversal from bullish to bearish.
sellSignal9 = open > high and close < low
Sell Signal 10 (Distribution Cluster):
This signal is triggered when a distribution day occurs three times in the rolling 7-bar period, indicating significant selling pressure.
sellSignal10 = ta.valuewhen((close < low) and volume > volume , 1, 7) >= 3
Theme Mode:
Users can select the theme mode (Auto, Dark, or Light) to match the chart's background or to manually choose a light or dark theme for the oscillator's appearance.
Exposure Score Calculation: The script calculates a cumulative exposure score based on a series of buy and sell signals.
Buy signals increase the exposure score, while sell signals decrease it. Each signal impacts the score by ±10%.
Signal Conditions: The buy and sell signals are derived from multiple conditions, including crossovers with moving averages (EMA21, SMA50, SMA200), trend behavior, and price/volume analysis.
Oscillator Visualization: The exposure score is visualized as a line on the chart, changing color based on whether the exposure is positive (long position) or negative (short position). It is limited to the range of -100% to +100%.
Position Type: The indicator also indicates the position type based on the exposure score, labeling it as "Long," "Short," or "Neutral."
Horizontal Lines: Reference lines at 0%, 100%, and -100% visually mark neutral, increasing long, and increasing short exposure levels.
Exposure Table: A table displays the current exposure level (in percentage) and position type ("Long," "Short," or "Neutral"), updated dynamically based on the oscillator’s value.
Inputs:
Theme Mode: Choose "Auto" to use the default chart theme, or manually select "Dark" or "Light."
Usage:
This oscillator is designed to help traders track market sentiment, gauge exposure levels, and manage risk. It can be used for long-term trend-following strategies or short-term trades based on moving average crossovers and volume analysis.
The oscillator operates in conjunction with the chart’s price action and provides a visual representation of the market’s current trend strength and exposure.
Important Considerations:
Risk Management: While the exposure score provides valuable insight, it should be combined with other risk management tools and analysis for optimal trading decisions.
Signal Sensitivity: The accuracy and effectiveness of the signals depend on market conditions and may require adjustments based on the user’s trading strategy or timeframe.
Disclaimer:
This script is for educational purposes only. Trading involves significant risk, and users should carefully evaluate all market conditions and apply appropriate risk management strategies before using this tool in live trading environments.
BTCUSD Price Overextension from Configurable SMAsBTCUSD Price Overextension Indicator with Configurable SMAs
This indicator helps identify potential correction points for BTCUSD by detecting overextended conditions based on customizable short-term and long-term SMAs, average price deviation, and divergence.
Key Features:
Customizable SMAs: Set your own lengths for short-term (default 20) and long-term (default 50) SMAs, allowing you to tailor the indicator to different market conditions.
Overextension Detection: Detects when the average price over a set period (default 10 bars) is overextended above the short-term SMA by a configurable adjustment factor.
Divergence Threshold: Highlights when the short-term and long-term SMAs diverge beyond a specified threshold, signaling potential trend continuation.
Conditional Highlight: Displays a red background only when all conditions are met, and the current candle closes at or above the previous candle. A label "Overextended" appears only on the first bar of each overextended sequence for clear identification.
How to Use:
Identify Correction Signals: Look for red background highlights, which indicate a potential overextension based on the configured SMA and divergence thresholds.
Adjust Parameters: Use the adjustment factor, divergence threshold, and SMA lengths to fine-tune the indicator for different market environments or trading strategies.
This tool is ideal for BTCUSD traders looking to spot potential pullback areas or continuation zones by analyzing trend strength and overextension relative to key moving averages.
William Fractals + SignalsWilliams Fractals + Trading Signals
This indicator identifies Williams Fractals and generates trading signals based on price sweeps of these fractal levels.
Williams Fractals are specific candlestick patterns that identify potential market turning points. Each fractal requires a minimum of 5 bars (2 before, 1 center, 2 after), though this indicator allows you to customize the number of bars checked.
Up Fractal (High Point) forms when you have a center bar whose HIGH is higher than the highs of 'n' bars before and after it. For example, with n=2, you'd see a pattern where the center bar's high is higher than 2 bars before and 2 bars after it. The indicator also recognizes patterns where up to 4 bars after the center can have equal highs before requiring a lower high.
Down Fractal (Low Point) forms when you have a center bar whose LOW is lower than the lows of 'n' bars before and after it. For example, with n=2, you'd see a pattern where the center bar's low is lower than 2 bars before and 2 bars after it. The indicator also recognizes patterns where up to 4 bars after the center can have equal lows before requiring a higher low.
Trading Signals:
The indicator generates signals when price "sweeps" these fractal levels:
Buy Signal (Green Triangle) triggers when price sweeps a down fractal. This requires price to go BELOW the down fractal's low level and then CLOSE ABOVE it . This pattern often indicates a failed breakdown and potential reversal upward.
Sell Signal (Red Triangle) triggers when price sweeps an up fractal. This requires price to go ABOVE the up fractal's high level and then CLOSE BELOW it. This pattern often indicates a failed breakout and potential reversal downward.
Customizable Settings:
1. Periods (default: 10) - How many bars to check before and after the center bar (minimum value: 2)
2. Maximum Stored Fractals (default: 1) - How many fractal levels to keep in memory. Older levels are removed when this limit is reached to prevent excessive signals and maintain indicator performance.
Important Notes:
• The indicator checks the actual HIGH and LOW prices of each bar, not just closing prices
• Fractal levels are automatically removed after generating a signal to prevent repeated triggers
• Signals are only generated on bar close to avoid false triggers
• Alerts include the ticker symbol and the exact price level where the sweep occurred
Common Use Cases:
• Identifying potential reversal points
• Finding stop-hunt levels where price might reverse
• Setting stop-loss levels above up fractals or below down fractals
• Trading failed breakouts/breakdowns at fractal levels
Economic Seasons [Daveatt]Ever wondered what season your economy is in?
Just like Mother Nature has her four seasons, the economy cycles through its own seasons! This indicator helps you visualize where we are in the economic cycle by tracking two key metrics:
📊 What We're Tracking:
1. Interest Rates (USIRYY) - The yearly change in interest rates
2. Inflation Rate (USINTR) - The rate at which prices are rising
The magic happens when we normalize these values (fancy math that makes the numbers play nice together) and compare them to their recent averages. We use a lookback period to calculate the standard deviation and determine if we're seeing higher or lower than normal readings.
🔄 The Four Economic Seasons & Investment Strategy:
1. 🌸 Goldilocks (↑Growth, ↓Inflation)
"Not too hot, not too cold" - The economy is growing steadily without overheating.
BEST TIME TO: Buy growth stocks, technology, consumer discretionary
WHY: Companies can grow earnings in this ideal environment of low rates and stable prices
2. 🌞 Reflation (↑Growth, ↑Inflation)
"Party time... but watch your wallet!" - The economy is heating up.
BEST TIME TO: Buy commodities, banking stocks, real estate
WHY: These sectors thrive when inflation rises alongside growth
3. 🌡️ Inflation (↓Growth, ↑Inflation)
"Ouch, my purchasing power!" - Growth slows while prices keep rising.
BEST TIME TO: Rotate into value stocks, consumer staples, healthcare
WHY: These defensive sectors maintain pricing power during inflationary periods
4. ❄️ Deflation (↓Growth, ↓Inflation)
"Winter is here" - Both growth and inflation are falling.
BEST TIME TO: Focus on quality bonds, cash positions, and dividend aristocrats
WHY: Capital preservation becomes key; high-quality fixed income provides safety
🎯 Strategic Trading Points:
- BUY AGGRESSIVELY: During late Deflation/early Goldilocks (the spring thaw)
- HOLD & ACCUMULATE: Throughout Goldilocks and early Reflation
- START TAKING PROFITS: During late Reflation/early Inflation
- DEFENSIVE POSITIONING: Throughout Inflation and Deflation
⚠️ Warning Signs to Watch:
- Goldilocks → Reflation: Time to reduce growth stock exposure
- Reflation → Inflation: Begin rotating into defensive sectors
- Inflation → Deflation: Quality becomes crucial
- Deflation → Goldilocks: Start building new positions
The blue dot shows you where we are right now in this cycle.
The red arrows in the middle remind us that this is a continuous cycle - one season flows into the next, just like in nature!
💡 Pro Tip: The transitions between seasons often provide the best opportunities - but also the highest risks. Use additional indicators and fundamental analysis to confirm these shifts.
Remember: Just like you wouldn't wear a winter coat in summer, you shouldn't use a Goldilocks strategy during Inflation! Time your trades with the seasons. 🎯
Happy Trading! 📈
Previous Day High and Low Count with Probabilities
Indicator Explanation
This indicator displays the number of days on which the previous day's high or low prices were not reached and calculates probabilities for future price movements based on this information. It stores the high and low values of the last 45 days and checks daily whether these levels were touched. Based on the number of days without touching either the high or the low, the indicator calculates the probability of future price movements in either direction (Up or Down).
The indicator offers customization options for label placement and color on the chart. The counts for the high and low touches, along with the calculated probabilities (in percentages), are displayed as labels on the chart. These labels can be shifted along the X-axis by up to 50 bars and can be customized in color and size. Additionally, the text for the labels can be freely chosen, giving the user improved flexibility and overview.
In summary, this indicator helps to:
- Track how often previous day's high and low levels were not reached.
- Estimate probabilities for future price movements based on this information.
- Customize the chart display for easier interpretation.
Strategy Concept
Probability and Touch Conditions:
A long position is entered only if:
The probability of reaching the high is at least 60%.
The price has not touched the previous day’s high in the last three days.
Similarly, for short positions:
The probability of reaching the low is at least 60%.
The price has not touched the previous day’s low in the last three days.
Incremental Position Size Increase:
On the 3rd consecutive day without a high/low touch and with the probability condition met, an initial position of 0.01 lots is opened.
On the 4th day, an additional position of 0.01 lots is added.
On the 5th day, an extra position of 0.02 lots is opened.
After a two-day pause, the situation is re-evaluated, and if conditions are still met, a 0.04-lot position is considered.
Trend Reversal Detection:
The strategy also includes a simple trend reversal check. If the market shows clear reversal signals, no new positions will be opened.
Adjustments and Risk Management
This strategy can be adjusted by modifying the probability values, the number of days without a high/low touch, and the lot sizes. Additionally, stop-loss and take-profit levels can be added to further control the risk and secure profits.
Strategy Concept
Probability and Touch Conditions:
A long position is entered only if:
The probability of reaching the high is at least 60%.
The price has not touched the previous day’s high in the last three days.
Similarly, for short positions:
The probability of reaching the low is at least 60%.
The price has not touched the previous day’s low in the last three days.
Incremental Position Size Increase:
On the 3rd consecutive day without a high/low touch and with the probability condition met, an initial position of 0.01 lots is opened.
On the 4th day, an additional position of 0.01 lots is added.
On the 5th day, an extra position of 0.02 lots is opened.
After a two-day pause, the situation is re-evaluated, and if conditions are still met, a 0.04-lot position is considered.
Trend Reversal Detection:
The strategy also includes a simple trend reversal check. If the market shows clear reversal signals, no new positions will be opened.
Risk Disclaimer
The author of this strategy does not assume any liability for potential losses or gains that may arise from the use of this strategy. Trading involves significant risk, and it is important to only trade with capital that you can afford to lose. The strategy presented is for educational purposes only and should not be considered as financial advice. Always conduct your own research and consider seeking advice from a professional financial advisor before making any trading decisions.