Gogol' 500 Nadaraya-Watson Envelope [LuxAlgo]50 Bars 500 Bars
Индикатор для анализа рыночных данных, улучшенный за счёт увеличения глубины анализа с 50 до 500 баров. Это позволяет выявлять долгосрочные тренды, снижать влияние рыночного шума и получать более точные сигналы для торговли. Идеален для работы в условиях высокой волатильности и долгосрочного технического анализа.
Indicatori di ampiezza
Confirmed Stage 2 DowntrendStage 2 downtrend you cant take trades yarre ewkbkbkjsnabsjbfjlbfslbDSBFjfefa ee fewgwefp fewp e gffewfiyewgfyewygfpew g fpewg f we
SWING TRADEATR Calculation:
The Average True Range (ATR) is used to measure volatility.
atr_length defines the period over which ATR is calculated default: 14.
Pivot Average:
A 10-day simple moving average pivot avg is calculated using the closing price.
Buy and Sell Signals:
Buy Signal: When the price is above the pivot average plus a multiple of ATR.
Sell Signal: When the price is below the pivot average minus a multiple of ATR.
The atr_multiplier determines how sensitive the buy/sell levels are to price movements.
Visual Elements:
The pivot average is plotted as a blue line on the chart.
Buy and sell signals are plotted as green and red labels below and above bars, respectively.
Strategy Execution:
The strategy enters a long position when a buy signal is triggered.
It exits the long position when a sell signal is triggered.
Cumulative TICK Session TrackerIntroduction
The Cumulative TICK Session Tracker is an advanced indicator that combines real-time cumulative TICK data with clear session markers to provide a complete view of intraday sentiment and trading session transitions. It visually highlights bullish and bearish market trends while resetting at the start of each new trading day.
How It Works
Cumulative TICK Calculation:
TICK values are accumulated bar-by-bar throughout the trading session.
At the start of each new session, the cumulative TICK resets to zero for a clean daily view.
Session Separators (EOD Lines):
Vertical dotted gray lines mark the start of each trading session (09:30 EST), making session transitions visually clear.
Bar Coloring:
Blue Bars: Indicate rising cumulative TICK values (bullish sentiment).
Red Bars: Indicate falling cumulative TICK values (bearish sentiment).
Optional SMA (Simple Moving Average):
A white SMA line can be applied to smooth out cumulative TICK trends, helping traders identify the broader sentiment.
Key Features
Cumulative TICK Calculation:
Accumulates TICK data intraday and resets at the beginning of each new session.
Session Separators (EOD Lines):
Automatically places vertical dotted lines to highlight the start of new trading days.
Clear Visuals:
Blue bars for rising cumulative TICK values.
Red bars for falling cumulative TICK values.
Optional Moving Average:
Smooth out cumulative data for better trend analysis with a configurable SMA.
Displayed Elements
Cumulative TICK Bars:
Blue: Positive momentum (rising cumulative values).
Red: Negative momentum (falling cumulative values).
Session Separators:
Vertical gray dotted lines that clearly mark the start of each trading session.
SMA Line (Optional):
A white moving average line for smoother cumulative TICK trends.
Use Cases
Intraday Market Sentiment:
Monitor the cumulative TICK for sustained upward or downward movement, signaling bullish or bearish trends.
Session Analysis:
Clearly distinguish daily TICK trends with session markers.
Trend Confirmation:
Use blue and red bars to visually confirm market momentum throughout the trading day.
Smoothed Trends:
Enable the optional SMA line to reduce noise and analyze broader intraday sentiment.
Advantages
Session Clarity: EOD lines cleanly separate daily sessions for easy analysis.
Visual Sentiment Detection: Instantly identify bullish (blue) and bearish (red) sentiment.
Customizable Moving Average: Optionally smooth cumulative trends for clearer signals.
Intraday Precision: Designed for real-time TICK analysis with automatic session resets.
Summary
The Cumulative TICK Session Tracker is a powerful tool for intraday traders, providing a clear visualization of cumulative market sentiment and session transitions. By combining TICK accumulation with session markers and intuitive bar coloring, it helps traders monitor intraday trends, identify momentum shifts, and make confident trading decisions.
Follow me for updates and more: @TraderNautilus 🚀
Price and Volume Oscillator StrategyThis Pine Script follows the described strategy, including:
Price Oscillator (PO): Difference between short and long moving averages of price.
Volume Oscillator (VO): Difference between short and long moving averages of volume.
Buy/Sell Logic: Opens a buy order when the PO and VO conditions align for bullish momentum, and vice versa for a sell order.
Order Closing Logic: Closes orders when the opposing conditions are met.
Candle Markers: Marks candles with labels when an order is opened or closed.
Bandas PersonalizadasEste script genera ondas similares a las Bandas de Bollinger y se puede ajustar fácilmente para adaptarse a tus necesidades.
ADD Sentiment & ExtremesIntroduction
The ADD Sentiment & Extremes indicator is specifically designed for ADD and ADDQ charts to provide a clean and clear visualization of market sentiment. By analyzing positive and negative advances/declines, it helps traders identify extreme market conditions, trend direction, and sentiment shifts in real time.
Purpose of the Indicator
Track Advances/Declines: Monitors the net advancing versus declining stocks.
Identify Extremes: Highlights significant levels of sentiment (+1500, +2000, -1500, -2000).
Visualize Sentiment: Displays subtle signals (points) when bars close above or below the zero line.
Clear Day Separation: Marks the start of each trading day with EOD (End of Day) highlights for clarity.
Key Features
Horizontal Lines:
0-Line: Central reference point for advances/declines.
+1500 and +2000 Lines: Represent bullish sentiment extremes.
-1500 and -2000 Lines: Represent bearish sentiment extremes.
Sentiment Points:
Blue Points at +2500: Appear when the bar closes above the 0-line (positive sentiment).
Red Points at -2500: Appear when the bar closes below the 0-line (negative sentiment).
EOD (End of Day) Highlights:
Subtle gray background marks the start of each new trading day for visual clarity.
Minimalist Design:
Uses small, clean points and horizontal lines to ensure the chart remains uncluttered and easy to read.
How It Works
Advances/Declines Calculation:
The indicator tracks the net number of advancing versus declining stocks, which form the ADD/ADDQ values.
Sentiment Visualization:
Blue Points: Indicate a bar closing above zero, signaling a positive market sentiment.
Red Points: Indicate a bar closing below zero, signaling a negative market sentiment.
Extreme Levels:
The horizontal lines at ±1500 and ±2000 help highlight extreme values in the advances/declines, which often signal turning points or strong trends.
Day Separation:
EOD highlights ensure traders can distinguish between trading days easily.
Displayed Elements
Horizontal Lines:
Zero Line (Gray)
+1500 and +2000 (Blue for bullish extremes).
-1500 and -2000 (Red for bearish extremes).
Sentiment Points:
Small blue points at +2500 for positive bar closures.
Small red points at -2500 for negative bar closures.
EOD Highlights:
Subtle gray backgrounds mark the start of a new trading day.
Use Cases
Identifying Extreme Sentiment:
Readings near +2000 or -2000 indicate extreme bullish or bearish market sentiment.
Trend Confirmation:
Consistent blue points above the zero line suggest sustained bullish sentiment.
Consistent red points below the zero line suggest bearish sentiment.
Reversal Signals:
Extreme levels at ±2000 often act as turning points, signaling potential reversals.
Daily Sentiment Overview:
Quickly see whether bars are predominantly closing above or below the zero line for the day.
Customization
Horizontal lines, colors, and styles can be adjusted for personal preferences.
Sentiment point markers can be modified for size and visibility.
Benefits
Real-Time Sentiment Analysis: Immediate insight into market behavior.
Clear Extreme Levels: Highlights critical thresholds at ±1500 and ±2000.
Uncluttered Visuals: Minimalist design ensures focus on key signals.
Day Separation: EOD highlights for seamless day-to-day analysis.
Summary
The ADD Sentiment & Extremes indicator is an essential tool for traders analyzing ADD/ADDQ charts. By combining real-time sentiment visualization with extreme level detection, it provides clear signals for identifying trends, reversals, and market direction.
Follow me for updates and more: @TraderNautilus 🚀
NASDAQ Breadth Ratio AnalyzerIf-Then Overview
If the Ratio > 60%: Strong uptrend – consider long trades.
If the Ratio < 40%: Strong downtrend – consider short trades.
If the Ratio is between 40% and 60%: Neutral – expect sideways or choppy conditions.
Introduction
The NASDAQ Breadth Ratio Analyzer provides traders with a clear and visual representation of market breadth specifically for the NASDAQ. By calculating the ratio of Up-Volume to Down-Volume as a percentage, it identifies whether the NASDAQ market is in a strong uptrend, downtrend, or neutral state.
Purpose of the Indicator
Identify Trending Days: Quickly determine if the NASDAQ market is trending up or down.
Avoid Choppy Markets: Filter out indecisive sideways market conditions.
Assess Market Strength: Measure the balance between buying (Up-Volume) and selling (Down-Volume).
Displayed Information
Dynamic Table (at the top of the chart):
Market: NASDAQ.
Ratio (%): The percentage of Up-Volume relative to total traded volume.
Status:
Strong Uptrend: Ratio > 60%.
Strong Downtrend: Ratio < 40%.
Neutral: Ratio between 40% and 60%.
Plotted Lines:
Breadth Ratio for NASDAQ is displayed as a line for trend tracking.
Blue: Indicates an uptrend (Ratio > 50%).
Red: Indicates a downtrend (Ratio < 50%).
Zero Line:
A grey zero-line acts as a visual reference to distinguish positive and negative breadth.
Status Determination:
Strong Uptrend: Ratio > 60%.
Strong Downtrend: Ratio < 40%.
Neutral: Ratio between 40% and 60%.
Visual Representation:
A dynamic table displays real-time ratios and status updates.
The ratio is plotted as a line for continuous monitoring over time.
Use Cases
Identifying Trending Days:
If the NASDAQ Ratio is consistently above 60%, it indicates strong buying pressure and a clear uptrend.
Recognizing Choppy Days:
If the Ratio fluctuates between 40% and 60%, expect indecision and sideways price movement.
Measuring Extreme Sentiment:
Extremely high or low Ratio values can signal potential reversals or trend exhaustion.
Indicator Settings
Scale Factor: Normalizes volume data for clarity (default: 1,000,000).
Color Highlights:
Blue: Indicates a strong uptrend.
Red: Indicates a strong downtrend.
Zero Line: Grey reference line to separate positive and negative ratios.
Advantages
Focused Analysis: Exclusively tracks NASDAQ market breadth for precision.
Real-Time Visualization: Provides live updates on buying and selling strength.
Clear Trend Signals: Color-coded status helps traders quickly identify market direction.
Filter Out Noise: Avoid trading in sideways markets by identifying neutral conditions.
Summary
The NASDAQ Breadth Ratio Analyzer is a streamlined tool for traders focused on the NASDAQ. By measuring the Up-Volume to Down-Volume ratio, it delivers real-time insights into market sentiment, helping traders identify trends, filter out choppy markets, and make confident, informed decisions.
Follow me for updates and more: @TraderNautilus 🚀
Advanced Trend Indicator ANAnalysis of the Interaction of the EMA and SMA Lines:
Short-Term vs. Long-Term Trend:
The EMA reacts faster to price changes and is more “dynamic” in determining the short-term trend, while the SMA is more stable and is often used to detect long-term changes.
Example of Intersection:
Golden Cross (Golden Cross): When the short-term EMA (e.g., 50 periods) pierces the long-term SMA (e.g., 200 periods) from the bottom up. This is a classic signal indicating the beginning of an uptrend.
Death Cross (Death Cross): When the short-term EMA pierces the long-term SMA from the top down. This is a classic signal indicating the beginning of a downtrend.
Space Between EMA and SMA:
If the space between the EMA and the SMA is widening (the EMA is rising faster than the SMA), this may indicate that the uptrend is strengthening.
If the space between the EMA and SMA is shrinking, it may suggest that the trend is weakening and a change in direction is possible.
Summary:
The EMA is more sensitive to price changes and is used to analyze the short-term trend, reacting quickly to changes.
The SMA is more stable and gives a picture of the long-term direction of the market, so it is less susceptible to short-term price fluctuations.
Together, these two lines can help you better understand both short-term and long-term market direction and give signals to buy or sell based on their intersections and interactions.
EMA 14 croise MA 14test yes yes "eferv"erv"rfv izuefjhokéniuefo
éouiefhjiéukfjhkéniuf
éiufehébu"yifhjén"iuj
zeufinj"uhfikj"n
éifjn"uhiefjkn"
SHARDA INVESTMENT CORPORATION- 1Buy when a buy signal appears on the chart and aim for a target of 1:5. Sell when a sell signal appears on the chart and also target 1:5.
Mongooses 10/2 yield spread (Enhanced) Mongoose's 10/2Y Yield Curve**
---
### **Description for TradingView Publishing**:
"Track the critical spread between the U.S. 10-Year and 2-Year Treasury Yields with **Mongoose's 10/2Y Yield Curve**. This indicator highlights positive (green) and inverted (red) yield curve conditions, with real-time spread values, dynamic alerts, and visual cues for yield curve inversion.
Perfect for monitoring macroeconomic trends and identifying recession signals. Stay ahead of the market with this clean and powerful tool designed by The Real Mongoose."
---
EMA 20 ve EMA 50 Kesişim EmA kesişimleri
ayı ve boğa oluşumları...
al veren pozisyonlar
sat veren pozisyonlar
ek olarak fisher le takip edilebilir zamanla.
High Risk 1. Tên Indicator:
Ví dụ: Moving Average (MA)
2. Mục đích:
Tóm tắt: Indicator được thiết kế để giúp nhà giao dịch xác định xu hướng thị trường, tìm điểm vào lệnh/thoát lệnh tiềm năng hoặc đánh giá sức mạnh của xu hướng.
3. Loại Indicator:
Thuộc nhóm nào:
Xu hướng (Trend-following): MA, MACD, Parabolic SAR.
Dao động (Oscillator): RSI, Stochastic.
Khối lượng (Volume): OBV, Volume Profile.
Khác: Fibonacci Retracement, Pivot Points.
4. Công thức tính toán (nếu có):
Ví dụ (Moving Average):
Simple Moving Average (SMA):
𝑆
𝑀
𝐴
=
∑
𝑖
=
1
𝑛
Gi
a
ˊ
Đ
o
ˊ
ng cửa ng
a
ˋ
y i
𝑛
SMA=
n
∑
i=1
n
Gi
a
ˊ
Đ
o
ˊ
ng cửa ng
a
ˋ
y i
Trong đó, n là số chu kỳ (period).
5. Đầu vào (Inputs):
Các tham số tùy chỉnh:
Số chu kỳ: 10, 20, 50, 200 (tuỳ theo chiến lược).
Loại giá: Giá đóng cửa, giá mở cửa, giá cao/thấp, giá trung bình.
6. Đặc điểm:
Hiển thị trên biểu đồ: Dạng đường, thanh, hoặc tín hiệu trực tiếp.
Ứng dụng: Xác định xu hướng, vùng quá mua/quá bán, hoặc mức hỗ trợ/kháng cự.
7. Cách sử dụng:
Ví dụ với SMA:
Khi giá nằm trên SMA: Thị trường có xu hướng tăng (Bullish).
Khi giá nằm dưới SMA: Thị trường có xu hướng giảm (Bearish).
Giao cắt SMA ngắn hạn và dài hạn (Golden Cross hoặc Death Cross): Xác định điểm vào/ra lệnh.
8. Ưu điểm:
Dễ sử dụng và hiệu quả với thị trường có xu hướng rõ ràng.
Có thể kết hợp với các chỉ báo khác để tạo chiến lược toàn diện.
9. Nhược điểm:
Trễ tín hiệu (lagging) vì chỉ dựa trên dữ liệu giá trong quá khứ.
Hiệu quả thấp trong thị trường không có xu hướng (sideway).
10. Ví dụ thực tiễn:
Kết hợp với MACD để xác định động lực (momentum) của xu hướng.
Sử dụng cùng Fibonacci để tìm điểm vào lệnh tối ưu.
Candle Prediction with Timed Arrows - ShoaibA trading signal indicator based on 5 min (more accurate) time frame and 1 min time frame (less accurate) that uses RSI and Fast MA and Slow MA to give signals 10 seconds earlier than the closing of the current candle.
Market Breadth Ratio AnalyzerIntroduction
The Market Breadth Ratio Analyzer is designed to provide traders with a clear and visual representation of market breadth for the NYSE (New York Stock Exchange) and NASDAQ. By calculating the ratio of Up-Volume to Down-Volume as a percentage, it highlights whether the market is in a strong uptrend, downtrend, or a neutral state.
Purpose of the Indicator
Identify Trending Days: Quickly determine if the market is showing a strong uptrend or downtrend.
Filter Out Choppy Markets: Avoid indecisive, sideways market conditions.
Understand Market Breadth: Measure the balance between buying and selling volume to assess overall market strength.
Displayed Information
Table (at the top of the chart):
Market: The index being analyzed (NYSE and NASDAQ).
Ratio (%): The percentage of Up-Volume relative to the total traded volume.
Status:
Strong Uptrend: Ratio > 60%.
Strong Downtrend: Ratio < 40%.
Neutral: Ratio between 40% and 60%.
Plotted Lines:
Breadth Ratios for NYSE and NASDAQ are plotted as lines for easy trend tracking.
Blue: Indicates an uptrend (Ratio > 50%).
Red: Indicates a downtrend (Ratio < 50%).
Zero Line:
A grey zero-line acts as a visual reference for market breadth.
How It Works
Breadth Ratio Calculation:
The ratio is calculated as the percentage of Up-Volume relative to the total volume:
Ratio
=
Up-Volume
Up-Volume
+
Down-Volume
×
100
Ratio=
Up-Volume+Down-Volume
Up-Volume
×100
Status Determination:
Strong Uptrend: Ratio > 60%.
Strong Downtrend: Ratio < 40%.
Neutral: Ratio between 40% and 60%.
Visual Representation:
A dynamic table displays the calculated ratios and statuses in real-time.
Plotted lines for NYSE and NASDAQ allow for trend monitoring over time.
Use Cases
Identifying Trend Days:
If the NYSE Ratio is 65% and NASDAQ Ratio is 70%, this indicates a clear uptrend, making it ideal for long trades.
Recognizing Choppy Days:
If both Ratios fluctuate between 40% and 60%, it suggests indecision and a likely sideways market.
Detecting Divergences:
If NYSE shows a strong uptrend but NASDAQ remains neutral, it could indicate divergence between the indices.
Indicator Settings
Scale Factor: Normalizes volume data (default: 1,000,000).
Color Highlights:
Blue: Strong Uptrend.
Red: Strong Downtrend.
Zero Line: A grey line as a reference for trend direction.
Advantages
Quick and Clear Visualization of market breadth for NYSE and NASDAQ.
Simple Trend Identification with color-coded statuses.
Effective Trade Filtering by identifying trending versus choppy conditions.
Detect Market Divergences to gain deeper insights.
Summary
The Market Breadth Ratio Analyzer is an essential tool for traders looking to measure and analyze the strength of market trends using volume ratios. By combining precision with an intuitive visual display, it allows traders to quickly identify market conditions and make informed decisions.
Tick Sentiment & ExtremesIntroduction
The Tick Sentiment & Extremes indicator provides real-time insights into the upticks and downticks of stocks on the market. Specifically designed for USI:TICK charts, it helps traders identify market sentiment, extreme readings, and bar-closing positions relative to the zero line. This fast-moving indicator updates every few seconds, offering a clean and visually intuitive setup for trend and sentiment analysis.
Purpose of the Indicator
Monitor Upticks vs. Downticks: Track stocks moving higher or lower in real time.
Identify Extremes: Highlight significant positive or negative readings (e.g., ±800 and ±1000).
Visually Track Bar Closures: Use clean markers to identify whether bars close above or below the zero line.
Daily Reset for Clarity: Highs, lows, and EOD (End of Day) boundaries reset at the start of each new trading day.
Key Features
EOD (End of Day) Lines:
Marks the start of each trading day with subtle background highlights for clear visual separation.
Horizontal Lines for Extremes:
Zero Line: Acts as the reference for positive or negative ticks.
800 and 1000 Levels: Extreme positive tick thresholds.
-800 and -1000 Levels: Extreme negative tick thresholds.
Visual Markers for Bar Closures:
Small Blue Dots at +1200: Appear when the bar closes above the zero line (positive sentiment).
Small Red Dots at -1200: Appear when the bar closes below the zero line (negative sentiment).
Minimalist Design:
Uses clean lines, dots, and subtle highlights to keep the chart uncluttered while delivering maximum clarity.
How It Works
Tick Calculation:
The indicator compares the number of stocks on an uptick (current price > last price) vs. downtick (current price < last price).
The tick value updates rapidly, showing live sentiment without regard to the previous day's close.
Bar Closes:
Blue Dot: Bar closes positively above the zero line.
Red Dot: Bar closes negatively below the zero line.
EOD Lines:
The day resets, and a subtle gray background highlights the start of a new trading session.
Displayed Elements
Horizontal Lines:
Zero Line (Gray)
+800 and +1000 Lines (Blue for extremes).
-800 and -1000 Lines (Red for extremes).
Markers:
Small blue dots at +1200 for positive closes.
Small red dots at -1200 for negative closes.
EOD Highlight:
Gray background at the start of each trading day to separate sessions visually.
Use Cases
Identifying Extreme Sentiment:
Tick readings near +1000 or -1000 indicate extreme bullish or bearish activity, suggesting potential reversals or trend continuations.
Daily Sentiment Overview:
Quickly see if the majority of tick bars closed above or below the zero line.
Consistent blue dots suggest bullish sentiment, while red dots indicate bearish activity.
Clean Visual Separation:
EOD highlights ensure clarity when analyzing multiple trading days on the same chart.
Customization
Users can customize the color and style of:
Horizontal lines (0, 800, 1000, -800, -1000).
Positive and negative markers (dots).
Subtle EOD backgrounds can be adjusted for visual preference.
Summary of Benefits
Real-Time Sentiment Analysis: Instantly see upticks vs. downticks.
Visual Extreme Readings: Highlight key levels (800 and 1000).
Clear Trend Indication: Track bar closures relative to the zero line.
Clean Chart Design: Minimalist markers and lines for an uncluttered view.
The TickValues & Distribution indicator is essential for traders analyzing USI:TICK charts. It provides clear, real-time signals and sentiment tracking, helping traders identify trends, reversals, and daily extremes with ease.
Follow me for updates and more: @TraderNautilus 🚀
Altcoin Season Indicator//@version=5
indicator("Altcoin Season Indicator", overlay=false)
// Input for Bitcoin Dominance (BTC.D)
btcDominance = request.security("CRYPTOCAP:BTC.D", "D", close)
altcoinMarketCap = request.security("CRYPTOCAP:TOTAL2", "D", close)
// Moving Averages for Trend Analysis
btcMA = ta.sma(btcDominance, 50)
altMA = ta.sma(altcoinMarketCap, 50)
// RSI for Momentum
btcRSI = ta.rsi(btcDominance, 14)
altRSI = ta.rsi(altcoinMarketCap, 14)
// Altcoin Season Conditions
btcBearish = btcDominance < btcMA and btcRSI < 50
altBullish = altcoinMarketCap > altMA and altRSI > 50
// Signal for Altcoin Season
altcoinSeason = btcBearish and altBullish
// Plotting
bgcolor(altcoinSeason ? color.new(color.green, 90) : na)
plot(btcDominance, color=color.red, title="BTC Dominance")
plot(altcoinMarketCap / 1e12, color=color.blue, title="Altcoin Market Cap (T)")
alertcondition(altcoinSeason, title="Altcoin Season Signal", message="Altcoin Season may be starting!")
Support and Resistance TrendlinesStrategy:
Support: Identified as the lowest low over a specific period.
Resistance: Identified as the highest high over a specific period.
Dynamic Trendlines: We’ll use the concept of a rolling window to calculate the highest highs and lowest lows over the last n bars (you can adjust the number of bars for more sensitivity).
Explanation:
Lookback Period (length): The number of bars over which we calculate the support and resistance levels. You can adjust this value depending on the timeframe and the sensitivity you want for the trendlines.
Resistance: This is the highest high over the length of bars. We use ta.highest(high, length) to find the highest high within the specified lookback period.
Support: This is the lowest low over the length of bars. We use ta.lowest(low, length) to find the lowest low within the specified lookback period.
Plotting the Lines:
We plot the support and resistance as horizontal lines on the chart using plot().
Additionally, we create dynamic trendlines that update automatically with each new bar. The line.new function creates lines that can be modified dynamically as new price data comes in.
Line Persistence:
The line functions are used to create horizontal lines that persist across bars. The trendlines adjust their position as the bars move forward.
How It Works:
This indicator will automatically detect the highest and lowest prices over the last n bars and draw support (green line) and resistance (red line) levels on the chart.
The trendlines will adjust as the market evolves and provide visual reference points for potential areas of price reversal.
How to Use This Script:
Copy and paste the Pine Script code into the Pine Script Editor on TradingView.
Save the script, and then add it to your chart.
Adjust the Lookback Period input to suit your trading strategy and timeframe.
The support and resistance levels will be drawn dynamically, and the lines will update as new bars form.
Customizations:
You can modify the number of bars (length) used to calculate support and resistance, depending on the timeframes you're interested in.
If you need more advanced trendline drawing (such as drawing trendlines between significant high/low points or automatic adjustment to more complex patterns), you might need to implement more advanced logic using peaks and valleys or price action patterns.
Let me know if you need any further adjustments!
cá nhân//@version=5
strategy("Demo GPT - Supertrend", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1, slippage=3)
// Inputs
Periods = input.int(10, title="ATR Period")
src = input.source(hl2, title="Source")
Multiplier = input.float(3.0, title="ATR Multiplier", step=0.1)
changeATR = input.bool(true, title="Change ATR Calculation Method ?")
showSignals = input.bool(true, title="Show Signals ?")
highlighting = input.bool(true, title="Highlighter On/Off ?")
emaPeriod = input.int(50, title="EMA Period")
bbLength = input.int(20, title="Bollinger Bands Length")
bbMultiplier = input.float(2.0, title="Bollinger Bands Multiplier")
// ATR Calculation
atr2 = ta.sma(ta.tr, Periods)
atr = changeATR ? ta.atr(Periods) : atr2
// Supertrend Calculation
up = src - (Multiplier * atr)
up1 = nz(up , up)
up := close > up1 ? math.max(up, up1) : up
dn = src + (Multiplier * atr)
dn1 = nz(dn , dn)
dn := close < dn1 ? math.min(dn, dn1) : dn
trend = 1
trend := nz(trend , trend)
trend := trend == -1 and close > dn1 ? 1 : trend == 1 and close < up1 ? -1 : trend
// Bollinger Bands Calculation
basis = ta.sma(close, bbLength)
deviation = ta.stdev(close, bbLength)
upperBand = basis + (bbMultiplier * deviation)
lowerBand = basis - (bbMultiplier * deviation)
// Plot Supertrend and Bollinger Bands
upPlot = plot(trend == 1 ? up : na, title="Up Trend", style=plot.style_line, linewidth=2, color=color.green)
dnPlot = plot(trend == 1 ? na : dn, title="Down Trend", style=plot.style_line, linewidth=2, color=color.red)
plot(upperBand, title="Upper Band", color=color.blue, linewidth=1)
plot(lowerBand, title="Lower Band", color=color.blue, linewidth=1)
plot(basis, title="BB Basis", color=color.gray, linewidth=1)
// Buy and Sell Signals
buySignal = close > upperBand
sellSignal = close < lowerBand
if (buySignal and showSignals)
strategy.entry("Buy", strategy.long)
if (sellSignal and showSignals)
strategy.close("Buy")
// Highlighting
mPlot = plot(ohlc4, title="", style=plot.style_circles, linewidth=0)
longFillColor = highlighting ? (trend == 1 ? color.new(color.green, 90) : na) : na
shortFillColor = highlighting ? (trend == -1 ? color.new(color.red, 90) : na) : na
fill(mPlot, upPlot, title="UpTrend Highlighter", color=longFillColor)
fill(mPlot, dnPlot, title="DownTrend Highlighter", color=shortFillColor)
// Date Range Filter
startDate = input.time(timestamp("2018-01-01 00:00"), title="Start Date")
endDate = input.time(timestamp("2069-12-31 23:59"), title="End Date")
inDateRange = (time >= startDate and time <= endDate)
if not inDateRange
strategy.close_all()
FVG Smart ScannerThis script helps traders identify potential trading opportunities by combining Fair Value Gaps (FVGs) with other technical indicators. Here's what it specifically looks for:
Fair Value Gaps:
Spots price gaps that form when price moves quickly, leaving unfilled areas
Identifies both bullish gaps (potential upward moves) and bearish gaps (potential downward moves)
Visualizes these gaps as colored boxes on your chart (green for bullish, red for bearish)
Trend Confirmation:
Uses two EMAs (20 and 50 period) to confirm market direction
Shows trend lines in blue (20 EMA) and purple (50 EMA)
Momentum Check:
Uses RSI (Relative Strength Index) to check if the market is overbought or oversold
Default settings: Overbought = 70, Oversold = 30
Trading Signals:
Shows green triangles below price for potential buy signals when:
A bullish gap is found
RSI shows oversold conditions
20 EMA is above 50 EMA
Shows red triangles above price for potential sell signals when:
A bearish gap is found
RSI shows overbought conditions
20 EMA is below 50 EMA
Customizable Settings:
Lookback period (how far back to scan for gaps)
FVG threshold (minimum gap size to consider)
RSI settings (length and thresholds)
Alert System:
Can notify you when potential buy or sell setups occur
Helps you catch opportunities even when not watching the chart
This indicator is best used on any timeframe where you want to spot potential reversals or continuation moves based on unfilled price gaps.