RSI + Fibonacci + Price Action Buy/Sell🔹 Strategy Logic
1. Buy Conditions (Long Entry)
✅ RSI is below 30 (oversold) and crossing up.
✅ Price is near 50% or 61.8% Fibonacci retracement (strong support).
✅ Price action confirmation: Bullish engulfing, hammer, or breakout of resistance.
✅ Entry Level: Current close price when buy conditions trigger.
✅ Stop Loss (SL): Below the 100% Fibonacci retracement level or last swing low.
✅ Targets:
🎯 Target 1 (1:2 RR) = Entry + (Entry - SL) * 2
🎯 Target 2 (1:3 RR) = Entry + (Entry - SL) * 3
2. Sell Conditions (Short Entry)
✅ RSI is above 70 (overbought) and crossing down.
✅ Price is near 38.2% Fibonacci retracement (strong resistance).
✅ Price action confirmation: Bearish engulfing, shooting star, or breakdown of support.
✅ Entry Level: Current close price when sell conditions trigger.
✅ Stop Loss (SL): Above the 0% Fibonacci retracement level or last swing high.
✅ Targets:
🎯 Target 1 (1:2 RR) = Entry - (SL - Entry) * 2
🎯 Target 2 (1:3 RR) = Entry - (SL - Entry) * 3
📌 How This Works
✅ Combines RSI, Fibonacci, and Price Action for Stronger Confirmation.
✅ Uses Candlestick Patterns (Engulfing, Hammer, Shooting Star) for Entry.
✅ Plots Entry, Stop Loss, and Targets (1:2 & 1:3 RR).
✅ Triggers Alerts When a Buy/Sell Signal is Confirmed.
🚀 How to Use:
1️⃣ Apply this script to Nifty (or any stock/crypto) chart in TradingView.
2️⃣ Works best on 15m, 1H, or daily timeframes.
3️⃣ Confirm with trendlines, volume, and market structure.
4️⃣ Adjust lookback period based on volatility.
Chỉ báo và chiến lược
XAU/USD Scalping Strategy (EMA 9 & 21 + RSI)What the Script Does:
EMA Calculation:
Plots the 9 EMA (blue line) and 21 EMA (orange line) on the chart.
Generates buy/sell signals when the EMAs cross over/under.
RSI Calculation:
Uses a 14-period RSI.
Highlights overbought conditions (RSI > 60) with a red background.
Highlights oversold conditions (RSI < 40) with a green background.
Buy Signal:
9 EMA crosses above 21 EMA (bullish crossover).
RSI is between 40 and 60 (not overbought or oversold).
Sell Signal:
9 EMA crosses below 21 EMA (bearish crossover).
RSI is between 40 and 60.
Visual Signals:
Green "BUY" labels appear below candles for buy signals.
Red "SELL" labels appear above candles for sell signals.
Alerts:
Alerts are triggered for buy and sell signals, so you can get notified.
RSI & Fibonacci Buy/Sell SignalsRSI Conditions:
Buy Signal: RSI crosses above 30 from below (oversold region).
Sell Signal: RSI crosses below 70 from above (overbought region).
Fibonacci Retracement Levels:
Key levels: 0.382, 0.5, 0.618
Buy Confirmation: If price is near a Fibonacci support level & RSI is oversold (<30), a strong buy signal is generated.
Sell Confirmation: If price is near a Fibonacci resistance level & RSI is overbought (>70), a strong sell signal is generated.
How This Works:
RSI Calculation: Uses the 14-period RSI.
Fibonacci Levels: Dynamically calculates key Fibonacci retracement levels based on the last 50 bars.
Buy Signal: Triggers when RSI is below 30 & price is near 61.8% retracement.
Sell Signal: Triggers when RSI is above 70 & price is near 38.2% retracement.
Plots:
Fibonacci levels are displayed.
Buy/Sell markers appear on the chart when conditions are met.
Usage Tips:
Use on 5m, 15m, or 1H charts for intraday trading.
Confirm signals with price action & volume.
Avoid trading in sideways markets.
EMA + VWMA Crossover StrategyInterpretation:
Buy Signal: When the 9 EMA crosses above the 21 VWMA, it indicates a potential uptrend.
Sell Signal: When the 9 EMA crosses below the 21 VWMA, it indicates a potential downtrend.
Example of Strategy Logic
Buy Condition: 9 EMA > 21 VWMA.
Sell Condition: 9 EMA < 21 VWMA.
Advantages of This Strategy
Combines trend-following (EMA) and volume-weighted (VWMA) indicators.
Simple and easy to understand.
Can be used on any timeframe or asset.
Estrategia de Trading con Order Blockssii la vela de 4H de las 5AM hora nueva york termina alcista se marcan los orderblock con imbalances en 15M y luego se ejecuta en 1M cuando:
1) se supera un minimo
2) la vela siguiente (alcista) envuelve a la bajista con cuerpo
y asi pero en el caso opuesto de venta.
Si la vela de 4H de las 5AM nueva york termina bajista se buscan en 15M los orderblocks con imbalances y en 1M se busca la entrada respetando los mismos parametros
1) se supera un maximo
2) la vela siguiente (bajista) envuelve con cuerpo a la alcista.
la relacion riesgo beneficios debe ser de 1-3
Erudite RSIThis indicator is a combination of Relative Strength Index (RSI) and Stochastic RSI.
This is a good indicator for scalping.
-Erudite
KKS_CUSTOMThis Pine Script combines a **Relative Strength Index (RSI) indicator with smoothing options** (SMA, EMA, WMA, VWMA, and Bollinger Bands) and **divergence detection** for bullish and bearish signals. It allows users to customize RSI settings, apply different moving averages, and enable Bollinger Bands for enhanced trend analysis. The script also detects **regular bullish and bearish divergences**, marking them on the chart with labels and providing alert conditions for potential trade signals. This versatile indicator helps traders identify overbought/oversold conditions and possible trend reversals efficiently. 🚀
DragonBandzv0Dragon Bandz v0 - By Karatop420
There ya go. Nothing fancy. No alerts or anything like that. Just a wave trend, money flow, and stochastic volatility.
Recurring Dotted Vertical LinesI want recurring vertical lines on the 00:00 and 18:00 times throughout the graph
BW by readCrypto
Hello, traders.
If you "Follow", you can always get new information quickly.
Please also click "Boost".
Have a nice day today.
-------------------------------------
BW indicator is an indicator that displays StochRSI, MACD, OBV, and superTrend indicators integrated.
The BW(100) indicator is created when
- StochRSI indicator is 50 or higher,
- MACD indicator's haMSignal > haSSignal,
- OBV indicator rises above the previous high,
- superTrend indicator rises above the Sell line
The above conditions are met and it falls.
The BW(0) indicator is created when
- StochRSI indicator is below 50,
- MACD indicator is haMSignal < haSSignal,
- OBV indicator falls below the previous low,
- superTrend indicator falls below the Buy line
The above conditions are satisfied and it rises.
-
(Interpretation method)
Accordingly, the creation of the BW(100) indicator can be interpreted as meaning that it has fallen from the high point range.
Therefore, the point where the BW(100) indicator is created is likely to be the resistance point.
The creation of the BW(0) indicator can be interpreted as meaning that it has risen from the low point range.
Therefore, the point where the BW(0) indicator is created is likely to be the support point.
-
Since this BW indicator includes the OBV indicator that refers to the trading volume, it cannot be used on index charts that do not display the trading volume.
I think intuition is important when trading.
I think that indicators like this, which are displayed on the price candles, that is, indicators that show support and resistance points, increase intuitiveness when trading.
-
Thank you for reading to the end.
I hope you have a successful trade.
--------------------------------------------------
안녕하세요?
트레이더 여러분, 반갑습니다.
"팔로우"를 해 두시면, 언제나 빠르게 새로운 정보를 얻으실 수 있습니다.
"부스트" 클릭도 부탁드립니다.
오늘도 좋은 하루되세요.
-------------------------------------
BW 지표는 StochRSI, MACD, OBV, superTrend 지표를 통합하여 표시한 지표입니다.
BW(100) 지표의 생성은
- StochRSI 지표가 50 이상,
- MACD 지표의 haMSignal > haSSignal,
- OBV 지표가 이전 고점 이상 상승,
- superTrend 지표가 Sell선 이상 상승
위의 조건이 만족한 상태에서 하락하게 되면 생성됩니다.
BW(0) 지표의 생성은
- StochRSI 지표가 50 이하,
- MACD 지표가 haMSignal < haSSignal,
- OBV 지표가 이전 저점 이하로 하락,
- superTrend 지표가 Buy선 이하로 하락
위의 조건이 만족한 상태에서 상승하게 되면 생성됩니다.
-
(해석 방법)
이에 따라서, BW(100) 지표가 생성되었다는 의미는 고점 구간에서 하락하였다는 의미로 해석할 수 있습니다.
그러므로, BW(100) 지표가 생성된 지점이 저항 지점이 될 가능성이 높습니다.
BW(0) 지표가 생성되었다는 의미는 저점 구간에서 상승하였다는 의미로 해석할 수 있습니다.
그러므로, BW(0) 지표가 생성된 지점이 지지 지점이 될 가능성이 높습니다.
-
이 BW 지표는 거래량를 참고하는 OBV 지표가 포함되어 있기 때문에 거래량 표시가 없는 지수 차트에서는 사용할 수 없습니다.
거래시에는 직관성이 중요하다고 생각합니다.
이렇게 가격 캔들 부분에 표시된 지표, 즉, 지지와 저항 지점을 표시하는 지표는 거래시 직관성을 높여 준다고 생각합니다.
-
끝까지 읽어주셔서 감사합니다.
성공적인 거래가 되기를 기원입니다.
--------------------------------------------------
ICT Killzones [Tsx Trader]isndicador exelente para ver as kilzones onde vc pode fazer seus trades com maior acertividade
Gelişmiş Supertrend + EMA StratejiBu strateji, üç temel göstergenin kombinasyonunu kullanarak alım-satım sinyalleri üreten bir sistemdir:
Ana Göstergeler:
EMA 5 (Hızlı Hareketli Ortalama)
EMA 20 (Yavaş Hareketli Ortalama)
Supertrend (ATR tabanlı trend göstergesi)
Alış Sinyali Koşulları:
Şu iki koşul aynı anda gerçekleştiğinde alış sinyali üretilir:
EMA 5, EMA 20'yi yukarı kesiyor (emaCrossUp)
Supertrend yukarı trend gösteriyor (stUp)
Satış Sinyali Koşulları:
Şu iki koşul aynı anda gerçekleştiğinde satış sinyali üretilir:
EMA 5, EMA 20'yi aşağı kesiyor (emaCrossDown)
Supertrend aşağı trend gösteriyor (stDown)
Stratejinin Çalışma Mantığı:
Trend Teyidi: Supertrend, genel trend yönünü belirler
Momentum Teyidi: EMA kesişimleri, momentumu gösterir
Çift Onay: Her iki göstergenin de aynı yönü işaret etmesi gerekir
Görsel Göstergeler:
Yeşil "AL" etiketi: Alış noktalarını gösterir (mum altında)
Kırmızı "SAT" etiketi: Satış noktalarını gösterir (mum üstünde)
Mavi çizgi: EMA 5
Kırmızı çizgi: EMA 20
Yeşil/Kırmızı çizgi: Supertrend
Bilgi Tablosu İçeriği:
Mevcut Sinyal: Son üretilen sinyal
EMA Trend: EMA'ların gösterdiği trend
Supertrend: Supertrend'in gösterdiği yön
Son İşlem: En son gerçekleşen alım veya satım
Stratejinin Avantajları:
Trend takibi sağlar
Yanlış sinyalleri azaltır
Görsel olarak anlaşılması kolaydır
Çift onay sistemi ile güvenilirlik artar
Kullanım Önerileri:
Günlük veya 4 saatlik grafiklerde daha etkilidir
Güçlü trend dönemlerinde daha iyi çalışır
Yatay piyasalarda dikkatli kullanılmalıdır
Stop loss ve take profit seviyeleri eklenmelidir
Parametre Optimizasyonu:
- EMA periyotları piyasa volatilitesine göre ayarlanabilir
Supertrend parametreleri trend hassasiyetini belirler
Risk Yönetimi Önerileri:
Her işlemde sabit risk oranı kullanın
Trend yönünde işlem yapın
Piyasa volatilitesine göre stop loss belirleyin
Pozisyon büyüklüğünü risk yönetimine göre ayarlayın
11. En İyi Kullanım Senaryoları:
Trend başlangıçlarını yakalamak için
Trend dönüşlerini tespit etmek için
Momentum değişimlerini takip etmek için
Orta-uzun vadeli pozisyonlar için
Bu strateji, trend takibi ve momentum stratejilerinin bir kombinasyonudur. Özellikle trendli piyasalarda etkili olabilir, ancak her strateji gibi risk yönetimi ile birlikte kullanılmalıdır.
Pablo_Cyrpto RSI Long/Short Strategy v6Explanations:
RSI Calculation: The RSI value is calculated using the ta.rsi function.
Long Condition: A long signal is generated when the RSI falls below 23 and then rises above 25.
Short Condition: A short signal is generated when the RSI rises above 78 and then falls below 75.
Signals on the Chart: Long and short signals are displayed on the chart using the plotshape function.
Alarms: Alarms are set for long and short signals using the alertcondition function.
kubebot533nxxcgfdgdfgdfgdfgdfgdfgdggdgddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddd dddddddddddd ddddddddddddddd ddddddd dddddddd dddddddddddddddddd dddddddddddddd ddd ddd ddddddddddddd dddddddddd ddddddddddd ddddddddd ddddddddd dddddd ddddd d d d d d dd d dd d dd ddddd d d d d
EMA Indicator with Dynamic Color & Crossovers_v003EMA Indicator with Dynamic Color & Crossovers_v003
EMA Indicator with Dynamic Color & Crossovers_v003EMA Indicator with Dynamic Color & Crossovers_v003
17 Moving Average with Risk/RewardIdentify trends and generate buy and sell signals during trending markets
Use the risk/reward ratio feature to set a desired risk/reward ratio and receive alerts when the trade meets the conditions
Experiment with different parameter settings to suit individual trading styles
SwingTrade_IshSimple indicator keeps on the right side of the market and follow the trend.
Fill color suggest to stay long or short
When SHORTMA, crosses LONGMA from down enter the long position, shown with triangle arrow up
When SHORTMA, crosses LONGMA from up enter the long position, shown with triangle arrow down
Trail the stop with yellow square shape
Note: enter above or below the close of the candle only
higher time frame fill color rules the market
use multi timeframe for better judgement
Trade the context and enjoy the profit
BOĞA VE AYI GÜCÜ-TREND ÖLÇEN GÖSTERGE //@version=5
indicator("Boğa ve Ayı Etkinliği - Multi-Timeframe", overlay=true)
// Parametreler
rsiPeriod = input.int(14, title="RSI Periyodu")
emaShortPeriod = input.int(9, title="Kısa EMA Periyodu")
emaLongPeriod = input.int(21, title="Uzun EMA Periyodu")
macdShort = input.int(12, title="MACD Kısa Periyot")
macdLong = input.int(26, title="MACD Uzun Periyot")
macdSignal = input.int(9, title="MACD Sinyal Periyodu")
// Her Zaman Dilimi İçin Hesaplamalar
// 1 Dakika (1M) verisi
rsi1M = request.security(syminfo.tickerid, "1", ta.rsi(close, rsiPeriod))
emaShort1M = request.security(syminfo.tickerid, "1", ta.ema(close, emaShortPeriod))
emaLong1M = request.security(syminfo.tickerid, "1", ta.ema(close, emaLongPeriod))
= request.security(syminfo.tickerid, "1", ta.macd(close, macdShort, macdLong, macdSignal))
// 5 Dakika (5M) verisi
rsi5M = request.security(syminfo.tickerid, "5", ta.rsi(close, rsiPeriod))
emaShort5M = request.security(syminfo.tickerid, "5", ta.ema(close, emaShortPeriod))
emaLong5M = request.security(syminfo.tickerid, "5", ta.ema(close, emaLongPeriod))
= request.security(syminfo.tickerid, "5", ta.macd(close, macdShort, macdLong, macdSignal))
// 1 Saat (1H) verisi
rsi1H = request.security(syminfo.tickerid, "60", ta.rsi(close, rsiPeriod))
emaShort1H = request.security(syminfo.tickerid, "60", ta.ema(close, emaShortPeriod))
emaLong1H = request.security(syminfo.tickerid, "60", ta.ema(close, emaLongPeriod))
= request.security(syminfo.tickerid, "60", ta.macd(close, macdShort, macdLong, macdSignal))
// 4 Saat (4H) verisi
rsi4H = request.security(syminfo.tickerid, "240", ta.rsi(close, rsiPeriod))
emaShort4H = request.security(syminfo.tickerid, "240", ta.ema(close, emaShortPeriod))
emaLong4H = request.security(syminfo.tickerid, "240", ta.ema(close, emaLongPeriod))
= request.security(syminfo.tickerid, "240", ta.macd(close, macdShort, macdLong, macdSignal))
// Günlük (1D) verisi
rsi1D = request.security(syminfo.tickerid, "D", ta.rsi(close, rsiPeriod))
emaShort1D = request.security(syminfo.tickerid, "D", ta.ema(close, emaShortPeriod))
emaLong1D = request.security(syminfo.tickerid, "D", ta.ema(close, emaLongPeriod))
= request.security(syminfo.tickerid, "D", ta.macd(close, macdShort, macdLong, macdSignal))
// Trend Yönü Hesaplamaları
isBullish(rsi, emaShort, emaLong, macdLine, signalLine) =>
(rsi > 50) and (emaShort > emaLong) and (macdLine > signalLine)
isBearish(rsi, emaShort, emaLong, macdLine, signalLine) =>
(rsi < 50) and (emaShort < emaLong) and (macdLine < signalLine)
// Durumları Belirleme
trend1M = isBullish(rsi1M, emaShort1M, emaLong1M, macdLine1M, signalLine1M) ? "Boğalar Etkin" : isBearish(rsi1M, emaShort1M, emaLong1M, macdLine1M, signalLine1M) ? "Ayılar Etkin" : "Kararsız"
trend5M = isBullish(rsi5M, emaShort5M, emaLong5M, macdLine5M, signalLine5M) ? "Boğalar Etkin" : isBearish(rsi5M, emaShort5M, emaLong5M, macdLine5M, signalLine5M) ? "Ayılar Etkin" : "Kararsız"
trend1H = isBullish(rsi1H, emaShort1H, emaLong1H, macdLine1H, signalLine1H) ? "Boğalar Etkin" : isBearish(rsi1H, emaShort1H, emaLong1H, macdLine1H, signalLine1H) ? "Ayılar Etkin" : "Kararsız"
trend4H = isBullish(rsi4H, emaShort4H, emaLong4H, macdLine4H, signalLine4H) ? "Boğalar Etkin" : isBearish(rsi4H, emaShort4H, emaLong4H, macdLine4H, signalLine4H) ? "Ayılar Etkin" : "Kararsız"
trend1D = isBullish(rsi1D, emaShort1D, emaLong1D, macdLine1D, signalLine1D) ? "Boğalar Etkin" : isBearish(rsi1D, emaShort1D, emaLong1D, macdLine1D, signalLine1D) ? "Ayılar Etkin" : "Kararsız"
// Tabloyu Göster
var table trendTable = table.new(position.top_right, 2, 5)
if (bar_index % 10 == 0) // Tabloyu her 10 bar'da bir güncelle
table.cell(trendTable, 0, 0, "1M Trend", text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 1, 0, trend1M, text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 0, 1, "5M Trend", text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 1, 1, trend5M, text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 0, 2, "1H Trend", text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 1, 2, trend1H, text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 0, 3, "4H Trend", text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 1, 3, trend4H, text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 0, 4, "1D Trend", text_color=color.white, bgcolor=color.blue)
table.cell(trendTable, 1, 4, trend1D, text_color=color.white, bgcolor=color.blue)
// İndikatörleri Ekle
plot(emaShort1H, color=color.blue, title="Kısa EMA 1H", linewidth=2)
plot(emaLong1H, color=color.orange, title="Uzun EMA 1H", linewidth=2)
plot(macdLine1H - signalLine1H, color=color.purple, style=plot.style_histogram, title="MACD Histogram 1H")
Combined EMA & Real Price IndicatorCombined EMA & Real Price Indicator
i needed this done for myself so I used chat gpt to assist me with the script.
All in One with CCICCI with Stock ATR that shows the risk of the stock and the present that the stock can move in one day of trade
Demo GPT - Gaussian Channel Strategy v3.0//@version=5
strategy(title="Demo GPT - Gaussian Channel Strategy v3.0", overlay=true, commission_type=strategy.commission.percent, commission_value=0.1, slippage=0, default_qty_type=strategy.percent_of_equity, default_qty_value=5)
// ============================================
// Gaussian Functions (Must be at top)
// ============================================
f_filt9x(_a, _s, _i) =>
var int _m2 = 0, var int _m3 = 0, var int _m4 = 0, var int _m5 = 0, var int _m6 = 0,
var int _m7 = 0, var int _m8 = 0, var int _m9 = 0, var float _f = 0.0
_x = 1 - _a
_m2 := _i == 9 ? 36 : _i == 8 ? 28 : _i == 7 ? 21 : _i == 6 ? 15 : _i == 5 ? 10 : _i == 4 ? 6 : _i == 3 ? 3 : _i == 2 ? 1 : 0
_m3 := _i == 9 ? 84 : _i == 8 ? 56 : _i == 7 ? 35 : _i == 6 ? 20 : _i == 5 ? 10 : _i == 4 ? 4 : _i == 3 ? 1 : 0
_m4 := _i == 9 ? 126 : _i == 8 ? 70 : _i == 7 ? 35 : _i == 6 ? 15 : _i == 5 ? 5 : _i == 4 ? 1 : 0
_m5 := _i == 9 ? 126 : _i == 8 ? 56 : _i == 7 ? 21 : _i == 6 ? 6 : _i == 5 ? 1 : 0
_m6 := _i == 9 ? 84 : _i == 8 ? 28 : _i == 7 ? 7 : _i == 6 ? 1 : 0
_m7 := _i == 9 ? 36 : _i == 8 ? 8 : _i == 7 ? 1 : 0
_m8 := _i == 9 ? 9 : _i == 8 ? 1 : 0
_m9 := _i == 9 ? 1 : 0
_f := math.pow(_a, _i) * nz(_s) + _i * _x * nz(_f ) - (_i >= 2 ? _m2 * math.pow(_x, 2) * nz(_f ) : 0) + (_i >= 3 ? _m3 * math.pow(_x, 3) * nz(_f ) : 0) - (_i >= 4 ? _m4 * math.pow(_x, 4) * nz(_f ) : 0) + (_i >= 5 ? _m5 * math.pow(_x, 5) * nz(_f ) : 0) - (_i >= 6 ? _m6 * math.pow(_x, 6) * nz(_f ) : 0) + (_i >= 7 ? _m7 * math.pow(_x, 7) * nz(_f ) : 0) - (_i >= 8 ? _m8 * math.pow(_x, 8) * nz(_f ) : 0) + (_i == 9 ? _m9 * math.pow(_x, 9) * nz(_f ) : 0)
_f
f_pole(_a, _s, _i) =>
_f1 = f_filt9x(_a, _s, 1)
_f2 = _i >= 2 ? f_filt9x(_a, _s, 2) : 0.0
_f3 = _i >= 3 ? f_filt9x(_a, _s, 3) : 0.0
_f4 = _i >= 4 ? f_filt9x(_a, _s, 4) : 0.0
_f5 = _i >= 5 ? f_filt9x(_a, _s, 5) : 0.0
_f6 = _i >= 6 ? f_filt9x(_a, _s, 6) : 0.0
_f7 = _i >= 7 ? f_filt9x(_a, _s, 7) : 0.0
_f8 = _i >= 8 ? f_filt9x(_a, _s, 8) : 0.0
_f9 = _i == 9 ? f_filt9x(_a, _s, 9) : 0.0
_fn = _i == 1 ? _f1 : _i == 2 ? _f2 : _i == 3 ? _f3 : _i == 4 ? _f4 : _i == 5 ? _f5 : _i == 6 ? _f6 : _i == 7 ? _f7 : _i == 8 ? _f8 : _i == 9 ? _f9 : na
// ============================================
// Date Filter
// ============================================
startDate = input.time(timestamp("1 Jan 2018"), "Start Date", group="Time Settings")
endDate = input.time(timestamp("31 Dec 2069"), "End Date", group="Time Settings")
timeCondition = time >= startDate and time <= endDate
// ============================================
// Stochastic RSI (Hidden Calculations)
// ============================================
stochRsiK = input.int(3, "Stoch RSI K", group="Stochastic RSI", tooltip="Only for calculations, not visible")
stochRsiD = input.int(3, "Stoch RSI D", group="Stochastic RSI")
rsiLength = input.int(14, "RSI Length", group="Stochastic RSI")
stochLength = input.int(14, "Stochastic Length", group="Stochastic RSI")
rsiValue = ta.rsi(close, rsiLength)
k = ta.sma(ta.stoch(rsiValue, rsiValue, rsiValue, stochLength), stochRsiK)
d = ta.sma(k, stochRsiD)
// ============================================
// Gaussian Channel
// ============================================
gaussianSrc = input(hlc3, "Source", group="Gaussian")
poles = input.int(4, "Poles", minval=1, maxval=9, group="Gaussian")
samplingPeriod = input.int(144, "Sampling Period", minval=2, group="Gaussian")
multiplier = input.float(1.414, "Multiplier", step=0.1, group="Gaussian")
reducedLag = input.bool(false, "Reduced Lag Mode", group="Gaussian")
fastResponse = input.bool(false, "Fast Response Mode", group="Gaussian")
// Gaussian Calculations
beta = (1 - math.cos(4 * math.asin(1) / samplingPeriod)) / (math.pow(1.414, 2 / poles) - 1)
alpha = -beta + math.sqrt(math.pow(beta, 2) + 2 * beta)
lag = (samplingPeriod - 1) / (2 * poles)
srcData = reducedLag ? gaussianSrc + (gaussianSrc - gaussianSrc ) : gaussianSrc
trData = reducedLag ? ta.tr(true) + (ta.tr(true) - ta.tr(true) ) : ta.tr(true)
= f_pole(alpha, srcData, poles)
= f_pole(alpha, trData, poles)
finalFilter = fastResponse ? (mainFilter + filter1) / 2 : mainFilter
finalTrFilter = fastResponse ? (trFilter + trFilter1) / 2 : trFilter
upperBand = finalFilter + finalTrFilter * multiplier
lowerBand = finalFilter - finalTrFilter * multiplier
// ============================================
// Trading Logic
// ============================================
longCondition =
finalFilter > finalFilter and // Green Channel
close > upperBand and // Price above upper band
(k >= 80 or k <= 20) and // Stoch RSI condition
timeCondition
exitCondition = ta.crossunder(close, upperBand)
if longCondition
strategy.entry("Long", strategy.long)
if exitCondition
strategy.close("Long")
// ============================================
// Visuals (Gaussian Only)
// ============================================
bandColor = finalFilter > finalFilter ? color.new(#00ff00, 0) : color.new(#ff0000, 0)
plot(finalFilter, "Filter", bandColor, 2)
plot(upperBand, "Upper Band", bandColor)
plot(lowerBand, "Lower Band", bandColor)
fill(plot(upperBand), plot(lowerBand), color.new(bandColor, 90))
barcolor(close > open and close > upperBand ? color.green :
close < open and close < lowerBand ? color.red : na)
Dual MTF MADescription:
Parameters:
MA Type: Choose between Simple (SMA) and Exponential (EMA) Moving Average
MA Length: Number of periods for calculation (default 20)
Source: Price source for calculations (Close/Open/High/Low)
Offset: Shift lines forward/backward in time
Features:
Works on any timeframe without code modifications
Displays overlay on price chart (overlay=true)
Customizable visual settings (color, thickness)
Usage:
Trend identification
Price crossover detection
Support/resistance analysis
Multi-Timeframe MADescription:
Parameters:
MA Type: Choose between Simple (SMA) and Exponential (EMA) Moving Average
MA Length: Number of periods for calculation (default 20)
Source: Price source for calculations (Close/Open/High/Low)
Offset: Shift lines forward/backward in time
Features:
Works on any timeframe without code modifications
Displays overlay on price chart (overlay=true)
Customizable visual settings (color, thickness)
Usage:
Trend identification
Price crossover detection
Support/resistance analysis