Goldilocks Pivot FractalsGOLDILOCKS PIVOT FRACTALS - DESCRIPTION
Overview
Goldilocks Pivot Fractals identifies swing highs and lows using fractal pattern recognition with professional visual presentation. This indicator marks potential reversal points where price creates distinct peaks and valleys - perfect pivot points for support, resistance, and market structure analysis.
The "Goldilocks" name reflects the perfectly balanced visual presentation: not too cluttered, not too plain, just right for professional traders. Unlike standard fractal indicators, this edition features fully customizable Buy/Sell labels with tick-based positioning, independent toggle controls, and a high-contrast color scheme optimized for both dark and light chart themes.
What Makes It Unique:
- Professional label system with full customization (colors, sizes, tick-based offsets)
- Toggle labels and arrow shapes independently
- High-contrast default colors (teal/maroon) optimized for maximum visibility
- Clean, trader-friendly interface with intuitive settings
- Works flawlessly on all timeframes and instruments
How to Use
PERIOD ADJUSTMENT & ADJUSTING SENSITIVITY
The Period(s) setting controls how many signals you see:
• Period = 2 (default): Shows more signals, catches smaller price swings - best for day trading and scalping
• Period = 3-4: Shows medium amount of signals, filters out tiny moves - good for swing trading (holding days to weeks)
• Period = 5 or higher: Shows fewer signals, only the biggest turning points - best for long-term position trading
- Simple rule: Lower number = more signals. Higher number = fewer, but stronger signals.
SIGNALS
🟢 "BUY Label" (Down Fractal)
- Marks swing lows and potential support zones
- Look for price bouncing up after the fractal forms
- Use for identifying pullback entry points in uptrends
- Place stops below recent BUY fractals
🔴 "SELL Label" (Up Fractal)
- Marks swing highs and potential resistance zones
- Look for price rejecting down after the fractal forms
- Use for identifying profit targets or short entries
- Place stops above recent SELL fractals
REPAINTING BEHAVIOR
⚠️ This indicator repaints by design. Fractals require N bars on both sides to confirm, so they appear N bars after the actual pivot point. This is normal and ensures accurate pivot identification. Wait for complete confirmation before trading.
TRADING APPLICATIONS
1. Support/Resistance: Mark key price levels for entries and exits
2. Market Structure: higher BUY fractals = uptrend, lower SELL fractals = downtrend
3. Stop Placement: Use recent fractals as logical stop-loss levels
4. Breakout Trading: Monitor price breaking above/below fractal levels
5. Trend Following: Enter on pullbacks to BUY fractals in uptrends
6. Swing Trading: Identify major swing points for position entries
CUSTOMIZATION OPTIONS
• Show BUY/SELL Labels**: Toggle professional text labels on/off
• Show Shapes: Toggle arrow shapes independently
• Offset (ticks): Adjust label distance from price bars for perfect positioning
• Colors: Customize backgrounds (default: teal/maroon) and text (default: white/yellow)
• Label Size: Choose from tiny, small, normal, large, or huge
The high-contrast default colors provide excellent visibility without adjustment, but full customization is available to match any chart theme.
Key Settings
Periods (n) (default: 2): Number of bars on each side of pivot. Lower = more signals, Higher = fewer, stronger signals
Show BUY/SELL Labels (default: ON): Display professional text labels
Show Shapes (default: ON): Display arrow shapes
BUY offset (ticks) (default: 8): Distance BUY labels appear below lows
SELL offset (ticks) (default: 8): Distance SELL labels appear above highs
Colors: Full customization - defaults optimized for visibility
Label size (default: normal): Visual prominence control
Key Features
✅ Professional pivot fractal detection
✅ Fully customizable Buy/Sell labels
✅ Independent toggle for labels and shapes
✅ Tick-based offset positioning
✅ High-contrast color scheme
✅ Works on all timeframes and instruments
✅ Clean, intuitive interface
✅ Adjustable sensitivity
✅ Perfect for support/resistance identification
✅ Ideal for market structure analysis
Indicadores e estratégias
MoBo Bands - Momentum Breakout IndicatorDESCRIPTION
MoBo Bands (Momentum Breakout Bands) is a volatility-based breakout detection indicator that helps traders identify potential momentum shifts in the market. The indicator uses dynamic bands calculated from standard deviation to signal when price breaks above or below established ranges, indicating potential bullish or bearish momentum changes.
═════════════════════════════════════════════════════════════
KEY FEATURES
═════════════════════════════════════════════════════════════
- Dynamic upper and lower bands based on standard deviation
- Color-coded bands that change based on breakout direction (green for bullish, red for bearish)
- Visual breakout arrows marking entry points above/below bands
- Optional colored fill zones between bands showing current momentum state
- Customizable displacement for band projection
- Built-in alert system for breakout and breakdown signals
═════════════════════════════════════════════════════════════
HOW IT WORKS
═════════════════════════════════════════════════════════════
The indicator calculates a middle line using a Simple Moving Average (SMA) with upper and lower bands positioned using standard deviation multipliers. When price closes above the upper band, a bullish breakout (green) is signaled. When price closes below the lower band, a bearish breakdown (red) is signaled. The bands and fill zones remain colored until the opposite signal occurs, providing clear visual confirmation of the current momentum state.
═════════════════════════════════════════════════════════════
CUSTOMIZABLE INPUTS
═════════════════════════════════════════════════════════════
CALCULATION PARAMETERS:
- Price Source - Select which price data to use (default: close)
- Length - Period for SMA and standard deviation calculation (default: 10)
- Num Dev Up - Standard deviation multiplier for upper band (default: 0.8)
- Num Dev Down - Standard deviation multiplier for lower band (default: -0.8)
- Displace - Shift bands forward for projection analysis (default: 0)
DISPLAY OPTIONS:
- Colored Mobo - Enable/disable color-coded bands
- Colored Fill - Enable/disable fill zones between bands
- Break Arrows - Show/hide breakout and breakdown arrows
ALERT OPTIONS:
- Show Alerts - Enable/disable alert conditions
═════════════════════════════════════════════════════════════
USAGE GUIDE
═════════════════════════════════════════════════════════════
Watch for price to close outside the bands as potential breakout signals:
BULLISH BREAKOUT: Green arrow appears below the lower band when price closes above the upper band, indicating upward momentum shift.
BEARISH BREAKDOWN: Red arrow appears above the upper band when price closes below the lower band, indicating downward momentum shift.
The bands also serve as dynamic support and resistance levels. When bands are green, momentum is bullish. When bands are red, momentum is bearish.
═════════════════════════════════════════════════════════════
BEST PRACTICES
═════════════════════════════════════════════════════════════
- This indicator works well on liquid futures contracts (MNQ, MES, MYM, MGC, MCL) and major
currency pairs across multiple timeframes
- Lower deviation values (0.5-1.0) produce more frequent signals suitable for scalping
- Higher deviation values (1.5-2.5) filter for stronger breakouts ideal for swing trading
- Combine with volume indicators for additional confirmation
- Use with momentum oscillators to validate breakout strength
- Best results in trending market conditions
- Consider the overall market context and trend direction
════════════════════════════════════════════════════════════
ALERT CONFIGURATION
═════════════════════════════════════════════════════════════
Configure custom alerts for automated notifications:
- "MoBo BreakOUT" - Triggers on bullish breakout signals
- "MoBo BreakDOWN" - Triggers on bearish breakdown signals
Set alerts to "Once Per Bar Close" for confirmed signals and avoid false triggers during bar development.
═════════════════════════════════════════════════════════════
IDEAL FOR
═════════════════════════════════════════════════════════════
- Day traders and scalpers on futures markets
- Swing traders looking for momentum shifts
- Breakout trading strategies
- Trend following systems
- Works on stocks, forex, crypto, and commodities
- Effective across multiple timeframes (1min to daily)
═════════════════════════════════════════════════════════════
Perfect for traders seeking clear visual breakout signals with minimal lag. The color-coded system and arrow markers make it easy to identify momentum changes at a glance.
© 2024 NPR21 | Mozilla Public License 2.0
Open-source script
NPR21
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by
IronRod Trigger SystemIRONROD TRIGGER SYSTEM
DESCRIPTION
IronRod Trigger System is a momentum oscillator based on the Stochastic Momentum Index (SMI) that identifies trend changes, momentum shifts, and range-bound "chop" zones. Features color-changing SMI lines, histogram columns showing momentum strength, and a visual chop zone that highlights when to trade versus when to stay on the sidelines.
The system combines momentum direction (green/red lines), momentum strength (histogram columns), and market context (chop zone cloud) into one clean visual package. The dynamic zero line changes color to signal trade conditions (cyan) versus hold conditions (orange).
What Makes It Unique:
Dual color-changing lines (SMI and AvgSMI) show momentum direction
Histogram columns display momentum strength
Chop zone cloud identifies low-momentum periods
Dynamic zero line (cyan = trade, orange = hold)
Three-color histogram (green = strong up, red = strong down, gray = weak)
Adjustable chop zone threshold
How to Use
THE DISPLAY
Lines:
Green = bullish momentum (rising)
Red = bearish momentum (falling)
Gray = neutral/sideways
Histogram Columns:
Green = strong bullish momentum
Red = strong bearish momentum
Gray = weak/choppy momentum
Zero Line:
Cyan (blue) = trade zone - momentum is directional
Orange = chop zone - momentum is weak, avoid trading
Chop Zone Cloud:
Gray shaded area = range where momentum is indecisive (±30 default)
TRADING STRATEGIES
1. Chop Zone Trading
Trade: Only when SMI is outside gray cloud AND zero line is cyan
Avoid: When SMI is inside cloud OR zero line is orange
Long: Green line appears above chop zone
Short: Red line appears below chop zone
This is the key feature - dramatically reduces whipsaws
2. Zero Line Crosses
Buy: SMI crosses above zero with cyan zero line
Sell: SMI crosses below zero with cyan zero line
Strongest signals when AvgSMI follows SMI across zero
Ignore crosses when zero line is orange (choppy)
3. Histogram Strength
Strong trend: Multiple consecutive green/red columns
Momentum building: Columns getting taller
Momentum fading: Columns turning gray = exit warning
Reversal signal: Gray columns after strong trend
4. Divergence Trading
Bearish divergence: Price higher high, SMI lower high → take red line signal
Bullish divergence: Price lower low, SMI higher low → take green line signal
Most powerful outside chop zone
ENTRIES & EXITS
Entries:
SMI line turns green outside chop zone (long)
SMI line turns red outside chop zone (short)
SMI crosses zero with cyan zero line
Exits:
SMI line changes color
SMI enters chop zone (orange zero line)
Histogram turns gray
Stops:
Below recent swing low (longs)
Above recent swing high (shorts)
ADJUSTING SETTINGS
Chop Zone (±) (default: 30):
Lower (15-25) = More trades, more whipsaws
Higher (35-50) = Fewer trades, higher quality
Adjust based on instrument volatility
Percent K Length (default: 5):
Lower (3-4) = More sensitive, faster signals - good for scalping
Higher (7-10) = Less sensitive, smoother - good for swing trading
Percent D Length (default: 4): Controls smoothing
SMI Bar Buffer (default: 4): Histogram color sensitivity
TIMEFRAME GUIDE
Scalping (1-5m): K=3, watch histogram color flips
Day trading (15-60m): Default settings, focus on zero crosses outside chop
Swing trading (4H-Daily): K=7-10, trade only strong trends outside chop
Key Settings
Percent K Length (default: 5): Lookback period - controls sensitivity
Percent D Length (default: 4): Smoothing period
Chop Zone (±) (default: 30): Range-bound zone threshold
SMI Bar Buffer (default: 4): Histogram color change sensitivity
Histogram Width (default: 1): Column thickness
Key Features
✅ Dual color-changing momentum lines
✅ Histogram columns show strength
✅ Chop zone cloud filters bad trades
✅ Dynamic zero line color
✅ Three-color histogram
✅ Adjustable chop threshold
✅ All timeframes
✅ Reduces whipsaws
Fractal Market Geometry [JOAT]
Fractal Market Geometry
Overview
Fractal Market Geometry is an open-source overlay indicator that combines fractal analysis with harmonic pattern detection, Fibonacci retracements and extensions, Elliott Wave concepts, and Wyckoff phase identification. It provides traders with a geometric framework for understanding market structure and identifying potential reversal patterns with multi-factor signal confirmation.
What This Indicator Does
The indicator calculates and displays:
Fractal Detection - Identifies fractal highs and lows using Williams-style pivot analysis with configurable period
Fractal Dimension - Calculates market complexity using range-based dimension estimation
Harmonic Patterns - Detects Gartley, Butterfly, Bat, Crab, Shark, Cypher, and ABCD patterns using Fibonacci ratios
Fibonacci Retracements - Key levels at 38.2%, 50%, and 61.8%
Fibonacci Extensions - Projection level at 161.8%
Elliott Wave Count - Simplified wave counting based on pivot detection (1-5)
Wyckoff Phase - Volume-based phase identification (Accumulation, Markup, Distribution, Neutral)
Golden Spiral Levels - ATR-based support and resistance levels using phi (1.618) ratio
Trend Detection - EMA crossover trend identification (20/50 EMA)
How It Works
Fractal detection uses a configurable period to identify swing points:
detectFractalHigh(simple int period) =>
bool result = true
float centerVal = high
for i = 0 to period - 1
if high >= centerVal or high >= centerVal
result := false
break
Harmonic pattern detection uses Fibonacci ratio analysis between swing points. Each pattern has specific ratio requirements:
Gartley: AB 0.382-0.618, BC 0.382-0.886, CD 1.27-1.618
Butterfly: AB 0.382-0.5, BC 0.382-0.886, CD 1.618-2.24
Bat: AB 0.5-0.618, BC 1.13-1.618, CD 1.618-2.24
Crab: AB 0.382-0.618, BC 0.382-0.886, CD 2.24-3.618
Shark: AB 0.382-0.618, BC 1.13-1.618, CD 1.618-2.24
Cypher: AB 0.382-0.618, BC 1.13-1.414, CD 0.786-0.886
Wyckoff phase detection analyzes volume relative to price movement:
wyckoffPhase(simple int period) =>
float avgVol = ta.sma(volume, period)
float priceChg = ta.change(close, period)
string phase = "NEUTRAL"
if volume > avgVol * 1.5 and math.abs(priceChg) < close * 0.02
phase := "ACCUMULATION"
else if volume > avgVol * 1.5 and math.abs(priceChg) > close * 0.05
phase := "MARKUP"
else if volume < avgVol * 0.7
phase := "DISTRIBUTION"
phase
Signal Generation
Signals use multi-factor confirmation for accuracy:
BUY Signal: Fractal low + Uptrend (EMA20 > EMA50) + RSI 30-55 + Bullish candle + Volume confirmation
SELL Signal: Fractal high + Downtrend (EMA20 < EMA50) + RSI 45-70 + Bearish candle + Volume confirmation
Pattern Detection: Label appears when harmonic pattern completes at current bar
Dashboard Panel (Top-Right)
Dimension - Fractal dimension value (market complexity measure)
Last High - Most recent fractal high price
Last Low - Most recent fractal low price
Pattern - Current harmonic pattern name or NONE
Elliott Wave - Current wave count (Wave 1-5) or OFF
Wyckoff - Current market phase or OFF
Trend - BULLISH, BEARISH, or NEUTRAL based on EMA crossover
Signal - BUY, SELL, or WAIT status
Visual Elements
Fractal Markers - Small triangles at fractal highs (down arrow) and lows (up arrow)
Geometry Lines - Dashed lines connecting the most recent fractal high and low
Fibonacci Levels - Clean horizontal lines at 38.2%, 50%, and 61.8% retracement levels
Fibonacci Extension - Horizontal line at 161.8% extension level
Golden Spiral Levels - Support and resistance lines based on ATR x 1.618
3D Fractal Field - Optional depth layers around swing levels (OFF by default)
Harmonic Pattern Markers - Small diamond shapes when Crab, Shark, or Cypher patterns detected
Pattern Labels - Text label showing pattern name when detected
Signal Labels - BUY/SELL labels on confirmed multi-factor signals
Input Parameters
Fractal Period (default: 5) - Bars on each side for fractal detection
Geometry Depth (default: 3) - Complexity of geometric calculations
Pattern Sensitivity (default: 0.8) - Tolerance for pattern ratio matching
Show Fibonacci Levels (default: true) - Display retracement levels
Show Fibonacci Extensions (default: true) - Display extension level
Elliott Wave Detection (default: true) - Enable wave counting
Wyckoff Analysis (default: true) - Enable phase detection
Golden Spiral Levels (default: true) - Display spiral support/resistance
Show Fractal Points (default: true) - Display fractal markers
Show Geometry Lines (default: true) - Display connecting lines
Show Pattern Labels (default: true) - Display pattern name labels
Show 3D Fractal Field (default: false) - Display depth layers
Show Harmonic Patterns (default: true) - Display pattern markers
Show Buy/Sell Signals (default: true) - Display signal labels
Suggested Use Cases
Identify potential reversal zones using harmonic pattern completion
Use Fibonacci levels for entry, stop-loss, and target planning
Monitor Wyckoff phases for accumulation/distribution awareness
Track Elliott Wave counts for trend structure analysis
Use fractal dimension to gauge market complexity
Wait for multi-factor signal confirmation before entering trades
Timeframe Recommendations
Best on 1H to Daily charts. Lower timeframes produce more fractals but with less significance. Higher timeframes provide stronger levels and more reliable signals.
Limitations
Harmonic pattern detection uses simplified ratio ranges and may not match all textbook definitions
Elliott Wave counting is basic and does not include all wave rules
Wyckoff phase detection is volume-based approximation
Fractal dimension calculation is simplified
Signals require fractal confirmation which has inherent lag equal to the fractal period
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management.
- Made with passion by officialjackofalltrades
VWATR Stop-Loss BandsPurpose
The script provides an adaptive stop‑loss framework built from VWATR, it anchors protective levels to price extremes and scales them with both volatility and volume. The objective is to create stop‑loss zones that reflect real market intensity rather than arbitrary fixed distances.
How it works
The script computes true range, multiplies it by volume, and smooths both the volume‑weighted range and raw volume using the selected moving average, their ratio forms VWATR, a volatility measure normalized by traded volume. It then calculates the standard deviation of VWATR to capture volatility‑of‑volatility. Stop‑loss levels are constructed by offsetting the low and high by one VWATR, with additional layers created by adding or subtracting one to five standard deviations. The plots use strong colors for core levels and progressively lighter tones for outer layers, establishing a clear visual hierarchy.
Rationale
This structure gives the trader stop‑loss levels that adapt to changing market conditions, expanding during high‑energy phases and contracting during quiet periods, which reduces premature stop‑outs and aligns risk with actual volatility. The standard deviation layers provide a graded map of volatility stress, allowing the user to assess how far price must travel to breach increasingly extreme thresholds. The result is a stop‑loss system that is both reactive and context‑aware, offering more informed decision‑making than static offsets.
SMI Trigger SystemSMI TRIGGER SYSTEM - DESCRIPTION
Overview
SMI Trigger System is a momentum oscillator that identifies trend changes and reversals using the Smoothed Stochastic Momentum Index (SMI). Features a color-changing line (green = bullish, red = bearish), cloud shading for momentum zones, and triangle markers that appear exactly when momentum flips.
What Makes It Unique:
Real-time color-changing momentum line
Cloud shading split at zero line
Triangle triggers at exact momentum flip points
Overbought/oversold limit lines
Built-in alerts for all key signals
Fully customizable appearance
Works on all timeframes
How to Use
THE DISPLAY
Green line/cloud: Bullish momentum
Red line/cloud: Bearish momentum
Above zero: Bulls in control
Below zero: Bears in control
Upper limit (+40): Overbought
Lower limit (-40): Oversold
SIGNALS
🟢 Green Triangle (▲) - Momentum flipping bullish. Buy signal, most powerful below zero.
🔴 Red Triangle (▼) - Momentum flipping bearish. Sell signal, most powerful above zero.
TRADING STRATEGIES
1. Trend Following
In uptrends: Only take green triangles, ignore red
In downtrends: Only take red triangles, ignore green
Use higher timeframe for trend, lower for entries
Example: Daily uptrend → trade green triangles on 1H chart
2. Limit Reversals
Red triangle at upper limit (+40) = strong reversal signal, go short
Green triangle at lower limit (-40) = strong reversal signal, go long
Wait for triangle AND price confirmation
Most reliable on 4H/Daily timeframes
3. Zero Line Trading
SMI crosses above zero → bullish bias, take green triangles
SMI crosses below zero → bearish bias, take red triangles
Zero acts as momentum baseline
4. Divergence Setups
Price higher high + SMI lower high = bearish divergence → take next red triangle
Price lower low + SMI higher low = bullish divergence → take next green triangle
Most powerful at overbought/oversold limits
ENTRIES & EXITS
Enter: On triangle appearance
Stop: Beyond recent opposite-color triangle
Target: Limit levels or opposite triangle
Add: Additional same-color triangles in strong trends
TIMEFRAME GUIDE
Scalping (1-5m): Lower %K to 3-4, take all trend-aligned triangles
Day trading (15-60m): Default settings (5/3), focus on limit reversals
Swing trading (4H-Daily): Higher %K to 7-10, trade only extreme readings
ADJUSTING SENSITIVITY
SMI %K Length (default: 5):
Lower (3-4) = More signals, faster - good for scalping
Higher (7-10) = Fewer signals, stronger - good for swing trading
SMI %D Length (default: 3):
Lower (1-2) = More responsive
Higher (5-7) = Smoother
ALERTS
Built-in alerts for:
Triangle appears (momentum flips)
SMI crosses zero (trend change)
SMI crosses limits (overbought/oversold)
Enable in settings, configure in TradingView alert dialog.
CUSTOMIZATION
Toggle cloud/triangles on/off
Adjust triangle size and positioning
Customize all colors
Triangle label cap prevents clutter
Key Settings
SMI %K Length (default: 5): Controls sensitivity and signal frequency
SMI %D Length (default: 3): Controls smoothing
SMI Limit (default: 40): Overbought/oversold threshold
Show SMI Cloud (default: ON): Cloud shading
Show SMI Flip Triangles (default: ON): Trigger markers
Triangle Size/Offset: Appearance customization
Enable Alerts (default: ON): Alert notifications
Key Features
✅ Color-changing momentum line
✅ Cloud shading for momentum zones
✅ Triangle triggers at exact flips
✅ Overbought/oversold limits
✅ Built-in alert system
✅ Fully customizable
✅ All timeframes
✅ Adjustable sensitivity
NPR21
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView.
Rango y Apertura PersonalizadoThis indicator highlights the opening times, and also shows the highest and lowest point on that candle.
VAM Pro (Multi-Model) [Final]Volatility Adjusted Momentum (VAM) Pro+ is a professional quantitative tool designed to measure trend strength by normalizing momentum against market volatility. Standard momentum indicators often fail during high-volatility periods because they treat every price change the same regardless of market noise. This indicator solves that problem by scaling price changes based on their statistical significance using Z-Score logic. This Pro+ version is specifically optimized for Scalping and Intraday Trading by introducing advanced volatility estimators and mathematical horizon adjustments that superior to classic standard deviation models.
The indicator allows you to choose the most suitable volatility model for your specific asset class. The Parkinson Volatility model is highly recommended for Crypto markets because it uses the High-Low range instead of just close prices, effectively capturing intraday wicks and liquidation spikes that standard deviation often misses. For Equities and Forex, the Garman-Klass model is the most efficient choice as it utilizes the full Open-High-Low-Close data set to account for opening gaps and professional trading ranges.
The mathematical core of the script features a strict Horizon Adjustment based on the Square Root of Time rule. This aligns the one-bar volatility risk with your chosen momentum lookback period to ensure a mathematically consistent calculation. By default, the script uses Logarithmic Returns to maintain scale invariance, which is critical for assets with high percentage swings like Cryptocurrencies. To trade with VAM Pro, look for the histogram color and its relation to the Zero line. A Green histogram indicates positive volatility-adjusted momentum where bulls are dominant, while a Red histogram shows bearish dominance. Values reaching the +2.0 or -2.0 Sigma levels represent statistically extreme moves that often act as exhaustion points or precede strong mean-reversion opportunities. When the histogram crosses the yellow signal line, it provides an early warning that the current momentum is fading.
Investment involves risk. The Volatility Adjusted Momentum (VAM) Pro+ is an analytical tool and does not constitute financial advice, investment recommendations, or an offer to buy or sell any security. Past performance is not indicative of future results. Market conditions can change rapidly, and technical indicators may produce false signals. Always perform your own due diligence, use proper risk management, and consult with a certified financial advisor before making any trading decisions. The author assumes no responsibility for any financial losses incurred through the use of this script.
52W High / Low + 20% Retracement52-Week High / Low with 20% Retracement Level
This indicator provides a visual context for momentum and drawdown
analysis using 52-week price extremes.
What it shows:
- The 52-week high and 52-week low levels.
- A retracement level defined as a fixed percentage (default 20%)
below the 52-week high.
How to interpret it:
- Price above the retracement level indicates that the stock has
corrected in a controlled manner and the broader momentum structure
is still intact.
- Price below the retracement level suggests a deeper drawdown and
potential deterioration of momentum.
Intended use:
- Designed as a quality filter, not as an entry or exit signal.
- Helps identify stocks with strong momentum that are consolidating
rather than breaking down.
- Should be combined with trend and liquidity filters.
Notes:
- The retracement percentage is adjustable.
- This indicator is descriptive, not predictive.
- It does not replace risk management or stop-loss rules.
*/
lib_ephemeris █ PLANETARY EPHEMERIS MASTER LIBRARY
Unified API for calculating planetary positions. Import this single library to access all 11 celestial bodies: Sun, Moon, Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto.
Theory: VSOP87 (planets), ELP2000-82 (Moon), Meeus (Pluto)
═══════════════════════════════════════════════════════════════
█ QUICK START
//@version=6
indicator("Planetary Ephemeris Demo")
import BlueprintResearch/lib_ephemeris/1 as eph
// Get all planets
sun = eph.string_to_planet("Sun")
moon = eph.string_to_planet("Moon")
mercury = eph.string_to_planet("Mercury")
venus = eph.string_to_planet("Venus")
mars = eph.string_to_planet("Mars")
jupiter = eph.string_to_planet("Jupiter")
saturn = eph.string_to_planet("Saturn")
uranus = eph.string_to_planet("Uranus")
neptune = eph.string_to_planet("Neptune")
pluto = eph.string_to_planet("Pluto")
// Get longitude for each planet (geocentric)
sun_lon = eph.get_longitude(sun, time, true)
moon_lon = eph.get_longitude(moon, time, true)
mercury_lon = eph.get_longitude(mercury, time, true)
venus_lon = eph.get_longitude(venus, time, true)
mars_lon = eph.get_longitude(mars, time, true)
jupiter_lon = eph.get_longitude(jupiter, time, true)
saturn_lon = eph.get_longitude(saturn, time, true)
uranus_lon = eph.get_longitude(uranus, time, true)
neptune_lon = eph.get_longitude(neptune, time, true)
pluto_lon = eph.get_longitude(pluto, time, true)
// Plot all planets
plot(sun_lon, "Sun", color.yellow)
plot(moon_lon, "Moon", color.silver)
plot(mercury_lon, "Mercury", color.orange)
plot(venus_lon, "Venus", color.green)
plot(mars_lon, "Mars", color.red)
plot(jupiter_lon, "Jupiter", color.purple)
plot(saturn_lon, "Saturn", color.olive)
plot(uranus_lon, "Uranus", color.aqua)
plot(neptune_lon, "Neptune", color.blue)
plot(pluto_lon, "Pluto", color.gray)
═══════════════════════════════════════════════════════════════
█ AVAILABLE FUNCTIONS
Core Data Access:
• string_to_planet(string) → Planet enum
• get_longitude(Planet, time, preferGeo) → degrees [0, 360)
• get_declination(Planet, time) → degrees
• get_speed(Planet, time) → degrees/day
• is_retrograde(Planet, time) → true/false
Planetary Averages:
• get_avg6_geo_lon(time) → 6 outer planets average
• get_avg6_helio_lon(time)
• get_avg8_geo_lon(time) → 8 classical planets average
• get_avg8_helio_lon(time)
Utility:
• normalizeLongitude(lon) → normalize to [0, 360)
═══════════════════════════════════════════════════════════════
█ SUPPORTED PLANET STRINGS
Works with symbols or plain names (case-insensitive):
• "☉︎ Sun" or "Sun"
• "☽︎ Moon" or "Moon"
• "☿ Mercury" or "Mercury"
• "♀ Venus" or "Venus"
• "🜨 Earth" or "Earth"
• "♂ Mars" or "Mars"
• "♃ Jupiter" or "Jupiter"
• "♄ Saturn" or "Saturn"
• "⛢ Uranus" or "Uranus"
• "♆ Neptune" or "Neptune"
• "♇ Pluto" or "Pluto"
═══════════════════════════════════════════════════════════════
█ COORDINATE SYSTEMS
Geocentric: Positions relative to Earth (default for Sun/Moon)
Heliocentric: Positions relative to the Sun
Use the preferGeo parameter in get_longitude():
• true = geocentric
• false = heliocentric
Sun and Moon always return geocentric (heliocentric not applicable).
═══════════════════════════════════════════════════════════════
█ FUTURE PROJECTIONS
Project planetary positions into the future using polylines:
import BlueprintResearch/lib_vsop_core/1 as core
// Get future timestamp (250 bars ahead)
future_time = core.get_future_time(time, 250)
// Calculate future position
future_lon = eph.get_longitude(mars, future_time, true)
Use with polyline.new() to draw projected paths on your chart. See the commented showcase code in this library's source for a complete 250-bar projection example.
═══════════════════════════════════════════════════════════════
█ OPEN SOURCE
This library is part of an open-source planetary ephemeris project.
Free to use with attribution. MIT License.
═══════════════════════════════════════════════════════════════
█ REFERENCES
• Meeus, Jean. "Astronomical Algorithms" (2nd Ed., 1998)
• Bretagnon & Francou. "VSOP87 Solutions" (1988)
• Chapront-Touzé & Chapront. "ELP2000-82" (1983)
═══════════════════════════════════════════════════════════════
© 2025 BlueprintResearch (Javonnii) • MIT License
@version=6
normalizeLongitude(lon)
Normalizes any longitude value to the range [0, 360) degrees.
Parameters:
lon (float) : (float) Longitude in degrees (can be any value, including negative or >360).
Returns: (float) Normalized longitude in range [0, 360).
string_to_planet(planetStr)
Converts a planet string identifier to Planet enum value.
Parameters:
planetStr (string) : (string) Planet name (case-insensitive). Supports formats: "Sun", "☉︎ Sun", "sun", "SUN"
Returns: (Planet) Corresponding Planet enum. Returns Planet.Sun if string not recognized.
@note Supported planet strings: Sun, Moon, Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto
get_longitude(p, t, preferGeo)
Returns planetary longitude with automatic coordinate system selection.
Parameters:
p (series Planet) : (Planet) Planet to query.
t (float) : (float) Unix timestamp in milliseconds (use built-in 'time' variable).
preferGeo (bool) : (bool) If true, return geocentric; if false, return heliocentric.
Returns: (float) Longitude in degrees, normalized to range [0, 360).
@note Sun and Moon always return geocentric regardless of preference (heliocentric not applicable).
get_declination(p, t)
Returns planetary geocentric equatorial declination.
Parameters:
p (series Planet) : (Planet) Planet to query.
t (float) : (float) Unix timestamp in milliseconds (use built-in 'time' variable).
Returns: (float) Geocentric declination in degrees, range where positive is north.
@note Declination is always geocentric (no heliocentric equivalent in library).
get_speed(p, t)
Returns planetary geocentric longitude speed (rate of change).
Parameters:
p (series Planet) : (Planet) Planet to query.
t (float) : (float) Unix timestamp in milliseconds (use built-in 'time' variable).
Returns: (float) Geocentric longitude speed in degrees per day. Negative values indicate retrograde motion. Returns na for Moon.
@note Speed is always geocentric (no heliocentric equivalent in library). Moon speed calculation not implemented.
get_avg6_geo_lon(t)
get_avg6_geo_lon
@description Returns the arithmetic average of the geocentric longitudes for the six outer planets: Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto.
Parameters:
t (float) : (float) Time in Unix timestamp (milliseconds).
Returns: (float) Average geocentric longitude of the six outer planets in degrees, range [0, 360).
get_avg6_helio_lon(t)
get_avg6_helio_lon
@description Returns the arithmetic average of the heliocentric longitudes for the six outer planets: Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto.
Parameters:
t (float) : (float) Time in Unix timestamp (milliseconds).
Returns: (float) Average heliocentric longitude of the six outer planets in degrees, range [0, 360).
get_avg8_geo_lon(t)
get_avg8_geo_lon
@description Returns the arithmetic average of the geocentric longitudes for all eight classical planets: Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto.
Parameters:
t (float) : (float) Time in Unix timestamp (milliseconds).
Returns: (float) Average geocentric longitude of all eight classical planets in degrees, range [0, 360).
get_avg8_helio_lon(t)
get_avg8_helio_lon
@description Returns the arithmetic average of the heliocentric longitudes for all eight classical planets: Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto.
Parameters:
t (float) : (float) Time in Unix timestamp (milliseconds).
Returns: (float) Average heliocentric longitude of all eight classical planets in degrees, range [0, 360).
is_retrograde(p, t)
Returns true if the planet is currently in retrograde motion (geocentric speed < 0) == 0 = stationary.
Parameters:
p (series Planet) : The planet to check.
t (float) : Time in Unix timestamp (milliseconds).
Returns: true if the planet is in retrograde, false otherwise.
lib_vsop87_mercuryLibrary "lib_vsop87_mercury"
Heliocentric and geocentric position calculations for Mercury
using VSOP87 theory. Provides longitude, latitude, radius, speed,
and declination functions.
@author BlueprintResearch (Javonnii)
@license MIT License - Free to use with attribution
@theory VSOP87A (Heliocentric rectangular coordinates)
@accuracy Truncated series (~10-15 terms per series) - arcsecond precision
@time_scale Julian millennia from J2000.0 (use core.get_julian_millennia)
@reference Meeus, Jean. "Astronomical Algorithms" (2nd Ed., 1998)
Bretagnon & Francou. "VSOP87 Solutions" (1988)
@showcase Includes commented showcase code with 250-bar future projection.
Uncomment to display Mercury data with polyline projections.
@open_source This library is part of an open-source alternative to
proprietary astronomical libraries. Study, modify, and
share freely. We believe knowledge of the cosmos belongs
to everyone.
════════════════════════════════════════════════════════════════
© 2025 BlueprintResearch / Javonnii
Licensed under MIT License
════════════════════════════════════════════════════════════════
@version=6
import BlueprintResearch/lib_vsop_core/1 as core
get_helio_lon(t)
Computes Mercury's heliocentric ecliptic longitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_helio_lat(t)
Computes Mercury's heliocentric ecliptic latitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic latitude in radians, range approximately . Note: Returns radians, not degrees.
get_helio_radius(t)
Computes Mercury's heliocentric radius (distance from Sun) using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric radius in astronomical units (AU). Typical range is 0.31-0.47 AU.
get_geo_speed(t)
Computes Mercury's geocentric longitude speed (rate of change over time).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric longitude speed in degrees per day. Negative values indicate retrograde motion (apparent backward movement).
get_geo_lon(t)
Computes Mercury's geocentric ecliptic longitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_geo_ecl_lat(t)
Computes Mercury's geocentric ecliptic latitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic latitude in degrees, range approximately .
get_geo_decl(t)
Computes Mercury's geocentric equatorial declination (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric equatorial declination in degrees, range where positive is north.
lib_vsop87_venusLibrary "lib_vsop87_venus"
Heliocentric and geocentric position calculations for Venus
using VSOP87 theory. Provides longitude, latitude, radius, speed,
and declination functions.
@author BlueprintResearch (Javonnii)
@license MIT License - Free to use with attribution
@theory VSOP87A (Heliocentric rectangular coordinates)
@accuracy Truncated series (~10-15 terms per series) - arcsecond precision
@time_scale Julian millennia from J2000.0 (use core.get_julian_millennia)
@reference Meeus, Jean. "Astronomical Algorithms" (2nd Ed., 1998)
Bretagnon & Francou. "VSOP87 Solutions" (1988)
@showcase Includes commented showcase code with 250-bar future projection.
Uncomment to display Venus data with polyline projections.
@open_source This library is part of an open-source alternative to
proprietary astronomical libraries. Study, modify, and
share freely. We believe knowledge of the cosmos belongs
to everyone.
════════════════════════════════════════════════════════════════
© 2025 BlueprintResearch / Javonnii
Licensed under MIT License
════════════════════════════════════════════════════════════════
@version=6
import BlueprintResearch/lib_vsop_core/1 as core
get_helio_lon(t)
Computes Venus's heliocentric ecliptic longitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_helio_lat(t)
Computes Venus's heliocentric ecliptic latitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic latitude in radians, range approximately . Note: Returns radians, not degrees.
get_helio_radius(t)
Computes Venus's heliocentric radius (distance from Sun) using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric radius in astronomical units (AU). Typical range is 0.72-0.73 AU.
get_geo_speed(t)
Computes Venus's geocentric longitude speed (rate of change over time).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric longitude speed in degrees per day. Negative values indicate retrograde motion (apparent backward movement).
get_geo_lon(t)
Computes Venus's geocentric ecliptic longitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_geo_ecl_lat(t)
Computes Venus's geocentric ecliptic latitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic latitude in degrees, range approximately .
get_geo_decl(t)
Computes Venus's geocentric equatorial declination (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric equatorial declination in degrees, range where positive is north.
lib_elp2000_moonLibrary "lib_elp2000_moon"
get_geo_ecl_lon(T)
Parameters:
T (float)
get_geo_ecl_lat(T)
Parameters:
T (float)
get_obliquity(T)
Parameters:
T (float)
get_declination(T)
Parameters:
T (float)
get_true_node_lon(T)
Parameters:
T (float)
get_true_south_node_lon(T)
Parameters:
T (float)
get_node_declination(T)
Parameters:
T (float)
get_south_node_declination(T)
Parameters:
T (float)
lib_vsop87_marsLibrary "lib_vsop87_mars"
get_helio_lon(t)
Computes Mars's heliocentric ecliptic longitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_helio_lat(t)
Computes Mars's heliocentric ecliptic latitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic latitude in radians, range approximately . Note: Returns radians, not degrees.
get_helio_radius(t)
Computes Mars's heliocentric radius (distance from Sun) using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric radius in astronomical units (AU). Typical range is 1.38-1.67 AU.
get_geo_speed(t)
Computes Mars's geocentric longitude speed (rate of change over time).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric longitude speed in degrees per day. Negative values indicate retrograde motion (apparent backward movement).
get_geo_lon(t)
Computes Mars's geocentric ecliptic longitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_geo_ecl_lat(t)
Computes Mars's geocentric ecliptic latitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic latitude in degrees, range approximately .
get_geo_decl(t)
Computes Mars's geocentric equatorial declination (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric equatorial declination in degrees, range where positive is north.
lib_vsop87_jupiterLibrary "lib_vsop87_jupiter"
get_helio_lon(t)
Computes Jupiter's heliocentric ecliptic longitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_helio_lat(t)
Computes Jupiter's heliocentric ecliptic latitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic latitude in radians, range approximately . Note: Returns radians, not degrees.
get_helio_radius(t)
Computes Jupiter's heliocentric radius (distance from Sun) using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric radius in astronomical units (AU). Typical range is 4.95-5.46 AU.
get_geo_speed(t)
Computes Jupiter's geocentric longitude speed (rate of change over time).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric longitude speed in degrees per day. Negative values indicate retrograde motion (apparent backward movement).
get_geo_lon(t)
Computes Jupiter's geocentric ecliptic longitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_geo_ecl_lat(t)
Computes Jupiter's geocentric ecliptic latitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic latitude in degrees, range approximately .
get_geo_decl(t)
Computes Jupiter's geocentric equatorial declination (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric equatorial declination in degrees, range where positive is north.
lib_vsop87_saturnLibrary "lib_vsop87_saturn"
get_helio_lon(t)
Computes Saturn's heliocentric ecliptic longitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_helio_lat(t)
Computes Saturn's heliocentric ecliptic latitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic latitude in radians, range approximately . Note: Returns radians, not degrees.
get_helio_radius(t)
Computes Saturn's heliocentric radius (distance from Sun) using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric radius in astronomical units (AU). Typical range is 9.02-10.05 AU.
get_geo_speed(t)
Computes Saturn's geocentric longitude speed (rate of change over time).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric longitude speed in degrees per day. Negative values indicate retrograde motion (apparent backward movement).
get_geo_lon(t)
Computes Saturn's geocentric ecliptic longitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_geo_ecl_lat(t)
Computes Saturn's geocentric ecliptic latitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic latitude in degrees, range approximately .
get_geo_decl(t)
Computes Saturn's geocentric equatorial declination (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric equatorial declination in degrees, range where positive is north.
lib_vsop87_uranusLibrary "lib_vsop87_uranus"
Heliocentric and geocentric position calculations for Uranus
using VSOP87 theory. Provides longitude, latitude, radius, speed,
and declination functions.
@author BlueprintResearch (Javonnii)
@license MIT License - Free to use with attribution
@theory VSOP87A (Heliocentric rectangular coordinates)
@accuracy Truncated series (~10-15 terms per series) - arcsecond precision
@time_scale Julian millennia from J2000.0 (use core.get_julian_millennia)
@reference Meeus, Jean. "Astronomical Algorithms" (2nd Ed., 1998)
Bretagnon & Francou. "VSOP87 Solutions" (1988)
@showcase Includes commented showcase code with 250-bar future projection.
Uncomment to display Uranus data with polyline projections.
@open_source This library is part of an open-source alternative to
proprietary astronomical libraries. Study, modify, and
share freely. We believe knowledge of the cosmos belongs
to everyone.
════════════════════════════════════════════════════════════════
© 2025 BlueprintResearch / Javonnii
Licensed under MIT License
════════════════════════════════════════════════════════════════
@version=6
import BlueprintResearch/lib_vsop_core/1 as core
get_helio_lon(t)
Computes Uranus's heliocentric ecliptic longitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_helio_lat(t)
Computes Uranus's heliocentric ecliptic latitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic latitude in radians, range approximately . Note: Returns radians, not degrees.
get_helio_radius(t)
Computes Uranus's heliocentric radius (distance from Sun) using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric radius in astronomical units (AU). Typical range is 18.28-20.09 AU.
get_geo_speed(t)
Computes Uranus's geocentric longitude speed (rate of change over time).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric longitude speed in degrees per day. Negative values indicate retrograde motion (apparent backward movement).
get_geo_lon(t)
Computes Uranus's geocentric ecliptic longitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_geo_ecl_lat(t)
Computes Uranus's geocentric ecliptic latitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic latitude in degrees, range approximately .
get_geo_decl(t)
Computes Uranus's geocentric equatorial declination (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric equatorial declination in degrees, range where positive is north.
lib_vsop87_neptuneLibrary "lib_vsop87_neptune"
Heliocentric and geocentric position calculations for Neptune
using VSOP87 theory. Provides longitude, latitude, radius, speed,
and declination functions.
@author BlueprintResearch (Javonnii)
@license MIT License - Free to use with attribution
@theory VSOP87A (Heliocentric rectangular coordinates)
@accuracy Truncated series (~10-15 terms per series) - arcsecond precision
@time_scale Julian millennia from J2000.0 (use core.get_julian_millennia)
@reference Meeus, Jean. "Astronomical Algorithms" (2nd Ed., 1998)
Bretagnon & Francou. "VSOP87 Solutions" (1988)
@showcase Includes commented showcase code with 250-bar future projection.
Uncomment to display Neptune data with polyline projections.
@open_source This library is part of an open-source alternative to
proprietary astronomical libraries. Study, modify, and
share freely. We believe knowledge of the cosmos belongs
to everyone.
════════════════════════════════════════════════════════════════
© 2025 BlueprintResearch / Javonnii
Licensed under MIT License
════════════════════════════════════════════════════════════════
@version=6
import BlueprintResearch/lib_vsop_core/1 as core
get_helio_lon(t)
Computes Neptune's heliocentric ecliptic longitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_helio_lat(t)
Computes Neptune's heliocentric ecliptic latitude using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric ecliptic latitude in radians, range approximately . Note: Returns radians, not degrees.
get_helio_radius(t)
Computes Neptune's heliocentric radius (distance from Sun) using VSOP87 theory.
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Heliocentric radius in astronomical units (AU). Typical range is 29.81-30.33 AU.
get_geo_speed(t)
Computes Neptune's geocentric longitude speed (rate of change over time).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric longitude speed in degrees per day. Negative values indicate retrograde motion (apparent backward movement).
get_geo_lon(t)
Computes Neptune's geocentric ecliptic longitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_geo_ecl_lat(t)
Computes Neptune's geocentric ecliptic latitude (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric ecliptic latitude in degrees, range approximately .
get_geo_decl(t)
Computes Neptune's geocentric equatorial declination (as seen from Earth).
Parameters:
t (float) : (float) Julian millennia from J2000.0 (use core.get_julian_millennia(time)).
Returns: (float) Geocentric equatorial declination in degrees, range where positive is north.
lib_meeus_plutoLibrary "lib_meeus_pluto"
Heliocentric and geocentric position calculations for Pluto using
Meeus truncated analytical series. Valid ±1 century from J2000.
@author BlueprintResearch (Javonnii)
@license MIT License - Free to use with attribution
@theory Meeus truncated series (not full planetary theory)
@accuracy Arcminute precision within ±1 century of J2000
@time_scale Julian centuries from J2000.0 (use core.get_julian_centuries)
@reference Meeus, Jean. "Astronomical Algorithms" (2nd Ed., 1998), Chapter 37
@showcase Includes commented showcase code with 250-bar future projection.
Uncomment to display Pluto data with polyline projections.
@open_source This library is part of an open-source alternative to
proprietary astronomical libraries. Study, modify, and
share freely. We believe knowledge of the cosmos belongs
to everyone.
════════════════════════════════════════════════════════════════
© 2025 BlueprintResearch / Javonnii
Licensed under MIT License
════════════════════════════════════════════════════════════════
@version=6
import BlueprintResearch/lib_vsop_core/1 as core
get_helio_lon(t)
Computes Pluto's heliocentric ecliptic longitude using Meeus truncated analytical series.
Parameters:
t (float) : (float) Julian centuries from J2000.0 (use core.get_julian_centuries(time)).
Returns: (float) Heliocentric ecliptic longitude in degrees, normalized to range [0, 360). Accurate within ±1 century from J2000.
get_helio_lat(t)
Computes Pluto's heliocentric ecliptic latitude using Meeus truncated analytical series.
Parameters:
t (float) : (float) Julian centuries from J2000.0 (use core.get_julian_centuries(time)).
Returns: (float) Heliocentric ecliptic latitude in degrees, range approximately . Accurate within ±1 century from J2000.
get_helio_radius(t)
Computes Pluto's heliocentric radius (distance from Sun) using Meeus truncated analytical series.
Parameters:
t (float) : (float) Julian centuries from J2000.0 (use core.get_julian_centuries(time)).
Returns: (float) Heliocentric radius in astronomical units (AU). Typical range is 29.6-49.3 AU. Accurate within ±1 century from J2000.
get_geo_lon(t)
Computes Pluto's geocentric ecliptic longitude (as seen from Earth).
Parameters:
t (float) : (float) Julian centuries from J2000.0 (use core.get_julian_centuries(time)).
Returns: (float) Geocentric ecliptic longitude in degrees, normalized to range [0, 360).
get_geo_ecl_lat(t)
Computes Pluto's geocentric ecliptic latitude (as seen from Earth).
Parameters:
t (float) : (float) Julian centuries from J2000.0 (use core.get_julian_centuries(time)).
Returns: (float) Geocentric ecliptic latitude in degrees, range approximately .
get_geo_decl(t)
Computes Pluto's geocentric equatorial declination (as seen from Earth).
Parameters:
t (float) : (float) Julian centuries from J2000.0 (use core.get_julian_centuries(time)).
Returns: (float) Geocentric equatorial declination in degrees, range where positive is north.
get_geo_speed(t)
Computes Pluto's geocentric longitude speed (rate of change over time).
Parameters:
t (float) : (float) Julian centuries from J2000.0 (use core.get_julian_centuries(time)).
Returns: (float) Geocentric longitude speed in degrees per day. Negative values indicate retrograde motion (apparent backward movement).
lib_vsop_coreLibrary "lib_vsop_core"
Foundation library providing core types, evaluators, and utilities
for VSOP87 planetary theory calculations. Required by all planetary
libraries. Includes Earth heliocentric model and Sun geocentric functions.
@author BlueprintResearch (Javonnii)
@license MIT License - Free to use with attribution
@theory VSOP87 (Variations Séculaires des Orbites Planétaires)
@accuracy Truncated series - suitable for financial astrology and education
@time_scale Julian millennia from J2000.0 for VSOP87 planets
Julian centuries from J2000.0 for Moon and Pluto
@reference Meeus, Jean. "Astronomical Algorithms" (2nd Ed., 1998)
Bretagnon & Francou. "VSOP87 Solutions" (1988)
@showcase Includes commented showcase code with 250-bar future projection.
Uncomment to display Sun/Earth data with polyline projections.
@open_source This library is part of an open-source alternative to
proprietary astronomical libraries. Study, modify, and
share freely. We believe knowledge of the cosmos belongs
to everyone.
════════════════════════════════════════════════════════════════
© 2025 BlueprintResearch / Javonnii
Licensed under MIT License
════════════════════════════════════════════════════════════════
@version=6
get_julian_millennia(time_)
Parameters:
time_ (float)
get_julian_centuries(time_)
Parameters:
time_ (float)
eval_vsop87(terms, t)
Parameters:
terms (array)
t (float)
eval_vsop87_derivative(terms, t)
Parameters:
terms (array)
t (float)
mod360(x)
Parameters:
x (float)
custom_atan2(y, x)
Parameters:
y (float)
x (float)
get_earth_helio_radius(t)
Parameters:
t (float)
get_earth_helio_coords(t)
Parameters:
t (float)
get_obliquity(t)
Parameters:
t (float)
get_earth_helio_lon(t)
Parameters:
t (float)
get_sun_geo_lon(t)
Parameters:
t (float)
get_sun_geo_speed(t)
Parameters:
t (float)
get_sun_decl(t)
Parameters:
t (float)
get_bar_gap_ms()
Get bar interval in milliseconds for current timeframe
Returns: (int) Time interval between bars in milliseconds
get_future_time(current_time, bars_ahead)
Calculate future timestamp for projection plotting
Parameters:
current_time (int) : (int) Current bar time in milliseconds (use built-in 'time')
bars_ahead (int) : (int) Number of bars to project into future
Returns: (int) Future timestamp suitable for xloc.bar_time and chart.point.from_time
is_projection_bar()
Check if current bar is suitable for drawing future projections
Returns: (bool) True on last bar when projections should be drawn
vsop_term
Fields:
amp (series float)
phase (series float)
freq (series float)
MK_FractalLibrary "MK_Fractal"
ResCal(price, degree)
Parameters:
price (float)
degree (float)
SupCal(price, degree)
Parameters:
price (float)
degree (float)
CalcAllLevels(price)
Parameters:
price (float)
FindNearestLevel(current_price, resistances, supports)
Parameters:
current_price (float)
resistances (array)
supports (array)
IsTouchSupport(current_price, supports, tolerance_pct)
Parameters:
current_price (float)
supports (array)
tolerance_pct (float)
IsTouchResistance(current_price, resistances, tolerance_pct)
Parameters:
current_price (float)
resistances (array)
tolerance_pct (float)
GetLevelByDegree(price, degree)
Parameters:
price (float)
degree (float)
GetFormattedLevels(price)
Parameters:
price (float)
Positive Volatility Ratio (Vol+ / Vol-)
Positive Volatility Ratio (Vol+ / Vol-)
This indicator measures whether an asset’s volatility is driven mainly
by upward or downward price movements over a given time window.
How it works:
- Daily returns are calculated.
- Positive and negative returns are separated.
- The standard deviation of each group is computed.
- The Vol+ / Vol- ratio compares how much volatility comes from
upward moves versus downward moves.
Interpretation:
- Ratio > 1 → volatility dominated by upside moves (cleaner momentum).
- Ratio ≈ 1 → symmetric movement / noise.
- Ratio < 1 → volatility dominated by downside moves (not ideal for momentum).
Recommended use:
- Use as a pre-filter for the trading universe.
- Do not use as an entry or exit signal.
- Always combine with trend and liquidity filters.
Notes:
- This is not a standard or predictive indicator.
- It does not replace risk management or stop-loss rules.
- Longer lookback windows (60–120 days) tend to be more robust.
*/
Webhook Candle Sender (OHLCV)This indicator sends OHLCV (Open, High, Low, Close, Volume) candle data via webhook on every confirmed bar close.
It is designed to integrate TradingView with an external trading or analytics system (e.g. a local Flask server, paper trading engine, or algorithmic agent).
Features:
• Sends data only on bar close (no repainting)
• Works on any symbol (stocks, crypto, forex)
• Works on any timeframe
• Outputs structured JSON suitable for APIs and bots
• Uses TradingView alert() function for webhook delivery
Typical use cases:
• Algorithmic trading research
• Paper trading systems
• Backtesting external strategies
• Educational and learning purposes
This script does NOT place trades, manage risk, or provide trading signals.
It only transmits candle data.
No financial advice is provided.






















