SHAP-Aligned BUY Signal (Daily, Edge-Triggered)Based on the XGBoost + SHAP interpretation report, I'll explain which indicators to monitor for buying NVO. However, I must emphasize that this model performed poorly (47.5% accuracy) and should NOT be used for actual trading! That said, here's what the model learned (for educational purposes):
📊 Top Indicators to Monitor for BUY Signals
1. Days_Since_Low (Most Important - 1.264)
Direction: BULLISH ↑
Interpretation: Higher values → UP prediction
What to monitor: Track how many days since the stock hit its recent low
Buy signal: When the stock has been recovering for an extended period (e.g., 100+ days from low)
Why it matters: The model learned that stocks in long-term recovery tend to continue rising
2. SMA_50 (50-day Moving Average) (0.413)
Direction: BULLISH ↑
Interpretation: Higher absolute SMA_50 values → UP prediction
What to monitor: The 50-day simple moving average price level
Buy signal: When SMA_50 is at higher levels (e.g., above $80-90)
Why it matters: Higher moving averages indicate stronger long-term trends
3. SMA_200 (200-day Moving Average) (0.274)
Direction: BULLISH ↑
Interpretation: Higher SMA_200 → UP prediction
What to monitor: The 200-day simple moving average
Buy signal: When SMA_200 is trending upward and at elevated levels
Why it matters: Long-term trend indicator; golden cross (SMA_50 > SMA_200) is traditionally bullish
4. BB_Width (Bollinger Band Width) (0.199)
Direction: BULLISH ↑
Interpretation: WIDER Bollinger Bands → UP prediction
What to monitor: The distance between upper and lower Bollinger Bands
Buy signal: When BB_Width is expanding (increasing volatility often precedes trend moves)
Why it matters: Widening bands can signal the start of a new trend
5. Price_SMA_50_Ratio (0.158)
Direction: BULLISH ↑
Interpretation: When price is ABOVE the 50-day MA → UP prediction
What to monitor: Current price ÷ SMA_50
Buy signal: When ratio > 1.0 (price is above the 50-day average)
Why it matters: Price above moving averages indicates uptrend
6. Momentum_21D (21-day Momentum) (0.152)
Direction: BULLISH ↑
Interpretation: Positive 21-day momentum → UP prediction
What to monitor: 21-day rate of change
Buy signal: When momentum is positive and increasing
Why it matters: Positive momentum suggests continuation
7. Stoch_K (Stochastic Oscillator) (0.142)
Direction: BULLISH ↑
Interpretation: Higher Stochastic K → UP prediction
What to monitor: Stochastic oscillator (0-100 scale)
Buy signal: When Stoch_K is rising from oversold (<20) or in mid-range (40-60)
Why it matters: Measures momentum and overbought/oversold conditions
Indicatori e strategie
Timeframe Overlay 24HrDaily High–Low Box (00:00–23:59)
This indicator highlights each trading day with a shaded box spanning from 00:00 to 23:59 (based on the selected timezone) and covering the day’s highest and lowest price.
• Green box when the day closes above its open
• Red box when the day closes below its open
• Historical days are fully drawn for easy comparison
• Current day box builds dynamically as new candles form
Useful for visualising daily range, market bias, and intraday structure across all timeframes.
BTC - Bitcoin Strategic Dashboard by RM Title: BTC - Bitcoin Strategic Dashboard | RM
Overview & Philosophy
The Bitcoin Strategic Dashboard is a comprehensive analytics tool designed to provide deeper market context beyond simple price action.
While a standard chart displays price history, this dashboard focuses on the structural health of the market. It aims to answer clearer questions: Is the asset statistically overextended? Is the current volatility compressed or expanding? How is Bitcoin currently correlating with traditional equity markets?
This script aggregates key data points—Performance, Risk, Valuation, and Macro Correlations—into a single, organized table. It is designed to be a quiet, high-density reference tool that sits unobtrusively in the corner of your screen, helping to contextualize daily price movements without cluttering your workspace.
Methodology & Module Breakdown
The dashboard is divided into 5 strategic modules. Here is exactly how to read them, how they are calculated, and how to interpret the data.
1. PERFORMANCE
This section answers: "Is Bitcoin actually beating the traditional market, and by how much?"
BTC Return : The raw percentage growth of Bitcoin.
Timeframes: 1-Year (Tactical Trend) and 4-Year (The Halving Cycle).
Alpha (vs SPX / Gold):
Meaning : "Alpha" measures true outperformance. It tells you how much better your capital worked in Bitcoin compared to the S&P 500 (Stocks) or Gold.
Calculation : We use a Relative Growth Ratio. Instead of simple subtraction, we calculate the growth factor of BTC divided by the growth factor of the Benchmark.
Interpretation :
Green: Bitcoin is outperforming. It is the superior vehicle for capital.
Red: Bitcoin is underperforming traditional assets (Opportunity Cost is high).
2. RISK PROFILE
This section answers: "How dangerous is the market right now?"
Drawdown (DD):
Meaning : The percentage loss from the 1-Year High.
Interpretation : Deep Drawdowns (e.g., > -50%) historically signal generational buying opportunities (Deep Red). Small Drawdowns (< -5%) signal we are near "Discovery Mode" (Blue/Green).
Sharpe Ratio:
Meaning : The industry standard for "Risk-Adjusted Return." It asks: "Is the profit worth the stress?"
Timeframe : Annualized over 365 Days.
Interpretation :
> 1.0: Good. The return justifies the risk.
> 2.0: Excellent. (Dark Green).
< 0.0: Bad. You are taking risk for negative returns.
Sortino Ratio:
Meaning : Similar to Sharpe, but it only counts downside volatility as "risk." Bitcoin often rallies aggressively (Good Volatility); Sortino ignores the upside "risk" and focuses only on minimizing losses.
Volatility (Vol) & Rank:
Meaning : How violently the price is moving.
Calculation : We compare the current 30-Day Volatility against the last 4 Years of volatility history (Rank 0-100).
Interpretation (The Squeeze Strategy) :
BLUE (Cold / <25%): Volatility is historically low. The market is "compressed." Big moves often follow these periods.
RED (Hot / >75%): Volatility is extreme. High risk of mean reversion or panic.
3. VALUATION & MOMENTUM
This section answers: "Is Bitcoin cheap or expensive?"
Mayer Multiple (MM):
Meaning: A "Godfather" of Bitcoin ratios.
Calculation : Current Price divided by the 200-Day Moving Average.
Interpretation :
< 0.8 (Blue): Historically "Cheap."
1.0: Fair Value (Price = Trend).
> 2.4 (Red): Speculative Bubble territory.
RSI (Relative Strength Index):
Timeframe : 14 Days.
Interpretation : >70 suggests the market is overheated (Red). <30 suggests oversold conditions (Blue).
Trend (ADX) :
Meaning : The Average Directional Index measures the strength of a trend, not the direction.
Interpretation : Values >25 (Green) indicate a strong trend is present. Values <20 (Gray) indicate a choppy/sideways market (no trend).
vs 200W (Macro):
Meaning : The distance to the 200-Week Moving Average.
Interpretation : This line is historically the "Cycle Bottom" or "Absolute Support" for Bitcoin. Being close to it (or below it) is rare and often marks cycle lows.
4. MACRO CORRELATIONS
This section answers: "Is Bitcoin moving on its own, or just following the Stock Market?"
vs TradFi (SPX):
Timeframe : 90-Day Correlation Coefficient.
Interpretation :
High Positive (Red): BTC is just acting like a tech stock. No "Safe Haven" status.
Negative/Zero (Green): BTC is "decoupled." It is moving independently of Wall Street.
vs DXY (US Dollar):
Interpretation : Bitcoin usually moves inverse to the Dollar.
Negative (Green): Normal healthy behavior.
Positive (Red): Warning signal. If both DXY and BTC rise, something is breaking in the system.
5. HISTORICAL LEDGER
A Year-by-Year breakdown of returns.
Feature : You can toggle the comparison column in the settings to compare Bitcoin against either S&P 500 or Gold.
Usage : Helps visualize the cyclical nature of returns (e.g., the 4-year cycle pattern of Green-Green-Green-Red).
How to Read the Visuals (Heatmap)
The dashboard uses a standardized Bloomberg-style heatmap to let you assess the market state in milliseconds:
🟢 Green: Profit / Good Performance / Positive Alpha.
🔴 Red: Loss / Overheating / High Risk.
🔵 Blue: "Cold" / Cheap / Low Volatility (Potential Buy Zones).
🟠 Orange: Warning / High Drawdown.
⚫ Gray/Black: Neutral or Fair Value.
Settings & Customization
Visuals: Change the text size (Tiny, Small, Normal) to fit your screen resolution.
Modules: You can toggle individual sections on/off to save screen space.
Calculation: Switch the Historical Benchmark between "S&P 500" and "Gold" depending on your thesis.
Disclaimer
This script is for research and educational purposes only. The metrics provided (Sharpe, Sortino, Mayer Multiple) are derived from historical data and do not guarantee future performance. "Cheap" (Low Mayer Multiple) does not mean the price cannot go lower. Always manage your own risk.
Tags
bitcoin, btc, bloomberg, terminal, dashboard, onchain, mayer multiple, sharpe ratio, volatility, alpha, risk management, Rob Maths
Hybrid Trend-Following Inside Bar BreakoutHybrid Trend-Following Inside Bar Breakout Strategy
The Hybrid Trend-Following Inside Bar Breakout Strategy is a rule-based trading system designed to capture strong directional moves while controlling risk during uncertain market conditions. It combines trend-following, price action, and volatility-based risk management into a single robust framework.
Core Concept
The strategy trades inside bar breakouts only in the direction of the dominant market trend. Inside bars represent periods of consolidation, and when price breaks out of this consolidation in a trending market, it often leads to impulsive moves with favorable risk–reward characteristics.
Key Components
1. Trend Filter
Uses 50 EMA and 200 EMA to define the market trend.
Bullish bias: 50 EMA above 200 EMA
Bearish bias: 50 EMA below 200 EMA
This filter prevents counter-trend trades and improves trade quality.
2. Volatility Filter
Compares fast ATR (14) with slow ATR (50).
Trades are taken only when volatility is expanding or above a minimum threshold.
This avoids low-volatility, choppy market conditions.
3. Inside Bar Breakout
An inside bar forms when the current candle’s high is lower than the previous candle’s high and the low is higher than the previous candle’s low.
A trade is triggered only when price breaks above or below the inside bar range in the direction of the trend.
4. Candle Quality Filter
Requires a minimum body-to-range ratio, ensuring that the breakout candle has strong momentum and is not driven by weak wicks.
Risk Management & Trade Management
Stop Loss (SL)
Placed using ATR-based dynamic stops, adapting to current market volatility.
Prevents tight stops in volatile conditions and wide stops in calm markets.
Partial Profit Taking
50% of the position is exited at 1.5R, locking in profits early.
This reduces psychological pressure and improves equity stability.
Trailing Stop
After partial profit is taken, the remaining position is managed with an ATR-based trailing stop.
Allows the strategy to capture large trend moves while protecting gains.
Cooldown Mechanism
After a losing trade, the system enters a cooldown period and skips a fixed number of bars.
This helps avoid revenge trading and overtrading during unfavorable market phases.
Why This Strategy Works
Trades only high-probability breakouts in trending markets
Adapts automatically to changing volatility
Combines price action precision with systematic risk control
Designed for consistent performance over long historical periods
Multi-TF RSI+EMA+Clean S/R v6Visual Confirmation (What You'll See)
✅ EMAs: Blue (9) + Red (21) lines
✅ Pivot Points: Red circles (high) + Green circles (low)
✅ S/R Lines: Red resistance + Green support
✅ MTF Table: Top-right corner (RSI/ADX values)
✅ Signals: 🚀 STRONG BUY / 🔻 STRONG SELL labels
✅ Background: Green/Red tint during strong trends
"Clean Market Structure & Trend Confirmation" Clean Market Structure & Trend Confirmation is a high-probability Market Structure and Trend Confirmation indicator trading system designed specifically for SPY and QQQ.
It combines trend structure, multi-timeframe confirmation, momentum gating, and market-state filtering to deliver clean, disciplined BUY and SELL signals — without noise, chop, or over-trading.
This script is built for traders who want clarity first, execution second.
Session ATR Progression Tracker📊 Session ATR Progression Tracker - SIYL Regression Trading Tool
Track how much of your instrument's 7-day Average True Range (ATR) has been covered during the current trading session. This indicator is specifically designed for regression traders who follow the "Stay In Your Lane" (SIYL) methodology, helping you identify when the probability of mean reversion significantly increases. If you are interested in more on that check out Rod Casselli and tradersdevgroup.com.
🎯 Key Features:
• Real-time ATR Coverage Percentage - See at a glance what percentage of the 7-day ATR has been covered in the current session
• SIYL-Optimized Thresholds - See at a glance when the instrument has achieved 80% and 100% ATR coverage, the proven thresholds where mean reversion probability increases (customizable)
• Flexible Session Modes:
- Daily: Resets at calendar day change
- Session: Uses exchange-defined trading sessions
- Custom Session: Set your exact session start/end times (perfect for futures traders and international markets)
• Visual Alerts - Color-coded display (gray → orange → red) and optional background highlighting
• Repositionable Display - Choose from 9 screen positions to avoid chart clutter
• Session Markers - Green triangles mark the start of each new session
• Detailed Stats - View current range, ATR value, session high/low, and session status
💡 Why Use This Indicator?
This tool is built around a proven concept: regression trading becomes significantly more effective once a session has achieved at least 80% of its 7-day ATR. At this threshold, the probability of price reverting to mean increases substantially, creating higher-probability trade setups for SIYL practitioners.
Benefits for regression traders:
- Identify optimal entry points when mean reversion probability is highest (≥80% ATR coverage)
- Avoid premature regression entries before adequate range has been established
- Recognize when daily moves have "earned their range" and are ripe for reversal
- Time fade-the-move and counter-trend strategies with statistical backing
- Improve win rates by trading only after proven probability thresholds are met
⚙️ Setup Instructions:
1. Add the indicator to your chart
2. Select your preferred "Reset Mode" (recommend "Custom Session" for futures/international markets)
3. If using Custom Session, enter your session times in 24-hour format (e.g., 0930-1600 for US stocks, 1700-1600 for CME futures)
4. Adjust alert thresholds if desired (default: 80% and 100% - proven SIYL thresholds)
5. Position the display where it's most visible on your chart
📈 Works Across All Markets:
Stocks • Futures • Forex • Indices • Crypto • Commodities
Perfect for regression traders, mean reversion specialists, and SIYL practitioners who want to trade with probability on their side by entering only after the session has "earned its range."
---
Tip: For futures contracts with overnight sessions that span calendar days (like MES, MNQ, MYM), use "Custom Session" mode with your exchange's official session times for accurate tracking.
Price Crossing 144 EMA Alert (No Visuals)Price Crossing 144 EMA Alert (No VisuPrice Crossing 144 EMA Alert (No Visuals)Price Crossing 144 EMA Alert (No Visuals)Price Crossing 144 EMA Alert (No Visuals)Price Crossing 144 EMA Alert (No Visuals)als)
[AlscapeLabs] HTF Candle Stack (Multi-Timeframe)
Overview
The HTF Candle Stack (Multi-TF) indicator is a powerful visualization tool designed to overlay high-timeframe (HTF) price action directly onto your current chart, independent of the chart's price scale. This gives traders a clear, aligned, and non-overlapping view of simultaneous price movements across customizable timeframes.
By stacking the candles horizontally next to the chart's price action, the indicator allows for quick identification of multi-timeframe correlation, trend confluence, and key levels without switching chart timeframes.
Key Features
6 Independent Stacks: Configure up to 6 separate timeframes (e.g., 5m, 15m, 1H, 4H, Daily, Weekly) to view the complete market fractals from micro to macro.
Price-Aligned Visualization : All HTF candle stacks are perfectly aligned with the main chart's vertical price axis
Replay Mode Safe : Includes dedicated logic to prevent "duplicate candles" during Bar Replay, ensuring accurate backtesting and historical analysis.
Toggleable Stacks : Each stack can be individually enabled or disabled via input settings
Dynamic Spacing : The distance between active stacks is automatically calculated and adjusted based on the visibility of the preceding stack.
Settings Guide
Stack Configuration (1 - 6)
Each of the six stacks has identical controls:
Show/Hide : Enable or disable this specific stack.
Timeframe : The specific HTF to display (e.g., "60" for 1 Hour, "D" for Daily).
[*} Count : How many candles to show in this stack (Current Active Candle + Past Closed Candles). Tip: Use higher counts (10-12) for lower TFs (Stack 1-2) and lower counts (2-4) for higher TFs (Stack 5-6)
Candle Color
Controls global coloring
Bullish / Bearish : Customize the body colors.
Wick : Separate control for wick color and transparency
Layout
Distance from Chart : How far (in bars) to the right the first stack begins
Space between Stacks : The gap (in bars) between each active stack.
Candle Width : The thickness of the HTF candles.
Labels
Displays a time-frame next to the active (live) candle in each stack
Show TF Labels : Enable or disable labels through all stacks
Text Color : Label text color
Background : Label background color
Style : Label position (Left, Down)
Size : Label text size (Tiny, Small, Normal, Large, Huge)
Developed by AlscapeLabs
X-Trend Macro Command CenterX-Trend Macro Command Center (MCC) | Institutional Grade Dashboard
📝 Description Body
The Invisible Engine of the Market Revealed.
Traders often focus solely on Price Action, ignoring the massive underwater currents that actually drive trends: Global Liquidity, Inflation, and Central Bank Policy. We created X-Trend Macro Command Center (MCC) to solve this problem.
This is not just an indicator. It is a fundamental heads-up display that bridges the gap between technical charts and macroeconomic reality.
💡 The Idea & Philosophy
Markets don't move in a vacuum. Bull runs are fueled by M2 Money Supply expansion and negative real yields. Crashes are triggered by liquidity crunches and aggressive rate hikes. X-Trend MCC was built to give retail traders the same "Macro Awareness" that institutional desks possess. It aggregates fragmented economic data from Federal Reserve databases (FRED) directly onto your chart in real-time.
🚀 Application & Logic
This tool is designed for Trend Traders, Crypto Investors, and Macro Analysts.
Identify the Regime: Instantly see if the environment is "RISK ON" (High Liquidity, Low Real Rates) or "RISK OFF" (Monetary Tightening).
Validate the Trend: Don't buy the dip if Liquidity (M2) is crashing. Don't short the rally if Real Yields are negative.
Multi-Region Analysis: Switch instantly between economic powerhouses (US, China, Japan) to see where the capital is flowing.
📊 Dashboard Metrics Explained
Every row in the Command Center tells a specific story about the economy:
Interest Rate: The "Gravity" of finance. Higher rates weigh down risk assets (Stocks/Crypto).
Inflation (YoY): The erosion of purchasing power. We calculate this dynamically based on CPI data.
Real Yield (The "Golden" Metric): Calculated as Interest Rate - Inflation.
Green: Real Yield is low/negative. Cash is trash, assets fly.
Red: Real Yield is high. Cash is King, assets struggle.
US Debt & GDP: Fiscal health indicators formatted in Trillions ($T). Watch the Debt-to-GDP ratio—if it spikes >120%, expect currency debasement.
M2 Money Supply: The fuel tank of the market. Tracks the total amount of money in circulation.
↗ Trend: Liquidity is entering the system (Bullish).
↘ Trend: Liquidity is drying up (Bearish).
🧩 The X-Trend Ecosystem
X-Trend MCC is just the tip of the iceberg. This module is part of the larger X-Trend Project — a comprehensive suite of algorithmic tools being developed to quantify market chaos. While our Price Action algorithms (Lite/Pro/Ultra) handle the Micro, the MCC handles the Macro.
Technical Note:
Data Sources: Direct connection to FRED (Federal Reserve Economic Data).
Zero Repainting: Historical data is requested strictly using closed bars to ensure accuracy.
Open Source: We believe in transparency. The code is open for study under MPL 2.0.
Build by Dev0880 | X-Trend © 2025
EMA 8 / 20 / 200Created to easily use the 8/20/200 strategy.
This indicator is designed to give a clear, multi-timeframe view of trend, momentum, and structure using three exponential moving averages.
1. Trend direction (EMA 200 – pink)
The 200 EMA acts as the long-term trend filter.
Price above the 200 EMA suggests a bullish market bias.
Price below the 200 EMA suggests a bearish market bias.
Many traders avoid taking trades against this higher-timeframe direction.
2. Momentum and trade bias (EMA 20 – blue)
The 20 EMA reflects short-term momentum.
When price respects the 20 EMA in an uptrend, pullbacks often provide continuation entries.
In downtrends, the 20 EMA frequently acts as dynamic resistance.
3. Entry timing (EMA 8 – yellow)
The 8 EMA is a fast reaction line used for precise timing.
Crosses of the 8 EMA over the 20 EMA can signal momentum shifts.
Strong trends often show price holding above (or below) the 8 EMA during impulse moves.
4. Confluence and trade filtering
The indicator works best when the EMAs are aligned:
Bullish alignment: EMA 8 > EMA 20 > EMA 200
Bearish alignment: EMA 8 < EMA 20 < EMA 200
Misaligned EMAs usually indicate consolidation or low-probability conditions.
5. Risk management context
EMAs can act as dynamic support and resistance:
Stops are often placed beyond the 20 EMA or 200 EMA depending on trade horizon.
Loss of EMA structure is a warning sign that the trend may be weakening.
In short, the indicator is a trend-first, momentum-second framework that helps you decide when to trade, in which direction, and when to stay out.
Expectativa de Juros (Fed)An indicator that measures future expectations for US interest rates, measured by the difference between the Fed's interest rate and pricing on the CME.
Monthly Hotness RSI (Auto-Calibrated)Indicator of the previous months volatility/vol compared to averages over the last 3-5 years. helps show trend and if the market is 'hot'. indicator is good for showing favourable market conditions.
Pivot Trend [ChartPrime]The Pivot Trend indicator is a tool designed to identify potential trend reversals based on pivot points in the price action. It helps traders spot shifts in market sentiment and anticipate changes in price direction.
◈ User Inputs:
Left Bars: Specifies the number of bars to the left of the current bar to consider when calculating pivot points.
Right Bars: Specifies the number of bars to the right of the current bar to consider when calculating pivot points.
Offset: Adjusts the sensitivity of pivot point detection.
◈ Indicator Calculation:
The indicator calculates pivot points based on the highest and lowest prices within a specified range of bars. It then determines the trend direction based on whether the current price crossed above upper band or crossed below lower band.
Upper and Lower Bands
◈ Visualization:
Trend direction is indicated by the color of the plotted lines, with blue representing an upward trend and red representing a downward trend.
Buy and sell signals are marked on the chart with corresponding symbols (🅑 for buy signals and 🅢 for sell signals).
Buy and sell signals generated by the indicator can be used in conjunction with other technical analysis tools to confirm trading decisions and manage risk.
Overall, the Pivot Trend indicator offers traders a simple yet effective method for identifying potential trend changes and capturing trading opportunities in the market. Adjusting the input parameters allows for customization according to individual trading preferences and market conditions.
Trend Prediction Meter [PointAlgo]The Trend Prediction Meter & Levels is a composite market-bias and volatility visualization tool designed to summarize trend strength, momentum, price positioning, and volatility into a single normalized score.
It provides a structured framework to interpret directional bias and probable price expansion zones during active market conditions.
Concept Overview
Markets often reflect multiple conditions simultaneously—trend direction, momentum strength, price location within a range, and volatility.
This indicator combines these elements into a unified Bullish Score (0–100), displayed as a meter and supported by projected ATR-based levels.
Rather than focusing on a single signal, the script aims to present context about current market conditions.
Bullish Score Composition (0–100)
The meter represents a weighted blend of multiple market factors:
1. Trend Strength (EMA Structure)
Uses a fast and slow EMA to assess directional bias.
The distance between EMAs is normalized into a trend strength score.
Strong separation indicates directional conviction; compression suggests balance.
2. Momentum Strength (RSI Blend)
Combines a short-term and mid-term RSI.
Helps capture both immediate momentum and broader directional stability.
Higher readings indicate sustained bullish pressure, lower readings indicate bearish pressure.
3. Position Within Recent Range
Measures where price is trading relative to its recent high–low range.
Values near the top of the range reflect strength; values near the bottom reflect weakness.
Mid-range positioning indicates equilibrium.
4. Volume Participation
Compares current volume against its recent average.
Acts as a minor confidence modifier rather than a primary driver.
Each component is normalized and combined using fixed weights to produce a final Bullish Score between 0 and 100.
Bias Classification
The Bullish Score is translated into descriptive market states:
Extreme Bullish
Very Bullish
Bullish
Neutral
Bearish
Very Bearish
These labels describe current bias, not future certainty.
Meter Visualization
The meter plot dynamically changes color based on the score range.
A dashed midline at 50 represents balance.
Background shading highlights strong bullish or bearish dominance zones.
Crossovers of the 50-level indicate shifts in directional control.
ATR-Based Projection Levels:
To provide volatility context, the indicator calculates ATR-based upside and downside reference levels:
Two potential expansion levels (TP1 and TP2) are projected above and below price.
The distance of these levels adapts based on current bias strength.
These levels are contextual reference zones, not fixed targets.
Prediction Dashboard
An optional side table summarizes key readings at the most recent bar:
Symbol
Current bias label
Bullish Score
Current price
ATR value
Upside and downside projection levels
Directional comment (Upside favoured / Downside favoured / Balanced)
This dashboard is designed to provide a quick structural overview without requiring manual calculation.
Signals & Alerts
Built-in alerts are available for:
Bullish bias conditions
Bearish bias conditions
Bullish Score crossing above 50
Bullish Score crossing below 50
Alerts are informational and reflect internal state changes only.
Customization:
Users can adjust:
RSI lengths
EMA lengths
Range lookback period
ATR parameters
Display options for the meter and dashboard
This allows adaptation across different instruments and timeframes.
Usage Notes
Best suited for analytical interpretation rather than standalone decision-making.
Designed to complement price action, structure, or other indicators.
Works across multiple markets where volume and volatility data are available.
Disclaimer :
This indicator is intended for educational and analytical purposes only.
It does not provide investment, trading, or financial advice.
All signals and levels should be validated with independent analysis and appropriate risk management.
Relative Strength Index_YJ//@version=5
indicator(title="MACD_YJ", shorttitle="MACD_YJ",format=format.price, precision=2)
source = close
useCurrentRes = input.bool(true, title="Use Current Chart Resolution?")
resCustom = input.timeframe("60", title="Use Different Timeframe? Uncheck Box Above")
smd = input.bool(true, title="Show MacD & Signal Line? Also Turn Off Dots Below")
sd = input.bool(false, title="Show Dots When MacD Crosses Signal Line?")
sh = input.bool(true, title="Show Histogram?")
macd_colorChange = input.bool(true, title="Change MacD Line Color-Signal Line Cross?")
hist_colorChange = input.bool(true, title="MacD Histogram 4 Colors?")
// === Divergence inputs ===
grpDiv = "Divergence"
calculateDivergence = input.bool(true, title="Calculate Divergence", group=grpDiv, tooltip="피벗 기반 정/역배 다이버전스 탐지 및 알람 사용")
lookbackRight = input.int(5, "Lookback Right", group=grpDiv, minval=1)
lookbackLeft = input.int(5, "Lookback Left", group=grpDiv, minval=1)
rangeUpper = input.int(60, "Bars Range Upper", group=grpDiv, minval=1)
rangeLower = input.int(5, "Bars Range Lower", group=grpDiv, minval=1)
bullColor = input.color(color.new(#4CAF50, 0), "Bull Color", group=grpDiv)
bearColor = input.color(color.new(#F23645, 0), "Bear Color", group=grpDiv)
textColor = color.white
noneColor = color.new(color.white, 100)
res = useCurrentRes ? timeframe.period : resCustom
fastLength = input.int(12, minval=1)
slowLength = input.int(26, minval=1)
signalLength= input.int(9, minval=1)
fastMA = ta.ema(source, fastLength)
slowMA = ta.ema(source, slowLength)
macd = fastMA - slowMA
signal = ta.sma(macd, signalLength)
hist = macd - signal
outMacD = request.security(syminfo.tickerid, res, macd)
outSignal = request.security(syminfo.tickerid, res, signal)
outHist = request.security(syminfo.tickerid, res, hist)
// 가격도 같은 res로
hi_res = request.security(syminfo.tickerid, res, high)
lo_res = request.security(syminfo.tickerid, res, low)
// ── Histogram 색
histA_IsUp = outHist > outHist and outHist > 0
histA_IsDown = outHist < outHist and outHist > 0
histB_IsDown = outHist < outHist and outHist <= 0
histB_IsUp = outHist > outHist and outHist <= 0
macd_IsAbove = outMacD >= outSignal
plot_color = hist_colorChange ? (histA_IsUp ? color.new(#00FF00, 0) :
histA_IsDown ? color.new(#006900, 0) :
histB_IsDown ? color.new(#FF0000, 0) :
histB_IsUp ? color.new(#670000, 0) : color.yellow) : color.gray
macd_color = macd_colorChange ? color.new(#00ffff, 0) : color.new(#00ffff, 0)
signal_color = color.rgb(240, 232, 166)
circleYPosition = outSignal
// 골든/데드 크로스 (경고 해결: 먼저 계산)
isBullCross = ta.crossover(outMacD, outSignal)
isBearCross = ta.crossunder(outMacD, outSignal)
cross_color = isBullCross ? color.new(#00FF00, 0) : isBearCross ? color.new(#FF0000, 0) : na
// ── 플롯
plot(sh and outHist ? outHist : na, title="Histogram", color=plot_color, style=plot.style_histogram, linewidth=5)
plot(smd and outMacD ? outMacD : na, title="MACD", color=macd_color, linewidth=1)
plot(smd and outSignal? outSignal: na, title="Signal Line", color=signal_color, style=plot.style_line, linewidth=1)
plot(sd and (isBullCross or isBearCross) ? circleYPosition : na,
title="Cross", style=plot.style_circles, linewidth=3, color=cross_color)
hline(0, "0 Line", linestyle=hline.style_dotted, color=color.white)
// =====================
// Divergence (정배/역배) - 피벗 비교
// =====================
_inRange(cond) =>
bars = ta.barssince(cond)
rangeLower <= bars and bars <= rangeUpper
plFound = false
phFound = false
bullCond = false
bearCond = false
macdLBR = outMacD
if calculateDivergence
// 정배: 가격 LL, MACD HL
plFound := not na(ta.pivotlow(outMacD, lookbackLeft, lookbackRight))
macdHL = macdLBR > ta.valuewhen(plFound, macdLBR, 1) and _inRange(plFound )
lowLBR = lo_res
priceLL = lowLBR < ta.valuewhen(plFound, lowLBR, 1)
bullCond := priceLL and macdHL and plFound
// 역배: 가격 HH, MACD LH
phFound := not na(ta.pivothigh(outMacD, lookbackLeft, lookbackRight))
macdLH = macdLBR < ta.valuewhen(phFound, macdLBR, 1) and _inRange(phFound )
highLBR = hi_res
priceHH = highLBR > ta.valuewhen(phFound, highLBR, 1)
bearCond := priceHH and macdLH and phFound
// 시각화 (editable 파라미터 삭제)
plot(plFound ? macdLBR : na, offset=-lookbackRight, title="Regular Bullish (MACD)",
linewidth=2, color=(bullCond ? bullColor : noneColor), display=display.pane)
plotshape(bullCond ? macdLBR : na, offset=-lookbackRight, title="Bullish Label",
text=" Bull ", style=shape.labelup, location=location.absolute, color=bullColor, textcolor=textColor, display=display.pane)
plot(phFound ? macdLBR : na, offset=-lookbackRight, title="Regular Bearish (MACD)",
linewidth=2, color=(bearCond ? bearColor : noneColor), display=display.pane)
plotshape(bearCond ? macdLBR : na, offset=-lookbackRight, title="Bearish Label",
text=" Bear ", style=shape.labeldown, location=location.absolute, color=bearColor, textcolor=textColor, display=display.pane)
// 알람
alertcondition(bullCond, title="MACD Regular Bullish Divergence",
message="MACD 정배 다이버전스 발견: 현재 봉에서 lookbackRight 만큼 좌측.")
alertcondition(bearCond, title="MACD Regular Bearish Divergence",
message="MACD 역배 다이버전스 발견: 현재 봉에서 lookbackRight 만큼 좌측.")
EMA 5/9 Angle + Candle Strength (SL=Open, TP=RR)EMA 5 / EMA 9 cross
Cross must have ~30° angle (approximated using slope → atan)
Entry candle must be bullish/bearish and also be Normal / 2nd Most / Most based on body-size percentile
Entry = close of signal candle
SL = open of signal candle
TP = 1:2 RR (editable input)
premium//@version=5
indicator("Custom Binance Premium Index + Alerts", overlay=false)
// === 1. 数据源(可修改) ===
// 永续合约价格(默认 BTCUSDT 永续)
futures = request.security("BINANCE:BTCUSDT_PERP", timeframe.period, close)
// 现货价格(默认 BTCUSDT 现货)
spot = request.security("BINANCE:BTCUSDT", timeframe.period, close)
// === 2. 计算自定义溢价指数 ===
premium = ((futures / spot) - 1) * 100
// === 3. 用户设定阈值(你给的值) ===
upper = 1.5 // 溢价 ≥ 1.5 触发告警
lower = -2.0 // 溢价 ≤ -2.0 触发告警
// === 4. 绘图 ===
plot(premium, title="Premium Index (%)", color=color.new(color.blue, 0))
hline(upper, "Upper Threshold (1.5%)", color=color.new(color.red, 0))
hline(lower, "Lower Threshold (-2.0%)", color=color.new(color.green, 0))
// === 5. 告警条件 ===
alertcondition(premium >= upper,
title="溢价 ≥ 1.5%",
message="Premium Index ≥ 1.5%(永续合约偏高,多头较强)"
)
alertcondition(premium <= lower,
title="溢价 ≤ -2.0%",
message="Premium Index ≤ -2.0%(永续合约偏低,空头压力大)"
)
// === 6. 信息显示 ===
label.new(bar_index, premium, "Premium: " + str.tostring(premium, "#.##") + "%",
style=label.style_label_left, color=color.new(color.blue, 85))
RSI + STOCH RSI - Marx_CapitalSimple RSI + STOCH RSI indicator in one pane. In addition to the standard 30/70 and 20/80 RSI levels you have three adjustable levels (eg. 0, 50, 100) to indicate STOCH RSI overbought/oversold scenarios.




















