Parent Session Sweeps + Alert Killzone Ranges with Parent Session Sweep
Key Features:
1. Multiple Session Support: The script tracks three major trading sessions - Asia, London, and New York. Users can customize the timing of these sessions.
2. Killzone Visualization: The strategy visually represents each session's range, either as filled boxes or lines, allowing traders to easily identify key price levels.
3. Parent Session Logic: The core of the strategy revolves around identifying a "parent" session - a session that encompasses the range of the following session. This parent session becomes the basis for potential trade setups.
4. Sweep and Reclaim Setups: The strategy looks for price movements that sweep (break above or below) the parent session's high or low, followed by a reclaim of that level. This price action often indicates a potential reversal.
5. Risk-Reward Filtering: Each potential setup is evaluated based on a user-defined minimum risk-reward ratio, ensuring that only high-quality trade opportunities are considered.
6. Candle Close Filter: An optional filter that checks the characteristics of the candle that reclaims the parent session level, adding an extra layer of confirmation to the setup.
7. Performance Tracking: The strategy keeps track of bullish and bearish setup success rates, providing valuable feedback on its performance over time.
8. Visual Aids: The script draws lines to mark the parent session's high and low, making it easy for traders to identify key levels.
How It Works:
1. The script continuously monitors price action across the defined sessions.
2. When a session fully contains the range of the next session, it's identified as a potential parent session.
3. The strategy then waits for price to sweep either the high or low of this parent session.
4. If a sweep occurs, it looks for a reclaim of the swept level within the parameters set by the user.
5. If a valid setup is identified, the script generates an alert and places a trade (if backtesting or running live).
6. The strategy continues to monitor the trade for either reaching the target (opposite level of the parent session) or hitting the stop loss.
Considerations for Signals:
- Sweep: A break of the parent session's high or low.
- Reclaim: A close back inside the parent session range after a sweep.
- Candle Characteristics: Optional filter for the reclaim candle (e.g., bullish candle for long setups).
- Risk-Reward: Each setup must meet or exceed the user-defined minimum risk-reward ratio.
- Session Timing: The strategy is sensitive to the defined session times, which should be set according to the trader's preferred time zone.
This strategy aims to capitalize on institutional order flow and liquidity patterns in the forex market, providing traders with a systematic approach to identifying potential reversal points with favorable risk-reward profiles.
Cycles
Trade Entry Detector, Wick to Body Ratio Trade Entry Detector: Wick-to-Body Ratio Strategy with Bollinger Bands
Overview
The Trade Entry Detector is a custom strategy for TradingView that leverages the Bollinger Bands and a unique wick-to-body ratio approach to capture precise entry opportunities. This indicator is designed for traders who want to pinpoint high-probability reversal points when price interacts with Bollinger Bands, all while offering flexible entry fill options.
The strategy performs primary analysis on the daily time frame, regardless of your current chart setting, allowing you to view daily Bollinger Band levels and entry signals even on lower time frames. This approach is suitable for swing traders and short-term traders looking to align intraday moves with higher time frame signals.
How the Strategy Works
1. Bollinger Band Analysis on the Daily Time Frame
Bollinger Bands are calculated using a 20-period simple moving average (SMA) and a standard deviation multiplier (default is 2). These bands dynamically expand and contract based on market volatility, making them ideal for identifying overbought and oversold conditions:
* Upper Band: Indicates potential overbought levels.
* Lower Band: Indicates potential oversold levels.
2. Wick-to-Body Ratio Condition
This strategy places significant emphasis on candle wicks relative to the candle body. Here’s why:
* A large upper wick relative to the body signals potential selling pressure after testing the upper Bollinger Band.
* A large lower wick relative to the body indicates buying support after testing the lower Bollinger Band.
* Ratio Threshold: You can set a minimum wick-to-body ratio (default is 1.0), meaning that the wick must be at least equal in size to the body. This ensures only candles with significant reversals are considered for entry.
3. Flexible Entry Timing
To adapt to various trading styles, the indicator allows you to choose the entry fill timing:
* Daily Close: Enter at the close of the daily candle.
* Daily Open: Enter at the open of the following daily candle.
* HOD (High of Day): Set entry at the daily high, for those who want confirmation of upward momentum.
* LOD (Low of Day): Set entry at the daily low, ideal for confirming downward movement.
4. Position Sizing and Risk Management
The strategy calculates position size based on a fixed risk percentage of your account balance (default is 1%). This approach dynamically adjusts position sizes based on stop-loss distance:
* Stop Loss: Placed at the nearest swing high (for shorts) or swing low (for longs).
* Take Profit: Exits are triggered when the price reaches the opposite Bollinger Band.
5. Order Expiration
Each pending order (long or short) expires after two days if unfilled, allowing for new setups on subsequent candles if conditions are met again.
Using the Trade Entry Detector
Step-by-Step Guide
1. Set the Primary Time Frame
The core calculations run on the daily time frame, but the strategy can be applied to intraday charts (e.g., 65-minute or 15-minute) for deeper insights.
2. Adjust Bollinger Band Settings
* Length: Default is 20, which determines the period for calculating the moving average.
* Standard Deviation Multiplier: Default is 2.0, which sets the width of the bands. Adjusting this can help you capture broader or tighter volatility ranges.
3. Define the Wick-to-Body Ratio
Set the minimum ratio between wick and body (default 1.0). Higher values filter out candles with less wick-to-body contrast, focusing on stronger rejection moves.
4. Choose Entry Fill Timing
Select your preferred fill condition:
* Daily Close: Confirms the trade at the end of the daily session.
* Daily Open: Executes the entry at the open of the next day.
* HOD/LOD: Uses the daily high or low as an additional confirmation for upward or downward moves.
5. Position Sizing and Risk Management
* Set your account balance and risk percentage. The strategy automatically calculates position sizes based on the stop distance to manage risk efficiently.
* Stop Loss and Take Profit points are automatically set based on swing highs/lows and opposing Bollinger Bands, respectively.
Practical Example
Let’s say SPY (S&P 500 ETF) tests the lower Bollinger Band on the daily time frame, with a lower wick that is twice the size of the body (meeting the 1.0 ratio threshold). Here’s how the strategy might proceed:
1. Signal: The lower wick on SPY suggests buying interest at the lower Bollinger Band.
2. Entry Fill Timing: If you’ve selected "Daily Open," the entry order will be placed at the next day's open price.
3. Stop Loss: Positioned at the nearest daily swing low to minimize risk.
4. Take Profit: If SPY price moves up and reaches the upper Bollinger Band, the position is automatically closed.
Indicator Features and Benefits
* Multi-Time Frame Compatibility: Perform daily analysis while tracking signals on any intraday chart.
* Automatic Position Sizing: Tailor risk per trade based on account balance and desired risk percentage.
* Flexible Entry Options: Choose from close, open, HOD, or LOD for optimal timing.
* Effective Trend Reversal Identification: Uses wick-to-body ratio and Bollinger Band interaction to pinpoint potential reversals.
* Dynamic Visualization: Bollinger Bands are displayed on your chosen time frame, allowing seamless intraday tracking.
Summary
The Trade Entry Detector provides a unique, data-driven way to spot reversal points with customizable entry options. By combining Bollinger Bands with wick-to-body ratio conditions, it identifies potential trade setups where price has tested extremes and shown reversal signals. With its flexible entry timing, risk management features, and multi-time frame compatibility, this indicator is ideal for traders looking to blend daily market context with shorter-term execution.
Tips for Usage:
* For swing trading, consider the Daily Open or Close entry options.
* For momentum entries, HOD or LOD may offer better alignment with the direction of the wick.
* Backtest on different assets to find optimal Bollinger Band and wick-to-body settings for your market.
Use this indicator to enhance your understanding of price behavior at key levels and improve the precision of your entry points. Happy trading!
RSI Fakeout Filter with SMA Confirmation [CHE] Introducing: RSI Fakeout Detection
Are you tired of being caught in fakeouts that can lead to frustrating losses? The RSI Fakeout Detection is here to enhance your trading strategy by filtering out false signals and providing you with more reliable entries. This innovative indicator is designed to help traders identify when market momentum, as indicated by the RSI, does not align with price movement – a key indicator of potential fakeouts!
What Does It Do?
The RSI Fakeout Detection focuses on one key goal: avoiding false signals. By monitoring when the RSI exceeds a customizable threshold (indicating strength) but the price remains below a moving average like the SMA, this indicator highlights situations where the market may seem strong, but the price action doesn't support that momentum. In other words, it saves you from those tricky fake breakouts.
Key Benefits:
1. Reduce Risk, Increase Confidence: Get an extra layer of protection against fakeouts by receiving signals only when both RSI and price confirm the market's true direction. Avoid entering false breakouts and trade with more confidence.
2. Dynamic Analysis of SMA Lengths: It doesn’t just rely on one SMA. The indicator automatically analyzes and sorts through different SMA lengths to find the most reliable one for your specific market condition, ensuring that you get the best possible signal.
3. Tailored for You: With customizable RSI thresholds, a choice of multiple moving average types (SMA, EMA, Bollinger Bands, and more), and vibrant color-coded visuals, this tool is built to fit your unique trading style and preferences.
4. Spot Fakeouts with Ease: Visual cues make it easy to see when the market might be tricking you. Labels, plotted lines, and a toggleable disclaimer keep everything transparent and easy to understand.
5. Friendly and Intuitive: Whether you’re new to trading or a seasoned pro, the RSI Fakeout Detection is designed to be simple and effective. The labels and plots are clear, the alerts are timely, and it seamlessly integrates into your chart without cluttering it.
Why Choose RSI Fakeout Detection?
- Accuracy and Precision: By combining RSI and SMA analysis, this indicator minimizes the risk of following false trends and entering trades too early.
- Save Time and Reduce Guesswork: No more spending hours trying to figure out which SMA length works best – the RSI Fakeout Detection does it for you!
- Peace of Mind: Avoiding fakeouts means fewer bad trades, which can lead to more consistent performance and less stress.
Transform the way you trade, and step into a more confident trading future with RSI Fakeout Detection . Whether you’re day trading or swing trading, this tool will give you an edge by helping you filter out the noise and make more informed decisions.
Best regards,
Chervolino
Disclaimer:
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Realized Price Profit/Loss Margin [VWAP Optimized]Shaded Profit/Loss Margin Oscillator
The Shaded Profit/Loss Margin Oscillator is a powerful tool designed to measure Bitcoin’s Net Unrealized Profit/Loss (NUPL). This metric reflects the difference between Bitcoin’s current market price and its realized price, which approximates the price at which coins were last moved. By smoothing the NUPL using a moving average, the indicator provides a clean purple oscillator line that helps users easily gauge market sentiment. When the oscillator is above the zero line, the market is in profit, and when it is below zero, participants are generally in a state of unrealized loss. The shaded area between the oscillator and the zero line enhances visual clarity, making it easier to identify potential shifts in market behavior such as profit-taking or capitulation.
Unique Features and Added Value
What sets this indicator apart from traditional NUPL indicators is the use of a volume-weighted average price (VWAP) as a proxy for the realized price. Unlike the original on-chain NUPL metric, which relies on complex on-chain data, this indicator leverages VWAP to provide an approximation of realized price based solely on price and volume data available directly on TradingView. This method makes it highly accessible to traders who don’t have access to on-chain data platforms.
The use of VWAP not only simplifies the calculation but also provides additional value, as it incorporates volume into the realized price estimation. This volume-sensitive approach may offer a more responsive and dynamic reflection of realized prices compared to on-chain models, which can sometimes lag. In essence, this VWAP-based NUPL oscillator offers a unique edge in tracking profit/loss margins, particularly for traders who want a straightforward and efficient way to gauge sentiment without relying on external on-chain data sources. It brings the essence of NUPL into the world of technical analysis in an accessible and actionable way.
Business Cycle Indicators (Normalized)This script aggregates and normalizes several key economic indicators to provide a comprehensive view of the business cycle and overall market conditions. By combining these indicators into a single, normalized average line, the script helps identify overarching trends and shifts in the economy, aiding in more informed trading and investment decisions.
Included Indicators:
Inverted National Financial Conditions Index (NFCI):
Symbol: FRED:NFCI
Measures financial stress in the markets. An inverted NFCI aligns higher values with positive financial conditions.
Inverted Net Percentage of Banks Tightening Lending Standards (DRTSCIS):
Symbol: FRED:DRTSCIS
Reflects changes in bank lending practices. Inverting this indicator means higher values indicate easing lending standards, which is generally positive for economic growth.
HYG Close Price (iShares High Yield Corporate Bond ETF):
Symbol: AMEX:HYG
Represents the performance of high-yield corporate bonds, providing insight into credit market conditions.
Inverted High-Yield Credit Spread (BAMLH0A0HYM2):
Symbol: FRED:BAMLH0A0HYM2
Measures the spread between high-yield bonds and risk-free securities. A narrower (inverted) spread indicates better market conditions.
Manufacturing/Non-Manufacturing New Orders Ratio:
Symbols: ECONOMICS:USMNO (Manufacturing), ECONOMICS:USNMNO (Non-Manufacturing)
Compares manufacturing to non-manufacturing new orders to gauge shifts in economic activity.
US PMI (Purchasing Managers' Index):
Symbol: ECONOMICS:USBCOI
An indicator of the economic health of the manufacturing sector.
10-Year Inflation Breakeven (T10YIE):
Symbol: FRED:T10YIE
Represents market expectations of inflation over the next ten years.
Inverted 10-Year Real Yield (DFII10):
Symbol: FRED:DFII10
Reflects the real yield on 10-year Treasury Inflation-Protected Securities (TIPS). Inverted to align higher values with positive economic sentiment.
Copper/Gold Ratio:
Symbols: CAPITALCOM:COPPER (Copper), TVC:GOLD (Gold)
Compares the prices of copper and gold, often used as a barometer for global economic activity.
Features:
Normalized Indicators: Each indicator is normalized to a 0-100 scale to facilitate direct comparison, regardless of their original units or scales.
Normalized Average Line: Calculates and plots the average of all available normalized indicators, providing a single line that represents the combined economic signals.
Customizable Display:
Show Individual Indicators: Option to display individual normalized indicators for detailed analysis.
Show Normalized Average Line: Option to display the normalized average line for a consolidated view.
Dynamic Labeling: Displays the latest value of the normalized average directly on the chart for quick reference.
How to Use:
Adding the Script:
Apply the script to a chart in TradingView using a timeframe that aligns with the frequency of the economic data (daily or weekly recommended).
Customization:
Show Normalized Average Line: Enabled by default to display the combined indicator.
Show Individual Indicators: Enable this option in the script settings to display all individual normalized indicators.
Interpretation:
Normalized Scale (0-100): Higher values generally indicate stronger economic conditions, while lower values may suggest weakening conditions.
Trend Analysis: Use the normalized average line to identify trends and potential turning points in the business cycle.
Notes:
Data Availability: Ensure you have access to all the data sources used in the script. Some data feeds may require specific TradingView subscriptions.
Indicator Limitations: Economic indicators are subject to revisions and may not reflect real-time market conditions.
No Investment Advice: This script is a tool for analysis and should not be considered as financial advice. Always conduct your own research before making investment decisions.
Unlock the Power of Seasonality: Monthly Performance StrategyThe Monthly Performance Strategy leverages the power of seasonality—those cyclical patterns that emerge in financial markets at specific times of the year. From tax deadlines to industry-specific events and global holidays, historical data shows that certain months can offer strong opportunities for trading. This strategy was designed to help traders capture those opportunities and take advantage of recurring market patterns through an automated and highly customizable approach.
The Inspiration Behind the Strategy:
This strategy began with the idea that market performance is often influenced by seasonal factors. Historically, certain months outperform others due to a variety of reasons, like earnings reports, holiday shopping, or fiscal year-end events. By identifying these periods, traders can better time their market entries and exits, giving them an advantage over those who solely rely on technical indicators or news events.
The Monthly Performance Strategy was built to take this concept and automate it. Instead of manually analyzing market data for each month, this strategy enables you to select which months you want to focus on and then executes trades based on predefined rules, saving you time and optimizing the performance of your trades.
Key Features:
Customizable Month Selection: The strategy allows traders to choose specific months to test or trade on. You can select any combination of months—for example, January, July, and December—to focus on based on historical trends. Whether you’re targeting the historically strong months like December (often driven by the 'Santa Rally') or analyzing quieter months for low volatility trades, this strategy gives you full control.
Automated Monthly Entries and Exits: The strategy automatically enters a long position on the first day of your selected month(s) and exits the trade at the beginning of the next month. This makes it perfect for traders who want to benefit from seasonal patterns without manually monitoring the market. It ensures precision in entering and exiting trades based on pre-set timeframes.
Re-entry on Stop Loss or Take Profit: One of the standout features of this strategy is its ability to re-enter a trade if a position hits the stop loss (SL) or take profit (TP) level during the selected month. If your trade reaches either a SL or TP before the month ends, the strategy will automatically re-enter a new trade the next trading day. This feature ensures that you capture multiple trading opportunities within the same month, instead of exiting entirely after a successful or unsuccessful trade. Essentially, it keeps your capital working for you throughout the entire month, not just when conditions align perfectly at the beginning.
Built-in Risk Management: Risk management is a vital part of this strategy. It incorporates an Average True Range (ATR)-based stop loss and take profit system. The ATR helps set dynamic levels based on the market’s volatility, ensuring that your stops and targets adjust to changing market conditions. This not only helps limit potential losses but also maximizes profit potential by adapting to market behavior.
Historical Performance Testing: You can backtest this strategy on any period by setting the start year. This allows traders to analyze past market data and optimize their strategy based on historical performance. You can fine-tune which months to trade based on years of data, helping you identify trends and patterns that provide the best trading results.
Versatility Across Asset Classes: While this strategy can be particularly effective for stock market indices and sector rotation, it’s versatile enough to apply to other asset classes like forex, commodities, and even cryptocurrencies. Each asset class may exhibit different seasonal behaviors, allowing you to explore opportunities across various markets with this strategy.
How It Works:
The trader selects which months to test or trade, for example, January, April, and October.
The strategy will automatically open a long position on the first trading day of each selected month.
If the trade hits either the take profit or stop loss within the month, the strategy will close the current position and re-enter a new trade on the next trading day, provided the month has not yet ended. This ensures that the strategy continues to capture any potential gains throughout the month, rather than stopping after one successful trade.
At the start of the next month, the position is closed, and if the next month is also selected, a new trade is initiated following the same process.
Risk Management and Dynamic Adjustments:
Incorporating risk management with this strategy is as easy as turning on the ATR-based system. The strategy will automatically calculate stop loss and take profit levels based on the market’s current volatility, adjusting dynamically to the conditions. This ensures that the risk is controlled while allowing for flexibility in capturing profits during both high and low volatility periods.
Maximizing the Seasonal Edge:
By automating entries and exits based on specific months and combining that with dynamic risk management, the Ultimate Monthly Performance Strategy takes advantage of seasonal patterns without requiring constant monitoring. The added re-entry feature after hitting a stop loss or take profit ensures that you are always in the game, maximizing your chances to capture profitable trades during favorable seasonal periods.
Who Can Benefit from This Strategy?
This strategy is perfect for traders who:
Want to exploit the predictable, recurring patterns that occur during specific months of the year.
Prefer a hands-off, automated trading approach that allows them to focus on other aspects of their portfolio or life.
Seek to manage risk effectively with ATR-based stop losses and take profits that adjust to market conditions.
Appreciate the ability to re-enter trades when a take profit or stop loss is hit within the month, ensuring that they don't miss out on multiple opportunities during a favorable period.
In summary, the Ultimate Monthly Performance Strategy provides traders with a comprehensive tool to capitalize on seasonal trends, optimize their trading opportunities throughout the year, and manage risk effectively. The built-in re-entry system ensures you continue to benefit from the market even after hitting targets within the same month, making it a robust strategy for traders looking to maximize their edge in any market.
Risk Disclaimer:
Trading financial markets involves significant risk and may not be suitable for all investors. The Monthly Performance Strategy is designed to help traders identify seasonal trends, but past performance does not guarantee future results. It is important to carefully consider your risk tolerance, financial situation, and trading goals before using any strategy. Always use appropriate risk management and consult with a professional financial advisor if necessary. The use of this strategy does not eliminate the risk of losses, and traders should be prepared for the possibility of losing their entire investment. Be sure to test the strategy on a demo account before applying it in live markets.
Gann Square of 9Understanding the Gann Square of 9
Delve into the fascinating realm of W.D. Gann’s Square of 9, a tool that has intrigued traders for generations. As we explore the insights behind this unique structure, we’ll show you how our Gann Square of 9 Indicator can become a valuable asset in your trading toolkit.
The History of the Gann Square of 9
The story behind the Gann Square of 9 is as fascinating as the man who created it. W.D. Gann, a pioneering trader from the early 20th century, introduced a method that highlighted the connection between time and price. Rooted in ancient mathematics and geometry, Gann’s theory suggests that financial markets follow cyclical patterns, which are captured in the design of the Square of 9.
Core Principles of the Gann Square of 9
At its heart, the Gann Square of 9 is based on a numerical system that spirals outward from a central point. This unique arrangement allows traders to identify potential support and resistance levels in the market. Each number represents a possible pivot point, indicating shifts in market direction, aligned with Gann’s time-price equilibrium theory.
Applying the Gann Square in Market Analysis
The strength of the Gann Square of 9 lies in its ability to predict key moments in the market where significant price movements may occur. By utilizing our Gann Square of 9 Indicator, traders can easily pinpoint these crucial points, applying Gann’s principles to anticipate both market highs and lows. This section will guide you through practical applications of the Gann Square for making both short-term and long-term trading decisions.
Market Timing with the Gann Square of 9 Indicator
Unlock the potential of market timing and price prediction using our Gann Square of 9 Indicator. This versatile tool brings Gann’s trading insights into the modern world of finance. Here, you’ll find a detailed walkthrough on how to use the indicator to enhance your trading strategies.
Step-by-Step Guide
Input the Source Price: Open, High, Low, Close on specific Timeframe.
Set the Pip Value: Adjust the pip value according to the scale of your trades. The pip value helps define the precision of the price levels the calculator will generate.
Analyze Results: The generated grid displays a central value (your input price) surrounded by numbers representing possible support and resistance levels.
Use the Support and Resistance Levels: Below the grid, you’ll find specific support and resistance points. These are key price levels that can help you plan your trading strategy, such as entry or exit points.
Apply Gann's Trading Entries: At the bottom, suggested long and short trade entries, with targets and stop-loss levels, giving you essential tools for managing risk effectively.
By following these steps, you can effectively incorporate Gann’s time-tested techniques into modern market analysis. Our Gann Square of 9 Indicator simplifies complex calculations while offering powerful insights, helping you make informed trading decisions rooted in one of market analysis’s most influential theories.
Whether you’re new to Gann’s approach or a seasoned trader, this indicator is designed to provide valuable insights aligned with Gann’s original concepts while delivering a seamless user experience for today’s traders. With just a few clicks, you can transform market data into a geometric pattern of time and price, setting the stage for strategic trading based on the cyclical nature of financial markets.
90 Minute Cycles Full90-Minute Cycles Indicator for London and NY Sessions
This is a more streamlined version of the 90-minute cycle indicator by sunwoo101.
The 90-Minute Cycles Indicator is built to help traders easily follow and trade around key market cycles during the London and New York sessions. Marking important 90-minute intervals and highlighting the True Cycle Open Price provides clear visual cues to help you make more informed trading decisions.
Key Features:
90-Minute Cycles for London and NY: The indicator automatically draws vertical lines marking every 90-minute cycle for the London and NY sessions. These lines are great for timing your trades and spotting potential shifts in market momentum.
True Cycle Open Price: A horizontal line is drawn at the True Cycle Open Price, which stays visible throughout the session. This gives you a key reference point for price levels that tend to act as support or resistance.
Customizable Visuals: You can fully personalize the indicator’s appearance - adjusting the colors and line styles and even controlling when the lines appear - so it blends perfectly with your existing charts.
All Cycles Drawn from the Start: Unlike other indicators, this one draws all the 90-minute cycles right when the session begins, so you can see the full day’s potential market moves as soon as the first cycle starts.
What’s Different About This Indicator:
London Session Support: In addition to the NY session, you now have 90-minute cycles for the London session, complete with its own True Cycle Open Price.
Better Customization: You have more control over the visual aspects of the indicator, so it can be tailored to fit your specific charting preferences.
Complete Cycle Visibility: All cycles are drawn immediately when the session starts, providing a full view of the day’s key moments right from the opening.
How to Use:
This indicator is perfect for scalping and short-term trading. Whether trading Forex or Indices and following SMT concepts, the cycle timing can help you pinpoint the best times for entering and exiting trades. The True Cycle Open Price is a crucial level of support or resistance throughout the session, making it a key marker to watch.
Scalpers: Use the 90-minute cycle lines to time your trades with the market's rhythm.
Day Traders: This indicator tracks the London and NY sessions, making it an excellent tool for day trading strategies where timing is critical.
Multi-Session Support:
Whether you're trading the London or New York session, the indicator will automatically adjust to your time zone and align the cycles to the relevant session. This helps you stay on top of key market activity across major trading hubs without changing anything manually.
Ichimoku Wave Oscillator with Custom MAIchimoku Wave Oscillator with Custom MA - Pine Script Description
This script uses various types of moving averages (MA) to implement the concept of Ichimoku wave theory for wave analysis. The user can select from SMA, EMA, WMA, TEMA, SMMA to visualize the difference between short-term, medium-term, and long-term waves, while identifying potential buy and sell signals at crossover points.
Key Features:
MA Type Selection:
The user can select from SMA (Simple Moving Average), EMA (Exponential Moving Average), WMA (Weighted Moving Average), TEMA (Triple Exponential Moving Average), and SMMA (Smoothed Moving Average) to calculate the waves. This script is unique in that it combines TEMA and SMMA, distinguishing it from other simple moving average-based indicators.
TEMA (Triple Exponential Moving Average): Best suited for capturing short-term trends with quick responsiveness.
SMMA (Smoothed Moving Average): Useful for identifying long-term trends with minimal noise, providing more stable signals.
Wave Calculations:
The script calculates three waves: Wave 9-17, Wave 17-26, and Wave 9-26, each of which analyzes different time horizons.
Wave 9-17 (blue): Primarily used for analyzing short-term trends, ideal for detecting quick changes.
Wave 17-26 (red): Used to analyze medium-term trends, providing a more stable market direction.
Wave 9-26 (green): Represents long-term trends, suitable for understanding broader trend shifts.
Baseline (0 Line):
Each wave is visualized around the 0 line, where waves above the line indicate an uptrend and waves below the line indicate a downtrend. This allows for easy identification of trend reversals.
Crossover Signals:
CrossUp: When Wave 9-17 (short-term wave) crosses Wave 17-26 (medium-term wave) upward, it is considered a buy signal, indicating a potential upward trend shift.
CrossDown: When Wave 9-17 (short-term wave) crosses Wave 17-26 downward, it is considered a sell signal, indicating a potential downward trend shift.
Background Color for Signal:
The script visually highlights the signals with background colors. When a buy signal occurs, the background turns green, and when a sell signal occurs, the background turns red. This makes it easier to spot reversal points.
Calculation Method:
The script calculates the difference between moving averages to display the wave oscillation. Wave 9-17, Wave 17-26, and Wave 9-26 represent the difference between the moving averages for different time periods, allowing for analysis of short-term, medium-term, and long-term trends.
Wave 9-17 = MA(9) - MA(17): Represents the difference between the short-term moving averages.
Wave 17-26 = MA(17) - MA(26): Represents the difference between medium-term moving averages.
Wave 9-26 = MA(9) - MA(26): Provides insight into the long-term trend.
This calculation method effectively visualizes the oscillation of waves and helps identify trend reversals at crossover points.
Uniqueness of the Script:
Unlike other moving average-based indicators, this script combines TEMA (Triple Exponential Moving Average) and SMMA (Smoothed Moving Average) to capture both short-term sensitivity and long-term stability in trends. This duality makes the script more versatile for different market conditions.
TEMA is ideal for short-term traders who need quick signals, while SMMA is useful for long-term investors seeking stability and noise reduction. By combining these two, this script provides a more refined analysis of trend changes across various timeframes.
How to Use:
This script is effective for trend analysis and reversal detection. By visualizing the crossover points between the waves, users can spot potential buy and sell signals to make more informed trading decisions.
Scalping strategies can rely on Wave 9-17 to detect quick trend changes, while those looking for medium-term trends can analyze signals from Wave 17-26.
For a broader market overview, Wave 9-26 helps users understand the long-term market trend.
This script is built on the concept of wave theory to anticipate trend changes, making it suitable for various timeframes and strategies. The user can tailor the characteristics of the waves by selecting different MA types, allowing for flexible application across different trading strategies.
Ichimoku Wave Oscillator with Custom MA - Pine Script 설명
이 스크립트는 다양한 이동 평균(MA) 유형을 활용하여 일목 파동론의 개념을 기반으로 파동 분석을 시도하는 지표입니다. 사용자는 SMA, EMA, WMA, TEMA, SMMA 중 원하는 이동 평균을 선택할 수 있으며, 이를 통해 단기, 중기, 장기 파동 간의 차이를 시각화하고, 교차점에서 상승 및 하락 신호를 포착할 수 있습니다.
주요 기능:
이동 평균(MA) 유형 선택:
사용자는 SMA(단순 이동 평균), EMA(지수 이동 평균), WMA(가중 이동 평균), TEMA(삼중 지수 이동 평균), SMMA(평활 이동 평균) 중 하나를 선택하여 파동을 계산할 수 있습니다. 이 스크립트는 TEMA와 SMMA의 독창적인 조합을 통해 기존의 단순한 이동 평균 지표와 차별화됩니다.
TEMA(삼중 지수 이동 평균): 빠른 반응으로 단기 트렌드를 포착하는 데 적합합니다.
SMMA(평활 이동 평균): 장기적인 추세를 파악하는 데 유용하며, 노이즈를 최소화하여 안정적인 신호를 제공합니다.
파동(Wave) 계산:
이 스크립트는 Wave 9-17, Wave 17-26, Wave 9-26의 세 가지 파동을 계산하여 각각 단기, 중기, 장기 추세를 분석합니다.
Wave 9-17 (파란색): 주로 단기 추세를 분석하는 데 사용되며, 빠른 추세 변화를 포착하는 데 유용합니다.
Wave 17-26 (빨간색): 중기 추세를 분석하는 데 사용되며, 좀 더 안정적인 시장 흐름을 보여줍니다.
Wave 9-26 (녹색): 장기 추세를 나타내며, 큰 흐름의 방향성을 파악하는 데 적합합니다.
기준선(0 라인):
각 파동은 0 라인을 기준으로 변동성을 시각화합니다. 0 위에 있는 파동은 상승세, 0 아래에 있는 파동은 하락세를 나타내며, 이를 통해 추세의 전환을 쉽게 확인할 수 있습니다.
파동 교차 신호:
CrossUp: Wave 9-17(단기 파동)이 Wave 17-26(중기 파동)을 상향 교차할 때, 상승 신호로 간주됩니다. 이는 단기적인 추세 변화가 발생할 수 있음을 의미합니다.
CrossDown: Wave 9-17(단기 파동)이 Wave 17-26(중기 파동)을 하향 교차할 때, 하락 신호로 해석됩니다. 이는 시장이 약세로 돌아설 가능성을 나타냅니다.
배경 색상 표시:
교차 신호가 발생할 때, 상승 신호는 녹색 배경, 하락 신호는 빨간색 배경으로 시각적으로 강조되어 사용자가 신호를 쉽게 인식할 수 있습니다.
계산 방식:
이 스크립트는 이동 평균 간의 차이를 계산하여 각 파동의 변동성을 나타냅니다. Wave 9-17, Wave 17-26, Wave 9-26은 각각 설정된 주기의 이동 평균(MA)의 차이를 통해, 시장의 단기, 중기, 장기 추세 변화를 시각적으로 표현합니다.
Wave 9-17 = MA(9) - MA(17): 단기 추세의 차이를 나타냅니다.
Wave 17-26 = MA(17) - MA(26): 중기 추세의 차이를 나타냅니다.
Wave 9-26 = MA(9) - MA(26): 장기적인 추세 방향을 파악할 수 있습니다.
이러한 계산 방식은 파동의 변동성을 파악하는 데 유용하며, 추세의 교차점을 통해 상승/하락 신호를 잡아냅니다.
스크립트의 독창성:
이 스크립트는 기존의 이동 평균 기반 지표들과 달리, TEMA(삼중 지수 이동 평균)와 SMMA(평활 이동 평균)을 함께 사용하여 짧은 주기와 긴 주기의 트렌드를 동시에 파악할 수 있도록 설계되었습니다. 이를 통해 단기 트렌드의 민감한 변화와 장기 트렌드의 안정성을 모두 반영합니다.
TEMA는 단기 트레이더에게 빠르고 민첩한 신호를 제공하며, SMMA는 장기 투자자에게 보다 안정적이고 긴 호흡의 트렌드를 파악하는 데 유리합니다. 두 지표의 결합으로, 다양한 시장 환경에서 추세의 변화를 더 정교하게 분석할 수 있습니다.
사용 방법:
이 스크립트는 추세 분석과 변곡점 포착에 효과적입니다. 각 파동 간의 교차점을 시각적으로 확인하고, 상승 또는 하락 신호를 포착하여 매매 시점 결정을 도울 수 있습니다.
스캘핑 전략에서는 Wave 9-17을 주로 참고하여 빠르게 추세 변화를 잡아내고, 중기 추세를 참고하고 싶은 경우 Wave 17-26을 사용해 신호를 분석할 수 있습니다.
장기적인 시장 흐름을 파악하고자 할 때는 Wave 9-26을 통해 큰 트렌드를 확인할 수 있습니다.
이 스크립트는 파동 이론의 개념을 기반으로 시장의 추세 변화를 예측하는 데 유용하며, 다양한 시간대와 전략에 맞추어 사용할 수 있습니다. 특히, 사용자가 선택한 MA 유형에 따라 파동의 특성을 변화시킬 수 있어, 여러 매매 전략에 유연하게 대응할 수 있습니다.
RoC Momentum CycleRoC Momentum Cycles (RMC) is derived from RoC (Rate of Change) indicator.
Motivation behind RMC: Addressing RoC’s Shortcomings
While the Rate of Change (RoC) indicator is a valuable tool for assessing momentum, it has notable limitations that traders must be aware of. One of the primary challenges with the traditional RoC is its sensitivity to price fluctuations, which can lead to false signals in volatile markets. This often results in premature entries or exits, impacting trading performance.
By smoothing out the RoC calculations and focusing on more consistent signal generation (using SMA on smoothed RoC), RMC offers a more consistent representation of price trends.
Momentum Cycles
RMC helps visualize momentum cycles in a much better way compared to RoC.
Long Momentum Cycle : A cross-over of smoothed RoC (blue line) above averaged signal (orange line) below zero marks start of a new potential upside cycle which ends when the blue line comes back to zero line from above.
Short Momentum Cycle : A cross-under of blue line below orange line above zero marks beginning of a potential downside cycle which ends when the blue line comes back to zero from below.
Dynamic Price Oscillator [CHE]Dynamic Price Oscillator
Overview:
Welcome to the Dynamic Price Oscillator ! This indicator is designed to help traders identify potential trend reversals and divergences by comparing short-term and long-term price movements in percentage terms. It’s a powerful tool to enhance your trading strategies by spotting bullish and bearish divergences effectively.
Key Features:
Dynamic Oscillator Calculation: The DPO calculates the percentage difference between two EMAs (Exponential Moving Averages), offering insight into the relative strength of price movements.
Bullish & Bearish Divergence Detection:
The indicator highlights divergences between price and the oscillator, allowing you to identify potential reversal points with ease.
Long-Term Divergence Option: Enable or disable long-term divergences to focus on either short-term trends or broader market movements.
High/Low Markers:
Visual markers for significant peaks and troughs in the DPO, helping you quickly spot potential trade setups.
Custom Alerts: Set up alerts for both bullish and bearish divergence signals, ensuring you never miss an important opportunity.
How to Use:
Bullish Divergence: A bullish divergence occurs when price is making lower lows, but the DPO shows higher lows. This can indicate a potential reversal to the upside.
Bearish Divergence: A bearish divergence happens when price is making higher highs, but the DPO shows lower highs. This can signal a potential downside reversal.
Customizable Settings: Adjust the fast and slow EMA periods, smoothing factor, and divergence lookback to fit your personal trading style.
Ideal For:
Swing traders and day traders looking for early signs of market reversals.
Those who want a clear, visual representation of divergence between price and momentum.
Traders who appreciate flexibility with customizable parameters and built-in alerts.
Why Use Dynamic Price Oscillator ?
This indicator gives you the edge by providing a reliable way to measure price momentum and detect divergences that are often missed by other indicators. With the option to enable long-term divergences, you can tailor the indicator to fit both short-term and long-term strategies.
Give it a try and see how the Dynamic Price Oscillator can enhance your trading performance!
Best regards Chervolino
Elliott Wave Oscillator with Peak DetectionThe Elliott Wave Oscillator with Derivative Peak Detection and Breakout Bands is a technical indicator that blends traditional Elliott Wave theory with modern derivative-based peak detection and breakout bands for a clearer view of market trends.
Key Components:
Elliott Wave Oscillator (EWO):
The core of the indicator is based on the difference between two simple moving averages (SMA): a short-term SMA (default length: 5) and a long-term SMA (default length: 35).
This difference is expressed either as an absolute value or a percentage of the current price, depending on the user’s input.
Smoothing:
The EWO is smoothed using an Exponential Moving Average (EMA) to filter out noise and provide a clearer trend direction.
The smoothing length is adaptive based on the current chart's timeframe (e.g., longer smoothing for daily charts).
Derivative Peak Detection:
The smoothed EWO is analyzed for peaks (positive) and troughs (negative) by calculating the derivative (rate of change) between consecutive values.
Peaks are detected when the derivative transitions from positive to negative, while troughs are identified when the derivative switches from negative to positive.
Tolerance levels are adjustable and vary by timeframe to avoid false signals.
Breakout Bands:
Upper and lower breakout bands are dynamically generated based on the smoothed EWO.
The bands help to filter significant peaks and troughs, only highlighting those that occur beyond the breakout levels.
Users can choose to display these bands and use them to filter out less significant peaks and troughs.
Visualization:
The original, unsmoothed EWO is plotted as a histogram, with positive values in green and negative values in red.
The smoothed EWO is plotted as a blue line, providing a clearer view of the underlying trend.
The breakout bands, if enabled, are plotted as white lines to visualize the upper and lower bounds of the oscillator's movement.
Positive peaks and negative troughs that meet the filtering criteria are marked with purple triangles (for peaks) and red triangles (for troughs) on the chart.
Customization Options:
Timeframe-based Smoothing and Tolerance: Different smoothing lengths and tolerance levels can be set for daily, hourly, and 5-minute charts.
Breakout Bands: Users can toggle the display of breakout bands and adjust their visual properties.
Peak Filtering: Peaks and troughs can be filtered based on whether they break out beyond the bands, or all peaks can be shown.
This indicator provides a unique blend of trend detection through the Elliott Wave Oscillator and derivative analysis to highlight significant market reversals while offering breakout bands as a filtering mechanism for false signals.
Short-Only Cycle IndicatorThis script is a follow-up to my previous 60-day Cycle, Long-Only Indicator.
The "Short-Only Cycle Indicator" is designed to help traders navigate optimal shorting opportunities by analyzing cyclical price behavior over a defined period. It focuses on recognizing distribution phases (ideal for shorting) and accumulation phases (where shorting should be avoided). It should be used with assets that the trader has an existing thesis for downward price movement.
Key Features:
1. Cycle Length: The indicator uses a 60-day cycle to identify high and low points in price, which are then used to determine the current market phase.
2. Distribution Phase: When the price is near the cycle high, the indicator signals a distribution phase, indicating potential shorting opportunities.
3. Accumulation Phase: When the price is near the cycle low, the indicator signals an accumulation phase, advising traders to avoid shorting.
4. Short Signal: A short signal is triggered when the price crosses below the cycle high, which is visually marked on the chart for easy identification.
This indicator is particularly useful for traders who prefer a short-only strategy, as it helps them time their entries and avoid shorting during unfavorable market conditions.
Inflation-Adjusted Price IndicatorThis indicator allows traders to adjust historical prices for inflation using customizable CPI data. The script computes the adjusted price by selecting a reference date, the original price, and the CPI source (US CPI or custom input) and plots it as a line on the chart. Additionally, a table summarizes the adjusted price values and average and total inflation rates.
While the indicator serves as a standalone tool to understand inflation's impact on prices, it is a supportive element in more advanced trading strategies requiring accurate analysis of inflation-adjusted data.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Fourier For Loop [BackQuant]Fourier For Loop
PLEASE Read the following, as understanding an indicator's functionality is essential before integrating it into a trading strategy. Knowing the core logic behind each tool allows for a sound and strategic approach to trading.
Introducing BackQuant's Fourier For Loop (FFL) — a cutting-edge trading indicator that combines Fourier transforms with a for-loop scoring mechanism. This innovative approach leverages mathematical precision to extract trends and reversals in the market, helping traders make informed decisions. Let's break down the components, rationale, and potential use-cases of this indicator.
Understanding Fourier Transform in Trading
The Fourier Transform decomposes price movements into their frequency components, allowing for a detailed analysis of cyclical behavior in the market. By transforming the price data from the time domain into the frequency domain, this indicator identifies underlying patterns that traditional methods may overlook.
In this script, Fourier transforms are applied to the specified calculation source (defaulted to HLC3). The transformation yields magnitude values that can be used to score market movements over a defined range. This scoring process helps uncover long and short signals based on relative strength and trend direction.
Why Use Fourier Transforms?
Fourier Transforms excel in identifying recurring cycles and smoothing noisy data, making them ideal for fast-paced markets where price movements may be erratic. They also provide a unique perspective on market volatility, offering traders additional insights beyond standard indicators.
Calculation Logic: For-Loop Scoring Mechanism
The For Loop Scoring mechanism compares the magnitude of each transformed point in the series, summing the results to generate a score. This score forms the backbone of the signal generation system.
Long Signals: Generated when the score surpasses the defined long threshold (default set at 40). This indicates a strong bullish trend, signaling potential upward momentum.
Short Signals: Triggered when the score crosses under the short threshold (default set at -10). This suggests a bearish trend or potential downside risk.'
Thresholds & Customization
The indicator offers customizable settings to fit various trading styles:
Calculation Periods: Control how many periods the Fourier transform covers.
Long/Short Thresholds: Adjust the sensitivity of the signals to match different timeframes or risk preferences.
Visualization Options: Traders can visualize the thresholds, change the color of bars based on trend direction, and even color the background for enhanced clarity.
Trading Applications
This Fourier For Loop indicator is designed to be versatile across various market conditions and timeframes. Some of its key use-cases include:
Cycle Detection: Fourier transforms help identify recurring patterns or cycles, giving traders a head-start on market direction.
Trend Following: The for-loop scoring system helps confirm the strength of trends, allowing traders to enter positions with greater confidence.
Risk Management: With clearly defined long and short signals, traders can manage their positions effectively, minimizing exposure to false signals.
Final Note
Incorporating this indicator into your trading strategy adds a layer of mathematical precision to traditional technical analysis. Be sure to adjust the calculation start/end points and thresholds to match your specific trading style, and remember that no indicator guarantees success. Always backtest thoroughly and integrate the Fourier For Loop into a balanced trading system.
Thus following all of the key points here are some sample backtests on the 1D Chart
Disclaimer: Backtests are based off past results, and are not indicative of the future .
INDEX:BTCUSD
INDEX:ETHUSD
BINANCE:SOLUSD
2024 - Seasonality - Open to CloseScript Description:
This Pine Script is designed to visualise **seasonality** in the financial markets by calculating the **open-to-close percentage change** for each month of a selected asset. It creates a **heatmap** table to display the monthly performance over multiple years. The script provides detailed statistical summaries, including:
- **Average monthly percentage changes**
- **Standard deviation** of the changes
- **Percentage of months with positive returns**
The script also allows users to adjust colour intensities for positive and negative values, specify which year to start from, and skip specific months. Key metrics such as averages, standard deviations, and percentages of positive months can be toggled on or off based on user preferences. The result is a clear, visual representation of how an asset typically performs month by month, aiding in seasonality analysis.
Fed Net LiquidityNet Liquidity = Federal Reserve Total Assets - Treasury General Account (TGA) - Reverse Repurchase Agreements (RRP) Balance
1. Federal Reserve Total Assets: This is the sum of everything the Fed owns, like government bonds and mortgage-backed securities. You can snag this data from the Fed’s weekly balance sheet report.
2. Treasury General Account (TGA): Think of this as the U.S. government’s checking account at the Fed. When the TGA balance goes up, it means the government is pulling liquidity out of the market, and vice versa.
3. Reverse Repurchase Agreements (RRP) Balance: This represents the liquidity the Fed absorbs from the market through reverse repo operations. When financial institutions park money in the Fed’s RRP account, there’s less cash available in the market.
Why Use Net Liquidity?
Net liquidity is seen as a key indicator of the actual amount of money available in the market. It helps gauge the overall liquidity conditions that can influence financial markets.
Where to Find the Data:
1. Federal Reserve Total Assets: You can find this in the Fed’s weekly balance sheet (the H.4.1 report). Here’s the link: Federal Reserve Statistical Release - H.4.1.
Steps to Calculate Net Liquidity Yourself:
1. Get the Fed’s Total Assets: Look up the latest H.4.1 report and jot down the total assets figure.
2. Find the TGA Balance: Head over to the U.S. Treasury’s Daily Treasury Statement to locate the “Treasury General Account” balance.
3. Get the RRP Balance: You can find this number in the H.4.1 report or on the New York Fed’s website under “Reverse Repurchase Agreements.”
4. Do the Math: Simply subtract the TGA and RRP balances from the Fed’s total assets—that gives you the net liquidity.
Relative PPP for USDBRLThis indicator calculates the USDBRL exchange rate using the Relative Purchasing Power Parity method, which considers that the variation in the exchange rate is equal to the variation in inflation in Brazil minus the variation in inflation in the US. It is derived from the Law of One Price, which states that an identical good should have the same price in different markets when adjusted for exchange rates, assuming the absence of arbitrage barriers such as transaction costs or trade restrictions.
The indicator is calculated starting from June 1994, at the launch of the Real Plan, which equalized the value of the Brazilian Real and the US Dollar at that time. This indicator is useful for providing an idea of the long-term trend of the Dollar exchange rate (months or years), acting similarly to a moving average, around which the exchange rate gravitates.
It's useful for analysts who have to forecast the USDBRL in the long term.
US Recessions (NBER)This indicator is designed to replace the US Recessions indicator.
Unfortunately, the original indicator is now broken, and the author is not responding: www.tradingview.com .
There are other similar indicators, but they are not based on live data and either show non-officially recognized recessions or fail to display all officially recognized recessions.
This indicator shades US recession periods based on live monthly data from USREC . It highlights all officially recognized US recessions according to the NBER and will automatically shade any future recessions when they occur. The indicator works across all timeframes, correctly shading recessions whether you are viewing a 30-minute, 2-hour, daily, weekly, or any other chart timeframe.
Warning & Risks :
This indicator uses the barmerge.lookahead_on option to correctly handle monthly recession data from USREC . The purpose of this setting is to ensure that the monthly data points are applied retroactively to the corresponding bars on the chart. However, this means that while past recession periods are accurately shaded, the script is effectively displaying data from future candles and plotting it backward onto the chart.
This behavior does not introduce a “future leak” in the traditional sense—since USREC data is backward-looking and the current month always remains non-recessionary until officially confirmed. Nonetheless, it can cause confusion, as users may see recession periods shaded retroactively only after the data becomes available. Therefore, the current month will always appear non-recessionary until the next data point is released, and historical recession periods may be adjusted after the fact .
Sessions Full Markets [TradingFinder] Forex Stocks Index 7 Time🔵 Introduction
In global financial markets, particularly in FOREX and stocks, precise timing of trading sessions plays a crucial role in the success of traders. Each trading session—Asian, European, and American—has its own unique characteristics in terms of volatility and trading volume.
The Asian session (Tokyo), Sydney session, Shanghai session, European session (London and Frankfurt), and American session (New York AM and New York PM) are examples of these trading sessions, each of which opens and closes at specific times.
This session indicator also includes a Time Convertor, enabling users to view FOREX market hours based on GMT, UTC, EST, and local time. Another valuable feature of this indicator is the automatic detection of Daylight Saving Time (DST), which automatically applies time changes for the New York, London, and Sydney sessions.
🔵 How to Use
The indicator also displays session times based on the exact opening and closing times for each geographic region. Users can utilize this indicator to view trading hours either locally or in UTC time, and if needed, set their own custom trading times.
Additionally, the session information table includes the start and end times of each session and whether they are open or closed. This functionality helps traders make better trading decisions by using accurate and precise time data.
Key Features of the Session Indicator
The session indicator is a versatile and advanced tool that provides several unique features for traders.
Some of these features are :
• Automatic Daylight Saving Time (DST) Detection : This indicator dynamically detects Daylight Saving Time (DST) changes for various trading sessions, including New York, London, and Sydney, without requiring manual adjustments. This feature allows traders to manage their trades without worrying about time changes.
Below are the start and end dates for DST in the New York, London, and Sydney trading sessions :
1. New York :
Start of DST: Second Sunday of March, at 2:00 AM.
End of DST: First Sunday of November, at 2:00 AM
2. London :
Start of DST: Last Sunday of March, at 1:00 AM.
End of DST: Last Sunday of October, at 2:00 AM.
3. Sydney :
Start of DST: First Sunday of October, at 2:00 AM.
End of DST: First Sunday of April, at 3:00 AM.
• Session Display Based on Different Time Zones : The session indicator allows users to view trading times based on different time zones, such as UTC, the local time of each market, or the user’s local time. This feature is especially useful for traders operating in diverse geographic regions.
• Custom Trading Time Setup : Another notable feature of this indicator is the ability to set custom trading times. Traders can adjust their own trading times according to their personal strategies and benefit from this flexibility.
• Session Information Table : The session indicator provides a complete information table that includes the exact start and end times of each trading session and whether they are open or closed. This table helps users simultaneously and accurately monitor the status of all trading sessions and make better trading decisions.
🟣 Session Trading Hours Based on Market Mode and Time Zones
The session indicator provides precise information on the start and end times of trading sessions.
These times are adjusted based on different market modes (FOREX, stocks, and TFlab suggestions) and time zones (UTC and local time) :
🟣 (FOREX Session Time) Forex Market Mode
• Sessions in UTC (DST inactive) :
Sydney: 22:00 - 06:00
Tokyo: 23:00 - 07:00
Shanghai: 01:00 - 09:00
Asia: 22:00 - 07:00
Europe: 07:00 - 16:00
London: 08:00 - 16:00
New York: 13:00 - 21:00
• Sessions in UTC (DST active) :
Sydney: 21:00 - 05:00
Tokyo: 23:00 - 07:00
Shanghai: 01:00 - 09:00
Asia: 21:00 - 07:00
Europe: 06:00 - 15:00
London: 07:00 - 15:00
New York: 12:00 - 20:00
• Sessions in Local Time :
Sydney: 08:00 - 16:00
Tokyo: 08:00 - 16:00
Shanghai: 09:00 - 17:00
Asia: 22:00 - 07:00
Europe: 07:00 - 16:00
London: 08:00 - 16:00
New York: 08:00 - 16:00
🟣 Stock Market Trading Hours (Stock Market Mode)
• Sessions in UTC (DST inactive) :
Sydney: 00:00 - 06:00
Asia: 00:00 - 06:00
Europe: 07:00 - 16:30
London: 08:00 - 16:30
New York: 14:30 - 21:00
Tokyo: 00:00 - 06:00
Shanghai: 01:30 - 07:00
• Sessions in UTC (DST active) :
Sydney: 23:00 - 05:00
Asia: 23:00 - 06:00
Europe: 06:00 - 15:30
London: 07:00 - 15:30
New York: 13:30 - 20:00
Tokyo: 00:00 - 06:00
Shanghai: 01:30 - 07:00
• Sessions in Local Time:
Sydney: 10:00 - 16:00
Tokyo: 09:00 - 15:00
Shanghai: 09:30 - 15:00
Asia: 00:00 - 06:00
Europe: 07:00 - 16:30
London: 08:00 - 16:30
New York: 09:30 - 16:00
🟣 TFlab Suggestion Mode
• Sessions in UTC (DST inactive) :
Sydney: 23:00 - 05:00
Tokyo: 00:00 - 06:00
Shanghai: 01:00 - 09:00
Asia: 23:00 - 06:00
Europe: 07:00 - 16:00
London: 08:00 - 16:00
New York: 13:00 - 21:00
• Sessions in UTC (DST active) :
Sydney: 22:00 - 04:00
Tokyo: 00:00 - 06:00
Shanghai: 01:00 - 09:00
Asia: 22:00 - 06:00
Europe: 06:00 - 15:00
London: 07:00 - 15:00
New York: 12:00 - 20:00
• Sessions in Local Time :
Sydney: 09:00 - 16:00
Tokyo: 09:00 - 15:00
Shanghai: 09:00 - 17:00
Asia: 23:00 - 06:00
Europe: 07:00 - 16:00
London: 08:00 - 16:00
New York: 08:00 - 16:00
🔵 Setting
Using the session indicator is straightforward and practical. Users can add this indicator to their trading chart and take advantage of its features.
The usage steps are as follows :
Selecting Market Mode : The user can choose one of the three main modes.
Forex Market Mode: Displays the forex market trading hours.
oStock Market Mode: Displays the trading hours of stock exchanges.
Custom Mode: Allows the user to set trading hours based on their needs.
TFlab Suggestion Mode: Displays the higher volume hours of the forex market in Asia.
Setting the Time Zone : The indicator allows displaying sessions based on various time zones. The user can select one of the following options:
UTC (Coordinated Universal Time)
Local Time of the Session
User’s Local Time
Displaying Comprehensive Session Information : The session information table includes the opening and closing times of each session and whether they are open or closed. This table helps users monitor all sessions at a glance and precisely set the best time for entering and exiting trades.
🔵Conclusion
The session indicator is a highly efficient and essential tool for active traders in the FOREX and stock markets. With its unique features, such as automatic DST detection and the ability to display sessions based on different time zones, the session indicator helps traders to precisely and efficiently adjust their trading activities.
This indicator not only shows users the exact opening and closing times of sessions, but by providing a session status table, it helps traders identify the best times to enter and exit trades. Moreover, the ability to set custom trading times allows traders to easily personalize their trading schedules according to their strategies.
In conclusion, using the session indicator ensures that traders are continuously and accurately informed of time changes and the opening and closing hours of markets, eliminating the need for manual updates to align with DST changes. These features enable traders to optimize their trading strategies with greater confidence and up-to-date information, allowing them to capitalize on opportunities in the market.
Prometheus Topological Persistent EntropyPersistence Entropy falls under the branch of math topology. Topology is a study of shapes as they twist and contort. It can be useful in the context of markets to determine how volatile they may be and different from the past.
The key idea is to create a persistence diagram from these log return segments. The persistence diagram tracks the "birth" and "death" of price features:
A birth occurs when a new price pattern or feature emerges in the data.
A death occurs when that pattern disappears.
By comparing prices within each segment, the script tracks how long specific price features persist before they die out. The lifetime of each feature (difference between death and birth) represents how robust or fleeting the pattern is. Persistent price features tend to reflect stable trends, while shorter-lived features indicate volatility.
Entropy Calculation: The lifetimes of these patterns are then used to compute the entropy of the system. Entropy, in this case, measures the amount of disorder or randomness in the price movements. The more varied the lifetimes, the higher the entropy, indicating a more volatile market. If the price patterns exhibit longer, more consistent lifetimes, the entropy is lower, signaling a more stable market.
Calculation:
We start by getting log returns for a user defined look back value. In the compute_persistent_entropy function we separate the overall log returns into windows. We then compute persistence diagrams of the windows. It tracks the birth and death of price patterns to see how persistent they are. Then we calculate the entropy of the windows.
After we go through that process we get an array of entropies, we then smooth it by taking the sum of all of them and dividing it by how many we have so the indicator can function better.
// Calculate log returns
log_returns = array.new()
for i = 1 to lgr_lkb
array.push(log_returns, math.log(close / close ))
// Function to compute a simplified persistence diagram
compute_persistence_diagram(segment) =>
n = array.size(segment)
lifetimes = array.new()
for i = 0 to n - 1
for j = i + 1 to n - 1
birth = array.get(segment, i)
death = array.get(segment, j-1)
if birth != death
array.push(lifetimes, math.abs(death - birth))
lifetimes
// Function to compute entropy of a list of values
compute_entropy(values) =>
n = array.size(values)
if n == 0
0.0
else
freq_map = map.new()
total_sum = 0.0
for i = 0 to n - 1
value = array.get(values, i)
//freq_map := freq_map.get(value, 0.0) + 1
map.put(freq_map, value, value + 1)
total_sum += 1
entropy = 0.0
for in freq_map
p = count / total_sum
entropy -= p * math.log(p)
entropy
compute_persistent_entropy(log_returns, window_size) =>
n = (lgr_lkb) - (2 * window_size) + 1
entropies = array.new()
for i = 0 to n - 1
segment1 = array.new()
segment2 = array.new()
for j = 0 to window_size - 1
array.push(segment1, array.get(log_returns, i + j))
array.push(segment2, array.get(log_returns, i + window_size + j))
dgm1 = compute_persistence_diagram(segment1)
dgm2 = compute_persistence_diagram(segment2)
combined_diagram = array.concat(dgm1, dgm2)
entropy = compute_entropy(combined_diagram)
array.push(entropies, entropy)
entropies
//---------------------------------------------
//---------------PE----------------------------
//---------------------------------------------
// Calculate Persistent Entropy
entropies = compute_persistent_entropy(log_returns, window_size)
smooth_pe = array.sum(entropies) / array.size(entropies)
This image illustrates how the indicator works for traders. The purple line is the actual indicator value. The line that changes from green to red is a SMA of the indicator value, we use this to determine bullish or bearish. When the smoothed persistence entropy is above it’s SMA that signals bearishness.
The indicator tends to look prettier on higher time frames, we see NASDAQ:TSLA on a 4 hour here and below we see it on the 5 minute.
On a lower time frame it looks a little weird but still functions the same way.
Prometheus encourages users to use indicators as tools along with their own discretion. No indicator is 100% accurate. We encourage comments about requested features and criticism.
Leonid's Bitcoin Sharpe RatioThe Sharpe ratio is an old formula used to value the risk-adjusted return of an asset. It was developed by Nobel Laureate William F. Sharpe. In this case, I have applied it to Bitcoin with an adjustable look-back date.
The Sharpe Ratio shows you the average return earned after subtracting out the risk-free rate per unit of volatility (I've defaulted this to 0.02 ).
Volatility is a measure of the price fluctuations of an asset or portfolio. Subtracting the risk-free rate from the mean return allows you to understand what the extra returns are for taking the risk.
If the indicator is flashing red, Bitcoin is temporarily overbought (expensive).
If the indicator is flashing green, Bitcoin is temporarily oversold (cheap).
The goal of this indicator is to signal out local tops & bottoms. It can be adjusted as far as the lookback time but I have found 25-26 days to be ideal.
Crossover CounterExplanation:
Crossover Detection: We detect the crossover of the 20-period and 50-period moving averages using ta.crossover().
Tracking Price Movement: After the crossover, we start tracking the price to check if it moves up or down by 2%. If an up movement occurs before a down movement, we increment the positive counter. If a down movement occurs first, we increment the negative counter.
Reset Condition: Once either a 2% up or down move is detected, we stop tracking until the next crossover.
Table Display: A table shows the counts of positive and negative events.