Tüm Mum Çubuğu Formasyonları V1Tradingview yerleşim Mum Formasyonaları API sini kullanarak, oluşturulmuş olan Tüm MUM Formasyonları Göstergesi' n de yer alan Etiket Mum Tanımları' nın Türkçeleştirilmiş versiyonudur. Yani, ekran da bulunan Mum Formasyonu Etiketi üzerine gidildiğinde, Mum Formasyonunun tanımı Türkçe olarak görüntülenmektedir. Açık kaynak kodlu, vatandaş kullansın..
Educational
Multi-indicator Signal Builder [Skyrexio]Overview
Multi-Indicator Signal Builder is a versatile, all-in-one script designed to streamline your trading workflow by combining multiple popular technical indicators under a single roof. It features a single-entry, single-exit logic, intrabar stop-loss/take-profit handling, an optional time filter, a visually accessible condition table, and a built-in statistics label. Traders can choose any combination of 12+ indicators (RSI, Ultimate Oscillator, Bollinger %B, Moving Averages, ADX, Stochastic, MACD, PSAR, MFI, CCI, Heikin Ashi, and a “TV Screener” placeholder) to form entry or exit conditions. This script aims to simplify strategy creation and analysis, making it a powerful toolkit for technical traders.
Indicators Overview
1. RSI (Relative Strength Index)
Measures recent price changes to evaluate overbought or oversold conditions on a 0–100 scale.
2. Ultimate Oscillator (UO)
Uses weighted averages of three different timeframes, aiming to confirm price momentum while avoiding false divergences.
3. Bollinger %B
Expresses price relative to Bollinger Bands, indicating whether price is near the upper band (overbought) or lower band (oversold).
4. Moving Average (MA)
Smooths price data over a specified period. The script supports both SMA and EMA to help identify trend direction and potential crossovers.
5. ADX (Average Directional Index)
Gauges the strength of a trend (0–100). Higher ADX signals stronger momentum, while lower ADX indicates a weaker trend.
6. Stochastic
Compares a closing price to a price range over a given period to identify momentum shifts and potential reversals.
7. MACD (Moving Average Convergence/Divergence)
Tracks the difference between two EMAs plus a signal line, commonly used to spot momentum flips through crossovers.
8. PSAR (Parabolic SAR)
Plots a trailing stop-and-reverse dot that moves with the trend. Often used to signal potential reversals when price crosses PSAR.
9. MFI (Money Flow Index)
Similar to RSI but incorporates volume data. A reading above 80 can suggest overbought conditions, while below 20 may indicate oversold.
10. CCI (Commodity Channel Index)
Identifies cyclical trends or overbought/oversold levels by comparing current price to an average price over a set timeframe.
11. Heikin Ashi
A type of candlestick charting that filters out market noise. The script uses a streak-based approach (multiple consecutive bullish or bearish bars) to gauge mini-trends.
12. TV Screener
A placeholder condition designed to integrate external buy/sell logic (like a TradingView “Buy” or “Sell” rating). Users can override or reference external signals if desired.
Unique Features
1. Multi-Indicator Entry and Exit
You can selectively enable any subset of 12+ classic indicators, each with customizable parameters and conditions. A position opens only if all enabled entry conditions are met, and it closes only when all enabled exit conditions are satisfied, helping reduce false triggers.
2. Single-Entry / Single-Exit with Intrabar SL/TP
The script supports a single position at a time. Once a position is open, it monitors intrabar to see if the price hits your stop-loss or take-profit levels before the bar closes, making results more realistic for fast-moving markets.
3. Time Window Filter
Users may specify a start/end date range during which trades are allowed, making it convenient to focus on specific market cycles for backtesting or live trading.
4. Condition Table and Statistics
A table at the bottom of the chart lists all active entry/exit indicators. Upon each closed trade, an integrated statistics label displays net profit, total trades, win/loss count, average and median PnL, etc.
5. Seamless Alerts and Automation
Configure alerts in TradingView using “Any alert() function call.”
The script sends JSON alert messages you can route to your own webhook.
The indicator can be integrated with Skyrexio alert bots to automate execution on major cryptocurrency exchanges
6. Optional MA/PSAR Plots
For added visual clarity, optionally plot the chosen moving averages or PSAR on the chart to confirm signals without stacking multiple indicators.
Methodology
1. Multi-Indicator Entry Logic
When multiple entry indicators are enabled (e.g., RSI + Stochastic + MACD), the script requires all signals to align before generating an entry. Each indicator can be set for crossovers, crossunders, thresholds (above/below), etc. This “AND” logic aims to filter out low-confidence triggers.
2. Single-Entry Intrabar SL/TP
One Position At a Time: Once an entry signal triggers, a trade opens at the bar’s close.
Intrabar Checks: Stop-loss and take-profit levels (if enabled) are monitored on every tick. If either is reached, the position closes immediately, without waiting for the bar to end.
3. Exit Logic
All Conditions Must Agree: If the trade is still open (SL/TP not triggered), then all enabled exit indicators must confirm a closure before the script exits on the bar’s close.
4. Time Filter
Optional Trading Window: You can activate a date/time range to constrain entries and exits strictly to that interval.
Justification of Methodology
Indicator Confluence: Combining multiple tools (RSI, MACD, etc.) can reduce noise and false signals.
Intrabar SL/TP: Capturing real-time spikes or dips provides a more precise reflection of typical live trading scenarios.
Single-Entry Model: Straightforward for both manual and automated tracking (especially important in bridging to bots).
Custom Date Range: Helps refine backtesting for specific market conditions or to avoid known irregular data periods.
How to Use
1. Add the Script to Your Chart
In TradingView, open Indicators , search for “Multi-indicator Signal Builder”.
Click to add it to your chart.
2. Configure Inputs
Time Filter: Set a start and end date for trades.
Alerts Messages: Input any JSON or text payload needed by your external service or bot.
Entry Conditions: Enable and configure any indicators (e.g., RSI, MACD) for a confluence-based entry.
Close Conditions: Enable exit indicators, along with optional SL (negative %) and TP (positive %) levels.
3. Set Up Alerts
In TradingView, select “Create Alert” → Condition = “Any alert() function call” → choose this script.
Entry Alert: Triggers on the script’s entry signal.
Close Alert: Triggers on the script’s close signal (or if SL/TP is hit).
Skyrexio Alert Bots: You can route these alerts via webhook to Skyrexio alert bots to automate order execution on major crypto exchanges (or any other supported broker).
4. Visual Reference
A condition table at the bottom summarizes active signals.
Statistics Label updates automatically as trades are closed, showing PnL stats and distribution metrics.
Backtesting Guidelines
Symbol/Timeframe: Works on multiple assets and timeframes; always do thorough testing.
Realistic Costs: Adjust commissions and potential slippage to match typical exchange conditions.
Risk Management: If using the built-in stop-loss/take-profit, set percentages that reflect your personal risk tolerance.
Longer Test Horizons: Verify performance across diverse market cycles to gauge reliability.
Example of statistic calculation
Test Period: 2023-01-01 to 2025-12-31
Initial Capital: $1,000
Commission: 0.1%, Slippage ~5 ticks
Trade Count: 468 (varies by strategy conditions)
Win rate: 76% (varies by strategy conditions)
Net Profit: +96.17% (varies by strategy conditions)
Disclaimer
This indicator is provided strictly for informational and educational purposes .
It does not constitute financial or trading advice.
Past performance never guarantees future results.
Always test thoroughly in demo environments before using real capital.
Enjoy exploring the Multi-Indicator Signal Builder! Experiment with different indicator combinations and adjust parameters to align with your trading preferences, whether you trade manually or link your alerts to external automation services. Happy trading and stay safe!
Support & Resistance - Volume Based [Splirus]The Support & Resistance - Volume Based indicator is a sophisticated tool designed for TradingView to assist traders in identifying key support and resistance levels based on volume and price action dynamics.
I have used the concept and code of @ChartPrime indicator to perform my own upgrade/Modification.
URL:
Here the main modification I have done from @ChartPrime indicator:
Volume Strength Calculation: I have review the calculation of the Strength of the Volume to have less levels but strength ones.
Extra Levels from Custom Timeframe: I have add the possibility to add extra levels from a Custom TimeFrame to have a better overview of significant level from Higher TimeFrame. So for example you can Set the Extra Levels to Dayly TimeFrame and switch from lower TimeFrame ( 1H / 2H / 4H / ... ) and continue to have on Screen Dayly Levels in Yellow Color
Here’s a breakdown of its functionality:
Core Features:
1. Dynamic Support and Resistance Zones:
Automatically detects and plots support and resistance zones using swing highs and lows.
Zones are calculated based on the Average True Range (ATR) to ensure dynamic adaptability to market volatility.
2. Volume Integration:
Incorporates volume data to validate the strength of support and resistance zones.
Highlights zones where volume activity indicates significant market interest.
3. Customizable Trading Modes:
Offers three trading styles: Scalper, Intraday, and Swing, each with adjustable parameters to suit different timeframes and strategies.
4. Breakout and Retest Detection:
Identifies breakouts above resistance or below support.
Tracks retests of broken levels to confirm their validity as new support or resistance.
5. Multi-Timeframe Analysis:
Includes an option to display custom support and resistance levels derived from higher timeframes for enhanced perspective.
6. Visual Enhancements:
Configurable colors and labels for resistance and support zones.
Displays volume labels and key level annotations for clarity.
Settings Overview:
Trading Settings:
Adjust parameters like swing length and retest bar count to refine level detection.
Visual Settings:
Control the appearance of zones, including width, history retention, and color customization.
Alert Conditions:
Alerts for testing, breaking, and retesting support or resistance zones, ensuring traders never miss critical events.
Usage Scenarios:
Intraday Traders: Quickly identify intraday levels to base entries and exits.
Swing Traders: Utilize historical zones to plan trades around significant support and resistance areas.
Scalpers: Benefit from precise, short-term level detection tailored for high-frequency trading.
This indicator is highly versatile, combining technical precision with visual clarity, making it an essential tool for traders aiming to optimize their decision-making in dynamic markets.
THE EDGE FXThis indicator is designed to enhance chart organization for traders by providing essential tools for analysis and time management. Key features include:
1. Notes and Watermarks:
- Allows traders to add customizable notes and watermarks directly on the chart for better information tracking and organization.
2. Unique Day and Week Separation:
- Dynamically separates days and weeks based on the selected UTC timezone. This feature is ideal for global traders managing different time zones and ensures accurate time segmentation on the chart.
3. Fractal Marking:
- Automatically highlights fractal points on the chart, helping traders identify potential reversal or continuation zones based on classic fractal analysis principles.
How It Works:
- The indicator overlays additional visual elements on the chart without altering the underlying data.
- Time segmentation is achieved using an algorithm that adapts to the selected UTC timezone for clear and accurate visualization.
- Fractal detection follows standard technical analysis rules to identify key price levels.
Usage Instructions:
- Add the indicator to your chart and configure the settings for your preferred timezone.
- Use the notes feature to save and display critical information directly on the chart.
- Utilize fractal markings to analyze potential turning points and market trends.
This indicator provides a streamlined way to manage your chart annotations and fractal analysis, making it an essential tool for both intraday and swing traders.
Smart Money Buy/Sell Algorithm Buy Signal: Triggered when:
There is a volume spike.
Cumulative delta shows strong buying pressure.
Price is near the support level.
Sell Signal: Triggered when:
There is a volume spike.
Cumulative delta shows strong selling pressure.
Price is near the resistance level.
Presley Gonsalves Profitable Trader GM Presley Gonsalves Profitable Trader GoldMine is a powerful TradingView indicator that identifies bullish and bearish signals using 20 & 200 SMA crossovers, engulfing candle patterns, and trend confirmation. It highlights buy/sell signals, dynamically colors SMAs, and provides alerts for high-probability trades in stocks, crypto, and forex. 📈🚀
Session Highs and Lows (Custom Time Range) Choose your own custom H/L for custom session parameters.
Has inside day, outside day, above/below prior day biases displayed as well.
EMA Study Script for Price Action Traders, v2JR_EMA Research Tool Documentation
Version 2 Enhancements
Version 2 of the JR_EMA Research Tool introduces several powerful features that make it particularly valuable for studying price action around Exponential Moving Averages (EMAs). The key improvements focus on tracking and analyzing price-EMA interactions:
1. Cross Detection and Counting
- Implements flags for crossing bars that instantly identify when price crosses above or below the EMA
- Maintains running counts of closes above and below the EMA
- This feature helps students understand the persistence of trends and the frequency of EMA interactions
2. Bar Number Tracking
- Records the specific bar number when EMA crosses occur
- Stores the previous crossing bar number for reference
- Enables precise measurement of time between crosses, helping identify typical trend durations
3. Variable Reset Management
- Implements sophisticated reset logic for all counting variables
- Ensures accuracy when analyzing multiple trading sessions
- Critical for maintaining clean data when studying patterns across different timeframes
4. Cross Direction Tracking
- Monitors the direction of the last EMA cross
- Helps students identify the current trend context
- Essential for understanding trend continuation vs reversal scenarios
Educational Applications
Price-EMA Relationship Studies
The tool provides multiple ways to study how price interacts with EMAs:
1. Visual Analysis
- Customizable EMA bands show typical price deviation ranges
- Color-coded fills help identify "normal" vs "extreme" price movements
- Three different band calculation methods offer varying perspectives on price volatility
2. Quantitative Analysis
- Real-time tracking of closes above/below EMA
- Running totals help identify persistent trends
- Cross counting helps understand typical trend duration
Research Configurations
EMA Configuration
- Adjustable EMA period for studying different trend timeframes
- Customizable EMA color for visual clarity
- Ideal for comparing different EMA periods' effectiveness
Bands Configuration
Three distinct calculation methods:
1. Full Average Bar Range (ABR)
- Uses the entire range of price movement
- Best for studying overall volatility
2. Body Average Bar Range
- Focuses on the body of the candle
- Excellent for studying conviction in price moves
3. Standard Deviation
- Traditional statistical approach
- Useful for comparing to other technical studies
Signal Configuration
- Optional signal plotting for entry/exit studies
- Helps identify potential trading opportunities
- Useful for backtesting strategy ideas
Using the Tool for Study
Basic Analysis Steps
1. Start with the default 20-period EMA
2. Observe how price interacts with the EMA line
3. Monitor the data window for quantitative insights
4. Use band settings to understand normal price behavior
Advanced Analysis
1. Pattern Recognition
- Use the cross counting system to identify typical pattern lengths
- Study the relationship between cross frequency and trend strength
- Compare different timeframes for fractal analysis
2. Volatility Studies
- Compare different band calculation methods
- Identify market regimes through band width changes
- Study the relationship between volatility and trend persistence
3. Trend Analysis
- Use the closing price count system to measure trend strength
- Study the relationship between trend duration and subsequent reversals
- Compare different EMA periods for optimal trend following
Best Practices for Research
1. Systematic Approach
- Start with longer timeframes and work down
- Document observations about price behavior in different market conditions
- Compare results across multiple symbols and timeframes
2. Data Collection
- Use the data window to record significant events
- Track the number of bars between crosses
- Note market conditions when signals appear
3. Optimization Studies
- Test different EMA periods for your market
- Compare band calculation methods for your trading style
- Document which settings work best in different market conditions
Technical Implementation Notes
This tool is particularly valuable for educational purposes because it combines visual and quantitative analysis in a single interface, allowing students to develop both intuitive and analytical understanding of price-EMA relationships.
High-Low Breakout Strategy with ATR traling Stop LossThis script is a TradingView Pine Script strategy that implements a High-Low Breakout Strategy with ATR Trailing Stop.created by SK WEALTH GURU, Here’s a breakdown of its key components:
Features and Functionality
Custom Timeframe and High-Low Detection
Allows users to select a custom timeframe (default: 30 minutes) to detect high and low levels.
Tracks the high and low within a user-specified period (e.g., first 30 minutes of the session).
Draws horizontal lines for high and low, persisting for a specified number of days.
Trade Entry Conditions
Long Entry: If the closing price crosses above the recorded high.
Short Entry: If the closing price crosses below the recorded low.
The user can choose to trade Long, Short, or Both.
ATR-Based Trailing Stop & Risk Management
Uses Average True Range (ATR) with a multiplier (default: 3.5) to determine a dynamic trailing stop-loss.
Trades reset daily, ensuring a fresh start each day.
Trade Execution and Partial Profit Taking
Stop-loss: Default at 1% of entry price.
Partial profit: Books 50% of the position at 3% profit.
Max 2 trades per day: If the first trade hits stop-loss, the strategy allows one re-entry.
Intraday Exit Condition
All positions close at 3:15 PM to ensure no overnight risk.
[ADB] Opening Range with Breakouts this indicator can help you to detect range breakouts and help you to set sl and tp
Presley Gonsalves Profitable Trader GoldMine//@version=5
indicator("Presley Gonsalves Profitable Trader GoldMine - Bullish & Bearish Signal with SMA and Candle Conditions", overlay=true)
// Input settings
sma20 = ta.sma(close, 20)
sma200 = ta.sma(close, 200)
// ---------------------- Bullish Conditions ---------------------- //
bull_sma_condition = sma20 > sma200
bull_price_condition = close > sma200
// Modified Bullish Condition (Check if previous red candle low, current green candle low, or both are below 20 SMA)
prev_red_candle = close < open // Previous candle is red
curr_green_candle = close > open // Current candle is green
prev_red_below_20 = low < sma20 // Previous red candle's low below 20 SMA
curr_green_below_20 = low < sma20 // Current green candle's low below 20 SMA
both_below_20 = prev_red_below_20 and curr_green_below_20 // Both candles' lows below 20 SMA
// Bullish engulfing pattern (flexible condition with open above previous close allowed)
bullish_engulfing = curr_green_candle and prev_red_candle and close > open
// 20 SMA must be rising for last 3 closes
bull_sma_rising = sma20 > sma20 and sma20 > sma20 and sma20 > sma20
bullish_signal = bull_sma_condition and bull_price_condition and bullish_engulfing and bull_sma_rising and (prev_red_below_20 or curr_green_below_20 or both_below_20)
// ---------------------- Bearish Conditions ---------------------- //
bear_sma_condition = sma20 < sma200
bear_price_condition = close < sma200
// Previous green candle must be above 20 SMA (either high above or entire candle above)
prev_green_candle = close > open // Previous candle is green
prev_green_above_20 = high > sma20 or (open > sma20 and close > sma20)
// Bearish engulfing pattern (flexible condition with open below previous close allowed)
curr_red_candle = close < open // Current candle is red
bearish_engulfing = curr_red_candle and prev_green_candle and close < open
// 20 SMA must be falling for last 3 closes
bear_sma_falling = sma20 < sma20 and sma20 < sma20 and sma20 < sma20
bearish_signal = bear_sma_condition and bear_price_condition and bearish_engulfing and bear_sma_falling and prev_green_above_20
// ---------------------- Plot Buy and Sell Signals ---------------------- //
plotshape(bullish_signal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, size=size.small)
plotshape(bearish_signal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, size=size.small)
// Plot SMAs with dynamic colors
plot(sma20, color=(sma20 > sma20 ? color.green : color.white), title="20 SMA")
plot(sma200, color=(sma200 > sma200 ? color.green : color.white), title="200 SMA")
// Alerts
alertcondition(bullish_signal, title="Bullish Alert", message="Bullish signal detected")
alertcondition(bearish_signal, title="Bearish Alert", message="Bearish signal detected")
Intraday ORB Breakout IndicatorThis is an intraday indicator works in a 15-minute timeframe.
Timeframe - 15 min
IB Range - 1-hour range after the market opens in India (i.e. 9.15 to 10.15 AM range)
If the price shows a breakout of IB High or a breakdown of IB low and the breakout/breakdown candle has less than 20% of the wick (selling wick in breakout and buying wick in breakdown) in a 15-minute chart, then it will set a flag or alert mechanism on the chart with 'Long' or 'Short' terms. It also marks the IB range (9.15 to 10.15 AM range) with two simple lines.
Traders should wait for the break of the high of the breakout candle or the low of the breakdown candle to take their trades. Besides, one should follow proper risk management rules when making trades.
// Disclaimer: This indicator is for educational purposes only.
// I am not responsible for any financial losses incurred from its use.
NDTECH Tool-N1CPR (Central Pivot Range) is a popular trading indicator used in technical analysis to identify potential support and resistance levels. It is based on the concept of pivot points, which are calculated using the high, low, and close prices of the previous trading session. The CPR indicator provides three key levels: the Central Pivot (P), the Bottom Central Pivot (BC), and the Top Central Pivot (TC).
Key Components of CPR:
Central Pivot (P): This is the primary level and is calculated as the average of the high, low, and close prices of the previous session.
P=High+Low+Close3
P=3High+Low+Close
Bottom Central Pivot (BC): This level acts as a support level and is calculated as the average of the Central Pivot and the low of the previous session.
BC=P+Low2
BC=2P+Low
Top Central Pivot (TC): This level acts as a resistance level and is calculated as the average of the Central Pivot and the high of the previous session.
TC=P+High2
TC=2P+High
Explanation:
request.security: This function is used to fetch the high, low, and close prices of the previous day. The "D" parameter specifies the daily timeframe.
plot: This function is used to plot the CPR levels on the chart.
fill: This function is used to highlight the area between the BC and TC levels, providing a visual representation of the CPR range.
Usage:
Support and Resistance: Traders use the CPR levels to identify potential support (BC) and resistance (TC) levels. Price action around these levels can provide insights into market sentiment.
Trend Identification: If the price is consistently above the Central Pivot (P), it may indicate a bullish trend, while prices below P may indicate a bearish trend.
Breakout Trading: Breakouts above TC or below BC can signal potential trading opportunities.
Conclusion:
The CPR indicator is a versatile tool that can be used in various trading strategies. By implementing it in Pine Script, traders can customize and automate their analysis on the TradingView platform, making it easier to identify key levels and make informed trading decisions.
Swing High/Low Breach Without CloseThis indicator helps traders identify potential reversal opportunities by detecting precise wick-based swing level breaks. It specifically looks for:
1. Swing highs/lows that formed with significant wicks
2. Current price action that wicks through (but doesn't close beyond) these levels
Key Features:
- Automatically identifies swing points that formed with substantial wicks
- Detects when price wicks through these levels without closing beyond them
- Dynamic marker positioning that scales with your chart
- Customizable swing length and wick size parameters
- Clean, uncluttered visual signals
- Built-in alert conditions for both high and low breaks
Customizable Inputs:
- Swing Length: Number of bars to calculate swing points
- Minimum Wick Size %: Required wick size as percentage of candle body
- ATR Period: Used for dynamic marker positioning
- ATR Multiplier: Adjusts marker distance from price
Trading Applications:
- Identify potential reversal points
- Spot failed breakouts early
- Recognize price rejection at key levels
- Filter out weak swing levels by focusing on significant wicks
Note: This indicator works best when combined with other forms of analysis and proper risk management.
- Initial release
- Added dynamic scaling for better visibility
- Implemented wick percentage filtering
Intraday ORB Breakout IndicatorThis is only applicable to intraday trading in 15 minutes timeframe.
It highlights the 1-hour range in Indian markets i.e. 9.15 AM to 10.15 AM.
If the price shows a breakout of a 1-hour High or a breakdown of a 1-hour low and the breakout/breakdown candle has less than 20% of the wick (selling wick in breakout and buying wick in breakdown) in the 15-minute chart, then it will set an alert 'Long' or 'Short' on the chart.
However, to take a trade, one must wait for the break of the high of the breakout candle for a long trade or a break of the low of the breakdown candle for a short trade. Besides, one should follow proper risk management rules to manage their trades.
Multi Stochastic AlertHello Everyone,
I have created a Multi Stochastic Alert based on Scalping Strategy
The Strategy uses below 4 Stochastic indicator:
1. Stochastic (9,3)
2. Stochastic (14,3)
3. Stochastic (40,4)
4. Stochastic (60,10)
Trade entry become active when all of these goes below 20 or above 80, In this indicator you don't need to use all 4, this will show red and green background whenever all of them goes below 20 or above 80.
As shown in picture below, it works better when script is making a channel, Our indicator shows green or red signal, we wait for RSI Divergence and we enter. We book when blue line (9,3) goes above 80, as shown by arrow, and trail rest at breakeven or your own trailing method
Same Situation shown for Short side. We book 50% when Blue line (9,3) Goes below 20 and trail rest at breakeven or your own trailing method
Happy trading, Let me know if any improvements required.
WSGTA IndicatorsThis set of indicators includes all of the items used in the WSGTA trading system. It will have the vwap added eventually, but currently holds the following EMA's -- 9, 15, 30, 65, 200; as well as the previous day/week HLC along with pivots.
Demo GPT - Bollinger Bands StrategyDemo GPT - Bollinger Bands Strategy, this strategy is going to help the people in identifying buy and sell signals
humbar//@version=5
indicator("20 & 80 Moving Averages", overlay=true)
// Calculate the 20-period Simple Moving Average (SMA)
sma20 = ta.sma(close, 20)
// Calculate the 80-period Simple Moving Average (SMA)
sma80 = ta.sma(close, 80)
// Plot the 20-period SMA
plot(sma20, title="20 SMA", color=color.blue, linewidth=2)
// Plot the 80-period SMA
plot(sma80, title="80 SMA", color=color.red, linewidth=2)
// Optional: Add background color when the 20 SMA crosses above the 80 SMA
bgcolor(sma20 > sma80 ? color.new(color.green, 90) : na, title="Bullish Crossover Background")
// Optional: Add background color when the 20 SMA crosses below the 80 SMA
bgcolor(sma20 < sma80 ? color.new(color.red, 90) : na, title="Bearish Crossover Background")