EMA 34 Crossover with Break Even Stop LossEMA 34 Crossover with Break Even Stop Loss Strategy
This trading strategy is based on the 34-period Exponential Moving Average (EMA) and aims to enter long positions when the price crosses above the EMA 34. The strategy is designed to manage risk effectively with a dynamic stop loss and take-profit mechanism.
Key Features:
EMA 34 Crossover:
The strategy generates a long entry signal when the closing price of the current bar crosses above the 34-period EMA, with the condition that the previous closing price was below the EMA. This crossover indicates a potential upward trend.
Risk Management:
Upon entering a trade, the strategy sets a stop loss at the low of the previous bar. This helps in controlling the downside risk.
A take profit level is set at a 10:1 risk-to-reward ratio, meaning the potential profit is ten times the amount risked on the trade.
Break-even Stop Loss:
As the price moves in favor of the trade and reaches a 3:1 risk-to-reward ratio, the strategy moves the stop loss to the entry price (break-even). This ensures that no loss will be incurred if the market reverses, effectively protecting profits.
Exit Conditions:
The strategy exits the trade when either the stop loss is hit (if the price drops below the stop loss level) or the take profit target is reached (if the price rises to the take profit level).
If the price reaches the break-even level (entry price), the stop loss is adjusted to lock in profits and prevent any loss.
Visualization:
The stop loss and take profit levels are plotted on the chart for easy visualization, helping traders track the status of their trade.
Trade Management Summary:
Long Entry: When price crosses above the 34-period EMA.
Stop Loss: Set to the low of the previous candle.
Take Profit: Set to a 10:1 risk-to-reward ratio.
Break-even: Stop loss is moved to entry price when a 3:1 risk-to-reward ratio is reached.
Exit: The trade is closed either when the stop loss or take profit levels are hit.
This strategy is designed to minimize losses by employing a dynamic stop loss and to maximize gains by setting a favorable risk-to-reward ratio, making it suitable for traders who prefer a structured, automated approach to risk management and trend-following.
Indicadores e estratégias
EMA 21 and SMA 50 Low ConditionsDescription:
This indicator highlights trend zones on a daily chart using the 21-day Exponential Moving Average (EMA) and 50-day Simple Moving Average (SMA). It’s designed to identify bullish conditions with two distinct background colors:
• Green Background: Signals a strong bullish trend. Appears when the low of the candle stays above the 21 EMA for 3 or more consecutive days, with either the 3rd or 4th day closing higher than its open (an “up” day). The green zone persists until a candle closes below the 21 EMA.
• Yellow Background: Indicates a potential support zone. Triggers when the low of the candle remains above the 50 SMA after the green condition ends, suggesting the price is still holding above a longer-term average. The yellow zone lasts until a candle closes below the 50 SMA.
Features:
• Plots the 21 EMA (blue line) and 50 SMA (orange line) for visual reference.
• Uses background colors to mark trend zones, making it easy to spot bullish phases and support levels.
• Optimized for daily timeframes, ideal for swing traders or long-term trend followers.
How to Use:
1. Apply the indicator to a daily chart.
2. Watch for the green background to identify strong bullish momentum (lows holding above the 21 EMA with an up close confirmation).
3. Look for the yellow background as a sign of potential support after the short-term trend weakens (lows above the 50 SMA).
4. Exit zones are triggered by closes below the respective averages (21 EMA for green, 50 SMA for yellow).
Notes:
• Best used on symbols with sufficient historical data to ensure accurate EMA and SMA calculations.
• The indicator prioritizes the green condition over yellow—green will override if both could apply.
Author’s Intent:
Created to help traders visualize sustained bullish trends and key support levels using simple moving average rules. Perfect for confirming uptrends and monitoring pullbacks within a broader bullish context.
BTC Trading RobotOverview
This Pine Script strategy is designed for trading Bitcoin (BTC) by placing pending orders (BuyStop and SellStop) based on local price extremes. The script also implements a trailing stop mechanism to protect profits once a position becomes sufficiently profitable.
________________________________________
Inputs and Parameter Setup
1. Trading Profile:
o The strategy is set up specifically for BTC trading.
o The systemType input is set to 1, which means the strategy will calculate trade parameters using the BTC-specific inputs.
2. Common Trading Inputs:
o Risk Parameters: Although RiskPercent is defined, its actual use (e.g., for position sizing) isn’t implemented in this version.
o Trading Hours Filter:
SHInput and EHInput let you restrict trading to a specific hour range. If these are set (non-zero), orders will only be placed during the allowed hours.
3. BTC-Specific Inputs:
o Take Profit (TP) and Stop Loss (SL) Percentages:
TPasPctBTC and SLasPctBTC are used to determine the TP and SL levels as a percentage of the current price.
o Trailing Stop Parameters:
TSLasPctofTPBTC and TSLTgrasPctofTPBTC determine when and by how much a trailing stop is applied, again as percentages of the TP.
4. Other Parameters:
o BarsN is used to define the window (number of bars) over which the local high and low are calculated.
o OrderDistPoints acts as a buffer to prevent the entry orders from being triggered too early.
________________________________________
Trade Parameter Calculation
• Price Reference:
o The strategy uses the current closing price as the reference for calculations.
• Calculation of TP and SL Levels:
o If the systemType is set to BTC (value 1), then:
Take Profit Points (Tppoints) are calculated by multiplying the current price by TPasPctBTC.
Stop Loss Points (Slpoints) are calculated similarly using SLasPctBTC.
A buffer (OrderDistPoints) is set to half of the take profit points.
Trailing Stop Levels:
TslPoints is calculated as a fraction of the TP (using TSLTgrasPctofTPBTC).
TslTriggerPoints is similarly determined, which sets the profit level at which the trailing stop will start to activate.
________________________________________
Time Filtering
• Session Control:
o The current hour is compared against SHInput (start hour) and EHInput (end hour).
o If the current time falls outside the allowed window, the script will not place any new orders.
________________________________________
Entry Orders
• Local Price Extremes:
o The strategy calculates a local high and local low using a window of BarsN * 2 + 1 bars.
• Placing Stop Orders:
o BuyStop Order:
A long entry is triggered if the current price is less than the local high minus the order distance buffer.
The BuyStop order is set to trigger at the level of the local high.
o SellStop Order:
A short entry is triggered if the current price is greater than the local low plus the order distance buffer.
The SellStop order is set to trigger at the level of the local low.
Note: Orders are only placed if there is no current open position and if the session conditions are met.
________________________________________
Trailing Stop Logic
Once a position is open, the strategy monitors profit levels to protect gains:
• For Long Positions:
o The script calculates the profit as the difference between the current price and the average entry price.
o If this profit exceeds the TslTriggerPoints threshold, a trailing stop is applied by placing an exit order.
o The stop price is set at a distance below the current price, while a limit (profit target) is also defined.
• For Short Positions:
o The profit is calculated as the difference between the average entry price and the current price.
o A similar trailing stop exit is applied if the profit exceeds the trigger threshold.
________________________________________
Summary
In essence, this strategy works by:
• Defining entry levels based on recent local highs and lows.
• Placing pending stop orders to enter the market when those levels are breached.
• Filtering orders by time, ensuring trades are only taken during specified hours.
• Implementing a trailing stop mechanism to secure profits once the trade moves favorably.
This approach is designed to automate BTC trading based on price action and dynamic risk management, although further enhancements (like dynamic position sizing based on RiskPercent) could be added for a more complete risk management system.
EMA Crossover (Short Focus with Trailing Stop)This strategy utilizes a combination of Exponential Moving Averages (EMA) and Simple Moving Averages (SMA) to generate entry and exit signals for both long and short positions. The core of the strategy is based on the 13-period EMA (short EMA) crossing the 33-period EMA (long EMA) for entering long trades, while a 13-period EMA crossing the 25-period EMA (mid EMA) generates short trade signals. The 100-period SMA and 200-period SMA serve as additional trend indicators to provide context for the market conditions. The strategy aims to capitalize on trend reversals and momentum shifts in the market.
The strategy is designed to execute trades swiftly with an emphasis on entering positions when conditions align in real time. For long entries, the strategy initiates a buy when the 13 EMA is greater than the 33 EMA, indicating a bullish trend. For short entries, the 13 EMA crossing below the 33 EMA signals a bearish trend, prompting a short position. Importantly, the code includes built-in exit conditions for both long and short positions. Long positions are exited when the 13 EMA falls below the 33 EMA, while short positions are closed when the 13 EMA crosses above the 25 EMA.
A key feature of the strategy is the use of trailing stops for both long and short positions. This dynamic exit method adjusts the stop level as the market moves in favor of the trade, locking in profits while reducing the risk of losses. The trailing stop for long positions is based on the high price of the current bar, while the trailing stop for short positions is set using the low price, providing more flexibility in managing risk. This trailing stop mechanism helps to capture profits from favorable market moves while ensuring that positions are exited if the market moves against them.
This strategy works best on the daily timeframe and is optimized for major cryptocurrency pairs. The daily chart allows for the EMAs to provide more reliable signals, as the strategy is designed to capture broader trends rather than short-term market fluctuations. Using it on major crypto pairs increases its effectiveness as these assets tend to have strong and sustained trends, providing better opportunities for the strategy to perform well.
Buffett Indicator with Historical Bubbles (Clean)The Buffett Indicator is a trusted macroeconomic gauge that compares the total US stock market capitalization to the nation’s GDP. Popularized by Warren Buffett, this metric highlights periods of overvaluation and undervaluation in the market.
This tool offers a clean and accurate visualization of the Buffett Indicator, enhanced with historical bubble annotations for key market events:
Dot-com Bubble (2000)
Global Financial Crisis Peak (2007)
COVID-19 Pre-crash Peak (2020)
Post-COVID Bull Market Peak (2021)
Features:
Dynamic Buffett Ratio (%) calculation using Wilshire 5000 Index as the market cap proxy.
Customizable GDP input for accuracy (update quarterly).
Visual thresholds for fair value, undervaluation, and overvaluation zones.
Historical event markers for educational and analytical context.
Optimized to display clearly across all timeframes: Daily, Weekly, Monthly.
How to Use:
Manually update the GDP input as new data is released.
Use this indicator for macro-level market sentiment analysis and valuation tracking.
Combine with other tools and risk management strategies for comprehensive market insights.
Disclaimer:
This indicator is for educational purposes only. It does not constitute financial advice. Always perform your own research and analysis.
Version: 1.0
we ask Allah reconcile and repay
#BuffettIndicator #MarketValuation #MacroAnalysis #BubbleDetector #LongTermInvestor #USMarket #Wilshire5000 #TradingViewScript
Option Contract Size CalculatorOption Contract Size Calculator
This indicator helps you to figure out the ideal number of contracts for your trade and its only used for options day trading.
The indicator needs to fill the input section in order to give you the information table that includes Contract size .
The input section consists of two sections. The first section requires user entry of the delta of the options contract from the broker chain and the stop loss size on the chart.
The second section allows you to enter your account balance and risk per trade
(2% recommended) .
There is also the option for where you wish to display your table like bottom right , bottom left or top right, top left.
special thanks to @Mohamedawke for the open source script this code is based off
Adaptive Fibonacci Pullback System -FibonacciFluxAdaptive Fibonacci Pullback System (AFPS) - FibonacciFlux
This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). Original concepts by FibonacciFlux.
Abstract
The Adaptive Fibonacci Pullback System (AFPS) presents a sophisticated, institutional-grade algorithmic strategy engineered for high-probability trend pullback entries. Developed by FibonacciFlux, AFPS uniquely integrates a proprietary Multi-Fibonacci Supertrend engine (0.618, 1.618, 2.618 ratios) for harmonic volatility assessment, an Adaptive Moving Average (AMA) Channel providing dynamic market context, and a synergistic Multi-Timeframe (MTF) filter suite (RSI, MACD, Volume). This strategy transcends simple indicator combinations through its strict, multi-stage confluence validation logic. Historical simulations suggest that specific MTF filter configurations can yield exceptional performance metrics, potentially achieving Profit Factors exceeding 2.6 , indicative of institutional-level potential, while maintaining controlled risk under realistic trading parameters (managed equity risk, commission, slippage).
4 hourly MTF filtering
1. Introduction: Elevating Pullback Trading with Adaptive Confluence
Traditional pullback strategies often struggle with noise, false signals, and adapting to changing market dynamics. AFPS addresses these challenges by introducing a novel framework grounded in Fibonacci principles and adaptive logic. Instead of relying on static levels or single confirmations, AFPS seeks high-probability pullback entries within established trends by validating signals through a rigorous confluence of:
Harmonic Volatility Context: Understanding the trend's stability and potential turning points using the unique Multi-Fibonacci Supertrend.
Adaptive Market Structure: Assessing the prevailing trend regime via the AMA Channel.
Multi-Dimensional Confirmation: Filtering signals with lower-timeframe Momentum (RSI), Trend Alignment (MACD), and Market Conviction (Volume) using the MTF suite.
The objective is to achieve superior signal quality and adaptability, moving beyond conventional pullback methodologies.
2. Core Methodology: Synergistic Integration
AFPS's effectiveness stems from the engineered synergy between its core components:
2.1. Multi-Fibonacci Supertrend Engine: Utilizes specific Fibonacci ratios (0.618, 1.618, 2.618) applied to ATR, creating a multi-layered volatility envelope potentially resonant with market harmonics. The averaged and EMA-smoothed result (`smoothed_supertrend`) provides a robust, dynamic trend baseline and context filter.
// Key Components: Multi-Fibonacci Supertrend & Smoothing
average_supertrend = (supertrend1 + supertrend2 + supertrend3) / 3
smoothed_supertrend = ta.ema(average_supertrend, st_smooth_length)
2.2. Adaptive Moving Average (AMA) Channel: Provides dynamic market context. The `ama_midline` serves as a key filter in the entry logic, confirming the broader trend bias relative to adaptive price action. Extended Fibonacci levels derived from the channel width offer potential dynamic S/R zones.
// Key Component: AMA Midline
ama_midline = (ama_high_band + ama_low_band) / 2
2.3. Multi-Timeframe (MTF) Filter Suite: An optional but powerful validation layer (RSI, MACD, Volume) assessed on a lower timeframe. Acts as a **validation cascade** – signals must pass all enabled filters simultaneously.
2.4. High-Confluence Entry Logic: The core innovation. A pullback entry requires a specific sequence and validation:
Price interaction with `average_supertrend` and recovery above/below `smoothed_supertrend`.
Price confirmation relative to the `ama_midline`.
Simultaneous validation by all enabled MTF filters.
// Simplified Long Entry Logic Example (incorporates key elements)
long_entry_condition = enable_long_positions and
(low < average_supertrend and close > smoothed_supertrend) and // Pullback & Recovery
(close > ama_midline and close > ama_midline) and // AMA Confirmation
(rsi_filter_long_ok and macd_filter_long_ok and volume_filter_ok) // MTF Validation
This strict, multi-stage confluence significantly elevates signal quality compared to simpler pullback approaches.
1hourly filtering
3. Realistic Implementation and Performance Potential
AFPS is designed for practical application, incorporating realistic defaults and highlighting performance potential with crucial context:
3.1. Realistic Default Strategy Settings:
The script includes responsible default parameters:
strategy('Adaptive Fibonacci Pullback System - FibonacciFlux', shorttitle = "AFPS", ...,
initial_capital = 10000, // Accessible capital
default_qty_type = strategy.percent_of_equity, // Equity-based risk
default_qty_value = 4, // Default 4% equity risk per initial trade
commission_type = strategy.commission.percent,
commission_value = 0.03, // Realistic commission
slippage = 2, // Realistic slippage
pyramiding = 2 // Limited pyramiding allowed
)
Note: The default 4% risk (`default_qty_value = 4`) requires careful user assessment and adjustment based on individual risk tolerance.
3.2. Historical Performance Insights & Institutional Potential:
Backtesting provides insights into historical behavior under specific conditions (always specify Asset/Timeframe/Dates when sharing results):
Default Performance Example: With defaults, historical tests might show characteristics like Overall PF ~1.38, Max DD ~1.16%, with potential Long/Short performance variance (e.g., Long PF 1.6+, Short PF < 1).
Optimized MTF Filter Performance: Crucially, historical simulations demonstrate that meticulous configuration of the MTF filters (particularly RSI and potentially others depending on market) can significantly enhance performance. Under specific, optimized MTF filter settings combined with appropriate risk management (e.g., 7.5% risk), historical tests have indicated the potential to achieve **Profit Factors exceeding 2.6**, alongside controlled drawdowns (e.g., ~1.32%). This level of performance, if consistently achievable (which requires ongoing adaptation), aligns with metrics often sought in institutional trading environments.
Disclaimer Reminder: These results are strictly historical simulations. Past performance does not guarantee future results. Achieving high performance requires careful parameter tuning, adaptation to changing markets, and robust risk management.
3.3. Emphasizing Risk Management:
Effective use of AFPS mandates active risk management. Utilize the built-in Stop Loss, Take Profit, and Trailing Stop features. The `pyramiding = 2` setting requires particularly diligent oversight. Do not rely solely on default settings.
4. Conclusion: Advancing Trend Pullback Strategies
The Adaptive Fibonacci Pullback System (AFPS) offers a sophisticated, theoretically grounded, and highly adaptable framework for identifying and executing high-probability trend pullback trades. Its unique blend of Fibonacci resonance, adaptive context, and multi-dimensional MTF filtering represents a significant advancement over conventional methods. While requiring thoughtful implementation and risk management, AFPS provides discerning traders with a powerful tool potentially capable of achieving institutional-level performance characteristics under optimized conditions.
Acknowledgments
Developed by FibonacciFlux. Inspired by principles of Fibonacci analysis, adaptive averaging, and multi-timeframe confirmation techniques explored within the trading community.
Disclaimer
Trading involves substantial risk. AFPS is an analytical tool, not a guarantee of profit. Past performance is not indicative of future results. Market conditions change. Users are solely responsible for their decisions and risk management. Thorough testing is essential. Deploy at your own considered risk.
Market Clock with Inline HoursThis script displays a powerful, configurable market session clock that shows the open/closed status and trading hours for major global financial markets — including specialized logic for NY Futures (Globex).
🔑 Key Features:
✅ Real-Time Session Status:
Shows whether each selected market is currently OPEN or CLOSED, based on the user’s selected time zone.
✅ NY Futures Weekend Logic:
Built-in logic ensures NY Futures are marked CLOSED:
Friday after 5:00 PM ET
All of Saturday
Sunday until 6:00 PM ET
This reflects the true CME Globex trading schedule.
✅ 12-Hour Format + Timezone Labels:
Session hours are displayed in 12-hour AM/PM format alongside their associated timezone (EST, GMT, JST, etc.) for clarity.
✅ Fully Configurable Markets:
You can choose to display:
NY Market (RTH)
NY Futures (Globex)
London
Tokyo
Frankfurt
And you can easily toggle them on/off in the settings.
✅ Text Size & Position Customization:
Easily control the text size (tiny → huge) and screen position (top/bottom, left/center/right).
✅ Auto Timezone Offset Support:
Select from a list of common time zones (EST, UTC, JST, etc.), or enter your own custom UTC offset for global flexibility.
✅ Compact & Clean Design:
The layout groups each market’s:
Real-time OPEN/CLOSED status
Trading hours
All into a single column, making the layout clean and dashboard-ready.
🧠 Who is this for?
Day traders
Futures traders
Forex traders
Anyone who tracks multiple time zones or global markets
📌 Notes:
Clock updates based on chart timeframe (e.g., every 1m on a 1-minute chart)
Pine Script doesn't support real-time per-second updates, but works well for market status tracking
💬 Feedback Welcome!
This script was designed to be lightweight and user-friendly. Suggestions and improvements are always welcome — feel free to leave a comment or reach out directly.
Prior LevelThe "Prior Level" indicator displays the previous day's key price levels (Open, High, Low, Close) directly on your chart. These reference levels are essential for intraday trading strategies, support/resistance analysis, and breakout identification.
Key features:
- Shows previous session's Open, High, Low and Close values
- Customizable line colors for better visual distinction
- Adjustable line length for cleaner chart appearance
- Optional data table showing exact values
- Simple and lightweight design for easy chart reading
This indicator helps traders identify important price zones from the previous trading session, allowing for more informed trading decisions based on how current price action interacts with these established levels.
The Silver Lining – GSR🍯 This tool converts the Gold/Silver Ratio (GSR) into a precision timing lens for short-term traders operating inside digital silver markets. It reveals structural dominance, trend exhaustion, and regime inflection by comparing the GSR to its smoothed baseline and historical percentile rhythm. On high timeframes (1D+), it reflects macroeconomic sentiment shifts 📈.
🧐 The lower the timeframe, the higher the alpha; the 15m and 1h charts are where you will the hidden pots of gold. For LTF traders, it becomes a hyper-responsive bias filter — especially when paired with volatility-based confirmation systems like SUPeR TReND 2.718, as shown.
🧠 The core logic compares the GSR (gold ÷ silver) against a user-defined moving average (VWMA or EMA). A color-coded fill shifts based on direction: amber when gold leads, teal when silver gains strength. Percentile bands (20th, 50th, 80th) map structural zones — helping traders anchor trades based on confluence, not hype.
📊 In the example chart, four theoretical long trades are shown on the 1h chart, manually drawn on the 15m timeframe. Each begins when the GSR reverses from the 80th percentile or breaks below its MA. The trades occur precisely as silver tested support, with confirmation from SUPeR TReND’s trend shift. Although idealized, these aren’t guesses — they are compression-to-expansion sequences backed by macro relative strength flow. Several yielded gains exceeding 4%.
🏆 Best-case long trades occur when GSR rotates down through the 50th percentile and silver catches a reactive bid. Shorts appear when GSR rises through the upper percentile band while silver fails to hold key intraday levels. The percentile bands function like behavioral tiers:
🥈 Below 20th = Silver Dominance
⚠️ Around 50th = Crossover Area
🥇 Above 80th = Gold Dominance
🥈 Why silver? It’s faster, more emotional, and more manipulated than gold — which paradoxically makes it more tradable on low timeframes. Its range-bound nature is ideal for rinse-and-repeat systems. Because we trade the derivative (XAGUSD), there’s no friction or delivery constraint — just price action, clean and liquid.
⚖️ The underlying strategy isn’t just technical; it’s alchemical. The system begins with short-term trading in digital silver and funnels gains into physical gold — converting volatility into wealth. Over time, this establishes a perpetual motion model: when profits allow, trade silver, extract value, cash out and convert into gold. The account stays active, and the hedge keeps growing.
🔁 The Silver Lining isn’t a signal engine. It’s a structural overlay. It tells you when the market’s invisible bias is shifting — so your tactics stay aligned with macro rhythm.
🌊 Silver moves fast. Gold moves first. The Silver Lining helps you bridge that gap — with clarity, confluence, and edge.
TP/SL Percentage & RR Visual ToolThis tool is designed to help traders visually and statistically assess their trade setup by calculating Stop Loss (SL), Take Profit (TP), and Risk-to-Reward (RR) based on percentage inputs from the current price.
🔧 How It Works:
Uses the current candle’s close price as your entry.
Calculates TP and SL as percentage-based levels (e.g., 1% SL, 1.5% TP).
Displays horizontal lines and labels on the chart for TP and SL (only on the latest candle to reduce clutter).
Shows a compact table in the top-right corner with all key values:
Entry Price
Current Price
TP Price (+%)
SL Price (-%)
TP Distance from current price
RR Ratio (e.g., 1:1.5)
💡 Use Cases:
Quickly validate if a trade setup meets your desired RR profile (e.g., 1:2).
Perfect for scalpers, swing traders, and position traders who rely on structured risk management.
Combine with your entry signal strategy to visualize targets and stops without manual calculations.
⚙️ Inputs:
Stop Loss % – Sets how far your SL is from the entry.
Take Profit % – Sets how far your TP is from the entry.
TimeframeUtilsCustomLibrary "TimeframeUtilsCustom"
Timeframe utilities library
f_timeframe_to_minutes(tf)
Converts timeframe string to minutes
Parameters:
tf (string) : String representation of timeframe
Returns: Number of minutes in the given timeframe
f_bars_for_hours(timeframe_minutes, hours)
Calculate number of bars for a specified time period
Parameters:
timeframe_minutes (int) : Current timeframe in minutes
hours (int) : Number of hours to calculate bars for
Returns: Number of bars representing the specified hours
f_bars_for_days(timeframe_minutes, days)
Calculate number of bars for a specified number of days
Parameters:
timeframe_minutes (int) : Current timeframe in minutes
days (int) : Number of days to calculate bars for
Returns: Number of bars representing the specified days
QT NY Session High/LowShows Asia & London High/Low which are key liquidity points price will react to.
You can also adjust the NY AM 6am - 12pm EST range to divide the time frames into 4 quarters
It delivers NY AM true open and the true day open
It gives you previous day high & previous day low
2013-2025 EclipsesIndicator Description: 2013-2025 Eclipses
This Pine Script (version 5) indicator overlays solar and lunar eclipse events on a TradingView chart, covering the period from 2013 to 2025. It is designed for traders and astrology enthusiasts who wish to visualize these significant astronomical events alongside price action, potentially identifying correlations with market movements or key turning points.
Features:
Eclipses:
Visualization: Displayed as a semi-transparent aqua background highlight across the chart.
Data: Includes 48 specific eclipse dates (both solar and lunar) from April 25, 2013, to September 21, 2025.
Purpose: Highlights dates of eclipses, which are often considered powerful astrological events associated with sudden changes, revelations, or significant shifts in energy and market sentiment.
Technical Details:
Overlay: The indicator is set to overlay=true, ensuring it displays directly on the price chart rather than in a separate pane.
Date Matching: Utilizes a helper function is_date(y, m, d) to determine if the current chart date matches any of the predefined eclipse dates, using TradingView's year, month, and dayofmonth variables.
Visualization Method:
bgcolor: Applies a light aqua background (using color.new(color.aqua, 85)) on the specific dates of eclipses. The transparency level of 85 allows price action to remain visible through the highlight.
Time Range: Spans from April 2013 to September 2025, covering a 12+ year period of eclipse events.
Usage:
Add the script to your TradingView chart to see eclipse dates highlighted with an aqua background on your chosen symbol and timeframe.
The background highlight appears only on the exact dates of eclipses, making it easy to spot these events amidst price data.
Ideal for those incorporating astrological analysis into trading or studying the potential impact of eclipses on financial markets.
Notes:
The script uses a single-line definition for eclipse_dates to ensure compatibility with Pine Script v5 syntax and avoid line continuation errors.
The aqua color matches the original circle-based visualization, with transparency adjustable via the color.new(color.aqua, 85) parameter (0 = fully opaque, 100 = fully transparent).
Works best on daily or higher timeframes for clear visibility of individual eclipse dates, though it functions on any TradingView-supported timeframe.
Eclipse dates should be cross-checked with astronomical sources for critical applications, as the script relies on the provided data accuracy.
Purpose:
This indicator provides a straightforward way to track eclipses over a 12-year period, offering a visual representation of these potent celestial events. By using a background highlight instead of markers, it maintains chart clarity while emphasizing the specific days when eclipses occur, potentially aiding in the analysis of their influence on market behavior or personal trading strategies.
2013-2025 Moon Phases & Mercury RetrogradesIndicator Description: 2013-2025 Moon Phases & Mercury Retrogrades
This Pine Script (version 5) indicator overlays key astrological events on a TradingView chart, specifically tracking full moons, new moons, and Mercury retrograde periods from 2013 to 2025. It is designed to help traders and astrology enthusiasts visualize these celestial events alongside price action, potentially identifying correlations or patterns.
Features:
New Moons:
Visualization: Plotted as small white circles above the price bars.
Data: Includes 156 specific new moon dates from January 11, 2013, to December 20, 2025.
Purpose: Marks the start of the lunar cycle, often associated with new beginnings or shifts in energy.
Full Moons:
Visualization: Plotted as small orange circles above the price bars.
Data: Includes 157 specific full moon dates from January 27, 2013, to December 15, 2025.
Purpose: Highlights the peak of the lunar cycle, often linked to heightened emotions or market volatility in astrological analysis.
Mercury Retrogrades:
Visualization: Displayed as a light red background highlight across the chart.
Data: Covers 39 Mercury retrograde periods, with precise start and end timestamps from February 23, 2013, to November 29, 2025.
Purpose: Indicates periods traditionally associated with communication issues, delays, or reversals, which some traders monitor for potential market impacts.
Technical Details:
Overlay: The indicator is set to overlay=true, meaning it displays directly on the price chart rather than in a separate pane.
Date Matching: Uses a helper function is_date(y, m, d) to check if the current chart date matches any of the predefined event dates, leveraging TradingView's year, month, and dayofmonth variables.
Visualization Methods:
plotshape: Used for new moons (white circles) and full moons (orange circles), positioned above bars for clear visibility.
bgcolor: Used for Mercury retrograde periods, applying a semi-transparent red highlight (transparency level 85) to the background during active retrograde periods.
Time Range: Spans from January 2013 to December 2025, providing a comprehensive 13-year view of these astrological events.
Usage:
Add the script to your TradingView chart to see new moons, full moons, and Mercury retrograde periods overlaid on your chosen symbol and timeframe.
The white and orange circles appear on specific dates, while the red background highlights extend across the duration of each Mercury retrograde period.
Useful for traders incorporating astrology into their analysis or anyone interested in tracking these celestial events alongside financial data.
Notes:
The script assumes accurate date data as provided; users should verify dates against astronomical sources if precision is critical.
The transparency of the Mercury retrograde background can be adjusted by modifying the value in color.new(color.red, 85) (0 = fully opaque, 100 = fully transparent).
Best viewed on daily or higher timeframes for clarity, though it works on any timeframe supported by TradingView.
This indicator provides a visual tool to explore the potential influence of lunar phases and Mercury retrograde periods on market behavior, blending astrology with technical analysis in a clear, customizable format.
Chonky ATR Levels 2.0Show ATR based high/low projections.
Choose a custom ATR calculation in the indicator's settings.
The default is a 20day RMA based ATR.
----------How projections are calculated----------
To project the ATR High, the ATR value is added to the low of the current candle that matches the ATR's timeframe.
To project the ATR Low, the ATR value is subtracted from the high of the current candle that matches the ATR's timeframe.
Example:
If a 20day RMA ATR is used:
- the ATR High will be the current day's low + the ATR value.
- the ATR Low will be the current day's high - the ATR value.
*However*, if the price action exceeds either ATR projection, the opposite ATR level will be fixed to the extreme of the period.
See the AUDUSD screenshot above for an example.
The ATR Low was exceeded, so the ATR High projection is capped at the high of day.
If the ATR High is exceeded, the ATR Low would be capped at the low of day.
Rachas ATR AssistHey Traders!
This indicator is a simple, it uses Average True Range (ATR) data from the daily chart and the current timeframe to estimate potential range and volatility.
This indicator compares the daily ATR to the current daily wick range (from low to high), helping you gauge how much "room" might be left for price movement within the day. Alongside that, it shows the ATR over the last 14 candles and 5 candles on your current chart for intraday volatility awareness—ideal for setting stops, targets, or position sizing.
Gauge Daily Potential Movement:
The "Day Range Difference" cell shows how much of the expected daily range (based on ATR) is still unfilled. If the market has moved less than the average, there's still potential for expansion. If it's close to or above the ATR, expect a slowdown or reversal.
Position Sizing & Stop Losses:
Use the 14-period ATR and 5-period ATR on your current timeframe to understand recent volatility. This helps in choosing logical stop loss levels and adjusting position sizes based on market conditions.
Volatility Awareness:
Knowing the average daily range and how much of it has been used lets you avoid entering trades too late in the move or placing stops in overly tight spots.
Table Position & Font:
You can adjust the table location (top/bottom left/right) and font size to best fit your chart layout.
Custom NYSE Hourly Intervals (Gris Extra Claro/T)NYSE Custom Hourly Intervals (Background Shading)
Indicator Overview:
This TradingView indicator visually highlights specific hourly intervals during the NYSE trading session (9:30 AM - 4:00 PM ET) using background shading. Its purpose is to help traders easily identify these key periods while analyzing price action.
Features:
Hourly Segmentation: Clearly marks the following hourly blocks within the NYSE session:
9:30 - 10:00 ET
10:00 - 11:00 ET
11:00 - 12:00 ET
12:00 - 13:00 ET
13:00 - 14:00 ET
14:00 - 15:00 ET
15:00 - 16:00 ET
Alternating Background: Uses a subtle, alternating background pattern for visual distinction:
Transparent: Applied during the 9:30-10:00, 11:00-12:00, 13:00-14:00, and 15:00-16:00 intervals (shows your default chart background).
Very Light Gray: Applied during the 10:00-11:00, 12:00-13:00, and 14:00-15:00 intervals.
Timeframe Restriction: The background shading is active only on chart timeframes of 30 minutes or less (e.g., 30m, 15m, 5m, 1m). It will not appear on higher timeframes.
Session Restriction: Shading only occurs during the defined NYSE session hours (9:30 AM - 4:00 PM ET).
Customization: The color and transparency level of the "Very Light Gray" shading can be adjusted in the indicator's settings.
Purpose & Use Case:
This indicator is ideal for intraday traders who want a clean visual guide to track price movement within specific hourly segments of the NYSE trading day, without needing complex overlays.
Coppock Curve
The Coppock Curve is a long-term momentum indicator, also known as the "Coppock Guide," used to identify potential long-term market turning points, particularly major downturns and upturns, by smoothing the sum of 14-month and 11-month rates of change with a 10-month weighted moving average.
Here's a more detailed breakdown:
What it is:
The Coppock Curve is a technical indicator designed to identify long-term buy and sell signals in major stock market indices and related ETFs.
How it's calculated:
Rate of Change (ROC): The indicator starts by calculating the rate of change (ROC) for 14 and 11 periods (usually months).
Sum of ROCs: The ROC for the 14-period and 11-period are summed.
Weighted Moving Average (WMA): A 10-period weighted moving average (WMA) is then applied to the sum of the ROCs.
Interpreting the Curve:
Buy Signals: A buy signal is often generated when the Coppock Curve crosses above the zero line, suggesting a potential transition from a bearish to a bullish phase.
Sell Signals: While primarily designed to identify market bottoms, some traders may interpret a cross below the zero line as a sell signal or a bearish warning.
Origin and Purpose:
The Coppock Curve was introduced by economist Edwin Coppock in 1962.
It was originally designed to help investors identify opportune moments to enter the market.
Coppock's inspiration came from the Episcopal Church's concept of the average mourning period, which he believed mirrored the stock market's recovery period.
Limitations:
The Coppock Curve is primarily used for long-term analysis and may not be as effective for short-term or intraday trading.
It may lag in rapidly changing markets, and its signals may not always be reliable.
Risk-On vs Risk-Off Meter (Pro)Risk-On vs Risk-Off Meter (Pro)
This macro-based tool analyzes capital flows across key assets to gauge overall market risk sentiment. It does not use ES, SPY, or stock data directly—making it a powerful confirmation tool for ES traders looking to align with macro forces.
🔹 Core Idea:
Tracks capital rotation between copper/gold, bonds, dollar, crude oil, VIX, and yield spreads to generate a normalized risk score (0–1). This score reflects whether macro money is flowing into risk or safety.
🔹 Use:
Use this indicator as confirmation of directional bias when scalping or day trading ES.
– Green Zone (>0.75): Risk-On environment. Favor long setups.
– Red Zone (<0.45): Risk-Off. Favor short setups or stand aside.
– Yellow Zone: Neutral, use caution.
– Divergence Alerts: Signals when ES price disagrees with macro risk trend—potential reversals or exhaustion zones.
HOT TO USE
– Combine with your existing price action or order flow signals
– Avoid trading against the macro sentiment unless strong setup
– Use divergence as a heads-up for fading or exiting trades
This gives you a macro-informed lens to validate or filter your entries.
Triple RSI DivergenceTriple rsi divergence
Sure! Here's a clear explanation in English of the Triple RSI Divergence Pine Script I shared earlier:
---
Explanation of the Triple RSI Divergence Pine Script
This Pine Script is designed to detect triple divergence patterns between the RSI (Relative Strength Index) and price action, which can signal potential trend reversals.
---
What is Triple Divergence?
Triple divergence occurs when price creates three consecutive higher highs (in an uptrend) or lower lows (in a downtrend), while the RSI moves in the opposite direction — forming lower highs or higher lows respectively.
This pattern is considered a strong reversal signal because it indicates momentum is weakening despite price continuing its trend.
---
What This Script Does:
Calculates RSI (14-period)
Identifies three recent highs/lows in price and RSI
Checks for:
Bearish triple divergence: price makes 3 higher highs, RSI makes 3 lower highs.
**Bullish
Risk-On / Risk-Off ScoreRisk-On / Risk-Off Score (Macro Sentiment Indicator)
This indicator calculates a custom Risk-On / Risk-Off Score to objectively assess the current market risk sentiment using a carefully selected basket of macroeconomic assets and intermarket relationships.
🧠 What does this indicator do?
The score is based on 14 key components grouped into three categories:
🟢 Risk-On Assets (rising = appetite for risk)
(+1 if performance over X days is positive, otherwise –1)
NASDAQ 100 (NAS100USD)
S&P 500 (SPX)
Bitcoin (BTCUSD)
Copper (HG1!)
WTI Crude Oil (CLK2025)
🔴 Risk-Off Assets (rising = flight to safety)
(–1 if performance is positive, otherwise +1)
Gold (XAUUSD)
US Treasury Bonds (TLT ETF) (TLT)
US Dollar Index (DXY)
USD/CHF
USD/JPY
US 10Y Yields (US10Y) (yields are interpreted inversely)
⚖️ Risk Spreads / Relative Indicators
(+1 if rising, –1 if falling)
Copper/Gold Ratio → HG1! / XAUUSD
NASDAQ/VIX Ratio → NAS100USD / VIX
HYG/TLT Ratio → HYG / TLT
📏 Score Calculation
Total score = sum of all components
Range: from –14 (extreme Risk-Off) to +14 (strong Risk-On)
Color-coded output:
🟢 Score > 2 = Risk-On
🟠 –2 to +2 = Neutral
🔴 Score < –2 = Risk-Off
Displayed as a line plot with background color and signal markers
🧪 Timeframe of analysis:
Default: 5 days (adjustable via input)
Calculated using Rate of Change (% change)
🧭 Use Cases:
Quickly assess macro sentiment
Filter for position sizing, hedging, or intraday bias
Especially useful for:
Swing traders
Day traders with macro filters
Volatility and options traders
📌 Note:
This is not a buy/sell signal indicator, but a contextual sentiment tool designed to help you stay aligned with overall market conditions.
Pre-Market High/Low (Static Lines + Labels)
Pre-Market Range ✅
Draws the Pre-Market High & Low from 4:00 AM to 9:30 AM ET using accurate 1-minute intraday data.
Static Lines 📏
Plots dashed horizontal lines that remain visible all day across all timeframes — including 1m, 5m, 15m, 1h, 4h, and Daily.
Price Labels 🔖
Includes real-time price labels so you can easily reference exact pre-market levels on the chart.
Session Lock 🕒
Lines are locked in after 9:30 AM and remain visible even if you switch timeframes or turn off extended hours.
Trading Utility 🎯
Ideal for identifying key breakout levels, intraday support/resistance zones, and setting risk parameters.