Shares to Stop Loss📊 Shares to Stop Loss Calculator
This indicator automatically calculates the optimal number of shares to trade based on your predefined risk amount and dynamic stop loss levels.
🎯 Key Features:
Automatic Position Sizing: Calculates exact number of shares for both LONG and SHORT positions based on your risk tolerance
Dynamic Stop Loss Levels: Uses relative highs and lows from a customizable lookback period
Visual Reference Lines: Displays horizontal lines showing your stop loss levels on the chart
Real-time Updates: Position size adjusts automatically with price movement
Clean Interface: Compact table showing all relevant information without cluttering your chart
⚙️ How It Works:
For SHORT positions:
Stop loss is placed at the relative high (highest price in the lookback period)
Calculates shares needed to risk your specified dollar amount
For LONG positions:
Stop loss is placed at the relative low (lowest price in the lookback period)
Calculates shares needed to risk your specified dollar amount
📝 Inputs:
Amount for stop loss ($): Your maximum risk per trade in dollars (default: $100)
Look back candles for rel. HIGH: Period to calculate the relative high for SHORT stops (default: 20)
Look back candles for rel. LOW: Period to calculate the relative low for LONG stops (default: 20)
Line colors: Customize the appearance of reference lines
💡 Use Case:
Perfect for traders who practice proper risk management and want to maintain consistent dollar risk across different price levels and volatility conditions. Simply set your risk amount once, and the indicator does the math for you on every candle.
⚠️ Note: This indicator calculates position sizes based on technical levels. Always consider liquidity, account size, and broker requirements before entering positions.
Pine utilities
ES Sessions - Asia / London / NY / Break This indicator draws clean, outline-only session boxes for ES futures, covering Asia, London, New York (RTH), Overnight, and the Daily Break.
Most session indicators add too much visual noise. Heavy background shading, overlapping colors, excessive lines, or extra calculations clutter the chart and distract from price. This script is intentionally different.
Each session is displayed as a simple price range outline showing the high and low of the session, with a single label placed at the top center. There is no background shading and no unnecessary highlights or metrics.
Sessions are defined using CME Central Time so they remain accurate, while Trading View automatically converts them to your chart’s local time.
The goal is clarity. See where each session starts and ends, understand its range, and keep the focus on price action without distraction.
Ideal for traders who want structure without clutter.
Socials - @burntledger
Session High/Low [gdad]There are many strategies that use the 5 min, 10 min or 15 min opening candle. There are also strategies that look at the behavior of other markets such as Tokyo and London as well as the pre-market. Along with these strategies, there is one by The Rumers (@the.rumers) that also looks at the Day ATR with his Padder Scalp strategy.
I trade Futures and like to see how the market has done for varying trading sessions.
I found it was time consuming and distracting to my trading to manually mark all these different things up. This indicator takes TradingView's Trading Sessions indicator and combined ideas borrowed the idea of taking the opening range breakout and extending it to the end of the trading session from Opening Range & Prior Day High/Low along with some additional enhancements and provided information.
It comes pre-built with eight different sessions:
Session 1: Futures Session
Session 2: Tokyo
Session 3: London
Session 4: NY Pre-Market
Session 5: New York
Session 6: 5 min open
Session 7: 10 min open
Session 8: 15 min open
The names, time spans, time zones, colors, whether to show the mid-line or averages and whether and how far to extend them are all customizable once you click Show Session. You can show none, one or multiple sessions. You can also choose which text shows up in the text box (the same will show for each session).
Warning: The Extend to Time range must start during the Session Time. You cannot have a Session Time of 9:30-9:45 and an Extend Time from 10:00-4:00.
Average is calculated by the sum of the close divided by the number of bars for the session.
9:45 AM Candle HighlighterThis script is a powerful visual aid for traders who use the 9:45 AM "Truth Candle" to dictate their morning bias. By automatically highlighting this specific 15-minute candle, it removes the guesswork and allows you to focus purely on execution when your confluences align.Here are a few ways to describe your script, depending on where you are sharing it (e.g., TradingView, Discord, or Social Media).Option 1: The Professional "Script Description" (Best for TradingView)Title: 9:45 AM Opening Range Anchor & Zone HighlighterOverview:This script identifies and highlights the 9:45 AM 15-minute candle (the close of the opening range) in a distinct Yellow Zone. In institutional trading, this candle often marks the end of opening manipulation and the beginning of the day's "real" trend.Key Features:Automatic Highlighting: Instantly colors the 9:45 AM candle yellow for easy identification.High/Low Plotting: Clearly marks the boundaries of the 15-minute range.Equilibrium Line: Automatically calculates and displays the 50% Level (Mean Threshold) of the candle for premium/discount entries.How to Trade This Script:The Breakout (Displacement): Watch for a strong close above or below the yellow zone, creating a Fair Value Gap (FVG).The Retest: Wait for price to return to the 50% level of the yellow candle or the newly formed FVG.The Trigger: Enter your trade once an Engulfing Candle prints in the direction of the displacement.Option 2: The "Strategy Guide" Style (Best for a Community or PDF)The "Yellow Candle" Strategy: Trading the Institutional FootprintThe 9:45 AM candle is the first candle of the day that institutions use to "set the trap" or "reveal the trend." This script paints that candle yellow to help you stay disciplined.Entry Model A: The 50% EquilibriumMany high-probability setups involve the market returning to the "midpoint" of the 9:45 candle before continuing the move.Action: If price breaks the high of the yellow candle, set a Limit Order at the 50% mark of that candle.Why: This offers a tighter stop-loss and a better Risk-to-Reward ratio.Entry Model B: The Displacement & FVG ConfluenceStep 1: Look for a "Displacement" (a large, energetic candle) breaking out of the yellow zone.Step 2: Ensure an FVG is left behind.Step 3: Enter when price taps the FVG or forms an Engulfing Candle against the yellow zone high/low.Option 3: The "Elevator Pitch" (Short & Punchy for Social Media)"I simplified my morning routine by creating a script that highlights the 9:45 AM 'Truth Candle' in yellow. No more squinting at the charts to find the opening range high/low. 🎯It plots the zone and the 50% equilibrium level automatically. I just wait for the displacement, look for the Fair Value Gap, and let the Engulfing candle be my trigger. Simple, visual, and effective. 📈✨"Technical Summary for your UsersFeaturePurposeYellow HighlightIdentifies the 9:45 AM (15-min) Institutional Anchor.High/Low LevelsDefines the "Support & Resistance" for the AM session.50% LevelProvides a "Discount" entry point for retracement traders.Confluence FilterDesigned to be used with FVG and Engulfing patterns for 90%+ clarity
Adjustable Price Line Size with Countdown Timer (Larger)Adjustable Size and Color for the Price Line and Timer so I Can See it Better From Across the Room...
Adjustments include: Price Line Width Size and Color (Small, Normal, Large, Huge)
Adjustment for: Solid Line, Dashed or Dotted Line
Countdown Timer: ON/OFF
I Can Now See The Price and Price Line From Across the Room!!
Multi KI Agenten Strategie (Final V2)What's included in the Pine Script (Technical Analysis)
These features are mathematically implemented in the script and function as "agent logic":
• Trend Following: Integrated via EMAs (50, 100, 200).
• Volume Analysis: An agent checks for institutional volume spikes.
• Supply & Demand: Zones are calculated based on price extremes.
• RSI & Fibonacci: Both are built in as decision criteria for the agents.
• Controlling AI: The "veto logic" in the code acts as a controlling instance, blocking signals if the risk is too high or divergences exist.
• Alerts: The "LONG" and "SHORT" alerts are only triggered after approval by the controlling mechanism.
Universal Market Sessions | Forex & FuturesThis indicator delivers a fully customizable and professional view of global market sessions directly on the chart. It is designed for both Forex and Futures traders and includes a built in mode switch that adjusts session structure and behavior based on the selected market.
All major sessions including Sydney Asia Frankfurt London and New York are displayed as clean session boxes with top centered labels for quick and intuitive identification. Every component of the indicator can be edited through the settings, including session times session names colors border styles transparency and visibility. This allows the script to adapt to any instrument broker feed or personal trading workflow.
For Forex trading, the indicator offers an optional Europe session that can merge the Frankfurt and London sessions into a single unified session. This feature is intended for traders who want a simplified European view without losing awareness of the full trading window.
The Futures mode is structured specifically around futures market behavior, using non overlapping sessions and clearly defined transitions. It includes New York pre market regular trading hours and a labeled break period to help traders identify liquidity shifts and session handoffs with clarity.
The script is lightweight efficient and intentionally minimal while still offering deep customization. It is well suited for traders who value precision flexibility and a clean professional chart layout without unnecessary visual noise.
This is a improved script from my first one "ES Sessions - Asia / London / NY / Break"
@burntledger IG
Days of WeekSplits the days of the week by UTC 00:00 and writes the day with a customizable light gray colored text.
KD Weekly Oversold Golden Cross (v6)KD Weekly Oversold Golden Cross (v6)
This is a screener for weekly KD indicator bullish crossovers at oversold levels, where the K value does not exceed 25.
Volume Delta Waterfall (Anchored, No Reset)What this helps you see (simple)
Delta (ΔV) = UpVolume − DownVolume (estimated from lower timeframe).
Positive ΔV ⇒ more “up” volume inside the bar → buying pressure dominates.
Negative ΔV ⇒ more “down” volume inside the bar → selling pressure dominates.
The waterfall is cumulative delta: each bar starts at the previous bar close and moves up/down by ΔV.
Divergence idea:
Bearish divergence: price makes Higher High, but cumulative delta at that swing makes Lower High → rally is weaker (often exhaustion / distribution).
Bullish divergence: price makes Lower Low, but cumulative delta at that swing makes Higher Low → selloff is weaker (often absorption / reversal risk).
Simple Perps Calculator## Simple Perps Calculator (Long & Short)
A lightweight on-chart trade calculator that visualizes **entry, take-profit, and liquidation levels** with leverage-adjusted returns — designed for fast planning and clean charts.
This indicator automatically detects **long or short positions** based on your target price and adjusts calculations accordingly. All key levels are displayed as **colored horizontal price lines** with matching labels positioned near the price scale for easy reference.
---
### Features
- Entry, Take-Profit, and Liquidation price levels
- Automatic **long / short detection**
- Leverage slider up to **1000×**
- Leveraged **percent gain** calculation
- Color-coded horizontal price lines:
- 🟡 Entry
- 🟢 Take-Profit
- 🔴 Liquidation
- Adjustable label positioning (left or right of chart)
- Horizontal offset control to move labels out of the way
- Clean, minimal, non-intrusive design
---
### How to Use
1. Set your **Entry Price**
2. Set your **Target Price**
3. Adjust **Leverage**
4. Move labels using the **horizontal offset** slider if needed
If the target price is above entry, the script assumes a **long** position. If below, it assumes a **short** position and places the liquidation level above entry automatically.
---
### Notes
- Liquidation price uses a simplified isolated-margin model
- Intended for **planning and visualization only**
- Actual exchange liquidation prices may vary due to fees and maintenance margin requirements
Market Structure MTF [HH/HL/LH/LL + CHoCH + BOS]Automatic market structure detection with pivot classification (HH/HL/LH/LL), Change of Character (CHoCH) and Break of Structure (BOS) signals. Multi-timeframe support allows overlaying higher timeframe structure on any chart.
█ OVERVIEW
This indicator automatically detects and classifies pivot points to visualize market structure. It identifies trend direction through the sequence of highs and lows, and signals potential reversals through Change of Character (CHoCH) and trend continuation through Break of Structure (BOS).
█ CONCEPTS
Market structure analysis is based on the relationship between consecutive pivot points:
Bullish Structure:
• HH (Higher High): A swing high that exceeds the previous swing high
• HL (Higher Low): A swing low that stays above the previous swing low
• Sequence: HH → HL → HH → HL confirms uptrend
Bearish Structure:
• LH (Lower High): A swing high that fails to exceed the previous swing high
• LL (Lower Low): A swing low that breaks below the previous swing low
• Sequence: LH → LL → LH → LL confirms downtrend
Structure Shifts:
• CHoCH (Change of Character): Signals when the expected sequence breaks, suggesting potential trend reversal
• BOS (Break of Structure): Confirms trend continuation when price breaks a pivot level in trend direction
█ FEATURES
• Automatic pivot detection using configurable lookback period
• Smart classification comparing each pivot to its predecessor
• CHoCH detection when trend sequence is violated
• BOS signals with anti-repetition filter to reduce noise in consolidation zones
• Multi-Timeframe (MTF) support to display higher timeframe structure
• Horizontal dashed lines marking HTF pivot levels
• Clean visual output with color-coded labels
█ SETTINGS
Structure Settings:
• Pivot Length: Number of bars on each side required to confirm a pivot (default: 5)
- Lower values (2-3) = more sensitive, detects minor swings
- Higher values (10-20) = less sensitive, only major structure
Multi-Timeframe:
• Show HTF Structure: Enable/disable higher timeframe overlay
• HTF Timeframe: Select the higher timeframe to display (D, W, M, etc.)
Visualization:
• Show Local Structure: Toggle visibility of current timeframe pivots
Filters:
• BOS Buffer: Minimum bars between BOS signals to avoid repetition
█ HOW TO USE
The indicator offers three visualization modes:
1. LOCAL STRUCTURE ONLY (default)
├─ Show Local Structure: ✓ Enabled
├─ Show HTF Structure: ✗ Disabled
└─ Use case: Analyze structure on the current timeframe only
2. HIGHER TIMEFRAME ONLY (recommended for clarity)
├─ Show Local Structure: ✗ Disabled
├─ Show HTF Structure: ✓ Enabled
├─ HTF Timeframe: Select desired TF (D, W, M)
└─ Use case: View higher TF context on lower TF charts without clutter
3. BOTH TIMEFRAMES (advanced)
├─ Show Local Structure: ✓ Enabled
├─ Show HTF Structure: ✓ Enabled
└─ Use case: See confluence between timeframes
⚠️ WARNING: This mode can make the chart visually crowded.
Recommended only for experienced users who need both layers simultaneously.
█ RECOMMENDED SETTINGS BY TIMEFRAME
| Chart TF | Pivot Length | Suggested HTF |
|----------|--------------|---------------|
| 1H | 10-15 | 4H or D |
| 4H | 5-10 | D or W |
| 1D | 5-7 | W |
| 1W | 3-5 | M |
The goal is to make pivots on lower timeframes represent equivalent time context.
█ VISUAL REFERENCE
Local Structure Labels:
• 🟩 Green (above): HH - Higher High
• 🟥 Red (above): LH - Lower High
• 🟩 Green (below): HL - Higher Low
• 🟥 Red (below): LL - Lower Low
• 🟧 Orange: CHoCH - Change of Character
• 🟦 Blue: BOS - Break of Structure
HTF Structure Labels:
• 🩵 Teal: HH/HL - Bullish HTF structure
• 🟫 Maroon: LH/LL - Bearish HTF structure
• 🟨 Yellow: CHoCH - HTF trend shift
• 🟦 Navy: BOS - HTF structure break
• ┈┈ Dashed lines mark HTF pivot price levels
█ INTERPRETATION GUIDELINES
Reading the sequence:
• Consistent HH + HL = Bullish bias, look for long opportunities
• Consistent LH + LL = Bearish bias, look for short opportunities
• CHoCH after trending sequence = Potential reversal, exercise caution
• BOS in trend direction = Trend continuation confirmed
Combining timeframes:
• HTF structure defines the primary bias
• Local structure provides entry timing
• Confluence (both TFs aligned) = Higher probability setups
█ LIMITATIONS
• Pivots are confirmed with a delay equal to the Pivot Length parameter
• In ranging markets, multiple CHoCH signals may appear (this is correct behavior - the market IS changing direction frequently)
• CHoCH signals potential reversal, not guaranteed reversal
• Works best on liquid markets with clean price action
█ TECHNICAL NOTES
• Uses ta.pivothigh() and ta.pivotlow() for pivot detection
• request.security() fetches higher timeframe data
• Anti-repetition logic prevents BOS signal clustering in consolidation
• All crossover/crossunder calculations are performed at global scope for consistency (Pine Script v6 compliance)
█ CREDITS
Developed for swing traders and position traders who use market structure for trend analysis and trade timing.
Feedback and suggestions are welcome.
Multi-KI-Agenten Strategie FINAL-PROMulti-AI agent trading system, including EMA 50, 100 & 200, Fibonacci retracement, supply and demand, RSI, and much more. Simply add the data, set alerts, and you're ready to go.
Please use this system solely to confirm your own analyses. It should never be used as a 100% reference.
AT trading systemIn the AT trading system, AT LONG means closing a long position and AT short means closing a long position and shorting.
CME Gap Tracker [captainua]CME Gap Tracker - Advanced Gap Detection & Tracking System
Overview
This indicator provides comprehensive gap detection and tracking capabilities for both consecutive bar gaps and weekly CME trading session gaps. It automatically detects gaps, tracks their fill progress in real-time, provides detailed statistics, and includes backtesting features to validate gap trading strategies. The script is optimized for CME futures trading but works with any instrument, automatically handling ticker conversion between CME futures and spot markets.
Gap Detection Types
Consecutive Bar Gaps:
Detects gaps between any two consecutive bars on the current timeframe. Two detection modes are available:
- High/Low Mode: Detects gaps when current bar's low > previous bar's high (gap up) or current bar's high < previous bar's low (gap down). This is more sensitive and detects more gaps.
- Close/Open Mode: Detects gaps when current bar's open > previous bar's close (gap up) or current bar's open < previous bar's close (gap down). This is more conservative.
Weekly CME Gaps:
Detects gaps between weekly trading sessions, specifically designed for CME futures markets. The script automatically detects the first bar of each new week and compares the current week's open with the previous week's close/high/low. This is particularly useful for tracking weekend gaps in CME futures markets where price can gap significantly between Friday close and Monday open.
Smart Ticker Detection
The script automatically converts between CME futures tickers (e.g., BTC1!, ETH1!) and spot tickers (e.g., BTCUSDT, ETHUSDT). When viewing a CME futures chart, it can automatically detect and use the corresponding spot ticker for gap analysis, and vice versa. This allows traders to:
- View CME futures but track spot market gaps
- View spot markets but track CME futures gaps
- Manually override with custom ticker specification
The ticker validation system uses caching to prevent race conditions during initial script load, ensuring reliable ticker resolution.
Gap Filtering & Tolerance
Static Tolerance:
Set minimum and maximum gap sizes as percentages (default: show only gaps > 0.333% and < 100%). This filters out noise and focuses on significant gaps.
Dynamic Tolerance:
When enabled, tolerance is calculated dynamically based on ATR (Average True Range). The formula: Dynamic Tolerance = (ATR × ATR Multiplier / Close Price) × 100%. This adapts to market volatility - in volatile markets, only larger gaps are shown; in calm markets, smaller gaps are displayed. This is particularly useful for instruments with varying volatility.
Absolute Size Filtering:
In addition to percentage filtering, gaps can be filtered by absolute price size (e.g., show only gaps > $100). This is useful for instruments where percentage alone doesn't capture significance (e.g., high-priced stocks).
Fill Confirmation System
To reduce false gap closure signals, the script requires multiple consecutive bars to confirm gap closure. The default is 2 bars, but can be adjusted from 1-10 bars. Lower values (1) confirm faster but may produce false signals from temporary wicks. Higher values (3-5) reduce false fill signals but delay confirmation. This prevents temporary price spikes from triggering false gap closure alerts.
Gap Fill Tracking
The script tracks gap fill progress in real-time:
- Fill Percentage: How much of the gap has been filled (0-100%)
- Fill Speed: Whether fill is accelerating, decelerating, or constant
- Time to Fill: For closed gaps, how many bars it took to fill
- Fill Status: Unfilled, partially filled, or fully filled
Visual Features
Heatmap Colors:
Gap colors can be adjusted based on gap size, with larger gaps appearing more intense and smaller gaps more faded.
Adaptive Line Width:
Line thickness automatically adjusts based on gap size, making larger gaps more prominent.
Age-Based Coloring:
Gaps can be color-coded by age, with newer gaps appearing brighter and older gaps more faded.
Confluence Zones:
Areas where multiple gaps overlap are highlighted with enhanced visuals, indicating stronger support/resistance zones.
Gap Statistics
A comprehensive statistics table provides:
- Total gaps created, open, and closed
- Fill rates by direction (up vs down) and size category (small, medium, large)
- Average fill time, fastest fill, slowest fill
- Oldest gap and oldest unfilled gap
- Backtesting results: success rate, reversal rate, average move after fill
- CME gap expiration statistics: Gaps expired unfilled (for Weekly CME gaps only)
Statistics can be filtered by period (All Time, Last 100/500/1000/5000 bars) and can be reset via toggle button.
Backtesting
When enabled, the script tracks price movement after gap fills:
- Price after fill: Captures price when gap closes
- Move after fill: Percentage price movement after closure
- Success/Reversal tracking: Determines if price continued in fill direction or reversed
- Success rate: Percentage of gaps where price continued in fill direction
This data helps validate gap trading strategies and understand gap fill behavior.
Gap Re-opening Detection
When enabled, the script detects when a previously filled gap reopens (price gaps back through the filled gap zone). This is useful for identifying when support/resistance levels break and can signal trend reversals.
CME-Specific Features
Monday Opening Volume Analysis:
For Weekly CME gaps detected on Monday openings, the script tracks Monday opening volume relative to average volume. Higher Monday volume ratios indicate stronger gap significance. This ratio is integrated into gap strength calculations and can be displayed in gap labels. Gaps with Monday volume > 1.5x average receive priority score boosts.
CME Gap Expiration Tracking:
Weekly CME gaps that remain unfilled beyond a configurable threshold (default 1000 bars) are automatically marked as "expired" and tracked separately in statistics. This helps identify gaps that act as strong support/resistance levels and never fill. Expired gaps are displayed with special labeling and counted in the "Gaps Expired (CME)" statistic.
CME Gap Priority Scoring Enhancement:
The priority scoring system includes special boosts for CME gaps:
- Monday gaps: +10 points (gaps detected on Monday openings)
- High Monday volume gaps: +15 points (Monday volume ratio > 1.5x average)
- Gaps at key weekly levels: +10 points (gaps aligning with previous week's high, low, or close within 0.5% tolerance)
These enhancements help prioritize the most significant CME gaps for trading decisions.
Custom Gap Zones
Traders can manually mark custom gap zones by specifying top and bottom levels. These zones are tracked like automatically detected gaps, allowing traders to:
- Mark historical gaps that weren't detected
- Create support/resistance zones based on other analysis
- Track specific price levels of interest
Multi-Timeframe Support
The script can detect gaps on higher timeframes simultaneously. For example, when viewing a 1-hour chart, it can also detect and display gaps from the weekly timeframe. This provides multi-timeframe context for gap analysis.
Alert System
Comprehensive alert system with multiple trigger types:
- Gap Creation: Alert when new gaps are detected
- Gap Closure: Alert when gaps are fully filled
- Partial Fill: Alert when gaps reach specific fill percentages (e.g., 25%, 50%, 75%, 90%)
- Approaching Closure: Alert when gaps reach high fill levels (e.g., 90%, 95%) before closing
- Gap Re-opening: Alert when previously filled gaps reopen
Alerts can be filtered to trigger only on Mondays (useful for CME weekly gaps) or any day.
Filtering Options
Gaps can be filtered by:
- Fill Status: Show all, unfilled only, partially filled only, or fully filled only
- Fill Percentage Range: Show gaps within specific fill percentage ranges
- Gap Age: Show only gaps within specific age ranges (bars)
- Gap Expiration: Automatically remove gaps older than specified number of bars (for Weekly CME gaps, uses separate CME expiration threshold)
Performance & Safety
The script includes several safety features:
- Safe array operations to prevent index out-of-bounds errors
- Memory leak prevention through proper visual object cleanup
- Ticker validation caching to prevent race conditions
- Week boundary detection for accurate CME gap identification
- Fill confirmation system to reduce false signals
- Monday opening volume analysis for CME gap strength assessment
- CME gap expiration tracking with configurable thresholds
- Priority scoring enhancement for Monday gaps, high Monday volume, and key weekly levels
Usage Recommendations
For CME Weekly Gaps:
1. Set "Gap Detection Type" to "Weekly CME"
2. View a CME futures chart (e.g., BTC1!) or enable auto-detect spot ticker
3. Set tolerance to filter gap size (default 0.333%)
4. Enable statistics to track fill rates
5. Configure alerts for gap creation/closure
For Consecutive Bar Gaps:
1. Set "Gap Detection Type" to "Consecutive Bars"
2. Choose "High/Low" for more gaps or "Close/Open" for fewer gaps
3. Adjust tolerance based on instrument volatility
4. Enable fill confirmation (2-3 bars) for more reliable signals
5. Use filtering to focus on specific gap types
For Gap Trading Strategies:
1. Enable backtesting to validate strategy performance
2. Review statistics to understand gap fill patterns
3. Use confluence zones to identify strong support/resistance
4. Configure alerts for gap events matching your strategy
5. Use custom zones to mark important levels
Technical Details:
• Pine Script v6 | Overlay indicator
• Safe array operations with index validation
• Memory leak prevention through proper object cleanup
• Ticker validation caching for reliable ticker resolution
• Works on all timeframes and instruments
• Comprehensive edge case handling
• Week boundary detection using ta.change(weekofyear)
• Fill confirmation system with configurable bars
For detailed documentation and usage instructions, see the script comments.
Classic Chartism-Market Structure- Support.ResistanceClassic Chartism – Market Structure + Support & Resistance
This indicator is designed for traditional chart-based technical analysis, relying exclusively on price action and market structure, without the use of oscillators or lagging indicators.
The script automatically detects significant swing highs and swing lows using confirmed pivots and classifies price structure according to classic market structure notation:
HH (Higher High)
HL (Higher Low)
LH (Lower High)
LL (Lower Low)
Based on these swings, the indicator plots horizontal Support & Resistance (SR) levels, representing historically significant areas of supply and demand. These levels remain active until invalidated by price, providing a clear and objective market context.
The indicator does not repaint once a swing is confirmed, making it suitable for real-time analysis and discretionary trading decisions. It performs well across cryptocurrencies, futures, indices, and equities, and is particularly useful for trend identification, pullback entries, and structure-based risk management.
Seasonal Strategies V1Seasonal Strategies V1 is a rule-based futures seasonality framework built around predefined calendar windows per asset.
The strategy automatically detects the current symbol and activates long or short trading phases strictly based on historically observed seasonal tendencies. All entries and exits are fully time-based — no indicators, no predictions, no discretionary input.
Key Features
Asset-specific seasonal windows (MMDD-based)
Automatic long and short activation
Fully time-based entries and exits
One position at a time (no pyramiding)
Clean chart visualization using subtle background shading
No indicators, no filters, no curve fitting
Philosophy:
This strategy is designed as a structural trading tool, not a forecasting model.
It focuses on when a market historically shows seasonal tendencies — not why or how far price might move.
Seasonal Strategies V1 intentionally keeps the chart clean and minimal, making it suitable as a baseline framework for research, portfolio-style seasonal approaches, or further extensions in later versions.
Intended Use:
Futures and commodity markets
Seasonality research and testing
Systematic, calendar-driven strategies
Educational and analytical purposes
Disclaimer
This script is provided for educational and research purposes only.
Past seasonal tendencies do not guarantee future performance.
Risk management, position sizing, and portfolio decisions are the responsibility of the user.
Trading Discipline Mirror How deciplined you are?
Trading Discipline Journal – Smart Feedback helps traders stay disciplined and emotionally controlled. Select your winning or losing reasons, and the indicator automatically calculates scores, evaluates your behavior, and gives clear feedback on whether you’re trading in a safe mindset or a risky one.
Price % Distance from 52 Weeks High, and EMAs"Stop guessing how far extended the price is—measure it instantly."
As a swing trader, knowing the exact distance between the current price and your key moving averages is critical. It tells you if a stock is overextended (too far) or offering a low-risk pullback entry (near 0%).
This lightweight utility script calculates the real-time percentage distance of the closing price from three critical levels:
10 EMA (Short-term momentum)
20 EMA (Swing trend baseline)
52-Week High (Major structural resistance)
It displays this data in a single, clean Smart Label attached to the latest candle, keeping your chart clutter-free.
Key Features
📊 Instant Calculation: See exactly how far (%) the price is from the 10 EMA, 20 EMA, and 52-Week High without using a measuring tool.
🧠 Intelligent Trend Coloring: The text color changes dynamically based on the immediate trend:
🟢 Green Text: Price is ABOVE both 10 & 20 EMAs (Bullish / Buy-the-dip zone).
🔴 Red Text: Price is BELOW both 10 & 20 EMAs (Bearish / Caution).
⚪ White Text: Price is mixed/choppy (between the EMAs).
👁️ High Contrast Design: Uses a semi-transparent dark background that ensures the data is clearly visible on both Light and Dark mode charts.
How to Use for Swing Trading
Pullback Entries: In a strong uptrend (Green Text), watch for the 10 EMA or 20 EMA % value to drop near 0.0% to 0.5%. This indicates a pullback to the average—often a high-probability entry point.
Overextension Warning: If the % distance becomes unusually large (e.g., Price is +5% above the 10 EMA), the move may be overextended, signaling to tighten stops or take profit.
52-Week Breakouts: Monitor the 52W % distance. As it approaches 0.0%, the stock is challenging its yearly high, alerting you to potential breakout plays.
Settings
EMA Lengths: Fully customizable (Default: 10 & 20).
Lookback: Adjust the high lookback period (Default: 260 bars for 52 Weeks).
Position: Toggle the label to appear Above or Below the candle.
Bar Countdown ClockBar Countdown Clock
Description:
Displays the remaining time for the current bar on the chart. The countdown label follows the previous EMA5 price to stay stable during high-volatility markets. Font size and label position are fully customizable. Works well on BTC, Gold, Forex, and other trading instruments.
How to Use:
Add the indicator to your chart.
Adjust Clock Color, Font Size, and X Offset to suit your preference.
The label will automatically track the previous EMA5 price.
The countdown updates in real-time until the current bar closes.
Tips:
Increase X Offset if the label overlaps the current bar.
For high-volatility instruments, the label remains stable by following EMA5.
EMA Length can be adjusted to change the anchor point for the label.
Macro Stress Monitor (USDJPY + JGB + Yield Curve)
# **Note‑Style Description**
This indicator provides a consolidated framework for monitoring two of the most systemically important channels of global USD liquidity transmission: **offshore USD funding conditions in Japan** and **front‑end U.S. rates stress linked to repo and collateral dynamics**. While TradingView does not supply direct access to cross‑currency basis swaps or repo benchmarks, the script employs market‑validated proxies that closely track the same underlying pressures observed in dealer balance‑sheet constraints, FX‑hedged flows, and Treasury funding markets.
### **1. USD/JPY Funding Pressure (Basis‑Swap Proxy)**
The USD/JPY cross‑currency basis is a primary indicator of offshore USD funding premia for Japanese banks, insurers, and real‑money accounts. Basis widening typically reflects elevated USD demand, reduced hedge ratios, and impaired FX swap market liquidity.
To approximate this behavior in real time, the indicator combines:
- **USDJPY spot**, which tends to accelerate higher during USD funding stress, FX swap dislocations, or shifts in BOJ/Fed policy differentials.
- **JP10Y (Japan 10‑year yield)**, which captures JGB‑market stress, duration‑hedging flows, and the impact of FX‑hedged UST carry dynamics on domestic rates.
The joint behavior of these two series provides a high‑signal proxy for USD/JPY basis conditions, particularly around quarter‑end, fiscal year‑end, and BOJ policy events.
### **2. U.S. Front‑End Curve Stress (Repo/Collateral Proxy)**
Stress in the U.S. repo market often manifests first in the front end of the Treasury curve, where funding volatility, collateral scarcity, and dealer balance‑sheet compression drive rapid curve distortions.
The indicator tracks:
- **US02Y – US10Y (2s10s spread)** as a public‑market proxy for repo tightness, GC specialness, and leveraged Treasury basis‑trade unwind risk.
A deeper inversion or accelerated flattening of the 2s10s curve frequently coincides with rising funding premia, increased margin requirements, and deleveraging across rates‑sensitive strategies.
### **3. Stress Diagnostics**
The script highlights three conditions that historically align with elevated cross‑asset fragility:
- **USDJPY > 20‑day SMA** — proxy for USD funding stress / basis widening
- **JP10Y < 20‑day SMA** — proxy for JGB‑market stress or hedging‑related duration flows
- **2s10s < –0.50** — proxy for front‑end funding pressure and repo‑related curve distortions
These are not directional trading signals. They are **liquidity‑risk diagnostics** intended to identify periods when global funding markets become more vulnerable to synchronized deleveraging.
### **4. Intended Use Case**
This tool is designed for macro practitioners, cross‑asset strategists, and risk managers who monitor:
- USD funding premia and cross‑currency basis dynamics
- FX‑hedged UST flows and Japanese institutional positioning
- Treasury basis‑trade leverage and repo‑driven volatility
- BOJ/Fed policy interactions and quarter‑end balance‑sheet effects
- Systemic liquidity conditions across FX, rates, and credit
The indicator provides a real‑time dashboard for identifying early‑stage liquidity stress that may precede broader cross‑asset volatility.
Time-Based Level & Watermark [PTN.Trades]Hello NTA Bros. Let's test my script! Hello Hello TDV said my description is too brief. I have to write something more!
## 3 Ways to Cook Crispy, Fluffy, and Delicious Omelettes Without the Grease
Calling all **Egg Lovers**! Today, we’re diving into the "Omelette"—a dish that seems simple but is packed with secret techniques. Everyone has their own signature style, and today, Maggi is sharing 3 different ways to fry an omelette. Whether you’re craving that **extra crispy and fluffy** version you find at restaurants, a **healthy, low-oil** version that isn't greasy, or a **thick and soft** omelette for a full, satisfying bite—we’ve got you covered!
---
### 1. How to Fry a Crispy Omelette
**Ingredients:**
1. 1 tsp Maggi Cooking Sauce
2. Cooking oil (about half a pan deep)
**Instructions:**
1. Pour oil into the pan and heat until hot. Crack the eggs, season, and beat well.
2. Once the oil is boiling, pour the egg mixture through a **strainer** into the pan to create a fluffy texture. When the egg turns golden brown, flip it over. Fry until cooked through and serve.
**Pro-Tips for Crispiness:**
* Don't over-beat the eggs until they are too bubbly, or they will flow through the strainer too slowly.
* Wait for the oil to get hot, then reduce to medium heat for about 10 seconds before testing a small amount of egg through the strainer. If it fluffs up beautifully, pour the rest through the strainer across the pan.
* If using an **electric stove**, use the highest heat. Once the oil is hot, test with a little egg. If it fluffs up, pour the rest in without reducing the heat.
* Pouring through a strainer creates small "strands" of egg that fluff up instantly when hitting the hot oil.
---
### 2. The Healthy Version: Low-Oil Omelette
**Ingredients:**
1. 2 Eggs
2. 1 tsp Maggi Cooking Sauce
3. A small amount of oil
**Instructions:**
1. Crack the eggs, season, and beat well. Heat the pan first, then add a little vegetable oil.
2. Pour the egg into the pan. Once golden brown, flip to the other side and serve.
**Pro-Tips for Low-Oil:**
* **Heating the pan before adding oil** prevents the egg from sticking, which is crucial since we are using very little oil.
* When you pour the egg in, use the edge of your spatula to stir the center quickly. This helps the egg cook faster, makes it easier to flip, and results in a thicker, softer texture.
---
### 3. How to Make a Thick and Soft Omelette
**Ingredients:**
1. 4 Eggs
2. 2 tsp Maggi Cooking Sauce
3. Cooking oil
**Instructions:**
1. Crack the eggs, season, and beat well. Pour about 3 tbsp of oil into a **pot**. You don't need to wait for the oil to be extremely hot.
2. Pour the egg in and use a fork to stir the center quickly (similar to making scrambled eggs). This helps the egg set fast without spreading too much. Use medium-low heat (or medium heat for electric stoves).
3. Once the egg starts to set, tilt the pot slightly and use a spatula to flip the egg. Add a tiny bit more oil, increase the heat, and wait for a beautiful color. Flip again and use high heat briefly to "push out" any excess oil. Remove, drain the oil, and serve.
**Pro-Tips for a Thick & Soft Texture:**
* **Frying in a pot** forces the egg to stay thick and shapely. Choose a small pot to make the omelette look taller and fluffier.
* Stirring quickly with a fork helps the egg cook and bind together faster, making it much easier to flip.
* Using medium-low heat ensures the egg doesn't burn before the thick center is fully cooked.
---
So, what do you think? With these 3 different methods, you can choose the style that fits your mood—whether it’s crispy, thick, or healthy. You can easily make these at home and ensure every bite is perfectly seasoned and delicious with **Maggi Cooking Sauce**.
---
**Would you like me to adjust the tone to be more formal, or perhaps help you write a catchy title for social media?**
4H Previous Candle + FibonacciIndicator Description: 4H Previous Candle + Fibonacci
This Pine Script (v5) indicator is a technical analysis tool designed for traders using the
TradingView platform. It allows for the visualization of key levels from the previous 4-
hour candle directly on any lower time frame.
1. Primary Objective
The indicator aims to provide a Higher Time Frame (HTF) perspective automatically.
By plotting the high, low, and Fibonacci retracement levels of the last closed 4H
candle, it helps identify institutional support and resistance zones without the need to
constantly switch time frames.
2. Key Features
Feature Description
Automatic 4H Levels
Automatically plots horizontal lines for the High and Low of the
previous 4H candle.
Dynamic Adaptation
Line colors and styles adapt based on whether the candle was
bullish (green) or bearish (red).
Fibonacci
Retracements
Calculates and displays customizable Fibonacci levels (e.g., 23.6%,
38.2%, 50%, 61.8%, 78.6%).
Dashboard (HUD)
A summary table in the top-right corner displays exact values and
the candle type.
3. Technical Functionality
Data Retrieval (Multi-Timeframe)
The script uses the request.security function to extract data from the 4-hour time
frame (“240”). Using the index ensures the indicator is based on a closed candle,
eliminating any risk of “repainting” (levels changing during formation).
Fibonacci Calculation Logic
The calculation of Fibonacci levels is intelligent and directional:
Bullish Candle: The retracement is calculated from bottom to top (0% is at the
bottom).
Bearish Candle: The retracement is calculated from top to bottom (0% is at the
top).
4. Configuration Parameters
Users can customize the indicator via the settings menu:
Visual Settings: Toggle lines, adjust thickness, price labels, and decimal
precision.
Fibonacci Settings: Enable levels, choose colors, line thickness, and enter
custom retracement percentages.
5. Trading Use Cases
Bounce Zones: The 50% and 61.8% levels of the previous 4H candle are often
considered “Premium” or “Discount” zones where price tends to react.
Confluence: Use these levels alongside other indicators (RSI, moving averages)
to confirm entry points.
Risk Management: Place Stop Losses just beyond the previous 4H High or Low.
Document generated for the analysis of the “4H Previous Candle + Fibonacci” Pine
Script.






















