Hybrid Strategy with Position Control & Breakout Filter//@version=6
indicator('Hybrid Strategy with Position Control & Breakout Filter', overlay=true)
// === INPUTS ===
emaFastLen = input.int(8, 'Fast EMA')
emaSlowLen = input.int(21, 'Slow EMA')
rsiLen = input.int(14, 'RSI Length')
rsiOverbought = input.int(70, 'RSI Overbought')
rsiOversold = input.int(30, 'RSI Oversold')
macdFast = input.int(12, 'MACD Fast')
macdSlow = input.int(26, 'MACD Slow')
macdSignal = input.int(9, 'MACD Signal')
volatilityMultiplier = input.float(1.0, 'ATR Multiplier for Volatility Filter')
// === CALCULATIONS ===
emaFast = ta.ema(close, emaFastLen)
emaSlow = ta.ema(close, emaSlowLen)
rsi = ta.rsi(close, rsiLen)
= ta.macd(close, macdFast, macdSlow, macdSignal)
atr = ta.atr(14)
// === VOLATILITY FILTER ===
volatilityThreshold = ta.sma(atr, 14) * volatilityMultiplier
isVolatile = atr > volatilityThreshold
// === OPENING SPIKE LOGIC (first 15 mins of session only) ===
sessionStart = timestamp("America/New_York", year, month, dayofmonth, 9, 30)
first15Min = time >= sessionStart and time < sessionStart + 15 * 60 * 1000
openingBreakout = first15Min and close > open and ta.change(close) > atr * 1.5
// === POSITION TRACKING ===
var int position = 0 // 0 = no position, 1 = long, -1 = short
// === ENTRY CONDITIONS ===
longCondition = ((ta.crossover(emaFast, emaSlow) and rsi < rsiOverbought and macdLine > signalLine and isVolatile) or openingBreakout) and position != 1
shortCondition = ta.crossunder(emaFast, emaSlow) and rsi > rsiOversold and macdLine < signalLine and isVolatile and position != -1
// === EXIT CONDITIONS ===
exitLong = ta.crossunder(emaFast, emaSlow)
exitShort = ta.crossover(emaFast, emaSlow)
// === SIGNAL PLOTS ===
buySignal = longCondition
sellSignal = shortCondition
plotshape(buySignal, title='Buy Signal', location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small, text='BUY')
plotshape(sellSignal, title='Sell Signal', location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small, text='SELL')
// === STATE MANAGEMENT ===
if (longCondition)
position := 1
if (shortCondition)
position := -1
if (exitLong and position == 1)
position := 0
if (exitShort and position == -1)
position := 0
// === PLOT EMAs ===
plot(emaFast, color=color.orange, title='Fast EMA')
plot(emaSlow, color=color.blue, title='Slow EMA')
Indicators and strategies
Hybrid Strategy with Position Control//@version=6
indicator('Hybrid Strategy with Position Control', overlay=true)
// === INPUTS ===
emaFastLen = input.int(8, 'Fast EMA')
emaSlowLen = input.int(21, 'Slow EMA')
rsiLen = input.int(14, 'RSI Length')
rsiOverbought = input.int(70, 'RSI Overbought')
rsiOversold = input.int(30, 'RSI Oversold')
macdFast = input.int(12, 'MACD Fast')
macdSlow = input.int(26, 'MACD Slow')
macdSignal = input.int(9, 'MACD Signal')
// === CALCULATIONS ===
emaFast = ta.ema(close, emaFastLen)
emaSlow = ta.ema(close, emaSlowLen)
rsi = ta.rsi(close, rsiLen)
= ta.macd(close, macdFast, macdSlow, macdSignal)
// === POSITION TRACKING ===
var int position = 0 // 0 = no position, 1 = long, -1 = short
// === ENTRY CONDITIONS ===
longCondition = ta.crossover(emaFast, emaSlow) and rsi < rsiOverbought and macdLine > signalLine and position != 1
shortCondition = ta.crossunder(emaFast, emaSlow) and rsi > rsiOversold and macdLine < signalLine and position != -1
// === EXIT CONDITIONS (Optional logic for reset) ===
exitLong = ta.crossunder(emaFast, emaSlow)
exitShort = ta.crossover(emaFast, emaSlow)
// === SIGNAL PLOTS ===
buySignal = longCondition
sellSignal = shortCondition
plotshape(buySignal, title='Buy Signal', location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small, text='BUY')
plotshape(sellSignal, title='Sell Signal', location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small, text='SELL')
// === STATE MANAGEMENT ===
if (longCondition)
position := 1
if (shortCondition)
position := -1
// Reset position if trend reverses
if (exitLong and position == 1)
position := 0
if (exitShort and position == -1)
position := 0
// === PLOT EMAs ===
plot(emaFast, color=color.orange, title='Fast EMA')
plot(emaSlow, color=color.blue, title='Slow EMA')
PCR tableOverview
This indicator displays a multi-period table of forward-looking price projections. It combines normalized directional momentum (Positive Change Ratio, PCR) with volatility (ATR) and presents a forecast for upcoming time intervals, adjusted for your local UTC offset.
Concepts & Calculations
Positive Change Ratio (PCR):
((total positive change)/(total change)-0.5)*2, producing a value between –100 and +100.
Synthetic ATR: Calculates average true range over the same lookbacks to capture volatility.
PCR × ATR: Forms a volatility-weighted directional forecast, indicating expected move magnitude.
Future Price Projection: Adds PCR × ATR value to current close to estimate future price at each lookahead interval.
Table Layout
There are 12 forecast horizons—1× to 12× the chart timeframe (e.g., minutes, hours, days). Each row displays:
1. Future Time: Timestamp of each projection (adjustable via UTC offset)
2. PCR: Directional bias per period (–1 to +1)
3. PCR × ATR: E xpected move magnitude
4. Future Price: Close + (PCR × ATR)
High and low PCR×ATR rows are highlighted green for minimum value in the price forecast (buy signal) or red for maximum value in the price forecast (sell signal).
How to Use
1. Set UTC offset to your time zone for accurate future timestamps.
2. View PCR to assess bullish (positive) or bearish (negative) momentum.
3. Use PCR × ATR to estimate move strength and direction.
4. Reference Future Price for potential levels over upcoming intervals, and for buy and sell signals.
Limitations & Disclaimers
* This model uses linear extrapolation based on recent price behavior. It does not guarantee future prices.
* It uses only current bar data and no lookahead logic—compliant with Pine Script rules.
* Designed for analytical insight, not as an automated signal or trade executor.
* Best used on standard bar/candle charts (avoid non-standard types like Heikin‑Ashi or Renko).
RLMC TMAS ALPHABOT by SAMOEDEFIferas gang
made by samoedefi
for rlmcrew
ict concepts with bos breaks
Support & Resistance ZonesAuto Support And Resistance Lines, This AI auto support and ressitance lines helps identify support and resitance
NMT Buy/Sell Alarm GPTBUY:
1. When the green arrow appears, it is time for you to consider other additional situations to place a buy order
2. And you set an alert so you don't miss the opportunity
SELL:
You observe the green label showing the % ratio between the order and the current price
You want to sell with how much profit % (relatively) then you sell.
Heikin Ashi Trend Strategy (Beginner)FOR BEGINNERS
Perfect! Below is a custom Pine Script for TradingView that:
Uses Heikin Ashi candles
Shows buy/sell signals based on trend conditions:
3+ green/red Heikin Ashi candles
Price above/below 20 EMA
RSI filter for momentum
Efficient Options Entry Signals (Call/Put/Spreads)Add to TradingView as a new Indicator Script.
Works on all timeframes, but defaults are tuned for daily/5m/15m.
Arrows and labels will show precise entries/exits for calls, puts, and debit spreads based on volatility.
Only efficient, trend-confirmed trades—no whipsaw overload!
All input parameters adjustable in the script UI.
📊 Bollinger Band Strategy v1.0这份 Bollinger Band 工具脚本用于在图表上可视化布林带结构,并识别市场即将爆发的「低波动压缩区」(squeeze)、上下轨突破时机以及潜在的假突破反转信号。用户在 TradingView 图表中加载该脚本后,可以通过观察橙色小圆圈(表示布林带带宽低于阈值)、绿色/红色三角(价格突破上/下轨)以及紫色/青色叉号(free bar 回归)来辅助判断入场、出场或规避信号,从而提高波段交易的胜率与风控能力。适合结合 RSI、MACD 等动能指标进一步增强信号有效性。
// This Bollinger Band tool script is designed to visualize the Bollinger Band structure on a chart,
// identify potential "low volatility squeeze zones", breakout opportunities, and false breakout reversal signals.
// Once loaded in a TradingView chart, the user can monitor:
// - Orange circles: indicate that the Bollinger Band bandwidth has dropped below the defined threshold (squeeze signal),
// - Green/Red triangles: signal when price breaks above or below the Bollinger Bands,
// - Purple/Cyan crosses: suggest a possible fake breakout where price reverts back inside the band (free bar).
// These visual cues help traders better time entries and exits, avoid traps, and improve overall win rate in swing trading.
// This script is best used in combination with momentum indicators such as RSI and MACD to further increase accuracy.
DNAMain array blue is used for break and retest entries, driver array is used for retest entries after retracement. The arrays signify dynamic liquidity pools where price reacts from. Timeframe confluence is needed to make everything work well.
Nifty Call/Put Chart Analysis (Minimal)By Arindam Dey. it is just for learning purpose. do not use it for professional trading. if it is working fine. just let me know on my email ID [email protected]
🏹 CCI+RSI+EMA Strategy (Enhanced with Oscillator Filters)This script is a multi-indicator trading strategy that combines trend-following and momentum signals using CCI, RSI, and EMA, enhanced with MACD and Stochastic filters for more reliable entries.
🧠 Core Concept
The strategy aims to:
Identify the trend using EMA(50) and a long-term comparison of EMA 35 vs EMA 169;
Spot momentum using CCI and RSI;
Filter entries through MACD and Stochastic confirmations to avoid false signals.
📌 Buy Conditions:
✅ Price is above EMA
✅ RSI is above a set threshold (default: 45)
✅ CCI is above a set threshold (default: 0)
✅ Uptrend confirmed by EMA 35 > EMA 169
✅ CCI has recently reached oversold levels (e.g. below -100)
✅ MACD shows bullish crossover
✅ Stochastic confirms exit from oversold zone
📌 Sell Conditions:
✅ Price is below EMA
✅ RSI is below a set threshold (default: 55)
✅ CCI is below 0
✅ Downtrend confirmed by EMA 35 < EMA 169
✅ CCI has recently reached overbought levels (e.g. above 100)
✅ MACD shows bearish crossover
✅ Stochastic confirms exit from overbought zone
🎯 Features:
Fully customizable inputs — adapt to your own trading style.
Trend background shading — green for uptrend, red for downtrend.
Enhanced entry logic — filters out weak signals.
CCI Cross and Trigger markers — additional confirmation tools.
🔔 Alerts
You can set alerts for ENHANCED BUY and ENHANCED SELL to never miss a quality signal.
📈 Use Case:
This tool is suitable for:
Manual trading entries and exits
Being a component of a broader trading system
Semi-automation with alert-based strategies
⚠️ Disclaimer:
This script is for educational and testing purposes only. It is not financial advice. Always backtest and demo trade before using on a live account.
Gold & FX 4H StrategyWith this indicator you BUY when the price is ABOVE the EMA and SELL when price is BELLOW all the EMA
Multi-Indicator Buy/Sell Signals (EMA, RSI, MACD)// This source code is subject to the terms of the Mozilla Public License 2.0
// mozilla.org
// © buy and sell signals gio1
//@version=5
indicator("Multi-Indicator Buy/Sell Signals (EMA, RSI, MACD)", overlay=true)
// --- Inputs for Moving Averages ---
fastMALen = input.int(10, title="Fast EMA Length", minval=1)
slowMALen = input.int(20, title="Slow EMA Length", minval=1)
// --- Inputs for RSI ---
rsiLength = input.int(14, title="RSI Length", minval=1)
rsiOB = input.int(70, title="RSI Overbought Level", minval=50, maxval=90)
rsiOS = input.int(30, title="RSI Oversold Level", minval=10, maxval=50)
// --- Inputs for MACD ---
macdFastLen = input.int(12, title="MACD Fast Length", minval=1)
macdSlowLen = input.int(26, title="MACD Slow Length", minval=1)
macdSigLen = input.int(9, title="MACD Signal Length", minval=1)
// --- Calculate Indicators ---
// EMA
fastMA = ta.ema(close, fastMALen)
slowMA = ta.ema(close, slowMALen)
// RSI
rsi = ta.rsi(close, rsiLength)
// MACD
= ta.macd(close, macdFastLen, macdSlowLen, macdSigLen)
// --- Define Buy and Sell Conditions ---
// EMA Crossover Condition
emaBuy = ta.crossover(fastMA, slowMA)
emaSell = ta.crossunder(fastMA, slowMA)
// RSI Condition
rsiBuy = rsi < rsiOS and rsi > rsiOS // Crossing up from oversold
rsiSell = rsi > rsiOB and rsi < rsiOB // Crossing down from overbought
// MACD Condition
macdBuy = ta.crossover(macdLine, signalLine)
macdSell = ta.crossunder(macdLine, signalLine)
// --- Combine Conditions for Final Signals ---
buySignal = emaBuy and rsiBuy and macdBuy
sellSignal = emaSell and rsiSell and macdSell
// --- Plot Signals on Chart ---
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
// --- Add Alert Conditions ---
alertcondition(buySignal, title="Buy Alert", message="🔔 BUY signal triggered!")
alertcondition(sellSignal, title="Sell Alert", message="🔔 SELL signal triggered!")
NEOs TDI + Sharkfin ScannerTDI + alert scanner for sharkfins use with Fibs and or support resistance for confluence
ATR Trailing Stop with ATR Targets [v6]What the Indicator Does
This custom TradingView indicator is designed for active traders who want to automate and visualize their trailing stop management and target setting, using true market volatility. It combines the Average True Range (ATR) with dynamic market structure logic to:
Trail a stop-loss behind major swings in real time, using 2×ATR (adjustable) from the highest high in uptrends or the lowest low in downtrends.
Flip trading bias between bullish and bearish when the stop is breached.
Identify and plot three profit targets (at 1, 2, and 3 ATR from the breakout/flip point) after every stop-flip, helping traders scale out or set take-profits objectively.
Maintain a visible presence on your chart every bar to avoid indicator errors, with color and labeling for clear distinction between long/short phases.
How the Indicator Works
1. ATR Calculation
ATR Period and Multiplier: You select your preferred ATR length (default is 14 bars) and a multiplier (default is 2.0).
Volatility Adjustment: ATR measures the average "true" bar range, so the trailing stop and targets adapt to current volatility.
2. Trailing Stop Logic
Uptrend (bullish bias): The indicator tracks the highest high made since the last bearish-to-bullish flip and sets the stop at - .
The stop only raises (never lowers) during an uptrend, protecting gains in strong moves.
Downtrend (bearish bias): Tracks the lowest low made since the last bullish-to-bearish flip, with stop at + .
The stop only lowers (never raises) in a downtrend.
Flip Point: If price closes through the trailing stop, the current bias “flips,” and the logic reverses (bullish to bearish or vice versa). At the new close, flip price and bar index are stored for target calculation.
3. ATR Targets after Flip
After each stop flip:
Three targets—based on the new close price—are calculated and plotted:
Long flip (new bull bias): Target1 = close + 1×ATR, Target2 = close + 2×ATR, Target3 = close + 3×ATR.
Short flip (new bear bias): Target1 = close - 1×ATR, Target2 = close - 2×ATR, Target3 = close - 3×ATR.
These targets help with scaling out, partial profit-taking, or setting automated orders.
4. Visual Feedback
Trailing stop line: Green for long bias, red for short bias.
Targets: Distinct color-coded circles at 1, 2, 3 ATR levels from the most recent flip.
Flip Labels: Mark the bar and price where bias flipped (“Long Flip” or “Short Flip”) for quick pattern recognition.
Subtle background shading: Ensures TradingView's requirement for “indicator output every bar.”
How to Use This Indicator
Parameter Setup
ATR Period and Multiplier: Adjust to match the timeframe and volatility of your instrument.
Lower periods/multipliers for short-term/volatile trading.
Higher values for smoother signals or higher timeframes.
Starting Trend: Set to match the expected initial bias if the instrument has strong trend characteristics.
Trading Application
1. Daily Bias Approach
Establish your bias in line with your trading plan (e.g., only trade long if price is above the previous day's high, short below the previous day's low).
Only look for trades in the indicator's current bias direction, as expressed by the stop and background color.
2. Entry
Use the indicator as a real-time confirmation or trailing stop for your entries.
Breakout: Enter when price establishes the current bias, using the trailing stop as your risk level.
Reversal: Wait for a bias flip after an extended move; enter in the direction of the new bias.
VWAP Rebound: Combine with a VWAP bounce—enter only if the indicator bias supports your direction.
3. Exits/Targets
Trailing stop management: Move your stop according to the plotted line; exit if your stop is hit.
Profit-taking: Scale out or take profits as price approaches each ATR-based target.
Use the dynamic labeling to identify reversal flips and reset your plan if stopped or the bias changes.
4. Market Context
Filter and frame setups by watching correlated indicators (DXY, VIX, AUDJPY, put/call ratio) and upcoming news; trade only in the daily bias direction for best consistency.
5. Practical Tips
Combine this indicator with your custom watchlist and alert settings to get notified on flips or targets.
Review the last label ("Long Flip"/"Short Flip") and targets to plan partial exits.
Remember: ATR adapts to volatility, so the stop and targets stay proportionate even when price action shifts.
N-Pattern Detector (Advanced Logic)Introduction
The N-Pattern Detector (Advanced Logic) is a powerful Pine Script-based tool designed to identify a specific price structure known as the "N-pattern", which often indicates trend continuation or potential breakout points in the market. This pattern combines zigzag pivot logic, retracement filters, volume confirmation, and trend alignment, offering high-probability trading signals.
It is ideal for traders who want to automate pattern detection while applying smart filters to reduce false signals in various markets — including stocks, forex, crypto, and indices.
What is the N-Pattern?
The N-pattern is a 3-leg price formation consisting of points A-B-C-D. It typically follows this structure:
Bullish N-Pattern:
A → Low Pivot
B → Higher High (Impulse)
C → Higher Low (Retracement)
D → Breakout above B (Confirmation)
Bearish N-Pattern:
A → High Pivot
B → Lower Low (Impulse)
C → Lower High (Retracement)
D → Breakdown below B (Confirmation)
The pattern essentially reflects a trend–pullback–breakout structure, making it suitable for continuation trades.
Key Features
1. Intelligent ZigZag Pivot Detection
Uses pivot highs/lows to define key swing points (A, B, C).
Adjustable ZigZag depth to control pattern sensitivity.
Filters noise and avoids false signals in volatile markets.
2. Retracement Validation
Validates the B→C leg as a proper pullback using Fibonacci-based thresholds.
User-defined min and max retracement settings (e.g., 38.2% to 78.6% of A→B leg).
3. Trend Filter via EMA
Filters patterns based on trend direction using a customizable EMA (e.g., 200 EMA).
Only detects bullish patterns above EMA and bearish patterns below EMA (optional).
4. Volume Confirmation
Ensures that impulse legs (A→B, C→D) are supported by stronger volume than the correction leg (B→C).
Adds another layer of confirmation and reliability to detected patterns.
5. Target Projections
Automatically draws 100% A→B projected target from point C.
Optional Fibonacci extensions at 1.272 and 1.618 levels for take-profit planning.
Visually plotted on the chart with colored dashed/dotted lines.
6. Clear Visuals & Labels
Connects all pattern points with colored lines.
Clearly labels points A, B, C, D on the chart.
Uses customizable colors for bullish and bearish patterns.
Includes real-time alerts when a valid pattern is detected.
How to Use It
Add to Chart
Apply the indicator to any chart and time frame. It works across all asset classes.
Adjust Inputs (Optional)
Set ZigZag Depth to control pivot detection sensitivity.
Define Min/Max Retracement levels to match your trading style.
Enable or disable Trend and Volume filters for cleaner signals.
Customize EMA length (default: 200) for trend validation.
Wait for Pattern Confirmation
The indicator constantly scans for valid N-patterns.
A pattern is confirmed only after point D forms (breakout or breakdown).
You’ll see the full pattern drawn with target levels.
Set Alerts
Alerts trigger automatically on confirmation of a bullish or bearish pattern.
You can customize these in TradingView’s alerts panel.
Momentum & stoch rsimomentum and stochastic rsi indicator ideal for day trading. momenum is set to 80 for a smooth and safe analysis.
Macros, Sessions, and Quarters - psyploThis script was developed for my personal trading workflow, where I rely heavily on macro time windows and session-based timing to guide my strategy. I designed this tool to help visualize important time-based zones that are crucial in my trading approach, and I believe other traders might find it useful as well.
Features
Macro Time Window Boxes: Visual representation of price range within a configurable time window around the top of every hour.
Session Ribbon Boxes: Clearly marks the Asia, London, and New York trading sessions, labeled distinctly for better visual separation.
Session Quarters: Each session is automatically divided into four quarters, providing more granular time segmentation within sessions.
Time Zone: All session calculations are based on UTC +8 (Asia/Singapore) timezone.
This tool helps traders:
Identify volatility zones around hourly opens.
Track session-specific market dynamics.
Recognize shifts in momentum or liquidity during each session quarter.
I created this for my own strategies, but it can serve any trader who benefits from time-based market segmentation.
Feel free to adjust the colors and time window settings to suit your preferences!
Max Drawdown (Asset-Based Lookback)Max Drawdown (Long-Term Trading)
🟦 Majors BTC, ETH, BNB, LTC 180 – 365
Captures full correction cycles and recovery patterns (6–12 months).
🟩 Altcoins SOL, ADA, DOT, LINK, AVAX 90 – 180
Alts move faster than majors; 3–6 months catches most large swings.
🟥 Meme coins DOGE, SHIB, PEPE, FLOKI 60 – 120
Volatile with quick trend reversals; 2–4 months captures parabolic runs + drawdowns.
📅 Chart Timeframe:
Use Daily (1D) timeframe for all these.
For extra macro insight, try Weekly (1W) with 52 bars (≈ 1 year).
Compare multiple assets using the same period to assess relative risk.
If you're building a long-term portfolio, combine this with:
200-day SMA or EMA for trend context.
Sharpe Ratio or Sortino Ratio if you're looking for risk-adjusted return metrics.