Multi-Indicator Buy/Sell Signals (EMA, RSI, MACD)Great base for a momentum + trend strategy. With the RSI dot
지표 및 전략
Multiple EMAMultiple EMA Indicator
This script overlays five customizable Exponential Moving Averages (EMAs) on your chart with color styling and transparency matching TradingView’s palette (≈65% opacity).
🔹 Features
Five EMAs with fully customizable lengths (default: 6, 13, 26, 52, 104)
Thicker line weights for longer-term EMAs (26, 52, 104) to emphasize trend bias
Short-term EMAs (6, 13) hidden by default but toggleable in settings
Custom color codes with opacity applied (35% transparency) for a smoother look
Adjustable price source input (close, open, hl2, etc.)
🔹 Best For
Swing traders and trend followers
Traders seeking a clear, color-coded, and visually optimized EMA setup
AMF PG Strategy_v2The AMF PG Strategy (Praetorian Guard) is an advanced trading system designed to seamlessly adapt to market conditions. Its unique structure balances precise entries with intelligent protection, giving traders confidence in both trending and volatility environments.
Key points include:
Adaptive Core (AMF Engine) – A dynamic framework that automatically adjusts for clearer long- and short-term opportunities and generates a robust tracking line.
Praetorian Guard – A built-in protective shield that activates in extreme conditions and helps stabilize performance when markets become turbulent.
Versatility – Effective across multiple timeframes, from scalping to swing trading, without constant parameter adjustments.
Clarity – Clear visual signals and color-coded monitoring for instant decision-making.
This strategy is designed for traders who want more than just entries and exits; it offers a command center for disciplined, adaptable, and resilient trading.
Disclaimer:
It should be noted that no strategy is guaranteed. This strategy does not provide buy-sell-hold advice. Responsibility rests with the user.
Version 2: Bugs overlooked in Version 1 have been corrected and improvements have been made.
Multiple Asset note_table Sections### Features
- **Expanded to 10 independent Sections**: Each Section has a title, content, and associated asset
- **Asset-based filtering**: Section only displays when the Section's asset name is empty or matches the current chart asset
- **Empty asset setting retained**: If Section asset name is left blank, that Section will display across all assets
- **Automatic display of current asset**: Current asset name is automatically shown in the header and footer
### Usage Instructions
1. Each Section can be assigned a specific asset name, such as "BTCUSDT", "ETHUSDT", etc.
2. A Section will only display when the current chart asset matches the asset specified for that Section
3. If you want a Section to display across all assets, simply leave the asset name blank for that Section
4. Each Section has independent title and content that can be customized as needed
5. When switching to different trading instruments, the indicator automatically displays notes relevant to the current instrument
TEMA Ribbon 9/13/15/21 – Smooth trend shifts, less lag, clearer“TEMA Ribbon 9/13/15/21 – Smooth trend shifts, less lag, clearer bias.”
Plots four Triple Exponential Moving Averages (9, 13, 15, 21) with shaded zones for quick trend visualization. Helps identify short- vs. medium-term momentum shifts with reduced lag compared to standard EMAs.
Recommended Usage:
Best applied on 5M–1H intraday charts for momentum and trend confirmation.
Use the 9 & 13 TEMA for short-term momentum shifts.
Use the 15 & 21 TEMA for medium-term bias.
Look for crossovers and alignment (all fast TEMAs above/below slow ones) to confirm bullish or bearish conditions.
Shaded zones help visualize when the short- and medium-term trends converge or diverge, signaling potential entry or exit points.
Combine the TEMA Ribbon with VWAP or session-based trading (e.g., London/New York Killzones) to filter signals.
Trade only in the direction of VWAP bias (price above VWAP → favor longs, below → favor shorts).
Within Killzones, use TEMA alignment (9/13 above 15/21 = bullish trend, or opposite for bearish) as confirmation before entries.
This reduces false signals and locks entries to periods of high liquidity and volatility, where TEMA shines.
//@version=5
indicator("TEMA 9/13/15/21", overlay=true)
// Quelle
src = close
// Funktion: TEMA
tema(src, length) =>
e1 = ta.ema(src, length)
e2 = ta.ema(e1, length)
e3 = ta.ema(e2, length)
3.0 * e1 - 3.0 * e2 + e3
// TEMA-Berechnung
t9 = tema(src, 9)
t13 = tema(src, 13)
t15 = tema(src, 15)
t21 = tema(src, 21)
// Plots
p9 = plot(t9, "TEMA 9", color=color.teal, linewidth=2)
p13 = plot(t13, "TEMA 13", color=color.aqua, linewidth=2)
p15 = plot(t15, "TEMA 15", color=color.orange, linewidth=2)
p21 = plot(t21, "TEMA 21", color=color.fuchsia, linewidth=2)
// Einfaches Fill (zwischen schnellstem und langsamstem)
fill(p9, p21, color=color.new(color.gray, 85))
fill(p13, p15, color=color.new(color.gray, 92))
3-Candle Swing Highs & Lows//@version=5
indicator("3-Candle Swing Highs & Lows", overlay=true, max_lines_count=1000)
// Inputs
highColor = input.color(color.red, "Swing High (Unbroken)")
highBreachCol = input.color(color.green, "Swing High (Breached)")
lowColor = input.color(color.blue, "Swing Low (Unbroken)")
lowBreachCol = input.color(color.orange, "Swing Low (Breached)")
// Arrays for storing lines and prices
var line highLines = array.new_line()
var float highPrices = array.new_float()
var line lowLines = array.new_line()
var float lowPrices = array.new_float()
// --- Swing High condition ---
// We check candle (the middle one) against candle and candle
isSwingHigh = high > high and high > high
// --- Swing Low condition ---
isSwingLow = low < low and low < low
// If swing high found (confirmed after bar closes)
if isSwingHigh
newHigh = line.new(bar_index - 1, high , bar_index, high , extend=extend.right, color=highColor, width=2)
array.push(highLines, newHigh)
array.push(highPrices, high )
// If swing low found (confirmed after bar closes)
if isSwingLow
newLow = line.new(bar_index - 1, low , bar_index, low , extend=extend.right, color=lowColor, width=2)
array.push(lowLines, newLow)
array.push(lowPrices, low )
// Update line colours for swing highs
for i = 0 to array.size(highLines) - 1
ln = array.get(highLines, i)
lvl = array.get(highPrices, i)
if close > lvl
line.set_color(ln, highBreachCol)
else
line.set_color(ln, highColor)
// Update line colours for swing lows
for i = 0 to array.size(lowLines) - 1
ln = array.get(lowLines, i)
lvl = array.get(lowPrices, i)
if close < lvl
line.set_color(ln, lowBreachCol)
else
line.set_color(ln, lowColor)
TRADE ORBIT:Dual MACD Histogram Background + Buy/SellDescription:
This indicator combines two MACD systems to provide clear trend, buy/sell signals, and identifies potential discount and premium zones for smarter entries and exits.
Features:
MACD #1 (100, 200, 50) – Trend & Background Coloring
Histogram > 0 → Green background (Bullish trend)
Histogram < 0 → Red background (Bearish trend)
MACD #2 (34, 144, 9) – Buy/Sell Signals
Buy Signal: Histogram crosses above zero and MACD #1 background is green
Sell Signal: Histogram crosses below zero and MACD #1 background is red
Signals are plotted as tiny labels directly on the chart
Discount & Premium Zones
Discount Zone: Price below MACD #1 slow EMA → highlighted in green
Premium Zone: Price above MACD #1 slow EMA → highlighted in red
Helps identify “cheap” (potential buy) and “expensive” (potential sell) areas relative to trend
Reference Plots (Optional)
MACD #1 & #2 histograms plotted as columns for visual confirmation
Usage:
Use MACD #1 background to identify the prevailing trend.
Wait for MACD #2 cross signals aligned with trend for buy/sell confirmation.
Discount and premium zones help time entries and exits more efficiently.
Ideal For:
Swing traders and position traders who want to combine trend-following signals with overbought/oversold zones.
BTCUSD Weekly Sell Signal – Visual Trade SetupThis indicator highlights a long-term SELL signal on BTCUSD (Bitcoin vs US Dollar) based on weekly chart structure.
Levels included:
— Entry: 11080
— Stop Loss: 11160
— Take Profits: 11040, 11000, 10960
A visual aid for swing traders to monitor bearish momentum on higher timeframes.
🟢 For educational use only.
❗ Always combine with your personal analysis and manage risk responsibly.
TRADE ORBIT:Dual MACD + HEMA TrendThis indicator combines dual MACD histograms with a Harmonic EMA (HEMA) trend overlay to provide comprehensive trend analysis, buy/sell signals, and dynamic support/resistance zones.
Features:
Dual MACD System:
Background Coloring: Uses MACD(100,200,50) histogram to color the chart background:
Green = bullish momentum
Red = bearish momentum
Buy/Sell Signals: Uses MACD(34,144,9) histogram crossovers for trade signals:
BUY Signal: Histogram crosses above zero and background is green
SELL Signal: Histogram crosses below zero and background is red
Signals are plotted as labels on the chart.
HEMA Trend Overlay:
Uses short and long HEMA lines (default 20 & 40) to detect trend direction.
Colors bars dynamically based on trend:
Green = bullish
Red = bearish
Gray = neutral or indecisive
Provides gradient fill between HEMA lines to visually highlight trend strength.
Trend Boxes & Markers:
Bullish/bearish boxes highlight areas of potential support/resistance based on HEMA crossovers.
Markers (▲ / ▼) appear when the price interacts with trend boxes for easy visual confirmation.
Alerts:
HEMA crossovers (bullish/bearish)
Price tests of bullish/bearish boxes
Optionally, can add alerts for MACD BUY/SELL signals.
Visualization:
MACD histograms plotted as columns for reference
Dynamic bar colors reflecting HEMA trend
Combined view gives a multi-layered trend analysis on a single chart.
Use Case:
Ideal for traders who want to filter trades by overall trend (background MACD), time precise entries/exits (MACD signals), and confirm trend strength (HEMA overlay) in a single indicator.
交易区本地时间This is a practical timezone display indicator designed specifically for forex and global market traders, showing real-time current times of three major financial centers in a clear table format at the top-right corner of the chart: Tokyo, New York, and London.
✨ Key Features
🗾 Tokyo Time - Asian trading session reference
🗽 New York Time - American trading session reference
🏛️ London Time - European trading session reference
📅 Complete Date & Time - Display format: MM-DD HH:MM
🔄 Automatic DST - Smart handling of daylight saving time transitions
🎨 Color Coding - Different colors for different timezone identification
⚡ Real-time Updates - Based on current timestamp, accurate with no delay
💼 Use Cases
Forex Traders - Track major financial center opening/closing times
Global Market Analysis - Understand market activity across different timezones
News Trading - Master timing of important economic data releases
Multi-timezone Coordination - Time management tool for international investors
这是一个专为外汇和全球市场交易者设计的实用时区显示指标,在图表右上角以清晰的表格形式实时显示三大主要金融中心的当前时间:东京、纽约和伦敦。
✨ 主要功能
🗾 东京时间 - 亚洲交易时段参考
🗽 纽约时间 - 美洲交易时段参考
🏛️ 伦敦时间 - 欧洲交易时段参考
📅 完整日期时间 - 显示格式:MM-DD HH:MM
🔄 自动夏令时 - 智能处理冬令时/夏令时切换
🎨 色彩区分 - 不同颜色标识不同时区
⚡ 实时更新 - 基于当前时间戳,准确无延迟
💼 适用场景
外汇交易者 - 把握各大金融中心开盘收盘时间
全球市场分析 - 了解不同时区的市场活跃度
新闻交易 - 掌握重要经济数据发布时间
多时区协调 - 国际投资者的时间管理工具
Marubozu Detector with Dynamic SL/TP
Strategy Overview:
This indicator detects a "Marubozu" bullish pattern or a “Marubozu” bearish pattern to suggest potential buy and sell opportunities. It uses dynamic Stop Loss (SL) and Take Profit (TP) management, based on either market volatility (ATR) or liquidity zones.
This tool is intended for educational and informational purposes only.
Key Features:
Entry: Based on detecting Marubozu bullish or bearish candle pattern.
Exit: Targets are managed through ATR multiples or previous liquidity levels (swing highs or swing lows).
Smart Liquidity: Optionally identify deeper liquidity targets.
Full Alerts: Buy and Sell signals supported with customizable alerts.
Visualized Trades: Entry, SL, and TP levels are plotted on the chart.
User Inputs:
ATR Length, ATR Multipliers
Take Profit Mode (Liquidity/ATR)
Swing Lookback and Strength
Toggleable Buy/Sell alerts
All Time Frames
📖 How to Use:
Add the Indicator:
Apply the script to your chart from the TradingView indicators panel.
Look for Buy Signals:
A buy signal is triggered when the script detects a "Marubozu" bullish pattern.
Entry, Stop Loss, and Take Profit levels are plotted automatically.
Look for Sell Signals:
A Sell signal is triggered when the script detects a "Marubozu" bearish pattern.
Entry, Stop Loss, and Take Profit levels are plotted automatically.
Choose Take Profit Mode:
ATR Mode: TP is based on a volatility target.
Liquidity Mode: TP is based on past swing highs.
Set Alerts (Optional):
Enable Buy/Sell alerts in the settings to receive real-time notifications.
Practice First:
Always backtest and paper trade before live use.
📜 Disclaimer:
This script does not offer financial advice.
No guarantees of profit or performance are made.
Use in demo accounts or backtesting first.
Always practice proper risk management and seek advice from licensed professionals if needed.
✅ Script Compliance:
This script is designed in full accordance with TradingView’s House Rules for educational tools.
No financial advice is provided, no performance is guaranteed, and users are encouraged to backtest thoroughly.
sHip Crypto Buy/Sell Pro BTC 15minThis is a 15min BTC buy sell indicator that is made by Ai. Have not tested yet but you can give it a go if you want.
Trading Sessions with Holidays & Timer🌍 Trading Sessions Matter
Markets breathe in cycles. When Tokyo, London, or New York steps in, liquidity shifts and price often reacts fast.
Example: New York closed BTC at $110K, and when traders woke up, the price was already $113K. That gap says everything about overnight pressure and the next move.
⚡ Indicator Features
✅ Session boxes (Tokyo, London, NY) with custom colors & time zones
✅ Open/close lines → spot gaps & momentum
✅ Average price per session → see where pressure builds
✅ Tick range → quick volatility check
✅ 🏖 Holiday markers → avoid false quiet markets
✅ Live status table → session OPEN / CLOSED + countdown timer
🚀 How to Use
Works on intraday timeframes (1m–4h)
Watch session opens/closes → liquidity shift points
Compare ranges & averages between Tokyo, London, NY
Use the timer to prep before the next wave
This tool helps you visualize the heartbeat of global markets session by session.
🔖 #BTCUSDT #Forex #TradingSessions #Crypto #DayTrading
Savitzky-Golay Hampel Filter | AlphaNattSavitzky-Golay Hampel Filter | AlphaNatt
A revolutionary indicator combining NASA's satellite data processing algorithms with robust statistical outlier detection to create the most scientifically advanced trend filter available on TradingView.
"This is the same mathematics that processes signals from the Hubble Space Telescope and analyzes data from the Large Hadron Collider - now applied to financial markets."
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 SCIENTIFIC PEDIGREE
Savitzky-Golay Filter Applications:
NASA: Satellite telemetry and space probe data processing
CERN: Particle physics data analysis at the LHC
Pharmaceutical: Chromatography and spectroscopy analysis
Astronomy: Processing signals from radio telescopes
Medical: ECG and EEG signal processing
Hampel Filter Usage:
Aerospace: Cleaning sensor data from aircraft and spacecraft
Manufacturing: Quality control in precision engineering
Seismology: Earthquake detection and analysis
Robotics: Sensor fusion and noise reduction
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧬 THE MATHEMATICS
1. Savitzky-Golay Filter
The SG filter performs local polynomial regression on data points:
Fits a polynomial of degree n to a sliding window of data
Evaluates the polynomial at the center point
Preserves higher moments (peaks, valleys) unlike moving averages
Maintains derivative information for true momentum analysis
Originally published in Analytical Chemistry (1964)
Mathematical Properties:
Optimal smoothing in the least-squares sense
Preserves statistical moments up to polynomial order
Exact derivative calculation without additional lag
Superior frequency response vs traditional filters
2. Hampel Filter
A robust outlier detector based on Median Absolute Deviation (MAD):
Identifies outliers using robust statistics
Replaces spurious values with polynomial-fitted estimates
Resistant to up to 50% contaminated data
MAD is 1.4826 times more robust than standard deviation
Outlier Detection Formula:
|x - median| > k × 1.4826 × MAD
Where k is the threshold parameter (typically 3 for 99.7% confidence)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💎 WHY THIS IS SUPERIOR
vs Moving Averages:
Preserves peaks and valleys (critical for catching tops/bottoms)
No lag penalty for smoothness
Maintains derivative information
Polynomial fitting > simple averaging
vs Other Filters:
Outlier immunity (Hampel component)
Scientifically optimal smoothing
Preserves higher-order features
Used in billion-dollar research projects
Unique Advantages:
Feature Preservation: Maintains market structure while smoothing
Spike Immunity: Ignores false breakouts and stop hunts
Derivative Accuracy: True momentum without additional indicators
Scientific Validation: 60+ years of academic research
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ PARAMETER OPTIMIZATION
1. Polynomial Order (2-5)
2 (Quadratic): Maximum smoothing, gentle curves
3 (Cubic): Balanced smoothing and responsiveness (recommended)
4-5 (Higher): More responsive, preserves more features
2. Window Size (7-51)
Must be odd number
Larger = smoother but more lag
Formula: 2×(desired smoothing period) + 1
Default 21 = analyzes 10 bars each side
3. Hampel Threshold (1.0-5.0)
1.0: Aggressive outlier removal (68% confidence)
2.0: Moderate outlier removal (95% confidence)
3.0: Conservative outlier removal (99.7% confidence) (default)
4.0+: Only extreme outliers removed
4. Final Smoothing (1-7)
Additional WMA smoothing after filtering
1 = No additional smoothing
3-5 = Recommended for most timeframes
7 = Ultra-smooth for position trading
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 TRADING STRATEGIES
Signal Recognition:
Cyan Line: Bullish trend with positive derivative
Pink Line: Bearish trend with negative derivative
Color Change: Trend reversal with polynomial confirmation
1. Trend Following Strategy
Enter when price crosses above cyan filter
Exit when filter turns pink
Use filter as dynamic stop loss
Best in trending markets
2. Mean Reversion Strategy
Enter long when price touches filter from below in uptrend
Enter short when price touches filter from above in downtrend
Exit at opposite band or filter color change
Excellent for range-bound markets
3. Derivative Strategy (Advanced)
The SG filter preserves derivative information
Acceleration = second derivative > 0
Enter on positive first derivative + positive acceleration
Exit on negative second derivative (momentum slowing)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 PERFORMANCE CHARACTERISTICS
Strengths:
Outlier Immunity: Ignores stop hunts and flash crashes
Feature Preservation: Catches tops/bottoms better than MAs
Smooth Output: Reduces whipsaws significantly
Scientific Basis: Not curve-fitted or optimized to markets
Considerations:
Slight lag in extreme volatility (all filters have this)
Requires odd window sizes (mathematical requirement)
More complex than simple moving averages
Best with liquid instruments
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 SCIENTIFIC BACKGROUND
Savitzky-Golay Publication:
"Smoothing and Differentiation of Data by Simplified Least Squares Procedures"
- Abraham Savitzky & Marcel Golay
- Analytical Chemistry, Vol. 36, No. 8, 1964
Hampel Filter Origin:
"Robust Statistics: The Approach Based on Influence Functions"
- Frank Hampel et al., 1986
- Princeton University Press
These techniques have been validated in thousands of scientific papers and are standard tools in:
NASA's Jet Propulsion Laboratory
European Space Agency
CERN (Large Hadron Collider)
MIT Lincoln Laboratory
Max Planck Institutes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 ADVANCED TIPS
News Trading: Lower Hampel threshold before major events to catch spikes
Scalping: Use Order=2 for maximum smoothness, Window=11 for responsiveness
Position Trading: Increase Window to 31+ for long-term trends
Combine with Volume: Strong trends need volume confirmation
Multiple Timeframes: Use daily for trend, hourly for entry
Watch the Derivative: Filter color changes when first derivative changes sign
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT NOTICES
Not financial advice - educational purposes only
Past performance does not guarantee future results
Always use proper risk management
Test settings on your specific instrument and timeframe
No indicator is perfect - part of complete trading system
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏆 CONCLUSION
The Savitzky-Golay Hampel Filter represents the pinnacle of scientific signal processing applied to financial markets. By combining polynomial regression with robust outlier detection, traders gain access to the same mathematical tools that:
Guide spacecraft to other planets
Detect gravitational waves from black holes
Analyze particle collisions at near light-speed
Process signals from deep space
This isn't just another indicator - it's rocket science for trading .
"When NASA needs to separate signal from noise in billion-dollar missions, they use these exact algorithms. Now you can too."
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Developed by AlphaNatt
Version: 1.0
Release: 2025
Pine Script: v6
"Where Space Technology Meets Market Analysis"
Not financial advice. Always DYOR
PCV (Darren.L-V2)Description:
This indicator combines Bollinger Bands, CCI, and RVI to help identify high-probability zones on M15 charts.
Features:
Bollinger Bands (BB) – displayed on the main chart in light gray. Helps visualize overbought and oversold price levels.
CCI ±100 levels + RVI – displayed in a separate sub-window:
CCI only shows the ±100 reference lines.
RVI displays a cyan main line and a red signal line.
Valid Zone Detection:
Candle closes outside the Bollinger Bands.
RVI crosses above +100 or below -100 (CCI level reference).
Candle closes back inside the BB, confirming a price rebound.
Requires two touches in the same direction to confirm the zone.
Only zones within 20–30 pips range are considered valid.
Usage:
Helps traders spot reversal or bounce zones with clear visual signals.
Suitable for all indices, Forex, and crypto on M15 timeframe.
VWAP Pro v6 (Color + Bands)AI helped me code VWAP
When price goes above VWAP line, VWAP line will turn green to indicate buyers are in control.
When price goes below VWAP line, VWAP line will turn red to indicate sellers are in control.
VWAP line stays blue when price is considered fair value.
Hilly's Advanced Crypto Scalping Strategy - 5 Min ChartTo determine the "best" input parameters for the Advanced Crypto Scalping Strategy on a 5-minute chart, we need to consider the goals of optimizing for profitability, minimizing false signals, and adapting to the volatile nature of cryptocurrencies. The default parameters in the script are a starting point, but the optimal values depend on the specific cryptocurrency pair, market conditions, and your risk tolerance. Below, I'll provide recommended input values based on common practices in crypto scalping, along with reasoning for each parameter. I’ll also suggest how to fine-tune them using TradingView’s backtesting and optimization tools.
Recommended Input Parameters
These values are tailored for a 5-minute chart for liquid cryptocurrencies like BTC/USD or ETH/USD on exchanges like Binance or Coinbase. They aim to balance signal frequency and accuracy for day trading.
Fast EMA Length (emaFastLen): 9
Reasoning: A 9-period EMA is commonly used in scalping to capture short-term price movements while remaining sensitive to recent price action. It reacts faster than the default 10, aligning with the 5-minute timeframe.
Slow EMA Length (emaSlowLen): 21
Reasoning: A 21-period EMA provides a good balance for identifying the broader trend on a 5-minute chart. It’s slightly longer than the default 20 to reduce noise while confirming the trend direction.
RSI Length (rsiLen): 14
Reasoning: The default 14-period RSI is a standard choice for momentum analysis. It works well for detecting overbought/oversold conditions without being too sensitive on short timeframes.
RSI Overbought (rsiOverbought): 75
Reasoning: Raising the overbought threshold to 75 (from 70) reduces false sell signals in strong bullish trends, which are common in crypto markets.
RSI Oversold (rsiOversold): 25
Reasoning: Lowering the oversold threshold to 25 (from 30) filters out weaker buy signals, ensuring entries occur during stronger reversals.
MACD Fast Length (macdFast): 12
Reasoning: The default 12-period fast EMA for MACD is effective for capturing short-term momentum shifts in crypto, aligning with scalping goals.
MACD Slow Length (macdSlow): 26
Reasoning: The default 26-period slow EMA is a standard setting that works well for confirming momentum trends without lagging too much.
MACD Signal Smoothing (macdSignal): 9
Reasoning: The default 9-period signal line is widely used and provides a good balance for smoothing MACD crossovers on a 5-minute chart.
Bollinger Bands Length (bbLen): 20
Reasoning: The default 20-period Bollinger Bands are effective for identifying volatility breakouts, which are key for scalping in crypto markets.
Bollinger Bands Multiplier (bbMult): 2.0
Reasoning: A 2.0 multiplier is standard and captures most price action within the bands. Increasing it to 2.5 could reduce signals but improve accuracy in highly volatile markets.
Stop Loss % (slPerc): 0.8%
Reasoning: A tighter stop loss of 0.8% (from 1.0%) suits the high volatility of crypto, helping to limit losses on false breakouts while keeping risk manageable.
Take Profit % (tpPerc): 1.5%
Reasoning: A 1.5% take-profit target (from 2.0%) aligns with scalping’s goal of capturing small, frequent gains. Crypto markets often see quick reversals, so a smaller target increases the likelihood of hitting profits.
Use Candlestick Patterns (useCandlePatterns): True
Reasoning: Enabling candlestick patterns (e.g., engulfing, hammer) adds confirmation to signals, reducing false entries in choppy markets.
Use Volume Filter (useVolumeFilter): True
Reasoning: The volume filter ensures signals occur during high-volume breakouts, which are more likely to sustain in crypto markets.
Signal Arrow Size (signalSize): 2.0
Reasoning: Increasing the arrow size to 2.0 (from 1.5) makes buy/sell signals more visible on the chart, especially on smaller screens or volatile price action.
Background Highlight Transparency (bgTransparency): 85
Reasoning: A slightly higher transparency (85 from 80) keeps the background highlights subtle but visible, avoiding chart clutter.
How to Apply These Parameters
Copy the Script: Use the Pine Script provided in the previous response.
Paste in TradingView: Open TradingView, go to the Pine Editor, paste the code, and click "Add to Chart."
Set Parameters: In the strategy settings, manually input the recommended values above or adjust them via the input fields.
Test on a 5-Minute Chart: Apply the strategy to a liquid crypto pair (e.g., BTC/USDT, ETH/USDT) on a 5-minute chart.
Fine-Tuning for Optimal Performance
To find the absolute best parameters for your specific trading pair and market conditions, use TradingView’s Strategy Tester and optimization features:
Backtesting:
Run the strategy on historical data for your chosen pair (e.g., BTC/USDT on Binance).
Check metrics like Net Profit, Profit Factor, Win Rate, and Max Drawdown in the Strategy Tester.
Focus on a sample period of at least 1–3 months to capture various market conditions (bull, bear, sideways).
Parameter Optimization:
In the Strategy Tester, click the settings gear next to the strategy name.
Enable optimization for key inputs like emaFastLen (test range: 7–12), emaSlowLen (15–25), slPerc (0.5–1.5), and tpPerc (1.0–3.0).
Run the optimization to find the combination with the highest net profit or best Sharpe ratio, but avoid over-optimization (curve-fitting) by testing on out-of-sample data.
Market-Specific Adjustments:
Volatile Pairs (e.g., DOGE/USDT): Use tighter stop losses (e.g., 0.5–0.7%) and smaller take-profit targets (e.g., 1.0–1.2%) to account for rapid price swings.
Stable Pairs (e.g., BTC/USDT): Slightly wider stop losses (e.g., 1.0–1.2%) and take-profit targets (e.g., 1.8–2.5%) may work better.
Trending Markets: Increase emaSlowLen (e.g., to 25–30) to follow stronger trends.
Choppy Markets: Tighten bbMult (e.g., to 1.8) and lower rsiOverbought/rsiOversold (e.g., to 70/30) to filter noise.
Forward Testing:
After backtesting, run the strategy in real-time on a demo account for 1–2 weeks to validate performance under current market conditions.
Important Notes
No Universal "Best" Numbers: Optimal parameters vary by crypto pair, exchange, and market conditions (e.g., bull vs. bear market). The suggested values are a starting point based on common scalping practices.
Risk Management: Never risk more than 1–2% of your account per trade. Adjust position sizing in TradingView’s strategy settings to align with your risk tolerance.
Market Volatility: Crypto markets are highly volatile. Test the strategy on your specific pair and adjust parameters if signals are too frequent or too rare.
Not Financial Advice: This is an educational tool. Backtest thoroughly and use a demo account before trading with real funds.
If you want me to generate a chart showing backtest performance for specific parameters or to tweak the script further (e.g., adding more indicators or adjusting signal logic), let me know!can you add clear buy ans sell signs above the candles in this codeTo add clear buy and sell signals above the candles in the provided Pine Script, I'll modify the existing code to include prominent text labels directly above (for sell signals) and below (for buy signals) the candles. These labels will be larger, color-coded, and positioned to avoid clutter, ensuring they are easily visible on the chart. The core strategy logic (EMA, RSI, MACD, Bollinger Bands, candlestick patterns, and volume filter) will remain unchanged, and I'll reuse the same artifact_id since this is an update to the previous script.AdvancedCryptoScalpingStrategy.pinex-pine
4H Candles High and Lows (#1-6) UTC - Last 32h - Colored BlocksThis script creates horizontal rays on the high and low in a 4 Hour period.
Trend Score HTF (Raw Data) Pine Screener📘 Trend Score HTF (Raw Data) Pine Screener — Indicator Guide
This indicator tracks price action using a custom cumulative Trend Score (TS) system. It helps you visualize trend momentum, detect early reversals, confirm direction changes, and screen for entries across large watchlists like SPX500 using TradingView’s Pine Script Screener (beta).
⸻
🔧 What This Indicator Does
• Assigns a +1 or -1 score when price breaks the previous high or low
• Accumulates these scores into a real-time tsScore
• Detects early warnings (primed flips) and trend changes (confirmed flips)
• Supports alerts and labels for visual and automated trading
• Designed to work inside the Pine Screener so you can filter hundreds of tickers live
⸻
⚙️ Recommended Settings (for Beginners)
When adding the indicator to your chart:
Go to the “Inputs” tab at the top of the settings panel.
Then:
• Uncheck “Confirm flips on bar close”
• Check “Accumulate TS Across Flips? (ON = non-reset, OFF = reset)”
This setup allows you to see trend changes immediately without waiting for bar closes and lets the trend score build continuously over time, making it easier to follow long trends.
⸻
🧠 Core Logic
Start Date
Select a meaningful historical start date — for example: 2020-01-01. This provides long-term context for trend score calculation.
Per-Bar Delta (Δ) Calculation
The indicator scores each bar based on breakout behavior:
If the bar breaks only the previous high, Δ = +1
If it breaks only the previous low, Δ = -1
If it breaks both the high and low, Δ = 0
If it breaks neither, Δ = 0
This filters out wide-range or indecisive candles during volatility.
Cumulative Trend Score
Each bar’s delta is added to the running tsScore.
When it rises, bullish pressure is building.
When it falls, bearish pressure is increasing.
Trend Flip Logic
A bullish flip happens when tsScore rises by +3 from the lowest recent point.
A bearish flip happens when tsScore falls by -3 from the highest recent point.
These flips update the active trend direction between bullish and bearish.
⸻
⚠️ What Is a “Primed” Flip?
A primed flip is a signal that the current trend is about to flip — just one point away.
A primed bullish flip means the trend is currently bearish, but the tsScore only needs +1 more to flip. If the next bar breaks the previous high (without breaking the low), it will trigger a bullish flip.
A primed bearish flip means the trend is currently bullish, but the tsScore only needs -1 more to flip. If the next bar breaks the previous low (without breaking the high), it will trigger a bearish flip.
Primed flips are plotted one bar ahead of the current bar. They act like forecasts and give you a head start.
⸻
✅ What Is a “Confirmed” Flip?
A confirmed flip is the first bar of a new trend direction.
A confirmed bullish flip appears when a bearish trend officially flips into a new bullish trend.
A confirmed bearish flip appears when a bullish trend officially flips into a new bearish trend.
These signals are reliable and great for entries, trend filters, or reversals.
⸻
🖼 Visual Cues
The trend score (tsScore) line shows the accumulated trend strength.
A Δ histogram shows the daily price contribution: +1 for breaking highs, -1 for breaking lows, 0 otherwise.
A green background means the chart is in a bullish trend.
A red background means the chart is in a bearish trend.
A ⬆ label signals a primed bullish flip is possible on the next bar.
A ⬇ label signals a primed bearish flip is possible on the next bar.
A ✅ means a bullish flip just confirmed.
A ❌ means a bearish flip just confirmed.
⸻
🔔 Alerts You Can Use
The indicator includes these built-in alerts:
• Primed Bullish Flip — watch for possible bullish reversal tomorrow
• Primed Bearish Flip — watch for possible bearish reversal tomorrow
• Bullish Confirmed — official entry into new uptrend
• Bearish Confirmed — official entry into new downtrend
You can set these alerts in TradingView to monitor across your chart or watchlist.
⸻
📈 How to Use in TradingView Pine Screener
Step 1: Create your own watchlist — for example, SPX500
Step 2: Favorite this indicator so it shows up in the screener
Step 3: Go to TradingView → Products → Screeners → Pine (Beta)
Step 4: Select this indicator and choose a condition, like “Bullish Confirmed”
Step 5: Click Scan
You’ll instantly see stocks that just flipped trends or are close to doing so.
⸻
⏰ When to Use the Screener
Use this screener after market close or before the next open to avoid intraday noise.
During the day, if a candle breaks both the high and low, the delta becomes 0, which may cancel a flip or primed signal.
Results during regular trading hours can change frequently. For best results, scan during stable periods like pre-market or after-hours.
⸻
🧪 Real-World Examples
SWK
NVR
WMT
UNH
Each of these examples shows clean, structured trend transitions detected in advance or confirmed with precision.
PLTR: complicated case primed for bullish (but we don't when it will flip)
⚠️ Risk Disclaimer & Trend Context
A confirmed bullish signal does not guarantee an immediate price increase. Price may continue to consolidate or even pull back after a bullish flip.
Likewise, a primed bullish signal does not always lead to confirmation. It simply means the conditions are close — but if the next bar breaks both the high and low, or breaks only the low, the flip will be canceled.
On the other side, a confirmed bearish signal does not mean the market will crash. If the overall trend is bullish (for example, tsScore has been rising for weeks), then a bearish flip may just represent a short-term pullback — not a trend reversal.
You always need to consider the overall market structure. If the long-term trend is bullish, it’s usually smarter to wait for bullish confirmation signals. Bearish flips in that context are often just dips — not opportunities to short.
This indicator gives you context, not predictions. It’s a tool for alignment — not absolute outcomes. Use it to follow structure, not fight it.
Shade 4H Blocks PSTShades a 4H timeframe intraday. The purpose is to remind me what 4H candle I am operating in without having to manually mark it on the lower-timeframe charts I am watching.
4H Weekly Candle Counter - Increments from Sunday until Friday This script will count the first 4H candle close on Sunday all the way until the final candle of the week on Friday.