Futures Trade Entry Indicator (MTF)Work in Progress with the help of Claude. Not ready for active trading. Public for help improving. This will be a multi-timeframe futures trading indicator with supply/demand zones, Fair Value Gaps (FVGs), and sophisticated entry/exit logic.I've created a comprehensive Pine Script v6 indicator that matches all your specifications! Here's what the script includes:
## **Key Features Implemented:**
### **🔄 Multi-Timeframe Logic**
- **1H Chart Data**: Detects Supply Zones, Demand Zones, and Fair Value Gaps
- **Current Timeframe**: Monitors for re-entry and confirmation signals
### **📊 Zone Detection**
- **Supply Zones**: Identified using pivot highs with configurable strength
- **Demand Zones**: Identified using pivot lows with touch validation
- **Fair Value Gaps**: Both bullish and bearish FVGs detected automatically
- **Auto-Expiry**: Zones expire after 24 hours (configurable)
### **⚡ Entry Logic**
- **Dual Confirmation Required**:
- ✅ Engulfing candle pattern (bullish/bearish)
- ✅ Market structure shift (HH→LL or LL→HH)
- **Zone Re-entry**: Price must be within identified zones/FVGs
### **🎯 Probability System**
- **Smart Scoring**: Based on zone age, strength, and risk/reward ratio
- **Color-Coded**: Green (High), Yellow (Medium), Red (Low)
- **Real-time Calculation**: Updates with each potential entry
### **🎨 Visual Elements**
- **Colored Zones**: Supply (red), Demand (green), FVGs (blue/orange)
- **Entry Labels**: 🟩 LONG / 🟥 SHORT markers
- **Probability Labels**: Display confidence levels
- **Confirmation Shapes**: Triangle indicators for pattern completion
### **⚙️ Manual Controls**
All the requested toggles are available in the settings panel:
- Show/Hide Supply Zones
- Show/Hide Demand Zones
- Show/Hide FVGs
- Show/Hide Labels
- Show/Hide Probability
- Zone strength and expiry settings
- Custom colors for all elements
### **🔔 Alert System**
- Entry opportunity alerts
- Includes probability assessment
- Ticker symbol identification
## **Usage Instructions:**
1. **Apply to 15m chart** for active trading signals
2. **Configure settings** based on your preferences
3. **Set up alerts** for automated notifications
4. **Monitor probability levels** for trade quality assessment
The script automatically handles the complex multi-timeframe analysis while keeping the interface clean and user-friendly. All zones update dynamically and expire appropriately to avoid clutter.
Would you like me to adjust any specific parameters or add additional features?
Bands and Channels
Vertical Time Marker Configurable (VTMC)# Vertical Time Marker Configurable (VTMC)
## Overview
The Vertical Time Marker Configurable (VTMC) is a powerful PineScript v6 indicator designed to help traders quickly identify key market times across their entire chart history. Instead of hovering over candles to check timestamps, VTMC draws clear vertical lines with customizable labels at your specified times, making it easy to spot important market sessions, news events, or personal trading windows at a glance.
## Key Features
### ⏰ Flexible Time Selection
- Set any time using an intuitive time picker (defaults to 8:30 AM Central Time)
- Automatically draws lines at your specified time across all historical data
- Perfect for marking market opens, closes, news releases, or personal trading times
### 🎨 Full Visual Customization
- **Line Color**: Choose any color (defaults to white for maximum visibility)
- **Line Style**: Solid, dashed, or dotted options
- **Line Width**: Adjustable from 1-10 pixels
- **Opacity Control**: Precise opacity slider (0-100%) for both line and text
### 🏷️ Smart Text Labels
- **Preset Options**: New York Open, New York Close, London Open, London Close, Asia Open, Asia Close
- **Custom Labels**: Enter any text for personalized marking (news events, trading windows, etc.)
- **Configurable Text**: Adjustable size (8-20px), color, and opacity
- **Smart Positioning**: Text appears just above the price action for clear visibility
### 📊 Professional Display
- Lines extend fully from top to bottom of chart
- Clean, non-intrusive design that doesn't clutter your analysis
- Works on any timeframe and market
- Historical lines persist across all chart data
## Perfect For
### Market Session Traders
- Mark key session opens and closes
- Identify overlap periods between major markets
- Track session-specific price behavior patterns
### News Traders
- Mark important economic releases (FOMC, NFP, etc.)
- Create visual reminders for scheduled events
- Track market reaction patterns around news times
### Institutional Flow Traders
- Identify key institutional activity times
- Mark order block formation periods
- Track smart money movement windows
### Personal Trading Systems
- Mark your optimal trading hours
- Create visual discipline for trading windows
- Track performance during specific time periods
## Why VTMC?
Unlike hardcoded session indicators that only work for specific markets, VTMC gives you complete flexibility to mark ANY time that matters to your trading strategy. Whether you're tracking "MY Trading Window" from 9:30-10:30 AM or marking custom news events, VTMC adapts to your specific needs.
The indicator eliminates the constant need to hover over candles to check times, instead providing instant visual reference points across your entire chart. This makes pattern recognition, backtesting, and trade timing significantly more efficient.
## Usage Tips
- Use multiple instances for different time zones or events
- Combine with other indicators for comprehensive market timing
- Customize colors to match your chart theme
- Use custom labels for personalized trading reminders
*Built with precision in PineScript v6 for reliable performance and modern TradingView compatibility.*
EMA Crossover Visual Setup (RS Clásico Confirmado)Overview
This script is designed to visually highlight classic swing trading setups based on the crossover of exponential moving averages (EMAs), with additional confirmation using Relative Strength (RS) compared to a benchmark asset (e.g., SPY).
The goal is to identify bullish momentum shifts that align both with technical structure (EMA crossover) and relative outperformance, helping traders focus on strong stocks in strong markets.
Logic
A signal is triggered when the following conditions are met:
The fast EMA (e.g., 10) crosses above the slow EMA (e.g., 20).
The closing price is above a third EMA (e.g., 50) to confirm bullish structure.
The asset's Relative Strength (RS) versus a benchmark is confirmed manually, based on an RSI comparison (not calculated inside the script).
The script is meant to be used alongside manual RS confirmation, using a secondary chart or overlay of the RS ratio.
Features
Visual labels and markers for clean charting of valid entry setups
Fully customizable EMA lengths
Optional highlighting of candle patterns near entry
Ideal for use with top-down analysis and watchlist filtering
Suggested Use
Works best on daily and 4H charts for swing trading setups
Combine with volume and price action analysis for higher probability trades
Use manual RS validation: confirm that the RSI of the selected stock is stronger than the RSI of SPY (or any benchmark of your choice)
Notes
This script does not execute trades or include stop loss/take profit logic, as it is intended for discretionary traders who want to visually scan for opportunities.
It also does not calculate RS internally, allowing flexibility in how you define strength (RS line, RSI comparison, or price ratio).
Setup: Smooth Gaussian + Adaptive Supertrend (Manual Vol)Overview
This strategy combines two powerful trend-based tools originally developed by Algo Alpha: the Smooth Gaussian Trend (simulated) and the Adaptive Supertrend. The objective is to capture sustained bullish movements in periods of controlled volatility by filtering for high-probability entries.
Entry Logic
Long Entry Conditions:
The closing price is above the Smooth Gaussian Trend line (with length = 75), and
The volatility setting from the Adaptive Supertrend is manually defined as either 2 or 3
Exit Condition:
The closing price falls below the Smooth Gaussian Trend line
This script uses a simulated version of the Gaussian Trend line via double-smoothed SMA, as the original Algo Alpha indicator is protected and cannot be accessed directly in code.
Features
Plots entry and exit signals directly on the chart
Manual toggle to enable or disable the volatility filter
Lightweight design to allow flexible backtesting even without access to proprietary indicators
Important Note
This strategy does not connect to the actual Adaptive Supertrend from Algo Alpha. Users must manually input the volatility level based on what they observe on the chart when the original indicator is also applied. The Smooth Gaussian Trend is approximated and may differ slightly from the original.
Suggested Use
Recommended timeframes: 1H, 4H, or Daily
Best used alongside the original indicators displayed on the chart
Consider incorporating additional structure, momentum, or volume filters to enhance performance
If you have suggestions or would like to contribute improvements, feel free to reach out or fork the script.
Multi-Timeframe TrendBelow is a PineScript that calculates the trend for multiple timeframes (5 minutes, 15 minutes, 1 hour, 4 hours, and daily) using the Relative Strength Index (RSI) and Moving Averages (MA) to determine bullish, bearish, or neutral trends. The script displays the trend information on the TradingView chart using a table.
Super-Elliptic BandsThe core of the "Super-Elliptic Bands" indicator lies in its use of a super-ellipse mathematical model to create dynamic price bands around a central Simple Moving Average (SMA). Here's a concise breakdown of its essential components:
Central Moving Average (MA):
A Simple Moving Average (ta.sma(close, maLen)) serves as the baseline, anchoring the bands to the average price over a user-defined period (default: 50 bars).
Super-Ellipse Formula:
The bands are generated using the super-ellipse equation: |y/b| = (1 - |x/a|^p)^(1/p), where:
x is a normalized bar index based on a user-defined cycle period (periodBase, default: 64), scaled to range from -1 to +1.
a = 1 (fixed semi-major axis).
b is the volatility-based semi-minor axis, calculated as volRaw * mult, where volRaw comes from ta.stdev, ta.atr, or ta.tr (user-selectable).
p (shapeP, default: 2.0) controls the band shape:
p = 2: Elliptical bands.
p < 2: Pointier, diamond-like shapes.
p > 2: Flatter, rectangular-like shapes.
This formula creates bands that dynamically adjust their width and shape based on price volatility and a cyclical component.
enjoy....
Venkat Sir RSI 38Here's a Pine Script (TradingView) code that does the following:
Uses the RSI indicator (Relative Strength Index).
Watches for RSI crossing below level 38 and then crossing above 38.
When RSI crosses above 38 (after having gone below), it plots a green triangle-up symbol above the candle that triggered the cross.
Flexi MA Heat ZonesOverview
Flexi MA Heat Zones is a powerful multi-timeframe visualization tool that helps traders easily identify trend strength, direction, and potential zones of confluence using multiple moving averages and dynamic heatmaps. The indicator plots up to three pairs of customizable moving averages, with color-coded heat zones to highlight bullish and bearish conditions at a glance.
Whether you're a trend follower, mean-reversion trader, or looking for visual confirmation zones, this indicator is designed to offer deep insights with high customizability.
⚙️ Key Features
🔄 Supports multiple MA types: Choose from EMA, SMA, WMA, VWMA to suit your strategy.
🎯 Six moving averages: Three MA pairs (MA1-MA2, MA3-MA4, MA5-MA6), each with independent lengths and colors.
🌈 Heatmap Zones: Dynamic fills between MA pairs, changing color based on bullish or bearish alignment.
👁️🗨️ Full customization: Enable/disable any MA pair and its heatmap zone from the settings.
🪞 Transparency controls: Adjust the visibility of heat zones for clarity or stylistic preference.
🎨 Color-coded for clarity: Bullish and bearish colors for each heat zone pair, fully user-configurable.
🧩 Efficient layout: Smart use of grouped inputs for easier configuration and visibility management.
📈 How to Use
Use the MA1–MA2 and MA3–MA4 zones for longer-term trend tracking and confluence analysis.
Use the faster MA5–MA6 zone for short-term micro-trend identification or scalping.
When a faster MA is above the slower one within a pair, the fill turns bullish (user-defined color).
When the faster MA is below the slower one, the fill turns bearish.
Combine with price action or other indicators for entry/exit confirmation.
🧠 Pro Tips
For trend-following strategies, consider using EMA or WMA types.
For mean-reversion or support/resistance zones, SMA and VWMA may offer better zone clarity.
Overlay with RSI, MACD, or custom entry signals for higher confidence setups.
Use different heatmap transparencies to visually separate overlapping MA zones.
Support/Resistance MTF Merge ZonesIndicator Introduction
Support/Resistance MTF Merge Zones is an advanced technical analysis tool that automatically identifies and merges key support/resistance zones by analyzing highs and lows from multiple timeframes (15M, 1H, 4H, Daily).
Key Features
Multi-Timeframe Analysis: Integrates data from 15M, 1H, 4H, and Daily charts
Smart Zone Merging: Automatically consolidates levels within a specified percentage range into unified zones
Dynamic Color System: Distinguishes support/resistance zones based on position relative to current price
Strength Indication: Highlights zones where multiple levels converge as strong zones
Usage Guide
Configuration Parameters
Lookback Period (10): Period for calculating highs/lows
Adjustable range: 5-30
Higher values detect more long-term levels
Zone Merge % (0.5): Percentage threshold for zone merging
Range: 0.1-2.0%
Higher values merge levels across wider price ranges
Min Levels for Zone (2): Minimum number of levels required to form a zone
Range: 2-5 levels
Higher values display only more confirmed zones
Box Opacity (7): Transparency level of zone boxes
Range: 0-100%
Color Scheme
Red: Resistance zones above current price
Blue: Support zones below current price
Orange: Strong zones (3+ merged levels)
Zone Shift [ChartPrime]⯁ OVERVIEW
Zone Shift is a dynamic trend detection tool that uses EMA/HMA-based bands to determine trend shifts and plot key reaction levels. It highlights trend direction through colored candles and marks important retests with visual cues to help traders stay aligned with momentum.
⯁ KEY FEATURES
Dynamic EMA-HMA Band:
Creates a three-line channel using the average of an EMA and HMA for the midline, and expands it using average candle range to form upper and lower bounds. This band visually adapts to market volatility.
float ema = ta.ema(close, length)
float hma = ta.hma(close, length-40)
float dist = ta.sma(high-low, 200)
float mid = math.avg(ema, hma)
float top = mid + dist
float bot = mid - dist
Trend Detection (Band Cross Logic):
Detects an uptrend when the Low crosses above the top band.
Detects a downtrend when the High crosses below the bottom band.
Bars change color to lime for uptrends and blue for downtrends.
Trend Initiation Level:
At the start of a new trend, the indicator locks in the extreme point (low for uptrend, high for downtrend) and plots a dashed horizontal level, serving as a potential retest zone.
Trend Retest Signal:
If price crosses back over the Trend Initiation level in the direction of the trend, a diamond label (⯁) is plotted at the retest point — confirming that price is revisiting a key shift level.
Visual Band Layout:
Midline: Dashed line shows the average of EMA and HMA.
Top/Bottom: Solid lines showing dynamic thresholds above/below the midline.
These help visualize compression, expansion, and possible breakout zones.
Color-Based Candle Plotting:
Candles are recolored in real time according to the current trend, allowing instant visual alignment with the market’s directional bias.
Noise-Filtered Retests:
To avoid repetitive signals, retests are only marked if they occur more than 5 bars after the previous one — filtering out minor fluctuations.
⯁ USAGE
Use colored candles to align trades with the dominant trend.
Treat dashed trendStart levels as important support/resistance zones.
Watch for ⯁ diamond labels as confirmation of retests for continuation or entry.
Use band boundaries to assess trend strength and volatility expansion.
Combine with your existing setups to validate momentum and zone shifts.
⯁ CONCLUSION
Zone Shift helps traders visually capture trend changes and key reaction points with precision. By combining band breakouts with real-time retest signals and trend-colored candles, this tool simplifies the process of reading market structure shifts and identifying high-confluence entry areas.
Corys Buy and SellThe Cory’s Buy and Sell indicator is an advanced, all-in-one trading toolkit that combines dynamic trend detection, volatility breakout alerts, and visual EMA strength to help traders confidently identify high-probability buy and sell opportunities.
🔍 Key Features:
Adaptive Supertrend Engine
Powered by a modified Keltner Channel, this trend-following algorithm generates timely BUY 🚀 and SELL 😡 signals based on market momentum and volatility, with adjustable sensitivity and factor settings for full control.
EMA Energy Bands (Optional)
A cascade of 15 EMAs (from 9 to 51 periods) visually maps market energy. Colours shift from green (bullish) to red (bearish), showing short- to medium-term trend strength at a glance.
Trend Catcher Overlay
Highlights major shifts in trend using a fast/slow EMA crossover (10 vs 20 EMA). Bars are coloured to reflect bullish reversals for added confidence.
Pullback Signal Detection
Identifies bullish pullback opportunities when price reclaims key EMA levels after a crossover, marked with a green triangle for entry timing.
Built-in Range Detection System
Automatically highlights price consolidation zones using ATR-based logic. When price breaks above or below the detected range, the zone changes colour (green for breakout up, red for breakdown), helping traders spot breakout opportunities.
Smart Labels & Alerts
Instant BUY/SELL labels on the chart and built-in alert conditions make this indicator suitable for both discretionary and automated trading strategies.
⚙️ Customisable Inputs:
Sensitivity (for trend signals)
EMA Energy toggle
Keltner & ATR Lengths
Range Detection parameters and styling
Best For: Trend traders, breakout traders, and swing traders looking for a clean, powerful overlay that combines momentum, structure, and volatility in one tool.
Fractal Support and Resistance [BigBeluga]🔵 OVERVIEW
The Fractal Support and Resistance indicator automatically identifies high-probability support and resistance zones based on repeated fractal touches. When a defined number of fractal highs or lows cluster around the same price zone, the indicator plots a clean horizontal level and shaded zone, helping traders visualize structurally important areas where price may react.
🔵 CONCEPTS
Fractal Points: Swing highs and lows based on user-defined left and right range (length). A valid fractal forms only when the center candle is higher or lower than its neighbors.
Zone Validation: A level is only confirmed when the price has printed the specified number of fractals (e.g., 3) within a narrow ATR-defined range.
Dynamic Zone Calculation: The plotted level can be based on the average of clustered fractals or on the extreme value (min or max), depending on the user’s choice.
Support/Resistance Zones: Once a zone is validated, a horizontal line and shaded box are drawn and automatically extended into the future until new valid clusters form.
Auto-Clean & Reactivity: Each zone persists until replaced by a new fractal cluster, ensuring the chart remains uncluttered and adaptive.
🔵 FEATURES
Detects swing fractals using adjustable left/right range.
Confirms zones when a defined number of fractals occur near the same price.
Plots horizontal level and shaded box for visual clarity.
Choice between average or min/max logic for level calculation.
Distinct color inputs for support (green) and resistance (orange) zones.
Adaptive auto-extension keeps valid zones projected into the future.
Displays optional triangle markers above/below bars where fractals form.
Clean design optimized for structural S/R analysis.
🔵 HOW TO USE
Use support zones (from low fractals) to look for potential long entries or bounce points .
Use resistance zones (from high fractals) to look for short setups or rejections .
Adjust the Fractals Qty to make zones more or less strict—e.g., 3 for higher reliability, 2 for quicker responsiveness.
Combine with liquidity indicators or break/retest logic to validate zone strength.
Toggle between average and min/max mode to fit your style (average for balance, extremes for aggression).
🔵 CONCLUSION
Fractal Support and Resistance offers a robust way to identify hidden levels that the market respects repeatedly. By requiring multiple fractal confirmations within a zone, it filters out noise and highlights clean structural areas of interest. This tool is ideal for traders who want automatic, adaptive, and reliable S/R levels grounded in raw market structure.
Smart Money Breakout Channels [AlgoAlpha]🟠 OVERVIEW
This script draws breakout detection zones called “Smart Money Breakout Channels” based on volatility-normalized price movement and visualizes them as dynamic boxes with volume overlays. It identifies temporary accumulation or distribution ranges using a custom normalized volatility metric and tracks when price breaks out of those zones—either upward or downward. Each channel represents a structured range where smart money may be active, helping traders anticipate key breakouts with added context from volume delta, up/down volume, and a visual gradient gauge for momentum bias.
🟠 CONCEPTS
The script calculates normalized price volatility by measuring the standard deviation of price mapped to a scale using the highest and lowest prices over a set lookback period. When normalized volatility reaches a local low and flips upward, a boxed channel is drawn between the highest and lowest prices in that zone. These boxes persist until price breaks out, either with a strong candle close (configurable) or by touching the boundary. Volume analysis enhances interpretation by rendering delta bars inside the box, showing volume distribution during the channel. Additionally, a real-time visual “gauge” shows where volume delta sits within the channel range, helping users spot pressure imbalances.
🟠 FEATURES
Automatic detection and drawing of breakout channels based on volatility-normalized price pivots.
Optional nested channels to allow multiple simultaneous zones or a clean single-zone view.
Gradient-filled volume gauge with dynamic pointer to show current delta pressure within the box.
Three volume visualization modes: raw volume, comparative up/down volume, and delta.
Alerts for new channel creation and confirmed bullish or bearish breakouts.
🟠 USAGE
Apply the indicator to any chart. Wait for a new breakout box to form—this occurs when volatility behavior shifts and a stable range emerges. Once a box appears, monitor price relative to its boundaries. A breakout above suggests bullish continuation, below suggests bearish continuation; signals are stronger when “Strong Closes Only” is enabled.
Watch the internal volume candles to understand where buy/sell pressure is concentrated during the box. Use the gauge on the right to interpret whether net pressure is building upward or downward before breakout to anticipate the direction.
Use alerts to catch breakout events without needing to monitor the chart constantly 🚨.
XAUUSD SMC Strategy (FVG + BoS)This advanced TradingView strategy is built for serious traders who follow Smart Money Concepts (SMC), with a special focus on Fair Value Gaps (FVG) and Break of Structure (BoS). The script automates trade entries and visual signals based on clean price action, while also allowing for performance backtesting through the built-in Strategy Tester.
The purpose of this script is to combine high-probability SMC signals with a clear and flexible backtest engine. Traders can visually confirm institutional moves (like imbalances and structure breaks) while simultaneously analyzing strategy performance, risk-reward, and execution logic — all from one chart.
⚙️ Key Features
FVG Detection: Automatically identifies bullish and bearish fair value gaps, highlighting imbalance zones between institutional buying and selling activity.
Break of Structure (BoS): Clearly shows bullish and bearish structure breaks, helping traders confirm directional bias and spot trend shifts with clarity.
Trade Execution Logic: Designed with actual strategy.entry() and strategy.exit() functions, this script simulates trades using risk-controlled logic with stop loss and take profit targeting.
Spaced Signal Visualization: Avoids chart clutter by spacing FVG and BoS signals, making the visual output clean and readable — even on fast-moving charts like XAUUSD.
Risk-Reward Customization: Easily set your own risk:reward ratio and stop-loss buffer, ensuring each trade is simulated according to your personal strategy or trading plan.
Cool-Down System: Add a delay between trades using the “Bars Between Trades” setting to prevent overtrading during volatile periods.
Live and Historical Insights: Signals appear in real-time, while also being plotted historically — making it easy to scroll back and study how the market behaved under this logic.
Fully Editable Parameters: Customize FVG size, structure lookback, spacing intervals, and more to fit your unique interpretation of SMC methodology.
🧠 How It Works
This strategy combines two key concepts:
FVG (Fair Value Gaps): Price zones where the market moved too quickly and left an imbalance between buyers and sellers. These gaps often act as magnets for price or areas of reversal.
BoS (Break of Structure): Points where the price breaks through a significant high or low, indicating a potential shift in market direction.
When both FVG and BoS align under certain conditions — and the cooldown requirement is satisfied — the strategy places a trade. A take profit and stop loss are automatically applied based on your inputs.
📈 Practical Use Cases
Trend Confirmation: Use BoS signals to validate trend continuation trades, especially when FVG confirms the imbalance.
Reversal Zones: Spot potential turning points when price fills an FVG and breaks previous structure in the opposite direction.
Backtest SMC Logic: Validate your theory by testing this strategy over historical XAUUSD data using real stop loss / take profit logic.
Refine Entry Timing: Study how structure breaks and FVGs align in different timeframes to improve entry precision.
💡 Best For
Traders learning or mastering Smart Money Concepts
Price action purists who avoid indicators
XAUUSD scalpers, day traders, or swing traders
Strategy developers who want visual + backtested confirmation
📌 Notes
The default strategy places trades every 10 candles to ensure the engine runs — replace this with your refined FVG + BoS logic as needed.
Works best on Gold (XAUUSD) 4H, 1H, or 15m timeframes depending on volatility and structure spacing.
🔒 Disclaimer
This strategy is for educational purposes only. It does not constitute financial advice. Always test and validate any trading logic before applying it to a live market. Trading carries risk — use proper risk management.
Trigonometric Sine Cosine WavesTrigonometric Sine Cosine Waves - Advanced Cyclical Analysis
Overview
This innovative indicator applies trigonometric mathematics to market analysis, generating dynamic sine and cosine waves that adapt to price movement and volatility. Unlike traditional oscillators, this tool visualizes market cycles directly on your chart using mathematical wave functions.
How It Works
The indicator calculates phase-based waves using:
• Phase Calculation: 2π × bar_index / cycle_length
• Adaptive Amplitude: EMA-based price + ATR volatility scaling
• Sine Wave: avgPrice + volatility × sin(phase)
• Cosine Wave: avgPrice + volatility × cos(phase)
Key Features
Dynamic Wave Generation
• Sine Wave: Primary cycle indicator with smooth transitions
• Cosine Wave: Leading indicator (90° phase difference from sine)
• Adaptive Amplitude: Automatically adjusts to market volatility using ATR
Turning Point Detection
• Anti-Repaint Signals: Uses confirmed values from previous bars
• Sine Bottom: Potential buy zones when wave transitions from down to up
• Sine Top: Potential sell zones when wave transitions from up to down
Advanced Analytics
• Price Correlation Angle: Shows relationship between price movement and cycle
• Phase Information: Current position in the mathematical cycle
• Real-time Values: Live sine/cosine values and phase degrees
Visual Enhancement
• Background Coloring: Changes based on sine wave position (above/below zero)
• Clean Overlay: Waves plot directly on price chart without cluttering
Parameters
• Cycle Length (5-200): Controls wave frequency - shorter = more sensitive
• Amplitude Multiplier (0.1-5.0): Adjusts wave height relative to volatility
• Display Options : Toggle sine wave, cosine wave, and correlation table
• Show Correlation : Optional table showing mathematical values
Trading Applications
Cycle Analysis
• Identify market rhythm and timing
• Spot potential reversal zones
• Understand price-to-cycle relationships
Entry/Exit Timing
• Buy Signals: Sine wave bottoms (cycle lows)
• Sell Signals: Sine wave tops (cycle highs)
• Confirmation: Use with other indicators for higher probability setups
Market Structure
• Visualize underlying market cycles
• Identify periods of high/low cyclical activity
• Track phase relationships between price and mathematical cycles
Pro Tips
1. Longer cycles (50-100) work better for swing trading
2. Shorter cycles (10-20) suitable for scalping
3. Combine with volume for stronger signal confirmation
4. Monitor correlation angle for trend strength assessment
5. Use background color as quick visual cycle reference
Important Notes
• Signals are anti-repaint using confirmed previous bar values
• Best used in trending or cyclical markets
• Consider market context when interpreting signals
• Mathematical approach - not based on traditional TA concepts
Alerts Included
• Sine Wave Buy Signal: Triggered on wave bottom detection
• Sine Wave Sell Signal: Triggered on wave top detection
Technical Requirements
• Pine Script v6
• Works on all timeframes
• No external dependencies
• Optimized for performance
This is a free, open-source indicator. Feel free to modify and improve according to your trading needs!
Educational Value: Perfect for understanding how mathematical functions can be applied to market analysis and cycle detection.
🧠 Blackbox Alpha v6 (Buy/Sell Only)Blackbox Alpha v6 Strategy – Institutional-Grade Intraday Trading
Overview:
The Blackbox Alpha v6 is a precision-engineered intraday trading strategy inspired by the world's top 0.1% traders — including philosophies from Jim Simons, Mark Minervini, Stefan Salomon, and Stanley Druckenmiller. It is designed to deliver ultra-high-probability Buy/Sell signals by using a multi-layered confirmation model that runs entirely in the background. Only confirmed signals appear on the chart – no noise, no clutter.
🔍 Core Strategy Logic
This strategy generates a Buy or Sell entry only when all of the following conditions are met:
✅ Trend Confirmation
EMA 20 > EMA 50 (bullish trend)
ADX > 20 (trend strength)
RSI confirms momentum direction
📊 Volume Validation
Volume spike above 20-period average × multiplier
Volume Climax (highest volume in last 10 candles)
Relative Volume Index (RVI) > 1.5
🎯 Price Structure + Pattern Recognition
Price near Fibonacci retracement zones (0.382 for Buy, 0.618 for Sell)
Bullish/Bearish engulfing candle pattern as trigger
🧠 Institutional Bias
Price must be above Anchored VWAP (Buy) or below (Sell)
Must be within predefined order block zones (smart money behavior)
📈 Signal Behavior
Buy Signal: Only appears when all trend, volume, price action, and institutional filters confirm.
Sell Signal: Same logic, mirrored for bearish market conditions.
Visualization: Minimalist – only Buy (green triangle) and Sell (red triangle) arrows.
🧪 Backtest Engine
Fully integrated with strategy.entry, strategy.close, stop and limit execution logic
User-configurable stop-loss and take-profit in %
Optimized for 15m, 1h, and 1D charts
🚀 Performance Philosophy
Rather than generating many signals, this strategy targets very selective, high-probability trades with asymmetric reward-to-risk opportunities — exactly like institutional traders and quant funds.
Ideal for traders seeking signal precision > signal frequency.
30M Scalping Strategy with Debug LogsWhat’s changed
Spot‑only: all short logic removed—only long entries and exits are generated.
Logging: uses log.info() to send entry/exit details (timestamp, price, ATR, RSI) to the Pine Logs console.
Clean & concise: core scalp logic (EMAs, RSI, MACD, volume, ATR SL/TP) remains intact.
OB/OS adaptative v1.1# OB/OS Adaptative v1.1 - Multi-Timeframe Adaptive Overbought/Oversold Indicator
## Overview
The `tradingview_indicator_emas.pine` script is a sophisticated multi-timeframe indicator designed to identify dynamic overbought and oversold levels in financial markets. It combines EMA (Exponential Moving Average) crossovers and Bollinger Bands across monthly, weekly, and daily timeframes to create adaptive support and resistance levels that adjust to changing market conditions.
## Core Functionality
### Multi-Timeframe Analysis
The indicator analyzes three timeframes simultaneously:
- **Monthly (M)**: Long-term trend identification
- **Weekly (W)**: Intermediate-term trend identification
- **Daily (D)**: Short-term volatility measurement
### Technical Indicators Used
- **EMA 9 and EMA 20**: For trend identification and momentum assessment
- **Bollinger Bands (20-period)**: For volatility measurement and extreme level identification
- **Price action**: For confirmation of level validity and signal generation
## Key Features
### Adaptive Level Calculation
The indicator dynamically determines overbought and oversold levels based on market structure and trend bias:
#### Monthly Level Logic
- **Bullish Bias** (when monthly open > EMA20):
- Oversold = lower of EMA9 or EMA20
- Overbought = upper of EMA9 or Bollinger Upper Band
- **Bearish/Neutral Bias** (when monthly open ≤ EMA20):
- Oversold = Bollinger Lower Band
- Overbought = upper of EMA20 or EMA9
#### Weekly Level Logic
- **Bullish Bias** (when weekly open > EMA20):
- Oversold = lower of EMA9 or EMA20
- Overbought = Bollinger Upper Band
- **Bearish/Neutral Bias** (when weekly open ≤ EMA20):
- Oversold = Bollinger Lower Band
- Overbought = upper of EMA20 or EMA9
#### Daily Level Logic
- Simple Bollinger Bands:
- Oversold = Bollinger Lower Band
- Overbought = Bollinger Upper Band
### Final Level Determination
The indicator combines all three timeframes through a weighted averaging process:
1. Calculates initial values as the average of monthly, weekly, and daily levels
2. Ensures mathematical consistency by enforcing overbought_final ≥ oversold_final using min/max functions
3. Calculates a midpoint average level as the center of the range
### Visual Elements
- **Dynamic Lines**: Draws horizontal lines for current and previous period overbought, oversold, and average levels
- **Labels**: Places clear textual labels at the start of each period
- **Color Coding**:
- Red for overbought levels (resistance)
- Green for oversold levels (support)
- Blue for average levels (pivot point)
- **Transparency**: Previous period lines use semi-transparent colors to distinguish between current and historical levels
### Update Mechanism
- **Calculation Day**: User-defined day of the week (default: Monday)
- On the specified calculation day, the indicator:
- Updates all levels based on previous bar's data
- Draws new lines extending forward for a user-defined number of days
- Maintains previous period lines for comparison and trend analysis
- Automatically deletes and recreates lines to ensure clean visualization
### Proximity Detection
- Alerts when price approaches overbought/oversold levels (configurable distance in percentage)
- Helps identify potential reversal zones before actual crossovers occur
- Distance thresholds are user-configurable for both overbought and oversold conditions
### Alert Conditions
The indicator provides four distinct alert types:
1. **Cross below oversold**: Triggered when price crosses below the oversold level
2. **Cross above overbought**: Triggered when price crosses above the overbought level
3. **Near oversold**: Triggered when price approaches the oversold level within the configured distance
4. **Near overbought**: Triggered when price approaches the overbought level within the configured distance
### Debug Mode
When enabled, displays comprehensive debug information including:
- Current values for all levels (oversold, overbought, average)
- Timeframe-specific calculations and raw data points
- System status information (current day, calculation day, etc.)
- Lines existence and timing information
- Organized in multiple labels at different price levels to avoid overlap
## Configuration Parameters
| Parameter | Default Value | Description |
|---------|---------------|-------------|
| Short EMA (9) | 9 | Length for short-term EMA calculation |
| Long EMA (20) | 20 | Length for long-term EMA calculation |
| BB Length | 20 | Period for Bollinger Bands calculation |
| Std Dev | 2.0 | Standard deviation multiplier for Bollinger Bands |
| Distance to overbought (%) | 0.5 | Percentage threshold for "near overbought" alerts |
| Distance to oversold (%) | 0.5 | Percentage threshold for "near oversold" alerts |
| Calculation day | Monday | Day of week when levels are recalculated |
| Lookback days | 7 | Number of days to extend previous period lines backward |
| Forward days | 7 | Number of days to extend current period lines forward |
| Show Debug Labels | false | Toggle for comprehensive debug information display |
## Trading Applications
### Primary Use Cases
1. **Reversal Trading**: Identify potential reversal zones when price approaches overbought/oversold levels
2. **Trend Confirmation**: Use the adaptive nature of levels to confirm trend strength and direction
3. **Position Sizing**: Adjust position size based on distance from key levels
4. **Stop Placement**: Use opposite levels as dynamic stop-loss references
### Strategic Advantages
- **Adaptive Nature**: Levels adjust to changing market volatility and trend structure
- **Multi-Timeframe Confirmation**: Signals are validated across multiple timeframes
- **Visual Clarity**: Clear color-coded lines and labels enhance decision-making
- **Proactive Alerts**: "Near" conditions provide early warnings before crossovers
## Implementation Details
### Data Security
Uses `request.security()` function to fetch data from higher timeframes (monthly, weekly) while maintaining proper bar indexing with ` ` offset for open prices.
### Performance Optimization
- Uses `var` keyword to declare persistent variables that maintain state across bars
- Efficient line and label management with proper deletion before recreation
- Conditional execution of debug code to minimize performance impact
### Error Handling
- Comprehensive NA (not available) checks throughout the code
- Graceful degradation when data is unavailable for higher timeframes
- Mathematical safeguards to prevent invalid level calculations
## Conclusion
The OB/OS Adaptative v1.1 indicator represents a sophisticated approach to identifying market extremes by combining multiple technical analysis concepts. Its adaptive nature makes it particularly useful in trending markets where static levels may be less effective. The multi-timeframe approach provides a comprehensive view of market structure, while the visual elements and alert system enhance its practical utility for active traders.
Moving Average Exponential (Daily Frozen EMA)This script plots an Exponential Moving Average (EMA) based on the daily timeframe, but with a unique twist:
✅ The EMA value is frozen for the entire current daily session, only updating when a new daily candle begins.
🔍 How it works:
The EMA is calculated using the 1-day timeframe, regardless of the chart's current timeframe.
This EMA value remains fixed throughout the day — it doesn't fluctuate intrabar.
It updates only once the daily candle has closed, providing a stable and reliable reference point during the trading day.
The default is the 5 day EMA but can be changed to any EMA timeframe you desire such as 9, 21, 50, 100. 200, etc.
✨ Additional Features:
✅ Optional smoothing with various moving average types (SMA, EMA, WMA, SMMA, VWMA).
✅ Optional Bollinger Bands on top of the smoothed EMA.
✅ Adjustable settings for EMA length, smoothing type, Bollinger Band deviation, and display options.
🛠️ Use Cases:
Ideal for traders who want a non-reactive EMA during intraday trading.
Helps reduce signal noise by anchoring EMA to higher timeframe structure.
Useful for strategy development where EMA should represent confirmed daily bias only.
Hope this helps, happy trading!