Ringz_o'_PowerThis is the "Ringz_o'_Power" complementary/companion indicator for "1-2R3wlTh4ll".
Intended as either a chart underlay or an aux. paned/scale pinned indicator...
- Average True Range (ATR)
- Average Directional Index (ADX)
- Directional Movement Index (DMI)
- Relative Strength Index (RSI)
- Moving Average Convergence Divergence (MACD)
- Stochastics
- Historical Volatility Percentile (HVP)
Cheerz M8z!
图表形态
My scriptThree Step Future-Trend by BigBeluga is a forward-looking trend analysis tool designed to project potential future price direction based on historical periods. This indicator aggregates data from three consecutive periods, using price averages and delta volume analysis to forecast trend movement and visualize it on the chart with a projected trend line and volume metrics.
ODR/PDR in Prices@DrGirishSawhneyThis indicator guide us about the recent rally of minimum 20% in any given script with consecutive green candles . the lowest point of green candle gives the buy signal and the highest point of green candle gives the sell or exit signal.
Opening Candle High/Low with Time Zone and Minute Offset
Title: Opening Candle High/Low with Time Zone and Minute Offset
Description:
The Opening Candle High/Low with Time Zone and Minute Offset indicator is a versatile tool that highlights the high and low of the first candle of the trading session, adjusted for your preferred time zone and minute offset. It is particularly useful for traders who focus on opening ranges as key reference points for their trading strategies.
---
Features:
1. Time Zone and Minute Adjustment:
- Allows customization of the start time by applying a time zone offset (in hours) and a minute offset.
- Ideal for traders operating in different time zones or trading sessions that don't align with midnight UTC.
2. Dynamic First Candle Detection:
- Automatically captures the high and low of the first candle after the adjusted time.
- Resets daily, ensuring accurate levels for each new trading session.
3. Visual Representation:
- Plots the high and low levels of the first candle directly on the chart for easy reference.
- Uses distinct colors (green for the high and red for the low) and adjustable line widths for clarity.
4. Simplicity and Versatility:
- Works across all markets and timeframes, providing essential information for opening range breakout strategies, support/resistance analysis, or session-based trading.
---
How It Works:
1. Time Adjustment:
- The indicator adjusts the current chart time by applying the user-defined hour and minute offsets.
- This ensures the "opening candle" aligns with your specific trading session requirements.
2. First Candle Detection:
- When the adjusted time matches the start of a new day (midnight with offsets), the indicator captures the high and low of the first candle.
- These values are stored and remain static throughout the trading day.
3. Plotting:
- The high and low levels of the opening candle are plotted on the chart, providing visual reference points for traders.
---
Use Case:
- This indicator is ideal for traders who rely on the opening range of a session for planning trades, such as breakout or reversal strategies.
- It can also serve as a key tool for identifying significant price levels in session-based trading.
Simplify your trading analysis and align your strategy with this customizable and intuitive indicator.
Longest Candles HighlighterDescription:
The Longest Candles Highlighter is a simple yet effective tool that identifies and highlights candles with significant price ranges. By visually marking candles that meet specific size criteria, this indicator helps traders quickly spot high-volatility moments or significant market moves on the chart.
Features:
1. Customizable Candle Range:
- Define the minimum and maximum candle size in pips using input fields.
- Tailor the indicator to highlight candles that are most relevant to your trading strategy.
2. Flexible for Different Markets:
- Automatically adjusts pip calculation based on the instrument type (Forex or non-Forex).
- Accounts for differences in pip values, such as the 0.01 pip for JPY pairs in Forex.
3. Visual Highlighting:
- Highlights qualifying candles with a customizable background color for easy identification.
- The default color is red, but you can choose any color to match your chart theme.
4. Precision and Efficiency:
- Quickly scans and identifies candles that meet your criteria, saving you time in analyzing charts.
- Works seamlessly across all timeframes and asset classes.
How It Works:
- The indicator calculates the range of each candle in pips by subtracting the low from the high and dividing by the appropriate pip value.
- It checks whether the candle's size falls within the user-defined minimum and maximum pip range.
- If the conditions are met, the background of the candle is highlighted with the specified color, drawing your attention to significant price movements.
Use Case:
- This indicator is ideal for identifying key market moments, such as breakouts, volatility spikes, or significant price movements.
- Traders can use it to quickly locate large candles on any chart, aiding in technical analysis and strategy development.
This tool simplifies the process of spotting important candles, empowering traders to make faster and more informed trading decisions.
XAUUSD Daily Strategy with AlertsTrend Strategy for Trading XAUUSD
A Trend Strategy in trading XAUUSD (gold) focuses on identifying and capitalizing on the market's prevailing directional momentum. Gold is a highly liquid asset and often moves in significant trends due to its sensitivity to global economic conditions, inflation expectations, interest rates, and geopolitical events. A trend-following strategy aims to ride these movements, either upward (bullish trend) or downward (bearish trend), maximizing profit potential while minimizing risks.
Key Components of a Trend Strategy for XAUUSD:
Trend Identification:
Use technical indicators such as moving averages (e.g., EMA, SMA) or trendlines to determine the direction of the trend.
A bullish trend is characterized by higher highs and higher lows, while a bearish trend features lower highs and lower lows.
Example: Employ the 50 EMA and 200 EMA Crossover to confirm trend direction. When the 50 EMA crosses above the 200 EMA, it indicates a bullish trend, and vice versa for a bearish trend.
Entry Points:
Enter trades in the direction of the trend. For a bullish trend, buy on pullbacks to support levels or moving averages. For a bearish trend, sell on pullbacks to resistance levels.
Indicators like the RSI (Relative Strength Index) or Stochastic Oscillator can help identify overbought or oversold conditions, providing better entry points.
Exit Points:
Use predefined take-profit and stop-loss levels to manage trades effectively.
For take-profit, set targets at major resistance levels for long positions or support levels for short positions.
For stop-loss, use levels slightly below the recent swing low in a bullish trend or above the recent swing high in a bearish trend.
Confirmation Indicators:
Incorporate additional indicators like the MACD (Moving Average Convergence Divergence) or ADX (Average Directional Index) to confirm trend strength.
The ADX value above 25 suggests a strong trend, while values below 20 indicate a weak or range-bound market.
Risk Management:
Use proper position sizing, typically risking no more than 1-2% of your account per trade.
Avoid over-leveraging, as XAUUSD is highly volatile, which can lead to large price swings.
Trend Continuation and Reversal Monitoring:
Watch for signs of trend exhaustion or reversal using candlestick patterns (e.g., Doji, Engulfing) or divergence on indicators like RSI or MACD.
When the trend weakens, adjust your positions or exit trades to lock in profits.
Custom Percent Pullback LevelThis script takes a stock's current day low and current day high and lets you set a custom pullback level that you can then set an alert for or use as an indicator if the stock is still bullish or bearish.
This can be useful for momentum runners as you may want to see only a set % (default is 50%) pullback in order to have a good chance for continuation. With the alert option you can set the percentage pullback you'd like to see in order to get eyes back on the stock
My script// © fxscoopy
//@version=6
indicator("My script")
plot(close)
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
1-Hour Signal Generator1Hr Breakout methode. simple system. lets see the esult. R:R is 1:1. might not be a sounds good. lets see. this is for testing only.
thanks to all.
Custom Strategy: Supertrend + RSI + EMA### **Indicator Description: Custom Strategy - Supertrend + RSI + EMA**
यह इंडिकेटर तीन पॉपुलर इंडिकेटर्स (Supertrend, RSI, और EMA) को मिलाकर बनाया गया है। इसका उद्देश्य यह है कि यह केवल उन्हीं परिस्थितियों में **Buy** और **Sell** सिग्नल जनरेट करे, जब तीनों इंडिकेटर्स एक साथ सकारात्मक (Buy) या नकारात्मक (Sell) संकेत दें।
---
### **इंडिकेटर के मुख्य घटक:**
1. **Supertrend:**
- Supertrend एक ट्रेंड-फॉलोइंग इंडिकेटर है जो प्राइस की दिशा के अनुसार ट्रेंड की पहचान करता है।
- अगर कैंडल Supertrend की नीचे वाली रेखा (Support Line) से ऊपर बंद हो, तो यह **Buy** सिग्नल देता है।
- अगर कैंडल Supertrend की ऊपर वाली रेखा (Resistance Line) से नीचे बंद हो, तो यह **Sell** सिग्नल देता है।
2. **RSI (Relative Strength Index):**
- RSI का उपयोग ओवरबॉट और ओवरसोल्ड कंडीशन की पहचान के लिए किया जाता है।
- अगर RSI की वैल्यू 50 से ऊपर हो, तो इसका मतलब प्राइस में बुलिश मूवमेंट है (**Buy Signal**)।
- अगर RSI की वैल्यू 50 से नीचे हो, तो इसका मतलब प्राइस में बेयरिश मूवमेंट है (**Sell Signal**)।
3. **EMA (Exponential Moving Average - 50):**
- EMA (50) एक पॉपुलर मूविंग एवरेज है जो पिछले 50 कैंडल्स का वेटेड एवरेज लेता है।
- अगर प्राइस EMA (50) से ऊपर है, तो यह **Buy Signal** दर्शाता है।
- अगर प्राइस EMA (50) से नीचे है, तो यह **Sell Signal** दर्शाता है।
---
### **Buy और Sell सिग्नल कब जनरेट होते हैं?**
- **Buy Signal:**
जब तीनों कंडीशन्स सही हों:
1. प्राइस Supertrend की सपोर्ट लाइन से ऊपर हो।
2. RSI वैल्यू 50 से ऊपर हो।
3. प्राइस EMA (50) से ऊपर हो।
- **Sell Signal:**
जब तीनों कंडीशन्स सही हों:
1. प्राइस Supertrend की रेजिस्टेंस लाइन से नीचे हो।
2. RSI वैल्यू 50 से नीचे हो।
3. प्राइस EMA (50) से नीचे हो।
---
### **इंडिकेटर की विशेषताएं:**
- **सटीक सिग्नल जनरेशन:**
- इंडिकेटर केवल मजबूत और भरोसेमंद सिग्नल्स देता है, क्योंकि यह तीन अलग-अलग इंडिकेटर्स को मिलाकर काम करता है।
- **Buy और Sell सिग्नल्स के लिए एरो प्लॉट:**
- चार्ट पर ग्रीन एरो (BUY) और रेड एरो (SELL) दिखाए जाते हैं।
- **EMA लाइन प्लॉट:**
- चार्ट पर EMA (50) को भी विज़ुअल रूप से दिखाया गया है।
- **पृष्ठभूमि हाईलाइटिंग:**
- जब Buy या Sell सिग्नल जनरेट होता है, तब चार्ट की पृष्ठभूमि को हल्के हरे (Buy Zone) या लाल (Sell Zone) रंग से हाईलाइट किया जाता है।
---
### **इंडिकेटर के उपयोग के लाभ:**
1. यह उन ट्रेडर्स के लिए उपयोगी है जो **ट्रेंड-फॉलोइंग स्ट्रेटजी** अपनाते हैं।
2. एक ही चार्ट पर तीनों इंडिकेटर्स को मर्ज करके एक स्पष्ट और सटीक सिग्नल प्राप्त करना।
3. अधिक भरोसेमंद ट्रेडिंग निर्णय लेने में मदद करता है।
---
### **कैसे उपयोग करें?**
1. इंडिकेटर को TradingView पर अपने चार्ट में ऐड करें।
2. Buy या Sell सिग्नल जनरेट होने पर ट्रेड एंट्री लें।
3. अपनी ट्रेडिंग स्ट्रेटजी के अनुसार स्टॉप-लॉस और टारगेट सेट करें।
---
### **Disclaimer (अस्वीकरण):**
यह इंडिकेटर केवल शैक्षिक उद्देश्यों के लिए है। इसका उपयोग करने से पहले अपनी रिसर्च करें और उचित जोखिम प्रबंधन अपनाएं। ट्रेडिंग में नुकसान का जोखिम हमेशा होता है।
---
अगर आपको किसी और विवरण की आवश्यकता हो, तो बताएं! 😊
VİPER_TRADE( Al/Sat Sinyalleri - Heikin Ashi ) HAKAN_DİCEL//@version=5
indicator("Güncel Al/Sat Sinyalleri - Heikin Ashi", overlay=true)
// Heikin Ashi Mumlarının Hesaplanması
var float ha_open = na
ha_close = (open + high + low + close) / 4
ha_open := na(ha_open ) ? (open + close) / 2 : (ha_open + ha_close ) / 2
ha_high = math.max(high, math.max(ha_open, ha_close))
ha_low = math.min(low, math.min(ha_open, ha_close))
// Parametreler
length = input.int(14, title="Hareketli Ortalama Periyodu")
source = ha_close // Heikin Ashi kapanış fiyatını kullanıyoruz
// Hareketli Ortalama Hesaplama
sma_line = ta.sma(source, length)
// Al/Sat Şartları
buy_signal = ta.crossover(source, sma_line) // Fiyat SMA'yı yukarı keserse al
sell_signal = ta.crossunder(source, sma_line) // Fiyat SMA'yı aşağı keserse sat
// Alarmlar için Şartlar
alertcondition(buy_signal, title="AL Sinyali", message="AL Sinyali Geldi! Fiyat: {{close}}")
alertcondition(sell_signal, title="SAT Sinyali", message="SAT Sinyali Geldi! Fiyat: {{close}}")
// Grafik Üzerinde Görselleştirme
plot(sma_line, color=color.blue, title="Hareketli Ortalama", linewidth=2)
plotshape(series=buy_signal, title="Al", location=location.belowbar, color=color.green, style=shape.labelup, text="Al", size=size.small)
plotshape(series=sell_signal, title="Sat", location=location.abovebar, color=color.red, style=shape.labeldown, text="Sat", size=size.small)
VİPER_TRADE( Destek ve Direnç) HAKAN_DİCEL/@version=5
indicator("Kısa Vadeli Destek ve Direnç (Swing High/Low)", overlay=true)
// Parametreler
length = input.int(3, title="Destek/Direnç Uzunluğu (Daha Hızlı için 3 veya 5 Seçin)")
// Yerel Zirve ve Dip Tespiti
high_point = ta.pivothigh(high, length, length)
low_point = ta.pivotlow(low, length, length)
// Destek ve Direnç Çizgileri
plot(high_point ? high : na, style=plot.style_cross, color=color.red, title="Direnç")
plot(low_point ? low : na, style=plot.style_cross, color=color.green, title="Destek")
Entry Price % Difference//@version=5
indicator("Entry Price % Difference", overlay=true)
// User input for entry price
entryPrice = input.float(title="Entry Price", defval=100.0, step=0.1)
// User inputs for profit and stop loss levels
profitLevel = input.float(title="Profit Level (%)", defval=10.0, step=0.1)
stopLossLevel = input.float(title="Stop Loss Level (%)", defval=-10.0, step=0.1)
// User input for USDT amount in the trade
usdtAmount = input.float(title="USDT Amount", defval=1000.0, step=1.0)
// User input for trade type (Long or Short)
tradeType = input.string(title="Trade Type", defval="Long", options= )
// User input for line styles and colors
profitLineStyle = input.string(title="Profit Line Style", defval="Dotted", options= )
profitLineColor = input.color(title="Profit Line Color", defval=color.green)
stopLossLineStyle = input.string(title="Stop Loss Line Style", defval="Dotted", options= )
stopLossLineColor = input.color(title="Stop Loss Line Color", defval=color.red)
// User input for fee percentage
feePercentage = input.float(title="Fee Percentage (%)", defval=0.1, step=0.01)
// Map line styles
profitStyle = profitLineStyle == "Solid" ? line.style_solid : profitLineStyle == "Dotted" ? line.style_dotted : line.style_dashed
stopLossStyle = stopLossLineStyle == "Solid" ? line.style_solid : stopLossLineStyle == "Dotted" ? line.style_dotted : line.style_dashed
// Calculate percentage difference
livePrice = close
percentDifference = tradeType == "Long" ? ((livePrice - entryPrice) / entryPrice) * 100 : ((entryPrice - livePrice) / entryPrice) * 100
// Calculate profit or loss
profitOrLoss = usdtAmount * (percentDifference / 100)
// Calculate fees and net profit or loss
feeAmount = usdtAmount * (feePercentage / 100)
netProfitOrLoss = profitOrLoss - feeAmount
// Display percentage difference, profit/loss, and fees as a single label following the current price
if bar_index == last_bar_index
labelColor = percentDifference >= 0 ? color.new(color.green, 80) : color.new(color.red, 80)
var label plLabel = na
if na(plLabel)
plLabel := label.new(bar_index + 1, livePrice + (livePrice * 0.005), str.tostring(percentDifference, "0.00") + "% " + "P/L: " + str.tostring(netProfitOrLoss, "0.00") + " USDT (Fee: " + str.tostring(feeAmount, "0.00") + ")",
style=label.style_label_down, color=labelColor, textcolor=color.white)
else
label.set_xy(plLabel, bar_index + 1, livePrice + (livePrice * 0.005))
label.set_text(plLabel, str.tostring(percentDifference, "0.00") + "% " + "P/L: " + str.tostring(netProfitOrLoss, "0.00") + " USDT (Fee: " + str.tostring(feeAmount, "0.00") + ")")
label.set_color(plLabel, labelColor)
// Calculate profit and stop loss levels
profitPrice = entryPrice * (1 + profitLevel / 100)
stopLossPrice = entryPrice * (1 + stopLossLevel / 100)
// Plot profit, stop loss, and entry price lines
line.new(x1=bar_index , y1=profitPrice, x2=bar_index, y2=profitPrice, color=profitLineColor, width=1, style=profitStyle)
line.new(x1=bar_index , y1=stopLossPrice, x2=bar_index, y2=stopLossPrice, color=stopLossLineColor, width=1, style=stopLossStyle)
line.new(x1=bar_index , y1=entryPrice, x2=bar_index, y2=entryPrice, color=color.blue, width=1, style=line.style_solid)
// Show percentage difference in the price scale
plot(percentDifference, title="% Difference on Price Scale", color=color.new(color.blue, 0), linewidth=0, display=display.price_scale)
Enhanced Market Opportunity Strategy (Updated)Script Description:
Script Name: Enhanced Market Opportunity Strategy (Updated)
This script is a comprehensive trading strategy designed for TradingView that identifies buying and selling opportunities based on configurable parameters, trend alignment, and risk management. It integrates visual alerts, performance metrics, and real-time trading signals. Below is a detailed overview of its features:
Features:
1. Strategy Inputs:
Buy Strategy Levels: Configurable levels for entry, stop loss, and three take-profit targets.
Sell Strategy Levels: Similar levels for short trades.
Risk Management:
Adjustable risk percentage per trade.
Account balance for position sizing.
Trend Filters:
Short-term and long-term EMAs for trend identification.
Minimum pip movement to validate signals.
2. Technical Analysis:
EMA-Based Trend Conditions:
Bullish (buy signals): When the short-term EMA is above the long-term EMA.
Bearish (sell signals): When the short-term EMA is below the long-term EMA.
Position Sizing:
Automatically calculates trade size based on risk percentage and pip distance to the stop loss.
3. Visual and Alert Features:
Key Levels:
Plots for entry, stop loss, and take-profit levels for both buy and sell strategies.
Background Trend Indication:
Green for bullish trends and red for bearish trends.
Markers and Alerts:
Visual "BUY" and "SELL" markers on the chart for detected opportunities.
Real-time alerts with calculated position size for actionable trades.
4. Performance Metrics:
Tracks:
Total trades executed.
Wins and losses.
Total profit and win rate.
Maximum drawdown.
Table Display:
A table on the chart shows performance metrics, including profit, trades, win rate, and more.
How it Works:
Trend Identification:
The script uses EMA crossovers to detect market trends.
It only generates buy signals in bullish trends and sell signals in bearish trends.
Trade Validation:
Buy or sell opportunities are validated based on the proximity of the price to defined entry levels and the occurrence of a candlestick pattern (close above open for buy and vice versa for sell).
Profit and Loss Tracking:
Tracks whether take-profit or stop-loss levels are hit and updates total profit, wins, and losses accordingly.
Backtesting Performance:
Historical trades are evaluated, and key performance metrics are calculated.
Swing Trading with Mean Reversion - Stonk_BUDThe Swing Trading Analyzer is built for traders looking to catch medium-term swing trading opportunities. It combines trend-following techniques with mean reversion strategies, making it a versatile tool for analyzing daily and weekly charts.
---
#### **Key Features**
- **Moving Average Crossovers**
Tracks 10-day and 50-day moving averages to identify trend shifts. You'll see clear signals for bullish (BUY) and bearish (SELL) momentum.
- **Mean Reversion Analysis**
Uses Bollinger Bands and Z-score calculations to pinpoint overbought and oversold conditions. These tools help confirm when the price is stretched and likely to reverse back toward the mean.
- **Swing Trading Focus**
Designed specifically for daily and weekly timeframes, this indicator avoids the noise of intraday trading and helps you focus on bigger moves.
- **Visual and Alert System**
Plots clear BUY and SELL signals directly on your chart, with optional background highlights for overbought (red) and oversold (green) zones. Plus, you can set custom alerts to get notified when signals trigger.
---
#### **How It Works**
- **Buy Signals**: Triggered when the 10-day moving average crosses above the 50-day moving average, and the price shows oversold conditions (Z-score < -2 and price below the lower Bollinger Band).
- **Sell Signals**: Generated when the 10-day moving average crosses below the 50-day moving average, with overbought confirmation (Z-score > 2 and price above the upper Bollinger Band).
---
Who It's For
- Swing traders looking for reliable signals to ride medium-term market trends.
- Anyone who wants a blend of trend-following and mean reversion strategies.
---
**Pro Tip**: Pair this indicator with solid risk management and additional tools like volume analysis for even better results.
---
(BUY-SELL)RSI with Bollinger BandsThis script for TradingView combines two popular technical analysis indicators - the Relative Strength Index (RSI) and Bollinger Bands - to identify when an asset's price may be overbought or oversold.
Here's how it works:
Input parameters:
rsiLength: the RSI calculation period (default is 14).
rsiOverbought: the overbought level of the RSI (default is 70).
rsiOversold: RSI oversold level (default is 30).
bbLength: Bollinger Bands calculation period (default is 20).
bbMult: standard deviation multiplier for Bollinger Bands (default is 2.0).
reducePyramiding: option to reduce pyramiding (off by default).
Indicator Calculation:
The script calculates RSI and Bollinger Bands using the built-in functions ta.rsi() and ta.bb().
Signal conditions:
Buy signal: generated when the RSI falls below the rsiOversold level and the closing price is below the lower Bollinger Band.
Sell signal: generated when the RSI rises above the rsiOverbought level and the closing price is above the upper Bollinger Band.
Pyramiding:
The script uses the buyCount and sellCount counters to track the number of consecutive buy and sell signals.
The maxTrades parameter defines the maximum number of trades in one direction (1 if reducePyramiding is enabled, and 3 otherwise).
Multi-Period Technical AnalysisThis indicator table provides a comprehensive view of key technical indicators across different time periods. Here's what each component displays:
Layout:
Top row contains headers for each column
Left-most column shows time periods (Current, -2, -4, -6, -8 candles)
Color coding: Current period is highlighted in green, historical periods in gray
Indicators Displayed:
Price: The actual closing price for each period
MFI (Money Flow Index): A momentum indicator combining price and volume, ranging 0-100
CCI (Commodity Channel Index): Shows overbought/oversold conditions and trend strength
Stochastic K & D: Two lines showing momentum, both ranging 0-100
K line: The faster, more sensitive line
D line: The slower, smoothed line
Williams %R: Shows overbought/oversold levels, ranging -100 to 0
MACD: Two lines showing trend direction and momentum
MACD line: The difference between fast and slow moving averages
Signal line: A smoothed version of the MACD line
Purpose:
Allows traders to see how indicators have evolved over the last few periods
Helps identify trends by comparing current values with historical ones
Provides a quick way to spot divergences between price and indicators
Useful for comparing multiple indicators at specific points in time
HH||LL||KCThis script is written in Pine Script version 5, designed for TradingView. It defines a custom trading indicator named **HH||LL||KC**. Here's a breakdown of its components and functionality:
---
### **Indicator Overview**
- **Purpose**: Combines multiple technical analysis tools to generate trading signals, including Keltner Channels, RSI-based stochastic oscillator, and conditions for buy and sell alerts.
- **Overlay**: The indicator plots directly on the price chart (overlay = `true`).
- **Precision**: Values are displayed with 2 decimal points.
---
### **Key Components**
1. **Keltner Channels**:
- Defined by `ma`, `upper`, and `lower` bands.
- Uses an exponential moving average (EMA) as the basis (`ma`).
- The upper and lower bands are derived from the range of highs and lows over the specified `length` (default is 100), multiplied by a factor (`mult`, default is 0.5).
2. **RSI Stochastic Oscillator**:
- Combines RSI and Stochastic calculations to create `%K` and `%D` lines:
- RSI is calculated over `lengthRSI` (default 14) using the specified source (`close` by default).
- Stochastic uses `lengthStoch` (default 14) smoothed by `smoothK` and `smoothD`.
- `%K` and `%D` are used for overbought/oversold signals and crossovers.
3. **Highs, Lows, and Alerts**:
- Identifies:
- **Highs (HH)** when `%K > 80`.
- **Lows (LL)** when `%K < 20`.
- Generates `red` and `green` points based on crossovers of `%K` with overbought/oversold levels.
- A 36-period EMA is plotted as an additional trend indicator.
4. **Additional Plots**:
- `ta.linreg(close, 21, 0)`: Short-term linear regression line.
- `ta.linreg(close, 375, 0)`: Long-term linear regression line.
- Plots for `red` and `green` points for potential reversal levels.
- Buy and Sell signal markers:
- **Buy**: Appears below the bar when `condi1` is true.
- **Sell**: Appears above the bar when `condi2` is true.
5. **Alerts**:
- Triggered when:
- `%K` crosses `%D` with specific conditions (e.g., close above `green` or below `red`).
- Defined via `alertcondition`.
---
### **Trading Logic**
1. **Buy Signal (condi1)**:
- EMA is above the upper Keltner Channel.
- Red marker (`red`) is above the EMA, and:
- Current or past candles open and close above the marker.
- `%K` is below 20, and `%K` crosses `%D`.
2. **Sell Signal (condi2)**:
- EMA is below the lower Keltner Channel.
- Green marker (`green`) is below the EMA, and:
- Current or past candles open below the marker.
- `%K` is above 80, and `%K` crosses under `%D`.
---
### **Visualization**
- **Keltner Channel**: Blue bands for upper and lower limits, with a gray center line.
- **Trend Lines**:
- Orange for short-term linear regression.
- White for long-term linear regression and EMA.
- **Markers**:
- Green for buy signals.
- Red for sell signals.
- **Cross Points**:
- Green dots (`green`) for potential buy reversals.
- Red dots (`red`) for potential sell reversals.
---
### **Use Case**
Traders can use this indicator for:
- Identifying overbought/oversold conditions.
- Spotting trend reversals and continuation patterns.
- Generating buy/sell alerts based on multi-condition logic.
It is versatile and integrates several technical analysis concepts into a single script.