StarterPack MAs🚀 Starter Moving Averages Indicator
This indicator was built by combining all the moving averages I personally use in my trading, organized in a clear and visual way to make market reading much easier. Instead of jumping between multiple tools, you now have everything in one place – designed to highlight trend direction, potential reversal areas, and dynamic zones of support and resistance.
📊 With this tool, you will be able to:
Quickly identify whether moving averages are aligned or diverging.
Spot moments of strong trending movement and possible shifts in momentum.
Use it as a filter for cleaner trade entries, reducing noise.
Track areas that often act as price “magnets” during intraday sessions.
💡 The idea is not to give you a rigid “buy/sell” signal, but to provide a market reading framework that adapts to different trading styles – whether you’re riding trends or looking for reversals at key levels. It brings structure, clarity, and consistency to the way you analyze your charts.
🔥 At the end of the day, this indicator is about perspective: making your screen cleaner, your decision-making faster, and your execution more confident. It’s not a magic button – it’s a powerful lens to help you see what really matters in the market.
แบนด์และแชนแนล
Range Grid From Two Levels (with intermediate lines)Range Grid From Two Levels of Initial Balance (works great with next day levels)
Rolling Range Bands by tvigRolling Range Bands
Plots two dynamic price envelopes that track the highest and lowest prices over a Short and Long lookback. Use them to see near-term vs. broader market structure, evolving support/resistance, and volatility changes at a glance.
What it shows
• Short Bands: recent trading range (fast, more reactive).
• Long Bands: broader range (slow, structural).
• Optional step-line style and shaded zones for clarity.
• Option to use completed bar values to avoid intrabar jitter (no repaint).
How to read
• Price pressing the short high while the long band rises → short-term momentum in a larger uptrend.
• Price riding the short low inside a falling long band → weakness with trend alignment.
• Band squeeze (narrowing) → compression; watch for breakout.
• Band expansion (widening) → rising volatility; expect larger swings.
• Repeated touches/rejections of long bands → potential areas of support/resistance.
Inputs
• Short Window, Long Window (bars)
• Use Close only (vs. High/Low)
• Use completed bar values (stability)
• Step-line style and Band shading
Tips
• Works on any symbol/timeframe; tune windows to your market.
• For consistent scaling, pin the indicator to the same right price scale as the chart.
Not financial advice; combine with trend/volume/RSI or your system for entries/exits.
Range Grid From Two LevelsRange Grid From Two Levels of Initial Balance (works great with next day levels)
Manipulation Ribbon [FxScripts]Manipulation Ribbon
Designed to detect areas of price manipulation by Market Makers vs areas where it is trading in a natural, price-driven state. By identifying zones of control and imbalance, the ribbon provides a clear visualization of where price is being held or artificially displaced, offering key insights into potential future direction.
Indicator Function
Unlike traditional oscillators, the Manipulation Ribbon plots a continuous line or ribbon, with no defined y-axis. The ribbon dynamically adapts to market conditions, allowing the user to spot potential manipulation and price containment vs natural price movement.
Calculation Methodology
The Manipulation Ribbon is derived exclusively from price action. The underlying algorithm evaluates where price is, where it should be and where it’s being held.
The resulting ribbon reflects these dynamics in real time, providing a visual framework for interpreting price behavior at a granular level.
Operational Use: Divergences
The primary use of the Manipulation Ribbon is to locate divergences between price and the ribbon.
There are two distinct types of divergence to look for:
Price Containment: Where the ribbon moves but price doesn’t. This can help identify zones where price is being held, often preceding sharp movements once control is released.
Price Manipulation: Where price moves but the ribbon doesn’t. This can help identify liquidity sweeps, often preceding swift reversals once the liquidity has been taken.
Analytical Scenarios
High Liquidity Sweep: Price forms a higher high while the ribbon forms a lower high. Indicates a liquidity sweep may be occurring at the highs and a potential bearish reversal may be imminent.
Low Liquidity Sweep: Price forms a lower low while the ribbon forms a higher low. Indicates a liquidity sweep may be occurring at the lows and a potential bullish reversal may be imminent.
Top Edge Hold: Upwards movement of the ribbon without price followthrough. Indicates price may be being held at the highs, suggesting Market Makers are artificially holding price down in order to create a top edge and potential bearish reversal.
Bottom Edge Hold: Downwards movement of the ribbon without price followthrough. Indicates price may be being held at the lows, suggesting Market Makers are artificially holding price up in order to create a bottom edge and potential bearish reversal.
Settings
Guides: Option to have dynamic guides applied to your chart. Customizable style, color and width.
Guide Lookback: Due to the ribbon having a non-standard y-axis scale, it’s not possible to plot standard interval guides. Due to technical limitations this value is not calculable automatically either. The upper and lower bounds of the guides are therefore calculated using a user-inputted lookback function. In order to ensure the guides use the correct y-axis on the chart, simply input the average number of bars in your current viewport using the ruler, the guides will automatically update to match this.
Line 1 / Band 1: Option to turn on/off Line 1 and Band 1 alongside updating color and linewidth. Line 1 and Band 1 use the current chart symbol as their source.
Line 2 / Band 2: Option to add a second line and/or band to the chart. Use this to compare any correlated instrument e.g. BTCUSDT and ETHUSDT (as visualized in the chart above) or other pairs such as XAUUSD/XAUEUR or ES/NQ. Due to differences in y-axis scaling it's advised to add this as an additional indicator on a new pane (as per chart above).
Inverse Line 2 / Band 2: Option to show/hide the inverse of Line 2 and Band 2. This is useful for comparing inversely correlated symbols e.g. EURUSD and USDCHF.
Performance and Optimization
Backtesting Results: The Manipulation Ribbon has undergone extensive backtesting across various instruments, timeframes and market conditions, demonstrating strong performance in identifying where price is out of sync with its natural state. User backtesting is strongly encouraged as it allows traders to gain familiarity with the ribbon using their preferred instruments and timeframes.
Optimization for Diverse Markets: The Manipulation Ribbon can be used on crypto, forex, indices, commodities and stocks. The Manipulation Ribbon's algorithmic foundation ensures consistent performance across a variety of instruments. The lack of complex settings makes it easy for the trader to set up and go.
Educational Resources and Support
Users of the Manipulation Ribbon benefit from comprehensive educational resources and full access to FxScripts Support. This ensures traders can maximize the potential of the Manipulation Ribbon and other tools in the Sigma Indicator Suite by learning best practices and gaining insights from an experienced team of traders.
TradeIQ 3.31 • Smart Market Direction [TH]TradeIQ is designed to guide traders with predictive arrows that highlight potential market peaks and reversal zones. It also provides entry point guidance along with suggested TP/SL zones, giving you a practical framework for trade planning.
✅ Key Features:
• Predictive arrows for possible turning points
• Visual guide for entry opportunities
• Suggested TP/SL zones for trade management
• Scalping signals to capture quick, short-term opportunities
• Works across Forex, Gold, Crypto, and Indices
• Fully customizable to match your trading style
Built from years of trading experience, TradeIQ gives traders a clear visual roadmap to support decision-making — not rigid signals.
👉 Perfect for traders who want guidance, structure, and clarity in the markets.
Trend Analyzer v0.6Trend Analyzer EMA Only v0.6
Simple yet powerful EMA trend analysis with multi-timeframe support!
Overview:
This comprehensive indicator focuses on EMA-based trend analysis with clean visual presentation. It provides clear BUY/SELL signals, trend tracking with unique IDs, peak detection, and multi-timeframe analysis across M15, M30, and H1 timeframes.
Key Features:
✅ EMA Trend Analysis - Fast and Slow EMA crossover signals
✅ Trend Tracking - Unique trend IDs with start/end markers
✅ Peak Detection - Automatic peak identification during trends
✅ Multi-Timeframe - Analysis across M15, M30, and H1 timeframes
✅ Visual Clarity - Dotted lines connecting labels to candles
✅ Statistics - BUY/SELL count and average trend length
How It Works:
The indicator calculates signal strength using weighted analysis:
• MACD (50%) - Primary trend momentum
• RSI (30%) - Overbought/oversold conditions
• Volume (20%) - Volume confirmation
Signal Logic:
• BUY - Fast EMA crosses above Slow EMA + both slopes positive
• SELL - Fast EMA crosses below Slow EMA + both slopes negative
• NEUTRAL - EMAs too close (below threshold)
Visual Elements:
• 🟢 BUY - Green label with trend ID
• 🔴 SELL - Red label with trend ID
• ⚪ NEUTRAL - Gray label with trend ID
• 🟡 PEAK - Yellow label marking trend extremes
• ⚫ END - Gray label marking trend end
Information Table:
Real-time display showing:
• Current Timeframe trend state
• Multi-Timeframe analysis (M15, M30, H1)
• PEAK Labels status
• Offset Type configuration
• Trend Strength percentage
• Statistics (BUY/SELL count, average trend length)
Settings:
• Fast EMA Length - 9 (default)
• Slow EMA Length - 21 (default)
• Min Trend Bars - 3 (filters short trends)
• Label Offset Type - ATR, % of price, or Dynamic
• Show PEAK Labels - On/Off toggle
Best Practices:
🎯 Works best in trending markets
📊 Use as overlay on main chart
⚡ Combine with price action analysis
🛡️ Always use proper risk management
Pro Tips:
• Green background = Strong uptrend, Red background = Strong downtrend
• Watch for trend change arrows for early reversal signals
• Use the information table for quick market assessment
• Monitor trend statistics for market behavior insights
Alerts:
• BUY Alert - "BUY signal detected"
• SELL Alert - "SELL signal detected"
Version 0.6 Improvements:
• Optimized performance
• Enhanced visual clarity
• Improved multi-timeframe analysis
• Refined trend detection algorithms
Created with ❤️ for the trading community
This indicator is free to use for both commercial and non-commercial purposes.
Trend Analyzer MACD EnhancedTrend Analyzer MACD Enhanced
Advanced trend analysis with MACD, RSI, Volume and Divergence detection!
Overview
This comprehensive indicator combines multiple technical analysis tools into one powerful visualization. It features dynamic background coloring, real-time signal strength calculation, and automatic divergence detection for complete market analysis.
Key Features
✅ Multi-Indicator Analysis- MACD, RSI, and Volume in one indicator
✅ Divergence Detection - Automatic bullish and bearish divergence identification
✅ Dynamic Background - Color-coded trend zones with smooth transitions
✅ Signal Strength - Weighted calculation showing overall market sentiment (0-100%)
✅ Trend Change Detection - Visual markers for trend reversals
✅ Information Table - Real-time status of all indicators
How It Works
The indicator calculates signal strength using weighted analysis:
- MACD (50%) - Primary trend momentum
- RSI (30%) - Overbought/oversold conditions
- Volume (20%) - Volume confirmation
Signal Strength Range: -100% to +100%
Visual Elements
Background Colors:
- 🟢 **Green** - Uptrend (intensity based on signal strength)
- 🔴 **Red** - Downtrend (intensity based on signal strength)
- ⚪ **Gray** - Neutral/sideways market
Trend Markers:
- 🔺 **Green Triangle Up** - Start of new uptrend
- 🔻 **Red Triangle Down** - Start of new downtrend
- 📏 **Vertical Lines** - Trend change confirmation
Information Table
Real-time display showing:
- Trend - Current trend state with color coding
- MACD - Direction and crossover status
- RSI - Level and overbought/oversold status
- Volume - Level and trend direction
- Divergence - Current divergence status
- Signal Strength - Overall percentage
Alerts
Built-in alerts for:
- Strong Buy/Sell Signals - High probability setups
- Divergence Signals - Early reversal warnings
Settings
MACD:Fast (12), Slow (26), Signal (9)
RSI:Length (14), Overbought (70), Oversold (30)
Volume:MA Length (20), Threshold (1.5x)
Display:Toggle RSI, Volume, and Table visibility
Best Practices
🎯 Works best in trending markets
📊 Use in separate window below main chart
⚡ Combine with price action analysis
🛡️ Always use proper risk management
Pro Tips
- Green background = Strong uptrend, Red background = Strong downtrend
- Signal strength > 50% = Very bullish, < -50% = Very bearish
- Watch for divergence signals for early reversal warnings
- Use the information table for quick market assessment
---
Created with ❤️ for the trading community
This indicator is free to use for both commercial and non-commercial purposes.
𝒢𝐹𝑜𝓇𝑔𝑒 BB% TrendSyncBB% TrendSync | by GForge
Overview
The GForge BB% TrendSync is a sophisticated technical analysis indicator that combines dual Bollinger Band systems with momentum deviation analysis to identify high-probability trading opportunities. This indicator transforms traditional Bollinger Band analysis by creating a percentage-based oscillator that measures price position relative to dynamic bands, enhanced with momentum deviation filters for refined entry and exit signals.
How It Works
The indicator operates through a multi-layered analytical framework:
Dual Bollinger Band Architecture:
The system employs two independent Bollinger Band calculations with distinct parameters. The first system uses a longer-term base period with extended standard deviation calculation for capturing major trend movements. The second system utilizes a shorter-term base period with different standard deviation parameters for detecting immediate price momentum shifts. Each system generates its own percentage reading by measuring where the current price sits within its respective band range, scaled from 0 to 100.
Combined Signal Processing:
The indicator offers multiple methods for combining the dual band signals:
Individual system analysis using either BB1 or BB2 exclusively
Arithmetic averaging of both systems for balanced signals
Consensus requirement where both systems must agree
Either-one activation where any system can trigger signals
Momentum Deviation Enhancement:
The core innovation lies in applying momentum deviation analysis to the combined Bollinger percentage readings. The system calculates the standard deviation of the percentage oscillator itself over a specified period, creating upper and lower momentum deviation bands. These bands dynamically adjust based on the volatility of the oscillator readings, providing additional confirmation layers for signal generation.
Threshold-Based Signal Generation:
Trading signals are generated when the combined oscillator crosses predetermined threshold levels. Long signals activate when the oscillator crosses above the upper threshold, while short signals trigger when crossing below the lower threshold. The momentum deviation bands provide additional refinement, with signals confirmed when the deviation bands also cross their respective thresholds.
Dynamic State Tracking:
The system maintains intelligent state tracking for the momentum deviation bands, changing colors and visual emphasis based on active conditions. This provides real-time visual feedback about market momentum direction and strength.
Key Features
Multi-Mode Signal Generation: Five different methods for combining dual Bollinger Band signals
Momentum Deviation Filtering: Advanced momentum analysis applied to percentage oscillator
Visual Theme System: Ten professional color themes for optimal chart readability
Comprehensive Performance Metrics: Real-time tracking including Sharpe ratio, Sortino ratio, Calmar ratio, and Kelly criterion
Adaptive Visual Elements: Dynamic band coloring, gradient price bars, and compact oscillator display
Flexible Trading Modes: Support for long/short and long/cash strategies
Professional Analytics: Complete backtesting metrics with win rate, drawdown analysis, and risk ratios
Visual Components
Primary Bollinger Bands with threshold-based zone fills
Momentum Deviation Bands with state-based coloring
Gradient oscillator bar showing current market position
Signal diamonds for entry and exit points
Comprehensive metrics table with performance analytics
Dynamic price bar coloring based on oscillator readings
12H SUI
Configuration Options
The indicator provides extensive customization through organized parameter groups:
Display Settings: Toggle visibility of bands, signals, thresholds, and metrics
Visual Themes: Professional color schemes optimized for different trading environments
Strategy Configuration: Trading mode selection and signal combination methods
Band Parameters: Individual control over both Bollinger Band systems
Momentum Settings: Deviation analysis parameters for signal refinement
Signal Thresholds: Customizable entry and exit levels
Analysis Period: Date range selection for performance metrics
Performance Analytics
The integrated performance system provides comprehensive trading statistics:
Net Profit and Total Return calculations
Win Rate and Trade Count tracking
Maximum Drawdown analysis
Risk-adjusted metrics (Sharpe, Sortino, Calmar ratios)
Position sizing guidance through Kelly Criterion
Real-time P&L for current positions
Current market state and momentum direction
Performance Metrics Explained
The indicator provides a comprehensive suite of performance analytics that help evaluate strategy effectiveness and risk management. Each metric serves a specific purpose in understanding your trading performance:
Core Performance Metrics:
Net Profit: Shows the total percentage return of the strategy from the start date. This is your bottom-line performance - how much your capital has grown or declined using the indicator's signals. A positive percentage indicates profitable trading, while negative shows losses.
Win Rate: The percentage of trades that resulted in profit. While important, a high win rate doesn't guarantee profitability if losing trades are much larger than winning ones.
Total Trades: The number of completed round-trip trades executed by the system. This metric helps assess the statistical significance of your results - strategies with very few trades may not be reliable indicators of future performance.
Current P&L: Real-time profit or loss percentage of any open position. This shows how your current trade is performing and updates continuously with price movements. Displays "FLAT" when no position is active.
Risk Assessment Metrics:
Max Drawdown: The largest peak-to-trough decline in your account equity during the analysis period. This critical risk metric shows the worst-case scenario you would have experienced. Lower drawdowns indicate better risk management and more consistent performance.
Calmar Ratio: Measures risk-adjusted returns by dividing annualized return by maximum drawdown. Higher values indicate better performance per unit of risk taken. A ratio above 1.0 is generally considered good, while above 2.0 is excellent.
Advanced Risk Metrics:
Sharpe Ratio: Calculates excess return per unit of total volatility. This widely-used metric helps compare strategies by showing how much additional return you receive for the extra volatility. Values above 1.0 indicate good risk-adjusted performance, while above 2.0 is considered excellent.
Sortino Ratio: Similar to Sharpe Ratio but focuses only on downside volatility, ignoring upside price movements. This provides a more realistic view of risk since traders typically don't mind upward volatility. Higher values indicate better downside risk management.
Position Sizing Guidance:
Kelly ½: Represents half of the Kelly Criterion percentage for position sizing. The Kelly Criterion calculates optimal position size based on win probability and average win/loss ratio. Using half the Kelly percentage is a common conservative approach that reduces the risk of over-leveraging while still optimizing for growth.
Real-Time Status Indicators:
Position: Shows current market position as "L" (Long), "S" (Short), or "C" (Cash/Flat). This provides immediate clarity on your current market exposure.
MD State: Displays the momentum deviation state as "BULL" (bullish momentum detected), "BEAR" (bearish momentum detected), or "NEUTRAL" (no clear momentum direction). This helps gauge current market momentum strength and direction.
Interpreting the Metrics:
Profitability Focus: Net Profit and Win Rate show basic performance
Risk Assessment: Max Drawdown and Calmar Ratio reveal risk exposure
Consistency Evaluation: Sharpe and Sortino Ratios measure risk-adjusted returns
Position Management: Kelly ½ guides optimal position sizing
Current Status: Position and P&L provide real-time trading state
These metrics work together to provide a complete picture of strategy performance, helping you make informed decisions about parameter adjustments, position sizing, and overall strategy viability.
Use the "Average" signal mode for balanced signal generation combining both systems
Monitor the momentum deviation bands for confirmation of trend changes
Pay attention to the gradient oscillator bar for current market positioning
Consider the comprehensive metrics for strategy evaluation and optimization
Adjust threshold levels based on market volatility and trading timeframe
Use the visual themes to optimize chart readability for your trading environment
1H BTC Since 2023
Important Considerations
Risk Disclaimer: This indicator is a technical analysis tool designed for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or trading guidance. Past performance does not guarantee future results. All trading involves substantial risk of loss, and you should carefully consider your financial situation and risk tolerance before making any trading decisions. The indicator's signals and metrics should be used as part of a comprehensive analysis approach and never as the sole basis for trading decisions. Always conduct your own research.
The GForge BB% TrendSync represents an evolution in Bollinger Band analysis, combining traditional technical analysis concepts with modern momentum deviation techniques to create a comprehensive trading system suitable for various market conditions and trading styles.
APO Channel and SuperTrend OptimizedComplete Long Description (Final Version)
🔹 How it works
The originality of this script lies in the combination of two complementary approaches:
An adaptive channel, whose responsiveness is based on fractal dimension and volatility.
A breakout & candle confirmation system, providing clear visual trade signals.
Unlike standard channels (e.g., Bollinger Bands), which use a fixed deviation or multiplier, the APO Channel dynamically adjusts its baseline (Filt) and bands (Filt1, Filt2) in real time. This ensures that signals are not only adaptive to market conditions but also reinforced when both indicators align simultaneously, filtering out false moves and highlighting stronger trade opportunities.
🔹 Why this combination matters
By merging an adaptive volatility channel with a breakout confirmation system, the script provides traders with a more reliable view of momentum shifts.
The channel identifies when markets are consolidating versus expanding.
The breakout signals confirm actual momentum surges.
When both conditions trigger together, the likelihood of a meaningful move increases, making signals clearer and more robust than using either tool alone.
🔹 Visual signals
The script offers optional candle coloring and breakout labels:
Bullish signals are shown when price breaks above the adaptive upper band.
Bearish signals appear when price breaks below the adaptive lower band.
This visualization helps traders instantly recognize breakout opportunities and momentum shifts without needing multiple charts or indicators.
🔹 Optimized Default Settings
Channel Length: 26
Bands Distance: 1
ATR Period: 1
Source: (High + Low)/2
ATR Multiplier: 2
These parameters have been optimized for balanced responsiveness across assets.
👉 Signals are particularly relevant for scalping entries on the 3-minute timeframe, where quick detection of breakouts provides a trading edge.
The indicator works seamlessly on futures, crypto, forex, stocks, and most other instruments, making it a versatile tool for traders across markets.
Adaptive Supertrend [PRO]A complete TradingView system — easy to learn, effortless to trade.?
How to use:
Observe the main chart trend: Blue indicates bullish, red indicates bearish.
Wait for arrow signals:
When the main chart trend is bullish (blue), only go long and wait for the buy arrow.
When the main chart trend is bearish (red), only go short and wait for the sell arrow.
It's that simple — follow the trend + arrow signals.
Core Advantages:
No repainting, no future predictions, stable signals without drift
Intuitive clarity, effortlessly follow trends
Volatility Indicators (displayed as letters on main chart):
H (High Volatility)
M (Medium Volatility)
L (Low Volatility)
LUCEO BBLUCEO BB (with Dynamic Alerts)
This is an enhanced Bollinger Bands indicator designed to provide timely, clean, and highly informative alerts for key market conditions. It eliminates repetitive alert spam and provides rich, dynamic context in every notification, helping you make faster and more informed decisions.
Key Features
"First-Trigger" Alerts: Get a single, clean alert only on the first candle a condition is met. No more alert fatigue during a strong trend or a prolonged squeeze.
Three Key Conditions:
Squeeze Start: Notifies you the moment a Bollinger Band squeeze begins, signaling the potential for a significant price move.
Initial Breakout: Alerts on the first candle the price breaks above the upper band, indicating a potential start of a new uptrend.
Initial Breakdown: Alerts on the first candle the price breaks below the lower band, indicating a potential start of a new downtrend.
Dynamic & Rich Alert Messages: Alerts are automatically formatted with the Ticker, a user-friendly Timeframe (e.g., 4h, 1D), the specific event, and the current price formatted to the correct number of decimal places.
Example: BB Upper First Breakout Current Price: 65,123.5
Persistent Visual Cues: While alerts are sent only once per event, the chart background will remain colored (Yellow for Squeeze, Blue for Upper, Red for Lower) for as long as the condition persists, allowing for easy visual tracking.
How to Set Up Alerts
Add the indicator to your chart.
Click the 'Alert' icon in the TradingView toolbar.
In the 'Condition' dropdown, select LUCEO BB.
In the second dropdown, select 'Any alert() function call'. This is a critical step.
Leave the 'Message' box empty (the script provides the full message).
Click 'Create'.
Settings
BB Length: The look-back period for the Bollinger Bands.
BB StdDev: The number of standard deviations for the bands.
Squeeze Threshold (%): Defines the percentage below the average bandwidth to trigger a squeeze condition.
LUCEO BB (커스텀 동적 알림)
이 지표는 주요 시장 상황에 대해 시기적절하고, 깔끔하며, 매우 유용한 알림을 제공하도록 설계된 강화된 볼린저밴드 지표입니다. 반복적인 알림 스팸을 제거하고 모든 알림에 풍부하고 동적인 컨텍스트를 제공하여 더 빠르고 정보에 입각한 결정을 내리는 데 도움을 줍니다.
주요 특징
'최초 발생' 알림: 조건이 충족되는 첫 번째 캔들에서만 단 한 번의 깔끔한 알림을 받으세요. 강한 추세나 지속되는 스퀴즈 동안 더 이상 알림으로 피로를 느끼지 않아도 됩니다.
세 가지 핵심 조건:
스퀴즈 시작: 볼린저밴드 스퀴즈가 시작되는 순간을 알려주어 잠재적인 큰 가격 변동에 대비할 수 있습니다.
최초 상단 돌파: 가격이 상단 밴드를 처음으로 돌파하는 캔들에서 알려주어 새로운 상승 추세의 시작 가능성을 나타냅니다.
최초 하단 이탈: 가격이 하단 밴드를 처음으로 이탈하는 캔들에서 알려주어 새로운 하락 추세의 시작 가능성을 나타냅니다.
동적이고 풍부한 알림 메시지: 알림은 티커, 사용자 친화적인 시간봉(예: 4h, 1D), 특정 이벤트 및 현재 가격이 자동으로 형식에 맞춰 포함됩니다.
예시: BB 상단 첫 돌파 현재 가격: 65,123.5
지속적인 시각 신호: 알림은 이벤트당 한 번만 전송되지만, 차트 배경색(스퀴즈: 노랑, 상단: 파랑, 하단: 빨강)은 조건이 지속되는 동안 유지되어 시각적으로 쉽게 상황을 추적할 수 있습니다.
알림 설정 방법
지표를 차트에 추가합니다.
트레이딩뷰 툴바에서 '알림' 아이콘을 클릭합니다.
'조건' 드롭다운 메뉴에서 LUCEO BB를 선택합니다.
두 번째 드롭다운 메뉴에서 **'모든 alert() 함수 호출' (Any alert() function call)**을 선택합니다. 이 단계가 매우 중요합니다.
'메시지' 창은 비워둡니다 (스크립트가 자동으로 전체 메시지를 제공합니다).
'만들기'를 클릭합니다.
설정
BB Length: 볼린저밴드의 기간을 설정합니다.
BB StdDev: 밴드의 표준편차 값을 설정합니다.
Squeeze Threshold (%): 스퀴즈 상태를 감지하기 위해 평균 밴드 폭 대비 얼마나 좁아졌는지를 백분율로 설정합니다.
Dynamic EMA Cloud📘 Dynamic EMA Cloud – Quick Guide
What it does:
- Shades the area between two EMAs (default 8 & 21).
- Cloud flips green when the fast EMA is on top (bullish), red when it’s underneath (bearish).
- The cloud gets thicker in strong trends and thinner when things are weak or choppy.
- Top-right box shows the EMA trend and which sizing mode you’re using.
Cloud Width Modes:
- EMA Gap → Cloud follows the distance between the EMAs. Great for spotting trend strength.
- ATR → Uses volatility. Wide in high-vol markets, tight in low-vol.
- Percent → Fixed % of price. Keeps charts looking consistent whether it’s a $2 penny stock or a $2000 ticker.
- Hybrid → Mix of both EMA gap and ATR. A “best of both” setting.
How to read it:
- Price riding above a green cloud = bullish control.
- Price staying under a red cloud = bearish control.
- A skinny cloud = trend might be running out of gas or a reversal coming.
- A fat cloud = momentum is strong, trend is solid.
Tips:
- For scalping/day trading, use faster EMAs (like 8 & 21).
- For swing trades, use slower pairs (20 & 50, 50 & 200).
- The floating label tells you “Bullish / Bearish / Neutral” at the current bar.
- Corner tag keeps you oriented no matter where you scroll.
Let me know what you think!
GSR-MINI BandsGSR-Mini Bands is an indicator designed to analyze the dynamics of implied volatility indices, such as the VIX (S&P500) or the VDAX-NEW (DAX40).
The calculation is performed as the percentage difference between the cumulative series of opening gaps and the cumulative evolution of the volatility index itself, adjusted for those gaps.
The indicator moves in a range of approximately -1 to 1, with intermediate lines (0.3 and 0.7) that help identify different relative levels of volatility behavior.
Although it is primarily designed for daily charts, it can also be applied to shorter time frames, such as 1 minute, where it offers additional insight into intraday volatility dynamics.
Note : This indicator does not constitute an investment recommendation. It is presented solely as a technical analysis tool.
Custom Alert - Volume, RSI, Bollinger Bandjust a quick script to see if i can catch the bounce off the bolinger band with low rsi
GSR BandsGSR Bands is an indicator designed to analyze the dynamics of an implied volatility index based on opening gaps. The model builds an accumulated series of gaps and generates additional offset bands derived from Fibonacci numbers and prime numbers (+10, +20, +30, +50, +70, +80, +110, +125).
The result is a set of cumulative gap curves that help visualize relevant zones in the evolution of the volatility index (potential areas of maximum volatility). Users can customize the offset values displayed on the chart, making it easier to explore different analytical scenarios.
The indicator can be applied to volatility indices such as VIX or VDAX-NEWS, and may serve as a complementary tool when studying the relationship between implied volatility and equity markets.
Note : This indicator does not constitute an investment recommendation. It is intended solely as a technical analysis tool.
Мой скрипт// © Buzzara
// =================================
// PLEASE SUPPORT THE TEAM
// =================================
//
// Telegram: t.me
a_trade// =================================
//@version=5
VERSION = ' Buzzara2.0'
strategy('ALGOX V6_1_24', shorttitle = '🚀〄 Buzzara2.0 〄🚀'+ VERSION, overlay = true, explicit_plot_zorder = true, pyramiding = 0, default_qty_type = strategy.percent_of_equity, initial_capital = 1000, default_qty_value = 1, calc_on_every_tick = false, process_orders_on_close = true)
G_SCRIPT01 = '■ ' + 'SAIYAN OCC'
//#region ———— <↓↓↓ G_SCRIPT01 ↓↓↓> {
// === INPUTS ===
res = input.timeframe('15', 'TIMEFRAME', group ="NON REPAINT")
useRes = input(true, 'Use Alternate Signals')
intRes = input(10, 'Multiplier for Alernate Signals')
basisType = input.string('ALMA', 'MA Type: ', options= )
basisLen = input.int(50, 'MA Period', minval=1)
offsetSigma = input.int(5, 'Offset for LSMA / Sigma for ALMA', minval=0)
offsetALMA = input.float(2, 'Offset for ALMA', minval=0, step=0.01)
scolor = input(false, 'Show coloured Bars to indicate Trend?')
delayOffset = input.int(0, 'Delay Open/Close MA', minval=0, step=1,
tooltip = 'Forces Non-Repainting')
tradeType = input.string('BOTH', 'What trades should be taken : ',
options = )
//=== /INPUTS ===
h = input(false, 'Signals for Heikin Ashi Candles')
//INDICATOR SETTINGS
swing_length = input.int(10, 'Swing High/Low Length', group = 'Settings', minval = 1, maxval = 50)
history_of_demand_to_keep = input.int(20, 'History To Keep', minval = 5, maxval = 50)
box_width = input.float(2.5, 'Supply/Demand Box Width', group = 'Settings', minval = 1, maxval = 10, step = 0.5)
//INDICATOR VISUAL SETTINGS
show_zigzag = input.bool(false, 'Show Zig Zag', group = 'Visual Settings', inline = '1')
show_price_action_labels = input.bool(false, 'Show Price Action Labels', group = 'Visual Settings', inline = '2')
supply_color = input.color(#00000000, 'Supply', group = 'Visual Settings', inline = '3')
supply_outline_color = input.color(#00000000, 'Outline', group = 'Visual Settings', inline = '3')
demand_color = input.color(#00000000, 'Demand', group = 'Visual Settings', inline = '4')
demand_outline_color = input.color(#00000000, 'Outline', group = 'Visual Settings', inline = '4')
bos_label_color = input.color(#00000000, 'BOS Label', group = 'Visual Settings', inline = '5')
poi_label_color = input.color(#00000000, 'POI Label', group = 'Visual Settings', inline = '7')
poi_border_color = input.color(#00000000, 'POI border', group = 'Visual Settings', inline = '7')
swing_type_color = input.color(#00000000, 'Price Action Label', group = 'Visual Settings', inline = '8')
zigzag_color = input.color(#00000000, 'Zig Zag', group = 'Visual Settings', inline = '9')
//END SETTINGS
// FUNCTION TO ADD NEW AND REMOVE LAST IN ARRAY
f_array_add_pop(array, new_value_to_add) =>
array.unshift(array, new_value_to_add)
array.pop(array)
// FUNCTION SWING H & L LABELS
f_sh_sl_labels(array, swing_type) =>
var string label_text = na
if swing_type == 1
if array.get(array, 0) >= array.get(array, 1)
label_text := 'HH'
else
label_text := 'LH'
label.new(
bar_index - swing_length,
array.get(array,0),
text = label_text,
style = label.style_label_down,
textcolor = swing_type_color,
color = swing_type_color,
size = size.tiny)
else if swing_type == -1
if array.get(array, 0) >= array.get(array, 1)
label_text := 'HL'
else
label_text := 'LL'
label.new(
bar_index - swing_length,
array.get(array,0),
text = label_text,
style = label.style_label_up,
textcolor = swing_type_color,
color = swing_type_color,
size = size.tiny)
// FUNCTION MAKE SURE SUPPLY ISNT OVERLAPPING
f_check_overlapping(new_poi, box_array, atrValue) =>
atr_threshold = atrValue * 2
okay_to_draw = true
for i = 0 to array.size(box_array) - 1
top = box.get_top(array.get(box_array, i))
bottom = box.get_bottom(array.get(box_array, i))
poi = (top + bottom) / 2
upper_boundary = poi + atr_threshold
lower_boundary = poi - atr_threshold
if new_poi >= lower_boundary and new_poi <= upper_boundary
okay_to_draw := false
break
else
okay_to_draw := true
okay_to_draw
// FUNCTION TO DRAW SUPPLY OR DEMAND ZONE
f_supply_demand(value_array, bn_array, box_array, label_array, box_type, atrValue) =>
atr_buffer = atrValue * (box_width / 10)
box_left = array.get(bn_array, 0)
box_right = bar_index
var float box_top = 0.00
var float box_bottom = 0.00
var float poi = 0.00
if box_type == 1
box_top := array.get(value_array, 0)
box_bottom := box_top - atr_buffer
poi := (box_top + box_bottom) / 2
else if box_type == -1
box_bottom := array.get(value_array, 0)
box_top := box_bottom + atr_buffer
poi := (box_top + box_bottom) / 2
okay_to_draw = f_check_overlapping(poi, box_array, atrValue)
// okay_to_draw = true
//delete oldest box, and then create a new box and add it to the array
if box_type == 1 and okay_to_draw
box.delete( array.get(box_array, array.size(box_array) - 1) )
f_array_add_pop(box_array, box.new( left = box_left, top = box_top, right = box_right, bottom = box_bottom, border_color = supply_outline_color,
bgcolor = supply_color, extend = extend.right, text = 'SUPPLY', text_halign = text.align_center, text_valign = text.align_center, text_color = poi_label_color, text_size = size.small, xloc = xloc.bar_index))
box.delete( array.get(label_array, array.size(label_array) - 1) )
f_array_add_pop(label_array, box.new( left = box_left, top = poi, right = box_right, bottom = poi, border_color = poi_border_color,
bgcolor = poi_border_color, extend = extend.right, text = 'POI', text_halign = text.align_left, text_valign = text.align_center, text_color = poi_label_color, text_size = size.small, xloc = xloc.bar_index))
else if box_type == -1 and okay_to_draw
box.delete( array.get(box_array, array.size(box_array) - 1) )
f_array_add_pop(box_array, box.new( left = box_left, top = box_top, right = box_right, bottom = box_bottom, border_color = demand_outline_color,
bgcolor = demand_color, extend = extend.right, text = 'DEMAND', text_halign = text.align_center, text_valign = text.align_center, text_color = poi_label_color, text_size = size.small, xloc = xloc.bar_index))
box.delete( array.get(label_array, array.size(label_array) - 1) )
f_array_add_pop(label_array, box.new( left = box_left, top = poi, right = box_right, bottom = poi, border_color = poi_border_color,
bgcolor = poi_border_color, extend = extend.right, text = 'POI', text_halign = text.align_left, text_valign = text.align_center, text_color = poi_label_color, text_size = size.small, xloc = xloc.bar_index))
// FUNCTION TO CHANGE SUPPLY/DEMAND TO A BOS IF BROKEN
f_sd_to_bos(box_array, bos_array, label_array, zone_type) =>
if zone_type == 1
for i = 0 to array.size(box_array) - 1
level_to_break = box.get_top(array.get(box_array,i))
// if ta.crossover(close, level_to_break)
if close >= level_to_break
copied_box = box.copy(array.get(box_array,i))
f_array_add_pop(bos_array, copied_box)
mid = (box.get_top(array.get(box_array,i)) + box.get_bottom(array.get(box_array,i))) / 2
box.set_top(array.get(bos_array,0), mid)
box.set_bottom(array.get(bos_array,0), mid)
box.set_extend( array.get(bos_array,0), extend.none)
box.set_right( array.get(bos_array,0), bar_index)
box.set_text( array.get(bos_array,0), 'BOS' )
box.set_text_color( array.get(bos_array,0), bos_label_color)
box.set_text_size( array.get(bos_array,0), size.small)
box.set_text_halign( array.get(bos_array,0), text.align_center)
box.set_text_valign( array.get(bos_array,0), text.align_center)
box.delete(array.get(box_array, i))
box.delete(array.get(label_array, i))
if zone_type == -1
for i = 0 to array.size(box_array) - 1
level_to_break = box.get_bottom(array.get(box_array,i))
// if ta.crossunder(close, level_to_break)
if close <= level_to_break
copied_box = box.copy(array.get(box_array,i))
f_array_add_pop(bos_array, copied_box)
mid = (box.get_top(array.get(box_array,i)) + box.get_bottom(array.get(box_array,i))) / 2
box.set_top(array.get(bos_array,0), mid)
box.set_bottom(array.get(bos_array,0), mid)
box.set_extend( array.get(bos_array,0), extend.none)
box.set_right( array.get(bos_array,0), bar_index)
box.set_text( array.get(bos_array,0), 'BOS' )
box.set_text_color( array.get(bos_array,0), bos_label_color)
box.set_text_size( array.get(bos_array,0), size.small)
box.set_text_halign( array.get(bos_array,0), text.align_center)
box.set_text_valign( array.get(bos_array,0), text.align_center)
box.delete(array.get(box_array, i))
box.delete(array.get(label_array, i))
// FUNCTION MANAGE CURRENT BOXES BY CHANGING ENDPOINT
f_extend_box_endpoint(box_array) =>
for i = 0 to array.size(box_array) - 1
box.set_right(array.get(box_array, i), bar_index + 100)
//
stratRes = timeframe.ismonthly ? str.tostring(timeframe.multiplier * intRes, '###M') :
timeframe.isweekly ? str.tostring(timeframe.multiplier * intRes, '###W') :
timeframe.isdaily ? str.tostring(timeframe.multiplier * intRes, '###D') :
timeframe.isintraday ? str.tostring(timeframe.multiplier * intRes, '####') :
'60'
src = h ? request.security(ticker.heikinashi(syminfo.tickerid),
timeframe.period, close, lookahead = barmerge.lookahead_off) : close
// CALCULATE ATR
atrValue = ta.atr(50)
// CALCULATE SWING HIGHS & SWING LOWS
swing_high = ta.pivothigh(high, swing_length, swing_length)
swing_low = ta.pivotlow(low, swing_length, swing_length)
// ARRAYS FOR SWING H/L & BN
var swing_high_values = array.new_float(5,0.00)
var swing_low_values = array.new_float(5,0.00)
var swing_high_bns = array.new_int(5,0)
var swing_low_bns = array.new_int(5,0)
// ARRAYS FOR SUPPLY / DEMAND
var current_supply_box = array.new_box(history_of_demand_to_keep, na)
var current_demand_box = array.new_box(history_of_demand_to_keep, na)
// ARRAYS FOR SUPPLY / DEMAND POI LABELS
var current_supply_poi = array.new_box(history_of_demand_to_keep, na)
var current_demand_poi = array.new_box(history_of_demand_to_keep, na)
// ARRAYS FOR BOS
var supply_bos = array.new_box(5, na)
var demand_bos = array.new_box(5, na)
//END CALCULATIONS
// NEW SWING HIGH
if not na(swing_high)
//MANAGE SWING HIGH VALUES
f_array_add_pop(swing_high_values, swing_high)
f_array_add_pop(swing_high_bns, bar_index )
if show_price_action_labels
f_sh_sl_labels(swing_high_values, 1)
f_supply_demand(swing_high_values, swing_high_bns, current_supply_box, current_supply_poi, 1, atrValue)
// NEW SWING LOW
else if not na(swing_low)
//MANAGE SWING LOW VALUES
f_array_add_pop(swing_low_values, swing_low)
f_array_add_pop(swing_low_bns, bar_index )
if show_price_action_labels
f_sh_sl_labels(swing_low_values, -1)
f_supply_demand(swing_low_values, swing_low_bns, current_demand_box, current_demand_poi, -1, atrValue)
f_sd_to_bos(current_supply_box, supply_bos, current_supply_poi, 1)
f_sd_to_bos(current_demand_box, demand_bos, current_demand_poi, -1)
f_extend_box_endpoint(current_supply_box)
f_extend_box_endpoint(current_demand_box)
channelBal = input.bool(false, "Channel Balance", group = "CHART")
lr_slope(_src, _len) =>
x = 0.0, y = 0.0, x2 = 0.0, xy = 0.0
for i = 0 to _len - 1
val = _src
per = i + 1
x += per
y += val
x2 += per * per
xy += val * per
_slp = (_len * xy - x * y) / (_len * x2 - x * x)
_avg = y / _len
_int = _avg - _slp * x / _len + _slp
lr_dev(_src, _len, _slp, _avg, _int) =>
upDev = 0.0, dnDev = 0.0
val = _int
for j = 0 to _len - 1
price = high - val
if price > upDev
upDev := price
price := val - low
if price > dnDev
dnDev := price
price := _src
val += _slp
//
= ta.kc(close, 80, 10.5)
= ta.kc(close, 80, 9.5)
= ta.kc(close, 80, 8)
= ta.kc(close, 80, 3)
barsL = 10
barsR = 10
pivotHigh = fixnan(ta.pivothigh(barsL, barsR) )
pivotLow = fixnan(ta.pivotlow(barsL, barsR) )
source = close, period = 150
= lr_slope(source, period)
= lr_dev(source, period, s, a, i)
y1 = low - (ta.atr(30) * 2), y1B = low - ta.atr(30)
y2 = high + (ta.atr(30) * 2), y2B = high + ta.atr(30)
x1 = bar_index - period + 1, _y1 = i + s * (period - 1), x2 = bar_index, _y2 = i
//Functions
//Line Style function
get_line_style(style) =>
out = switch style
'???' => line.style_solid
'----' => line.style_dashed
' ' => line.style_dotted
//Function to get order block coordinates
get_coordinates(condition, top, btm, ob_val)=>
var ob_top = array.new_float(0)
var ob_btm = array.new_float(0)
var ob_avg = array.new_float(0)
var ob_left = array.new_int(0)
float ob = na
//Append coordinates to arrays
if condition
avg = math.avg(top, btm)
array.unshift(ob_top, top)
array.unshift(ob_btm, btm)
array.unshift(ob_avg, avg)
ob := ob_val
//Function to remove mitigated order blocks from coordinate arrays
remove_mitigated(ob_top, ob_btm, ob_left, ob_avg, target, bull)=>
mitigated = false
target_array = bull ? ob_btm : ob_top
for element in target_array
idx = array.indexof(target_array, element)
if (bull ? target < element : target > element)
mitigated := true
array.remove(ob_top, idx)
array.remove(ob_btm, idx)
array.remove(ob_avg, idx)
array.remove(ob_left, idx)
mitigated
//Function to set order blocks
set_order_blocks(ob_top, ob_btm, ob_left, ob_avg, ext_last, bg_css, border_css, lvl_css)=>
var ob_box = array.new_box(0)
var ob_lvl = array.new_line(0)
//Global elements
var os = 0
var target_bull = 0.
var target_bear = 0.
// Create non-repainting security function
rp_security(_symbol, _res, _src) =>
request.security(_symbol, _res, _src )
htfHigh = rp_security(syminfo.tickerid, res, high)
htfLow = rp_security(syminfo.tickerid, res, low)
// Main Indicator
// Functions
smoothrng(x, t, m) =>
wper = t * 2 - 1
avrng = ta.ema(math.abs(x - x ), t)
smoothrng = ta.ema(avrng, wper) * m
rngfilt(x, r) =>
rngfilt = x
rngfilt := x > nz(rngfilt ) ? x - r < nz(rngfilt ) ? nz(rngfilt ) : x - r : x + r > nz(rngfilt ) ? nz(rngfilt ) : x + r
percWidth(len, perc) => (ta.highest(len) - ta.lowest(len)) * perc / 100
securityNoRep(sym, res, src) => request.security(sym, res, src, barmerge.gaps_off, barmerge.lookahead_on)
swingPoints(prd) =>
pivHi = ta.pivothigh(prd, prd)
pivLo = ta.pivotlow (prd, prd)
last_pivHi = ta.valuewhen(pivHi, pivHi, 1)
last_pivLo = ta.valuewhen(pivLo, pivLo, 1)
hh = pivHi and pivHi > last_pivHi ? pivHi : na
lh = pivHi and pivHi < last_pivHi ? pivHi : na
hl = pivLo and pivLo > last_pivLo ? pivLo : na
ll = pivLo and pivLo < last_pivLo ? pivLo : na
f_chartTfInMinutes() =>
float _resInMinutes = timeframe.multiplier * (
timeframe.isseconds ? 1 :
timeframe.isminutes ? 1. :
timeframe.isdaily ? 60. * 24 :
timeframe.isweekly ? 60. * 24 * 7 :
timeframe.ismonthly ? 60. * 24 * 30.4375 : na)
f_kc(src, len, sensitivity) =>
basis = ta.sma(src, len)
span = ta.atr(len)
wavetrend(src, chlLen, avgLen) =>
esa = ta.ema(src, chlLen)
d = ta.ema(math.abs(src - esa), chlLen)
ci = (src - esa) / (0.015 * d)
wt1 = ta.ema(ci, avgLen)
wt2 = ta.sma(wt1, 3)
f_top_fractal(_src) => _src < _src and _src < _src and _src > _src and _src > _src
f_bot_fractal(_src) => _src > _src and _src > _src and _src < _src and _src < _src
top_fractal = f_top_fractal(src)
bot_fractal = f_bot_fractal(src)
f_fractalize (_src) => top_fractal ? 1 : bot_fractal ? -1 : 0
f_findDivs(src, topLimit, botLimit) =>
fractalTop = f_fractalize(src) > 0 and src >= topLimit ? src : na
fractalBot = f_fractalize(src) < 0 and src <= botLimit ? src : na
highPrev = ta.valuewhen(fractalTop, src , 0)
highPrice = ta.valuewhen(fractalTop, high , 0)
lowPrev = ta.valuewhen(fractalBot, src , 0)
lowPrice = ta.valuewhen(fractalBot, low , 0)
bearSignal = fractalTop and high > highPrice and src < highPrev
bullSignal = fractalBot and low < lowPrice and src > lowPrev
// Get user input
enableSR = input(false , "SR On/Off", group="SR")
colorSup = input(#00000000 , "Support Color", group="SR")
colorRes = input(#00000000 , "Resistance Color", group="SR")
strengthSR = input.int(2 , "S/R Strength", 1, group="SR")
lineStyle = input.string("Dotted", "Line Style", , group="SR")
lineWidth = input.int(2 , "S/R Line Width", 1, group="SR")
useZones = input(true , "Zones On/Off", group="SR")
useHLZones = input(true , "High Low Zones On/Off", group="SR")
zoneWidth = input.int(2 , "Zone Width %", 0,
tooltip = "it's calculated using % of the distance between highest/lowest in last 300 bars", group="SR")
expandSR = input(true , "Expand SR")
// Get components
rb = 10
prd = 284
ChannelW = 10
label_loc = 55
style = lineStyle == "Solid" ? line.style_solid :
lineStyle == "Dotted" ? line.style_dotted : line.style_dashed
ph = ta.pivothigh(rb, rb)
pl = ta.pivotlow (rb, rb)
sr_levels = array.new_float(21, na)
prdhighest = ta.highest(prd)
prdlowest = ta.lowest(prd)
cwidth = percWidth(prd, ChannelW)
zonePerc = percWidth(300, zoneWidth)
aas = array.new_bool(41, true)
u1 = 0.0, u1 := nz(u1 )
d1 = 0.0, d1 := nz(d1 )
highestph = 0.0, highestph := highestph
lowestpl = 0.0, lowestpl := lowestpl
var sr_levs = array.new_float(21, na)
label hlabel = na, label.delete(hlabel )
label llabel = na, label.delete(llabel )
var sr_lines = array.new_line(21, na)
var sr_linesH = array.new_line(21, na)
var sr_linesL = array.new_line(21, na)
var sr_linesF = array.new_linefill(21, na)
var sr_labels = array.new_label(21, na)
if (not na(ph) or not na(pl))
for x = 0 to array.size(sr_levels) - 1
array.set(sr_levels, x, na)
highestph := prdlowest
lowestpl := prdhighest
countpp = 0
for x = 0 to prd
if na(close )
break
if not na(ph ) or not na(pl )
highestph := math.max(highestph, nz(ph , prdlowest), nz(pl , prdlowest))
lowestpl := math.min(lowestpl, nz(ph , prdhighest), nz(pl , prdhighest))
countpp += 1
if countpp > 40
break
if array.get(aas, countpp)
upl = (not na(ph ) and (ph != 0) ? high : low ) + cwidth
dnl = (not na(ph ) and (ph != 0) ? high : low ) - cwidth
u1 := countpp == 1 ? upl : u1
d1 := countpp == 1 ? dnl : d1
tmp = array.new_bool(41, true)
cnt = 0
tpoint = 0
for xx = 0 to prd
if na(close )
break
if not na(ph ) or not na(pl )
chg = false
cnt += 1
if cnt > 40
break
if array.get(aas, cnt)
if not na(ph )
if high <= upl and high >= dnl
tpoint += 1
chg := true
if not na(pl )
if low <= upl and low >= dnl
tpoint += 1
chg := true
if chg and cnt < 41
array.set(tmp, cnt, false)
if tpoint >= strengthSR
for g = 0 to 40 by 1
if not array.get(tmp, g)
array.set(aas, g, false)
if (not na(ph ) and countpp < 21)
array.set(sr_levels, countpp, high )
if (not na(pl ) and countpp < 21)
array.set(sr_levels, countpp, low )
// Plot
var line highest_ = na, line.delete(highest_)
var line lowest_ = na, line.delete(lowest_)
var line highest_fill1 = na, line.delete(highest_fill1)
var line highest_fill2 = na, line.delete(highest_fill2)
var line lowest_fill1 = na, line.delete(lowest_fill1)
var line lowest_fill2 = na, line.delete(lowest_fill2)
hi_col = close >= highestph ? colorSup : colorRes
lo_col = close >= lowestpl ? colorSup : colorRes
if enableSR
highest_ := line.new(bar_index - 311, highestph, bar_index, highestph, xloc.bar_index, expandSR ? extend.both : extend.right, hi_col, style, lineWidth)
lowest_ := line.new(bar_index - 311, lowestpl , bar_index, lowestpl , xloc.bar_index, expandSR ? extend.both : extend.right, lo_col, style, lineWidth)
if useHLZones
highest_fill1 := line.new(bar_index - 311, highestph + zonePerc, bar_index, highestph + zonePerc, xloc.bar_index, expandSR ? extend.both : extend.right, na)
highest_fill2 := line.new(bar_index - 311, highestph - zonePerc, bar_index, highestph - zonePerc, xloc.bar_index, expandSR ? extend.both : extend.right, na)
lowest_fill1 := line.new(bar_index - 311, lowestpl + zonePerc , bar_index, lowestpl + zonePerc , xloc.bar_index, expandSR ? extend.both : extend.right, na)
lowest_fill2 := line.new(bar_index - 311, lowestpl - zonePerc , bar_index, lowestpl - zonePerc , xloc.bar_index, expandSR ? extend.both : extend.right, na)
linefill.new(highest_fill1, highest_fill2, hi_col)
linefill.new(lowest_fill1 , lowest_fill2 , lo_col)
if (not na(ph) or not na(pl))
for x = 0 to array.size(sr_lines) - 1
array.set(sr_levs, x, array.get(sr_levels, x))
for x = 0 to array.size(sr_lines) - 1
line.delete(array.get(sr_lines, x))
line.delete(array.get(sr_linesH, x))
line.delete(array.get(sr_linesL, x))
linefill.delete(array.get(sr_linesF, x))
if (not na(array.get(sr_levs, x)) and enableSR)
line_col = close >= array.get(sr_levs, x) ? colorSup : colorRes
array.set(sr_lines, x, line.new(bar_index - 355, array.get(sr_levs, x), bar_index, array.get(sr_levs, x), xloc.bar_index, expandSR ? extend.both : extend.right, line_col, style, lineWidth))
if useZones
array.set(sr_linesH, x, line.new(bar_index - 355, array.get(sr_levs, x) + zonePerc, bar_index, array.get(sr_levs, x) + zonePerc, xloc.bar_index, expandSR ? extend.both : extend.right, na))
array.set(sr_linesL, x, line.new(bar_index - 355, array.get(sr_levs, x) - zonePerc, bar_index, array.get(sr_levs, x) - zonePerc, xloc.bar_index, expandSR ? extend.both : extend.right, na))
array.set(sr_linesF, x, linefill.new(array.get(sr_linesH, x), array.get(sr_linesL, x), line_col))
for x = 0 to array.size(sr_labels) - 1
label.delete(array.get(sr_labels, x))
if (not na(array.get(sr_levs, x)) and enableSR)
lab_loc = close >= array.get(sr_levs, x) ? label.style_label_up : label.style_label_down
lab_col = close >= array.get(sr_levs, x) ? colorSup : colorRes
array.set(sr_labels, x, label.new(bar_index + label_loc, array.get(sr_levs, x), str.tostring(math.round_to_mintick(array.get(sr_levs, x))), color=lab_col , textcolor=#000000, style=lab_loc))
hlabel := enableSR ? label.new(bar_index + label_loc + math.round(math.sign(label_loc)) * 20, highestph, "High Level : " + str.tostring(highestph), color=hi_col, textcolor=#000000, style=label.style_label_down) : na
llabel := enableSR ? label.new(bar_index + label_loc + math.round(math.sign(label_loc)) * 20, lowestpl , "Low Level : " + str.tostring(lowestpl) , color=lo_col, textcolor=#000000, style=label.style_label_up ) : na
// Get components
rsi = ta.rsi(close, 28)
//rsiOb = rsi > 78 and rsi > ta.ema(rsi, 10)
//rsiOs = rsi < 27 and rsi < ta.ema(rsi, 10)
rsiOb = rsi > 65 and rsi > ta.ema(rsi, 10)
rsiOs = rsi < 35 and rsi < ta.ema(rsi, 10)
dHigh = securityNoRep(syminfo.tickerid, "D", high )
dLow = securityNoRep(syminfo.tickerid, "D", low )
dClose = securityNoRep(syminfo.tickerid, "D", close )
ema = ta.ema(close, 144)
emaBull = close > ema
equal_tf(res) => str.tonumber(res) == f_chartTfInMinutes() and not timeframe.isseconds
higher_tf(res) => str.tonumber(res) > f_chartTfInMinutes() or timeframe.isseconds
too_small_tf(res) => (timeframe.isweekly and res=="1") or (timeframe.ismonthly and str.tonumber(res) < 10)
securityNoRep1(sym, res, src) =>
bool bull_ = na
bull_ := equal_tf(res) ? src : bull_
bull_ := higher_tf(res) ? request.security(sym, res, src, barmerge.gaps_off, barmerge.lookahead_on) : bull_
bull_array = request.security_lower_tf(syminfo.tickerid, higher_tf(res) ? str.tostring(f_chartTfInMinutes()) + (timeframe.isseconds ? "S" : "") : too_small_tf(res) ? (timeframe.isweekly ? "3" : "10") : res, src)
if array.size(bull_array) > 1 and not equal_tf(res) and not higher_tf(res)
bull_ := array.pop(bull_array)
array.clear(bull_array)
bull_
// === BASE FUNCTIONS ===
// Returns MA input selection variant, default to SMA if blank or typo.
variant(type, src, len, offSig, offALMA) =>
v1 = ta.sma(src, len) // Simple
v2 = ta.ema(src, len) // Exponential
v3 = 2 * v2 - ta.ema(v2, len) // Double Exponential
v4 = 3 * (v2 - ta.ema(v2, len)) + ta.ema(ta.ema(v2, len), len) // Triple Exponential
v5 = ta.wma(src, len) // Weighted
v6 = ta.vwma(src, len) // Volume Weighted
v7 = 0.0
sma_1 = ta.sma(src, len) // Smoothed
v7 := na(v7 ) ? sma_1 : (v7 * (len - 1) + src) / len
v8 = ta.wma(2 * ta.wma(src, len / 2) - ta.wma(src, len), math.round(math.sqrt(len))) // Hull
v9 = ta.linreg(src, len, offSig) // Least Squares
v10 = ta.alma(src, len, offALMA, offSig) // Arnaud Legoux
v11 = ta.sma(v1, len) // Triangular (extreme smooth)
// SuperSmoother filter
// 2013 John F. Ehlers
a1 = math.exp(-1.414 * 3.14159 / len)
b1 = 2 * a1 * math.cos(1.414 * 3.14159 / len)
c2 = b1
c3 = -a1 * a1
c1 = 1 - c2 - c3
v12 = 0.0
v12 := c1 * (src + nz(src )) / 2 + c2 * nz(v12 ) + c3 * nz(v12 )
type == 'EMA' ? v2 : type == 'DEMA' ? v3 : type == 'TEMA' ? v4 : type == 'WMA' ? v5 : type == 'VWMA' ? v6 : type == 'SMMA' ? v7 : type == 'HullMA' ? v8 : type == 'LSMA' ? v9 : type == 'ALMA' ? v10 : type == 'TMA' ? v11 : type == 'SSMA' ? v12 : v1
// security wrapper for repeat calls
reso(exp, use, res) =>
security_1 = request.security(syminfo.tickerid, res, exp, gaps = barmerge.gaps_off, lookahead = barmerge.lookahead_on)
use ? security_1 : exp
// === /BASE FUNCTIONS ===
// === SERIES SETUP ===
closeSeries = variant(basisType, close , basisLen, offsetSigma, offsetALMA)
openSeries = variant(basisType, open , basisLen, offsetSigma, offsetALMA)
// === /SERIES ===
// Get Alternate resolution Series if selected.
closeSeriesAlt = reso(closeSeries, useRes, stratRes)
openSeriesAlt = reso(openSeries, useRes, stratRes)
//
lxTrigger = false
sxTrigger = false
leTrigger = ta.crossover (closeSeriesAlt, openSeriesAlt)
seTrigger = ta.crossunder(closeSeriesAlt, openSeriesAlt)
G_RISK = '■ ' + 'Risk Management'
//#region ———— <↓↓↓ G_RISK ↓↓↓> {
// ———————————
//Tooltip
T_LVL = '(%) Exit Level'
T_QTY = '(%) Adjust trade exit volume'
T_MSG = 'Paste JSON message for your bot'
//Webhook Message
O_LEMSG = 'Long Entry'
O_LXMSGSL = 'Long SL'
O_LXMSGTP1 = 'Long TP1'
O_LXMSGTP2 = 'Long TP2'
O_LXMSGTP3 = 'Long TP3'
O_LXMSG = 'Long Exit'
O_SEMSG = 'Short Entry'
O_SXMSGSL = 'Short SL'
O_SXMSGA = 'Short TP1'
O_SXMSGB = 'Short TP2'
O_SXMSGC = 'Short TP3'
O_SXMSGX = 'Short Exit'
// ——————————— | | | Line length guide |
i_lxLvlTP1 = input.float (0.2, 'Level TP1' , group = G_RISK,
tooltip = T_LVL)
i_lxQtyTP1 = input.float (80.0, 'Qty TP1' , group = G_RISK,
tooltip = T_QTY)
i_lxLvlTP2 = input.float (0.5, 'Level TP2' , group = G_RISK,
tooltip = T_LVL)
i_lxQtyTP2 = input.float (10.0, 'Qty TP2' , group = G_RISK,
tooltip = T_QTY)
i_lxLvlTP3 = input.float (7.0, 'Level TP3' , group = G_RISK,
tooltip = T_LVL)
i_lxQtyTP3 = input.float (2, 'Qty TP3' , group = G_RISK,
tooltip = T_QTY)
i_lxLvlSL = input.float (0.5, 'Stop Loss' , group = G_RISK,
tooltip = T_LVL)
i_sxLvlTP1 = i_lxLvlTP1
i_sxQtyTP1 = i_lxQtyTP1
i_sxLvlTP2 = i_lxLvlTP2
i_sxQtyTP2 = i_lxQtyTP2
i_sxLvlTP3 = i_lxLvlTP3
i_sxQtyTP3 = i_lxQtyTP3
i_sxLvlSL = i_lxLvlSL
G_MSG = '■ ' + 'Webhook Message'
i_leMsg = input.string (O_LEMSG ,'Long Entry' , group = G_MSG, tooltip = T_MSG)
i_lxMsgSL = input.string (O_LXMSGSL ,'Long SL' , group = G_MSG, tooltip = T_MSG)
i_lxMsgTP1 = input.string (O_LXMSGTP1,'Long TP1' , group = G_MSG, tooltip = T_MSG)
i_lxMsgTP2 = input.string (O_LXMSGTP2,'Long TP2' , group = G_MSG, tooltip = T_MSG)
i_lxMsgTP3 = input.string (O_LXMSGTP3,'Long TP3' , group = G_MSG, tooltip = T_MSG)
i_lxMsg = input.string (O_LXMSG ,'Long Exit' , group = G_MSG, tooltip = T_MSG)
i_seMsg = input.string (O_SEMSG ,'Short Entry' , group = G_MSG, tooltip = T_MSG)
i_sxMsgSL = input.string (O_SXMSGSL ,'Short SL' , group = G_MSG, tooltip = T_MSG)
i_sxMsgTP1 = input.string (O_SXMSGA ,'Short TP1' , group = G_MSG, tooltip = T_MSG)
i_sxMsgTP2 = input.string (O_SXMSGB ,'Short TP2' , group = G_MSG, tooltip = T_MSG)
i_sxMsgTP3 = input.string (O_SXMSGC ,'Short TP3' , group = G_MSG, tooltip = T_MSG)
i_sxMsg = input.string (O_SXMSGX ,'Short Exit' , group = G_MSG, tooltip = T_MSG)
i_src = close
G_DISPLAY = 'Display'
//
i_alertOn = input.bool (true, 'Alert Labels On/Off' , group = G_DISPLAY)
i_barColOn = input.bool (true, 'Bar Color On/Off' , group = G_DISPLAY)
// ———————————
// @function Calculate the Take Profit line, and the crossover or crossunder
f_tp(_condition, _conditionValue, _leTrigger, _seTrigger, _src, _lxLvlTP, _sxLvlTP)=>
var float _tpLine = 0.0
_topLvl = _src + (_src * (_lxLvlTP / 100))
_botLvl = _src - (_src * (_sxLvlTP / 100))
_tpLine := _condition != _conditionValue and _leTrigger ? _topLvl :
_condition != -_conditionValue and _seTrigger ? _botLvl :
nz(_tpLine )
// @function Similar to "ta.crossover" or "ta.crossunder"
f_cross(_scr1, _scr2, _over)=>
_cross = _over ? _scr1 > _scr2 and _scr1 < _scr2 :
_scr1 < _scr2 and _scr1 > _scr2
// ———————————
//
var float condition = 0.0
var float slLine = 0.0
var float entryLine = 0.0
//
entryLine := leTrigger and condition <= 0.0 ? close :
seTrigger and condition >= 0.0 ? close : nz(entryLine )
//
slTopLvl = i_src + (i_src * (i_lxLvlSL / 100))
slBotLvl = i_src - (i_src * (i_sxLvlSL / 100))
slLine := condition <= 0.0 and leTrigger ? slBotLvl :
condition >= 0.0 and seTrigger ? slTopLvl : nz(slLine )
slLong = f_cross(low, slLine, false)
slShort = f_cross(high, slLine, true )
//
= f_tp(condition, 1.2,leTrigger, seTrigger, i_src, i_lxLvlTP3, i_sxLvlTP3)
= f_tp(condition, 1.1,leTrigger, seTrigger, i_src, i_lxLvlTP2, i_sxLvlTP2)
= f_tp(condition, 1.0,leTrigger, seTrigger, i_src, i_lxLvlTP1, i_sxLvlTP1)
tp3Long = f_cross(high, tp3Line, true )
tp3Short = f_cross(low, tp3Line, false)
tp2Long = f_cross(high, tp2Line, true )
tp2Short = f_cross(low, tp2Line, false)
tp1Long = f_cross(high, tp1Line, true )
tp1Short = f_cross(low, tp1Line, false)
switch
leTrigger and condition <= 0.0 => condition := 1.0
seTrigger and condition >= 0.0 => condition := -1.0
tp3Long and condition == 1.2 => condition := 1.3
tp3Short and condition == -1.2 => condition := -1.3
tp2Long and condition == 1.1 => condition := 1.2
tp2Short and condition == -1.1 => condition := -1.2
tp1Long and condition == 1.0 => condition := 1.1
tp1Short and condition == -1.0 => condition := -1.1
slLong and condition >= 1.0 => condition := 0.0
slShort and condition <= -1.0 => condition := 0.0
lxTrigger and condition >= 1.0 => condition := 0.0
sxTrigger and condition <= -1.0 => condition := 0.0
longE = leTrigger and condition <= 0.0 and condition == 1.0
shortE = seTrigger and condition >= 0.0 and condition == -1.0
longX = lxTrigger and condition >= 1.0 and condition == 0.0
shortX = sxTrigger and condition <= -1.0 and condition == 0.0
longSL = slLong and condition >= 1.0 and condition == 0.0
shortSL = slShort and condition <= -1.0 and condition == 0.0
longTP3 = tp3Long and condition == 1.2 and condition == 1.3
shortTP3 = tp3Short and condition == -1.2 and condition == -1.3
longTP2 = tp2Long and condition == 1.1 and condition == 1.2
shortTP2 = tp2Short and condition == -1.1 and condition == -1.2
longTP1 = tp1Long and condition == 1.0 and condition == 1.1
shortTP1 = tp1Short and condition == -1.0 and condition == -1.1
// ——————————— {
//
if strategy.position_size <= 0 and longE and barstate.isconfirmed
strategy.entry(
'Long',
strategy.long,
alert_message = i_leMsg,
comment = 'LE')
if strategy.position_size > 0 and condition == 1.0
strategy.exit(
id = 'LXTP1',
from_entry = 'Long',
qty_percent = i_lxQtyTP1,
limit = tp1Line,
stop = slLine,
comment_profit = 'LXTP1',
comment_loss = 'SL',
alert_profit = i_lxMsgTP1,
alert_loss = i_lxMsgSL)
if strategy.position_size > 0 and condition == 1.1
strategy.exit(
id = 'LXTP2',
from_entry = 'Long',
qty_percent = i_lxQtyTP2,
limit = tp2Line,
stop = slLine,
comment_profit = 'LXTP2',
comment_loss = 'SL',
alert_profit = i_lxMsgTP2,
alert_loss = i_lxMsgSL)
if strategy.position_size > 0 and condition == 1.2
strategy.exit(
id = 'LXTP3',
from_entry = 'Long',
qty_percent = i_lxQtyTP3,
limit = tp3Line,
stop = slLine,
comment_profit = 'LXTP3',
comment_loss = 'SL',
alert_profit = i_lxMsgTP3,
alert_loss = i_lxMsgSL)
if longX
strategy.close(
'Long',
alert_message = i_lxMsg,
comment = 'LX')
//
if strategy.position_size >= 0 and shortE and barstate.isconfirmed
strategy.entry(
'Short',
strategy.short,
alert_message = i_leMsg,
comment = 'SE')
if strategy.position_size < 0 and condition == -1.0
strategy.exit(
id = 'SXTP1',
from_entry = 'Short',
qty_percent = i_sxQtyTP1,
limit = tp1Line,
stop = slLine,
comment_profit = 'SXTP1',
comment_loss = 'SL',
alert_profit = i_sxMsgTP1,
alert_loss = i_sxMsgSL)
if strategy.position_size < 0 and condition == -1.1
strategy.exit(
id = 'SXTP2',
from_entry = 'Short',
qty_percent = i_sxQtyTP2,
limit = tp2Line,
stop = slLine,
comment_profit = 'SXTP2',
comment_loss = 'SL',
alert_profit = i_sxMsgTP2,
alert_loss = i_sxMsgSL)
if strategy.position_size < 0 and condition == -1.2
strategy.exit(
id = 'SXTP3',
from_entry = 'Short',
qty_percent = i_sxQtyTP3,
limit = tp3Line,
stop = slLine,
comment_profit = 'SXTP3',
comment_loss = 'SL',
alert_profit = i_sxMsgTP3,
alert_loss = i_sxMsgSL)
if shortX
strategy.close(
'Short',
alert_message = i_sxMsg,
comment = 'SX')
// ———————————
c_tp = leTrigger or seTrigger ? na :
condition == 0.0 ? na : color.green
c_entry = leTrigger or seTrigger ? na :
condition == 0.0 ? na : color.blue
c_sl = leTrigger or seTrigger ? na :
condition == 0.0 ? na : color.red
p_tp1Line = plot (
condition == 1.0 or
condition == -1.0 ? tp1Line : na,
title = "TP Line 1",
color = c_tp,
linewidth = 1,
style = plot.style_linebr)
p_tp2Line = plot (
condition == 1.0 or
condition == -1.0 or
condition == 1.1 or
condition == -1.1 ? tp2Line : na,
title = "TP Line 2",
color = c_tp,
linewidth = 1,
style = plot.style_linebr)
p_tp3Line = plot (
condition == 1.0 or
condition == -1.0 or
condition == 1.1 or
condition == -1.1 or
condition == 1.2 or
condition == -1.2 ? tp3Line : na,
title = "TP Line 3",
color = c_tp,
linewidth = 1,
style = plot.style_linebr)
p_entryLine = plot (
condition >= 1.0 or
condition <= -1.0 ? entryLine : na,
title = "Entry Line",
color = c_entry,
linewidth = 1,
style = plot.style_linebr)
p_slLine = plot (
condition == 1.0 or
condition == -1.0 or
condition == 1.1 or
condition == -1.1 or
condition == 1.2 or
condition == -1.2 ? slLine : na,
title = "SL Line",
color = c_sl,
linewidth = 1,
style = plot.style_linebr)
fill(
p_tp3Line, p_entryLine,
color = leTrigger or seTrigger ? na :color.new(color.green, 90))
fill(
p_entryLine, p_slLine,
color = leTrigger or seTrigger ? na :color.new(color.red, 90))
//
plotshape(
i_alertOn and longE,
title = 'Long',
text = 'Long',
textcolor = color.white,
color = color.green,
style = shape.labelup,
size = size.tiny,
location = location.belowbar)
plotshape(
i_alertOn and shortE,
title = 'Short',
text = 'Short',
textcolor = color.white,
color = color.red,
style = shape.labeldown,
size = size.tiny,
location = location.abovebar)
plotshape(
i_alertOn and (longX or shortX) ? close : na,
title = 'Close',
text = 'Close',
textcolor = color.white,
color = color.gray,
style = shape.labelup,
size = size.tiny,
location = location.absolute)
l_tp = i_alertOn and (longTP1 or shortTP1) ? close : na
plotshape(
l_tp,
title = "TP1 Cross",
text = "TP1",
textcolor = color.white,
color = color.olive,
style = shape.labelup,
size = size.tiny,
location = location.absolute)
plotshape(
i_alertOn and (longTP2 or shortTP2) ? close : na,
title = "TP2 Cross",
text = "TP2",
textcolor = color.white,
color = color.olive,
style = shape.labelup,
size = size.tiny,
location = location.absolute)
plotshape(
i_alertOn and (longTP3 or shortTP3) ? close : na,
title = "TP3 Cross",
text = "TP3",
textcolor = color.white,
color = color.olive,
style = shape.labelup,
size = size.tiny,
location = location.absolute)
plotshape(
i_alertOn and (longSL or shortSL) ? close : na,
title = "SL Cross",
text = "SL",
textcolor = color.white,
color = color.maroon,
style = shape.labelup,
size = size.tiny,
location = location.absolute)
//
plot(
na,
title = "─── ───",
editable = false,
display = display.data_window)
plot(
condition,
title = "condition",
editable = false,
display = display.data_window)
plot(
strategy.position_size * 100,
title = ".position_size",
editable = false,
display = display.data_window)
//#endregion }
// ——————————— <↑↑↑ G_RISK ↑↑↑>
//#region ———— <↓↓↓ G_SCRIPT02 ↓↓↓> {
// @function Queues a new element in an array and de-queues its first element.
f_qDq(_array, _val) =>
array.push(_array, _val)
_return = array.shift(_array)
_return
var line a_slLine = array.new_line(1)
var line a_entryLine = array.new_line(1)
var line a_tp3Line = array.new_line(1)
var line a_tp2Line = array.new_line(1)
var line a_tp1Line = array.new_line(1)
var label a_slLabel = array.new_label(1)
var label a_tp3label = array.new_label(1)
var label a_tp2label = array.new_label(1)
var label a_tp1label = array.new_label(1)
var label a_entryLabel = array.new_label(1)
newEntry = longE or shortE
entryIndex = 1
entryIndex := newEntry ? bar_index : nz(entryIndex )
lasTrade = bar_index >= entryIndex
l_right = 10
line.delete(
f_qDq(a_slLine,
line.new(
entryIndex,
slLine,
last_bar_index + l_right,
slLine,
style = line.style_solid,
color = c_sl)))
line.delete(
f_qDq(a_entryLine,
line.new(
entryIndex,
entryLine,
last_bar_index + l_right,
entryLine,
style = line.style_solid,
color = color.blue)))
line.delete(
f_qDq(a_tp3Line,
line.new(
entryIndex,
tp3Line,
last_bar_index + l_right,
tp3Line,
style = line.style_solid,
color = c_tp)))
line.delete(
f_qDq(a_tp2Line,
line.new(
entryIndex,
tp2Line,
last_bar_index + l_right,
tp2Line,
style = line.style_solid,
color = c_tp)))
line.delete(
f_qDq(a_tp1Line,
line.new(
entryIndex,
tp1Line,
last_bar_index + l_right,
tp1Line,
style = line.style_solid,
color = c_tp)))
label.delete(
f_qDq(a_slLabel,
label.new(
last_bar_index + l_right,
slLine,
'SL: ' + str.tostring(slLine, '##.###'),
style = label.style_label_left,
textcolor = color.white,
color = c_sl)))
label.delete(
f_qDq(a_entryLabel,
label.new(
last_bar_index + l_right,
entryLine,
'Entry: ' + str.tostring(entryLine, '##.###'),
style = label.style_label_left,
textcolor = color.white,
color = color.blue)))
label.delete(
f_qDq(a_tp3label,
label.new(
last_bar_index + l_right,
tp3Line,
'TP3: ' + str.tostring(tp3Line, '##.###'),
style = label.style_label_left,
textcolor = color.white,
color = c_tp)))
label.delete(
f_qDq(a_tp2label,
label.new(
last_bar_index + l_right,
tp2Line,
'TP2: ' + str.tostring(tp2Line, '##.###'),
style = label.style_label_left,
textcolor = color.white,
color = c_tp)))
label.delete(
f_qDq(a_tp1label,
label.new(
last_bar_index + l_right,
tp1Line,
'TP1: ' + str.tostring(tp1Line, '##.###'),
style = label.style_label_left,
textcolor = color.white,
color = c_tp)))
// ———————————
//
if longE or shortE or longX or shortX
alert(message = 'Any Alert', freq = alert.freq_once_per_bar_close)
if longE
alert(message = 'Long Entry', freq = alert.freq_once_per_bar_close)
if shortE
alert(message = 'Short Entry', freq = alert.freq_once_per_bar_close)
if longX
alert(message = 'Long Exit', freq = alert.freq_once_per_bar_close)
if shortX
alert(message = 'Short Exit', freq = alert.freq_once_per_bar_close)
//#endregion }
// ——————————— <↑↑↑ G_SCRIPT03 ↑↑↑>
Super Signals (High Accuracy)Test it and you will juge it by yourself..a high winrate +90%
NO REPAINTING, NO LAGGING
DCA_v2.3A geometric DCA strategy with optional RSI filter.
First entry on RSI golden cross at 35 (configurable).
Subsequent entries on price drops with multiplier sizing.
Closes all positions at overall profit target (%).
Displays capital usage, planned allocation, and key levels.
For backtesting & research only. Not financial advice.
Support & Resistance (高成交量箱体)支撑与阻力(高成交量箱体)— 基于成交量方向与枢轴点自动绘制“箱体”支撑/阻力,突破变虚线、保持为实线,并用中文字符“阻/撑”与标签提示突破与回测;作者:李天天;Pine v5,叠加到主图。
Name: Support & Resistance (High-Volume Boxes) — auto-draws “box” support/resistance from directional volume and pivot points; dashed when broken and solid when held, with Chinese glyphs “阻/撑” and labels highlighting breakouts/retests; Author: Li Tiantian; Pine v5, overlay on price.
阻力支撑箱体
原理:以 K 线涨跌判定买卖量,构造“正负成交量”序列;当出现 pivot low 且正量显著 时在低位绘制支撑箱体,出现 pivot high 且负量显著 时在高位绘制阻力箱体;箱体厚度 = ATR(200) × 宽度系数,右边界随时间自适应延展。
Mechanism: classify up/down bars to build a signed volume stream; draw a support box at a pivot low with strong positive volume and a resistance box at a pivot high with strong negative volume; box thickness = ATR(200) × width factor, with the right edge auto-extended over time.
阻力支撑箱体
突破与保持:价格 向上穿越阻力上沿 记为突破阻力,未上破阻力 记为阻力保持;价格 向下穿越支撑下沿 记为跌破支撑,未跌破支撑 记为支撑保持;突破后箱体边框改为虚线并改变底色透明度。
Break & hold: crossing above resistance upper band flags a breakout, failing to close above resistance means it holds; crossing below support lower band flags a breakdown, failing to close below support means it holds; after break, the box switches to dashed border and adjusted fill.
阻力支撑箱体
可视化:图上绘制 “阻力保持=‘阻’(红,K线上方)/ 支撑保持=‘撑’(绿,K线下方)”;当 阻力转支撑 或 支撑转阻力 且保持时,分别用“撑”或“阻”标记;同时在突破当根前一根位置打出 “突破阻力 / 跌破支撑” 标签。
Visualization: plots “阻” (red, above bars) for resistance hold and “撑” (green, below bars) for support hold; when resistance flips to support or support flips to resistance and holds, it prints “撑” or “阻” accordingly; breakout labels (“Break Resistance” / “Break Support”) are printed one bar back at the level.
阻力支撑箱体
参数与设置:回看周期 控制 pivot 灵敏度(越大越稳健);成交量差过滤长度 用于筛除低量噪声(越大越严格);箱体宽度调整 以 ATR(200) 为基准控制箱体厚度;最大箱体数默认 50。
Inputs & settings: Lookback period tunes pivot sensitivity (larger = more robust); volume-delta length filters low-volume noise (larger = stricter); box width factor scales thickness from ATR(200); max box count defaults to 50.
阻力支撑箱体
使用方法:将脚本添加至图表并叠加主图→根据品种与周期调大/调小回看周期与成交量过滤→用箱体边界作为结构位,观察“阻/撑”与标签提示 突破/保持/转换 来辅助判定进出场与止损迁移。
How to use: add to chart (overlay) → calibrate lookback and volume filtering for your symbol/timeframe → treat box bounds as structure levels; read “阻/撑” and labels for break/hold/flip to guide entries and stop adjustments.
阻力支撑箱体
调参建议:波动剧烈或假突破多时,提高回看周期 与 加大过滤长度;趋势单边强时,可略 放宽过滤 以更快识别新箱体;箱体过厚影响精度时,下调 箱体宽度调整。
Tuning tips: in whipsaw/high-noise markets, increase lookback and raise filter length; in strong one-sided trends, loosen filtering to detect fresh boxes earlier; if boxes look too thick, reduce the width factor.
阻力支撑箱体
注意事项:本指标不含 alertcondition,主要依靠可视标记;对象数量受平台上限影响,历史过长或频繁触发时可适当缩短回看或减少过滤开销;仅作为技术参考,不构成交易建议。
Notes: no built-in alertcondition; use the on-chart marks for cues; object counts are platform-limited—trim history or adjust filters if performance/clutter arises; for research only, not investment advice.