ATH with Percentage DifferenceSimple ATH with difference percentage from the actual price to hit the all time high price again
Pine utilities
AB Buy Sell CrossoverThe information, scripts, and indicators provided by the author of this TradingView publication, including but not limited to this particular indicator, are intended solely for educational, informational, and research purposes. They do not constitute, and should not be interpreted as, financial or investment advice, nor should they be construed as recommendations or endorsements for any specific securities, financial products, asset classes, or trading strategies. The use of this indicator is entirely at the user’s own risk.
Trading and investing in financial markets are inherently risky and involve the potential for significant financial losses. The value of financial instruments, including stocks, commodities, currencies, and cryptocurrencies, can fluctuate widely and may result in the loss of all capital invested. The past performance of any indicator, strategy, or asset class is not indicative of future results, and no method or system, including those based on technical analysis, can guarantee profits or prevent losses.
The author of this indicator assumes no responsibility for any loss or damage, whether direct, indirect, incidental, or consequential, arising from the use of the indicator, its signals, or the execution of trades based on its recommendations. By using this script, the user agrees to take full responsibility for their trading decisions and acknowledges that they are solely responsible for managing their investments.
Risk Warning
Financial markets are volatile and subject to rapid and unpredictable changes. Market conditions can shift unexpectedly due to various factors such as economic data releases, geopolitical events, or broader market sentiment. Even with the use of indicators and technical analysis, there is no way to guarantee profits or avoid losses in such an environment. Users should be aware that any trades made using this indicator may involve substantial risk, including but not limited to the risk of losing more than the amount initially invested.
This script is based on historical data, technical patterns, and algorithms that may not account for real-time market dynamics, such as liquidity, transaction costs, slippage, and order execution delays. It is important to understand that backtested results do not guarantee future performance and may not be representative of the outcomes that would occur in live trading conditions.
No Professional Advice
This indicator is not designed to serve as professional financial advice, tax advice, legal counsel, or investment recommendations. The author of this script is not a licensed financial advisor, broker, or tax professional, and the content provided should not be construed as such. It is strongly recommended that users consult with a qualified financial advisor or investment professional who is aware of their individual circumstances and financial goals before making any investment decisions.
Users should conduct their own thorough research and consider the risks associated with trading. The author is not responsible for any action taken by the user based on the use of this indicator, nor for the consequences of such actions, including but not limited to financial losses, opportunity cost, or missed opportunities.
No Guarantee of Accuracy or Profitability
While every effort has been made to ensure that the information and signals generated by this indicator are as accurate as possible, the author makes no representations or warranties, either express or implied, regarding the accuracy, reliability, or completeness of any of the information provided. The indicator relies on technical analysis and mathematical models that are subject to limitations, including but not limited to the inherent uncertainties in financial markets.
The author does not guarantee the success or profitability of any trades based on this indicator, and users should not rely solely on the output of this script to make their investment decisions. Trading should always be conducted in conjunction with sound risk management practices, including the use of stop-loss orders, position sizing, and portfolio diversification. Users should never risk more than they are willing to lose.
No Liability
The author disclaims any liability for losses or damages of any kind, whether direct, indirect, incidental, consequential, or punitive, arising from the use of this indicator, including but not limited to financial losses, missed opportunities, and any other consequences. This includes losses due to errors, inaccuracies, or malfunctions in the indicator, the user’s reliance on the signals provided, or any other factors related to the use of the TradingView platform or the market.
In no event shall the author, its affiliates, or any third parties associated with the script be liable for any loss, damage, or claim arising out of or in connection with the use of this indicator or any related services, even if the author has been advised of the possibility of such losses or damages. The user agrees to indemnify, defend, and hold harmless the author from and against any and all claims, damages, liabilities, and expenses arising from the use of this script.
Third-Party Data and Sources
This indicator may incorporate data from third-party sources, such as TradingView’s data feeds or other publicly available financial data sources. While the author strives to ensure that the data used in the creation of the indicator is accurate, there is no guarantee of the completeness or accuracy of such data. The author is not responsible for any errors, omissions, or delays in data that may affect the indicator’s performance.
Limitations of TradingView and Pine Script
The author’s ability to implement certain features or strategies within TradingView is limited by the functionality of the TradingView platform and Pine Script, the scripting language used to develop indicators and strategies. While Pine Script is a powerful tool, it does have certain constraints, including limited historical data access, limitations on the number of calculations per bar, and the inability to scan multiple assets simultaneously. This indicator operates within the confines of TradingView’s platform and should not be seen as a comprehensive solution for trading automation or real-time market analysis.
Use of Alerts
This indicator may include alert conditions that allow users to set up notifications on TradingView. However, the author makes no guarantee that alerts will be delivered promptly or accurately. Alerts are dependent on TradingView’s alert system and the user’s account settings, and the author is not responsible for any missed, delayed, or incorrect alerts.
User Responsibility
By using this indicator, users acknowledge that they are responsible for their trading decisions and actions. The author of this script does not have access to any user’s account or trading information, nor can the author influence or control the execution of trades. All trading decisions are made at the sole discretion of the user, and the author does not bear responsibility for any outcomes, including financial gains or losses, resulting from the use of this indicator.
Changes and Updates
The author reserves the right to modify, update, or discontinue the indicator at any time without notice. Any updates or changes made to the indicator may affect its performance, and users are encouraged to stay informed about any modifications. It is the responsibility of the user to regularly check for updates to ensure they are using the latest version of the indicator.
Conclusion
The use of this TradingView indicator is at the user’s own risk. By applying this indicator and utilizing its features, users acknowledge that they have read, understood, and agreed to the terms outlined in this disclaimer. The author is not responsible for any financial, legal, or other consequences that may result from the use of this indicator or the trading decisions based on its signals.
New Rate - PROIndicator Description: New Rate - PRO
The New Rate - PRO is an advanced trading indicator designed to assist traders in identifying significant price levels and potential reversal points within a specified time frame. By highlighting key highs and lows, projecting trendlines, and providing visual cues, this indicator enhances your ability to make informed trading decisions. It offers extensive customization options, ensuring adaptability to various trading styles and market conditions.
---
Key Features:
Customizable Color Themes: Choose between Dark and Light color styles to match your chart preferences.
High and Low Line Detection: Automatically identifies and draws lines for significant high and low price levels within the defined analysis period.
Midline Projection: Optionally displays a midline representing the 50% range between the detected high and low, aiding in trend analysis.
Candle Coloring: Colors the first six candles within the analysis range with a specific color, while the remaining candles are displayed in a subdued gray for clarity.
Trading Session Highlight: Highlights the designated trading hours on the chart, providing a clear visual reference for active trading periods.
Touch Detection Arrows: Plots arrows on the chart when the price touches the detected high or low levels, indicating potential trading opportunities.
Extensive Customization Options: Allows users to adjust line colors, styles, widths, label texts, and more to suit individual trading preferences.
Timeframe and Range Configuration: Defines the specific timeframe and time range for analysis, ensuring precise detection of significant price levels.
How Does the Indicator Work?
Color Style Selection:
- Choose between "Dark" or "Light" themes to match your chart setup, adjusting the color palette for optimal visibility.
High and Low Line Detection:
- The indicator analyzes the first six candles within the specified time range to identify the highest and lowest price levels.
- Once detected, it draws horizontal lines extending 25 candles to the right, marking these significant levels on the chart.
Midline Projection:
- If enabled, the indicator calculates the midpoint between the detected high and low.
- It then draws a horizontal line at this midpoint, providing an additional reference for potential support or resistance.
Candle Coloring:
- The first six candles within the analysis period are colored based on user selection (default: yellow).
- Subsequent candles are displayed in a semi-transparent gray, allowing the key candles to stand out.
Trading Session Highlight:
- Highlights the active trading hours on the chart using a semi-transparent orange background.
- This visual aid helps traders focus on periods of increased market activity.
Touch Detection Arrows:
- When the price touches the previously detected high or low levels, the indicator plots an upward green arrow or a downward red arrow, respectively.
- These arrows signal potential entry points for buy or sell trades.
Customization of Labels and Lines:
- Users can customize the colors, styles (Solid, Dotted, Dashed), and widths of the high, low, and midline.
- Label texts and font sizes are also adjustable to enhance readability.
How to Use the Indicator?
Setup Color Themes:
- Select your preferred color theme ("Dark" or "Light") to ensure the indicator aligns with your chart's appearance.
Configure High and Low Lines:
- Adjust the line color, style, and width to clearly distinguish high and low levels on the chart.
- Enable or disable the midline based on your analysis needs.
Set Timeframe and Analysis Range:
- Define the chart's timeframe in minutes (e.g., 5 minutes) to tailor the indicator's sensitivity.
- Specify the start and end hours and minutes for the analysis period to focus on specific trading sessions.
Customize Candle Colors:
- Choose the color for the first six candles within the analysis range.
- The remaining candles will automatically be displayed in a default gray color.
Enable Trading Session Highlight:
- Activate the background highlight for the trading session to visually separate active trading hours from inactive periods.
Monitor Touch Detection Arrows:
- Watch for green upward arrows indicating potential buy signals when the price touches the high level.
- Look for red downward arrows signaling potential sell opportunities when the price reaches the low level.
Adjust Labels and Visual Elements:
- Modify label texts and font sizes to ensure clarity and avoid clutter on the chart.
- Fine-tune line styles and colors for better visual differentiation.
Plan Your Trades:
- Use the detected high and low levels as reference points for setting entry, stop-loss, and take-profit levels.
- Combine with other technical analysis tools to confirm trade signals and enhance decision-making.
---
What Makes This Indicator Original?
Dynamic High and Low Detection: Automatically identifies significant price levels within a defined time range, providing timely insights into market movements.
Midline Projection Feature: Offers an additional reference point by calculating and displaying the midpoint between high and low levels, aiding in trend analysis.
Customizable Visual Elements: Extensive customization options for colors, styles, and labels allow traders to tailor the indicator to their specific preferences and trading environments.
Touch Detection Arrows: Provides clear visual signals when the price interacts with key levels, facilitating quick decision-making for trade entries.
Trading Session Highlight: Enhances focus by visually distinguishing active trading periods, helping traders concentrate on high-probability trading times.
Trade Summary Visualization: (If applicable based on code) Offers a summary of recent trades, allowing traders to assess performance directly on the chart.
Additional Considerations
Testing and Optimization: Before deploying the indicator in live trading, test it on historical data and a demo account to fine-tune settings according to your trading strategy.
Complementary Analysis: Use the indicator alongside other technical analysis tools such as moving averages, trendlines, and oscillators to confirm trade signals.
Risk Management: Always set appropriate stop-loss and take-profit levels to manage risk effectively, regardless of the indicator's signals.
Stay Informed: Keep abreast of market news and economic events that may influence price movements and affect the indicator's performance.
Adjust for Different Assets: Customize the indicator's settings based on the asset's volatility and trading behavior to enhance accuracy and reliability.
---
Example Configuration
To help you get started, here is an example configuration:
Color Style: Dark
Line Color (High and Low): Red
Line Style (High and Low): Dotted
Line Width (High and Low): 2
Midline Color (50%): Blue
Show Midline: Yes
Label Text Color: Gray
Label Font Size: Medium
Candle Color (First 6 Candles): Yellow
Default Candle Color (Remaining Candles): Semi-transparent Gray
Timeframe Minutes: 5
Analysis Start Time: 08:35
Analysis End Time: 09:05
These settings are optimized for a 5-minute XAUUSD chart during the 8:35 to 09:05 trading session, highlighting key price levels and providing clear visual signals for potential trades.
Conclusion
The New Rate - PRO indicator is tool that combines dynamic price level detection with extensive customization and real-time visual cues. By automatically identifying significant highs and lows, projecting trendlines, and signaling potential trade opportunities, it enhances your ability to navigate the markets effectively. Its adaptability through customizable settings ensures that it can be tailored to various trading styles and market conditions, making it a valuable addition to any trader's toolkit.
Market Stats Panel [Daveatt]█ Introduction
I've created a script that brings TradingView's watchlist stats panel functionality directly to your charts. This isn't just another performance indicator - it's a pixel-perfect (kidding) recreation of TradingView's native stats panel.
Important Notes
You might need to adjust manually the scaling the firs time you're using this script to display nicely all the elements.
█ Core Features
Performance Metrics
The panel displays key performance metrics (1W, 1M, 3M, 6M, YTD, 1Y) in real-time, with color-coded boxes (green for positive, red for negative) for instant performance assessment.
Display Modes
Switch seamlessly between absolute prices and percentage returns, making it easy to compare assets across different price scales.
Absolute mode
Percent mode
Historical Comparison
View year-over-year performance with color-coded lines, allowing for quick historical pattern recognition and analysis.
Data Structure Innovation
Let's talk about one of the most interesting challenges I faced. PineScript has this quirky limitation where request.security() can only return 127 tuples at most. £To work around this, I implemented a dual-request system. The first request handles indices 0-63, while the second one takes care of indices 64-127.
This approach lets us maintain extensive historical data without compromising script stability.
And here's the cool part: if you need to handle even more years of historical data, you can simply extend this pattern by adding more request.security() calls.
Each additional call can fetch another batch of monthly open prices and timestamps, following the same structure I've used.
Think of it as building with LEGO blocks - you can keep adding more pieces to extend your historical reach.
Flexible Date Range
Unlike many scripts that box you into specific timeframes, I've designed this one to be completely flexible with your date selection. You can set any start year, any end year, and the script will dynamically scale everything to match. The visual presentation automatically adjusts to whatever range you choose, ensuring your data is always displayed optimally.
█ Customization Options
Visual Settings
The panel's visual elements are highly customizable. You can adjust the panel width to perfectly fit your workspace, fine-tune the line thickness to match your preferences, and enjoy the pre-defined year color scheme that makes tracking historical performance intuitive and visually appealing.
Box Dimensions
Every aspect of the performance boxes can be tailored to your needs. Adjust their height and width, fine-tune the spacing between them, and position the entire panel exactly where you want it on your chart. The goal is to make this tool feel like it's truly yours.
█ Technical Challenges Solved
Polyline Precision
Creating precise polylines was perhaps the most demanding aspect of this project.
The challenge was ensuring accurate positioning across both time and price axes, while handling percentage mode scaling with precision.
The script constantly updates the current year's data in real-time, seamlessly integrating new information as it comes in.
Axis Management
Getting the axes right was like solving a complex puzzle. The Y-axis needed to scale dynamically whether you're viewing absolute prices or percentages.
The X-axis required careful month labeling that stays clean and readable regardless of your selected timeframe.
Everything needed to align perfectly while maintaining proper spacing in all conditions.
█ Final Notes
This tool transforms complex market data into clear, actionable insights. Whether you're day trading or analyzing long-term trends, it provides the information you need to make informed decisions. And remember, while we can't predict the future, we can certainly be better prepared for it with the right tools at hand.
A word of warning though - seeing those red numbers in a beautifully formatted panel doesn't make them any less painful! 😉
---
Happy Trading! May your charts be green and your stops be far away!
Daveatt
M2 Money Supply vs SPY SpreadSpread between M2 Money Supply and SPY, with Bollinger bands to see when it has become overextended in either direction.
Daily Structure Cycles - Session - PDH/PDLDescription:
The Session Windows indicator visualizes predefined trading sessions on the chart, highlighting key price ranges with customizable background colors and labels. Designed to track session-specific high and low levels, this tool provides visual guidance for analyzing market behavior across different trading windows. It includes three customizable sessions—Asian, Window 1, and Window 2—that can be toggled on or off.
How It Works:
Each session is marked with a colored box, representing the high and low range for that session. Border colors and box transparency can be customized, allowing for easy visual differentiation.
The indicator also displays the high and low levels of the previous day, marked as PDH (Previous Day High) and PDL (Previous Day Low). When the current price crosses these levels, the line style changes, signaling potential support or resistance levels.
Labels for each session high and low are positioned based on the user-defined offset and alignment options, providing easy-to-read markers at the end of each session.
Usage: This indicator helps traders observe price behavior within distinct trading sessions and how the current price interacts with previous day’s highs and lows, which may offer insight into support/resistance zones. Traders can use this tool to spot breakout or reversal points as price moves through session highs/lows or crosses the previous day’s levels.
Customization Options:
Session Settings: Choose session times for Asian, Window 1, and Window 2.
Color Settings: Set different colors for session background and border lines.
Label Positioning: Adjust label offset and vertical position for high/low markers.
PDH/PDL Levels: Toggle lines for previous day’s high and low, with color and line style options.
Limitations: This indicator is designed for visualization purposes and is best used alongside other tools for confirmation, as it does not provide standalone buy or sell signals.
Session Breaks [Market Mindset]Session Break Indicator
This powerful tool marks session breaks on your chart based on your chosen timeframe, helping you quickly spot key points in market sessions.
Customize it to fit your trading style with the following settings:
Resolution: Select the timeframe you want session start and end lines for.
Wait: Turn this on to delay new line creation until the bar closes, keeping your chart clean in real-time.
Styling: Adjust line width and color for optimal clarity.
Perfect for traders wanting a clear view of session transitions and opportunities!
Pine Execution MapPine Script Execution Map
Overview:
This is an educational script for Pine Script developers. The script includes data structure, functions/methods, and process to capture and print Pine Script execution map of functions called while pine script execution.
Map of execution is produced for last/latest candle execution.
The script also has example code to call execution map methods and generate Pine Execution map.
Use cases:
Pine script developers can get view of how the functions are called
This can also be used while debugging the code and know which functions are called vs what developer expect code to do
One can use this while using any of the open source published script and understand how public script is organized and how functions of the script are called.
Code components:
User defined type
type EMAP
string group
string sub_group
int level
array emap = array.new()
method called internally by other methods to generate level of function being executed
method id(string tag) =>
if(str.startswith(tag, "MAIN"))
exe_level.set(0, 0)
else if(str.startswith(tag, "END"))
exe_level.set(0, exe_level.get(0) - 1)
else
exe_level.set(0, exe_level.get(0) + 1)
exe_level.get(0)
Method called from main/global scope to record execution of main scope code. There should be only one call to this method at the start of global scope.
method main(string tag) =>
this = EMAP.new()
this.group := "MAIN"
this.sub_group := tag
this.level := "MAIN".id()
emap.push(this)
Method called from main/global scope to record end of execution of main scope code. There should be only one call to this method at the end of global scope.
method end_main(string tag) =>
this = EMAP.new()
this.group := "END_MAIN"
this.sub_group := tag
this.level := 0
emap.push(this)
Method called from start of each function to record execution of function code
method call(string tag) =>
this = EMAP.new()
this.group := "SUB"
this.sub_group := tag
this.level := "SUB".id()
emap.push(this)
Method called from end of each function to record end of execution of function code
method end_call(string tag) =>
this = EMAP.new()
this.group := "END_SUB"
this.sub_group := tag
this.level := "END_SUB".id()
emap.push(this)
Pine code which generates execution map and show it as a label tooltip.
if(barstate.islast)
for rec in emap
if(not str.startswith(rec.group, "END"))
lvl_tab = str.repeat("", rec.level+1, "\t")
txt = str.format("=> {0} {1}> {2}", lvl_tab, rec.level, rec.sub_group)
debug.log(txt)
debug.lastr()
Snapshot 1:
This is the output of the script and can be viewed by hovering mouse pointer over the blue color diamond shaped label
Snapshot 2:
How to read the Pine execution map
Hinton Map█ HINTON MAP
This script displays a Hinton Map visualization of market data for user-defined tickers and timeframes. It uses color gradients to represent the magnitude and direction of price change, RSI, and a combination of both.
This is one example. You can modify and try other values as you wish, but do keep the incoming values between -1 and 1.
In the Example Usage:
Users can input up to 5 symbols and 5 timeframes. For each ticker/timeframe combination:
The box size represents the relative magnitude of the 2-bar percentage change.
The box fill color represents the direction and magnitude of the 2-bar percentage change.
The box border color and thickness represent the RSI deviation from 50.
The inner box color represents a combination of price change magnitude and RSI deviation from 50.
Hovering over each box displays a tooltip with the ticker, timeframe, percentage change, and RSI.
Inputs:
• Unit Size (bars):
The size of each Hinton unit in bars.
Type: int
Default Value: 10
• Border Width:
The base width of the inner box border.
Type: int
Default Value: 3
• Negative Hue (0-360):
The hue value for negative price changes (0-360).
Type: float
Default Value: 100
• Positive Hue (0-360):
The hue value for positive price changes (0-360).
Type: float
Default Value: 180
• Ticker 1-5:
The tickers to display on the Hinton map.
Type: string
Default Value: AAPL
• Timeframes (comma separated):
The timeframes to display on the Hinton map (comma-separated).
Type: string
Default Value: 1, 5, 60, 1D, 1W
(Fun Note: My Home town is named `Hinton`)
Lot Size CalculatorThis Pine Script indicator, "Lot Size Calculator", is designed to help traders effectively manage their risk by calculating the optimal lot size for a given position based on account balance, risk percentage, and the distance to Stop Loss. The script also visually plots key price levels such as Entry Price, Stop Loss, and multiple Take Profit targets (1R, 2R, 3R).
Key Features:
Risk Management: Enter your account balance, risk percentage, entry price, and stop loss price to calculate the optimal lot size for your trade. The lot size is computed based on the risk amount you are willing to take.
Take Profit Levels: The script calculates and plots Take Profit levels for 1R, 2R, and 3R multiples of the risk, providing a structured approach to setting targets and managing rewards.
Visual Representation: The indicator plots horizontal lines on the chart for Entry Price, Stop Loss, and Take Profit levels. The Take Profit levels are styled as dotted lines for easy differentiation, and all lines extend infinitely in both directions for clarity.
Convenient Information Table: A table displayed in the top-right corner of the chart provides key information such as account balance, lot size, entry price, stop loss price, and risk details. The lot size value is highlighted for better visibility.
This tool is ideal for traders looking to maintain disciplined risk management and to visually identify key levels directly on the chart.
DYNAMIC USD MOMENTUM INDICATOR
Hello traders,
Welcome to my script, an indicator helping you to quickly see the performance of USD in constant daily comparison to other currencies.
This script requests price data from other charts but displays overbought and oversold labels on any selected chart currency pair.
See attached images to spot high probability reversal days when USD is in extremes against multiple other currencies. The output labels represent the currency traded against USD and reaching overbought and oversold zoned on a dynamic RSI scale.
Suggested pairs with higher co relation to stronger or weaker dollar:
AUD/USD, CAD/USD, EUR/USD, GBP/USD, NZD/USD
CHF/USD and JPY/USD require more in depth analysis of individual performance of JPY AND CHF
Atlas Trend Position TableAtlas Trend Position Table
This script provides an easy-to-understand position overview for traders, including key metrics such as entry price, potential profit, potential loss, and current profit/loss (PnL). It’s designed to help traders manage their open positions effectively, especially when using leverage.
Inputs:
Order Size ($): The total amount of capital used for the trade.
Entry Price: The price at which the trade was entered.
Stop Loss: The price level at which the trade will be exited to prevent further losses.
Take Profit: The price level where the trader aims to take profits.
Leverage: The multiplier for leveraged trading.
Commission (%): The commission fee applied to each trade.
Key Features:
Position Value Calculation: The script calculates the total position value by taking into account the leverage used in the trade.
Potential Profit and Loss:
Potential profit is calculated based on the difference between the take profit and the entry price, adjusted for commission.
Potential loss is calculated similarly, using the stop loss, and includes the effect of commission.
Real-Time Profit/Loss: The script also calculates real-time profit or loss using the current market price, factoring in leverage and commission.
Dynamic Background Colors:
The PnL background color dynamically adjusts: green when in profit, red when in loss. This provides a quick visual cue to assess the current trade status.
Table Display:
The output is shown in a table positioned on the right side of the chart. It contains the following information:
Entry Price: Displays the trade’s entry price.
Order Size ($): Shows the total leveraged position value.
Potential Profit: The potential profit from the trade based on the take profit level.
Potential Loss: The potential loss from the trade based on the stop loss level.
Current PnL: Displays the current profit or loss based on the live market price.
How to Use:
Input your trade details in the settings menu, including your entry price, stop loss, take profit, and leverage.
The script will automatically calculate and display the potential outcomes and live PnL.
Use the visual indicators to monitor the status of your open position and adjust your strategy accordingly.
This tool is designed to be simple, effective, and user-friendly, providing traders with the essential data they need for better risk management and decision-making.
Mars Signals - SSL Trend AnalyzerIntroduction
The "Mars Signals - Precision Trend Analyzer with SSL Baseline & Price Action Zones" is a comprehensive technical analysis tool designed for traders seeking to enhance their market analysis and trading strategies. This indicator integrates multiple advanced trading concepts, including dynamic moving averages, trend detection algorithms, momentum indicators, volume analysis, higher timeframe confirmation, candlestick pattern recognition, and precise price action zones. By combining these elements, the indicator aims to provide clear and actionable buy and sell signals, helping traders to make informed decisions in various market conditions.
Core Components and Functionality
1.Dynamic Baseline Calculation
Moving Average Types: The indicator allows users to select from a variety of moving average types for the baseline calculation, including Simple Moving Average (SMA), Exponential Moving Average (EMA), Hull Moving Average (HMA), Weighted Moving Average (WMA), Double EMA (DEMA), Triple EMA (TEMA), Least Squares Moving Average (LSMA), Triangular Moving Average (TMA), Kijun (from Ichimoku Kinko Hyo), and McGinley's Dynamic.
Baseline Length: Users can customize the length of the moving average, providing flexibility to adjust the sensitivity of the baseline to market movements.
Signal Line Generation: The indicator computes a dynamic signal line based on the relationship between the close price and the moving averages of the high and low prices. This signal line adapts to market volatility and trend changes.
2.SSL Baseline Integration
SSL Baseline: In addition to the primary baseline, the indicator incorporates an SSL (Semaphore Signal Level) Baseline, which further refines trend detection by considering the highs and lows over a specified period.
Dual Confirmation: The combination of the primary baseline and the SSL baseline enhances the reliability of the trend signals by requiring agreement between both baselines before generating a signal.
3.Momentum and Trend Filters
Relative Strength Index (RSI): The indicator uses the RSI to assess the momentum of price movements, filtering out signals that occur during overbought or oversold conditions.
Moving Average Convergence Divergence (MACD): The MACD is employed to identify the direction and strength of the trend, adding another layer of confirmation to the signals.
Average Directional Index (ADX): The ADX measures the strength of the trend, ensuring that signals are generated only when the market shows significant directional movement.
4.Volume Analysis
Volume Filter: An optional volume filter compares the current volume to its moving average, allowing traders to focus on signals that occur during periods of higher market activity.
5.Higher Timeframe Confirmation
Multi-Timeframe Analysis: The indicator can incorporate data from a higher timeframe, comparing the current price to the higher timeframe's baseline and signal line. This feature helps traders align their trades with the broader market trend.
6.Candlestick Pattern Recognition
Bullish Patterns: The indicator detects bullish patterns such as Bullish Engulfing, Piercing Line, Hammer, and Doji.
Bearish Patterns: It also identifies bearish patterns like Bearish Engulfing, Dark Cloud Cover, Shooting Star, and Doji.
Pattern Prioritization: The patterns are prioritized to highlight the most significant formations, which can serve as additional confirmation for trade entries and exits.
7.Price Action Zones
Support and Resistance Levels: The indicator automatically identifies pivot highs and lows to establish dynamic support and resistance levels.
Zone Visualization: It draws shaded rectangles on the chart to represent these zones, providing a clear visual aid for potential reversal or breakout areas.
ATR-Based Zone Width: The zones' thickness is dynamically calculated using the Average True Range (ATR), adjusting to the current market volatility.
Background Coloring: The chart background changes color when the price is above the maximum resistance or below the minimum support, alerting traders to significant price movements.
Interpreting the Signals
1.Buy Signals
Conditions:
Price crosses above the signal line.
RSI is below 70 (not overbought).
MACD line is above the signal line (indicating bullish momentum).
ADX is above the user-defined threshold (default is 20), confirming a strong trend.
(Optional) Volume is above its moving average if the volume filter is enabled.
(Optional) Price is above the higher timeframe baseline and signal line if the higher timeframe filter is enabled.
(Optional) A bullish candlestick pattern is detected if the candlestick pattern filter is enabled.
Visual Indicators:
An upward-pointing label with the text "BUY" appears below the price bar.
The baseline and SSL baseline lines turn to colors indicating bullish conditions.
2.Sell Signals
Conditions:
Price crosses below the signal line.
RSI is above 30 (not oversold).
MACD line is below the signal line (indicating bearish momentum).
ADX is above the user-defined threshold, confirming a strong trend.
(Optional) Volume is above its moving average if the volume filter is enabled.
(Optional) Price is below the higher timeframe baseline and signal line if the higher timeframe filter is enabled.
(Optional) A bearish candlestick pattern is detected if the candlestick pattern filter is enabled.
Visual Indicators:
A downward-pointing label with the text "SELL" appears above the price bar.
The baseline and SSL baseline lines turn to colors indicating bearish conditions.
3.Support and Resistance Zones
Interpretation:
Resistance Zones: Represent areas where the price may face selling pressure. A break above these zones can signal a strong bullish move.
Support Zones: Represent areas where the price may find buying interest. A break below these zones can signal a strong bearish move.
Background Color:
The background turns red when the price is above the maximum resistance, indicating potential overextension.
The background turns green when the price is below the minimum support, indicating potential undervaluation.
Effective Usage Strategies
1.Customization
Adjusting Baseline and SSL Settings: Traders should experiment with different moving average types and lengths to match their trading style and the specific characteristics of the asset being analyzed.
Filtering Parameters: Modify RSI, MACD, and ADX settings to fine-tune the sensitivity of the signals.
Volume and Higher Timeframe Filters: Enable these filters to add robustness to the signals, especially in volatile markets or when trading higher timeframes.
2.Combining with Other Analysis
Fundamental Analysis: Use the indicator in conjunction with fundamental insights to validate technical signals.
Risk Management: Always apply proper risk management techniques, such as setting stop-loss and take-profit levels based on the support and resistance zones provided by the indicator.
3.Backtesting
Historical Analysis: Utilize the indicator's settings to backtest trading strategies on historical data, helping to identify the most effective configurations before applying them in live trading.
4.Monitoring Market Conditions
Volatility Awareness: Pay attention to the ATR and ADX readings to understand market volatility and trend strength, adjusting strategies accordingly.
Event Considerations: Be cautious around major economic announcements or events that may impact market behavior beyond technical indications.
Indicator Inputs and Customization Options
Baseline Type and Length: Select from multiple moving average types and specify the period length.
ADX Settings: Adjust the length, smoothing, and threshold for trend strength confirmation.
Volume Filter: Enable or disable the volume confirmation filter.
Higher Timeframe Filter: Choose to incorporate higher timeframe analysis and specify the desired timeframe.
Candlestick Patterns: Enable or disable the detection of candlestick patterns for additional signal confirmation.
SSL Baseline Type and Length: Customize the SSL baseline settings separately from the primary baseline.
Price Action Zones Settings:
Zone Thickness: Adjust the visual thickness of the support and resistance zones.
Lookback Period: Define how far back the indicator looks for pivot points.
ATR Multiplier for Zone Width: Set the multiplier for ATR to determine the dynamic width of the zones.
Maximum Number of Zones: Limit the number of support and resistance zones displayed.
Pivot Bars: Customize the number of bars to the left and right used for identifying pivot highs and lows.
Conclusion
The "Mars Signals - Precision Trend Analyzer with SSL Baseline & Price Action Zones" is a versatile and powerful tool that amalgamates essential technical analysis techniques into a single, user-friendly indicator. By providing clear visual signals and incorporating multiple layers of confirmation, it assists traders in identifying high-probability trading opportunities. Whether you are a day trader, swing trader, or long-term investor, this indicator can be tailored to suit your trading style and enhance your decision-making process.
To maximize the benefits of this indicator:
Understand Each Component: Familiarize yourself with how each part of the indicator contributes to the overall signal generation.
Customize Thoughtfully: Adjust the settings based on the asset class, market conditions, and your risk tolerance.
Practice Diligently: Use demo accounts or paper trading to practice and refine your strategy before deploying it in live markets.
Stay Informed: Continuously educate yourself on technical analysis and market dynamics to make the most informed decisions.
Disclaimer
Trading financial markets involves risk, and past performance is not indicative of future results. This indicator is a tool to aid in analysis and should not be the sole basis for any trading decision. Always conduct your own research and consider consulting with a licensed financial advisor.
Vektorkerzen HighlightThe indicator highlights candles when:
The volume is at least twice the 20-period moving average.
The range (difference between high and low prices) is at least twice the 20-period average range.
[MAD MBS] L3 Float Operations & ML-NormalizersFirst of all:
This indicator is not a standalone tool ; it relies on other script series for its inputs.
This script is an indicator designed for multi-path float operations with integrated machine learning normalizers.
It supports up to four distinct paths, each customizable with multiple sources, factors, and operations.
Users can perform various mathematical operations on price data, including addition, subtraction, multiplication, division, and percentage changes, as well as more advanced tasks like double and triple moving averages or power operations.
The script also integrates several normalization methods (e.g., Min-Max, Z-Score, Robust) to standardize data—an important step for machine learning models.
Each path supports multiple smoothing techniques (e.g., EMA, SMA, and specialized Ehlers smoothers) to further refine the output.
Designed to handle multiple data inputs simultaneously, this tool is especially useful for traders looking to analyze and normalize data from different price sources.
The combination of advanced mathematical operations, normalization techniques, and smoothing enhances data management, aiding in more effective trading decisions.
Here you can see a single path, out of the four possible:
Details to the screenshot:
First Series
Second Series
Option to override the second series with a custom constant (or when normalizing, use the length instead)
The first selection box sets the mathematical operation or activates the normalizer.
The second selection box sets the normalization method.
The third selection box sets the final smoothing technique, followed by parameters for smoothing length.
These settings are repeated identically for Paths 2–4.
At the bottom of the setup, there's a general offset option (add the 'close' price for overlay purposes).
Additionally, there's an option to display a line at zero for centered results.
Profit & Risk CalculatorThe "Profit & Risk Calculator" script in Pine Script (TradingView) is designed to help users calculate potential profit and risk when trading, and to provide alerts when specific price levels are reached (such as entry price, take profit, or stop loss). It includes several components as described below:
1. Input Fields:
The user can manually input various prices: entry price, stop loss price, and take profit price, with steps of 0.25.
There is also an option to input a custom value (e.g., for personal lot sizing) and a total investment amount.
2. Dynamic Lines:
The script draws dynamic horizontal lines for the input prices: entry line (white), stop loss line (red), and take profit line (green).
These lines are automatically updated based on the entered price levels.
3. Labels for the Lines:
Labels are added to the lines to visually indicate the entry, stop loss, and take profit levels on the chart.
4. Long and Short Position Calculations:
The script calculates potential profit and loss for both long (profit if the price goes up) and short (profit if the price goes down) positions.
It also calculates the distance between entry and take profit, and distance between entry and stop loss, along with the risk/reward ratio (RR).
5. Alerts:
The script generates alerts when one of the following conditions is met:
Entry Condition: The price touches or exceeds the entry price (high >= entryPrice).
Stop Loss Condition: The price touches or drops below the stop loss price (low <= stopLossPrice).
Take Profit Condition: The price touches or exceeds the take profit price (high >= takeProfitPrice).
6. Lot Calculations:
The script calculates both micro and mini lot sizes based on a preset table and the custom value.
The results are displayed in a table on the chart.
7. Profit/Risk Table:
The script shows two tables:
One table calculates the profit, loss, and risk/reward ratio based on the input entry price.
A second table shows the same calculations based on the current price.
8. Chart Display:
The script places tables and other visual data on the chart, such as preset values, profit and loss calculations, and the distance from take profit and stop loss to the entry price.
English Explanation of Each Part of the Script
1. Input Fields
The script starts with several input fields where the user can specify the entry price, stop loss price, take profit price, custom value, and investment amount. These values help define the parameters for risk/reward calculations.
2. Dynamic Horizontal Lines
Three horizontal lines are drawn on the chart, representing the entry price, stop loss price, and take profit price. These lines update dynamically based on user input.
3. Dynamic Line Updates
As the user adjusts their inputs, the position of the lines is updated in real-time to match the new price levels. This keeps the chart visually accurate.
4. Labels for Lines
Labels are placed on the chart next to each price line, allowing the user to clearly see which line represents which price level.
5. Long and Short Position Calculations
The script calculates the potential profit or loss for both long (prices go up) and short (prices go down) positions, providing users with an idea of their potential gains or losses.
6. **6. Risk/Reward Ratio Calculation
This calculates the Risk/Reward Ratio (RR) by dividing the distance between the take profit and entry price by the distance between the entry and stop loss price. This gives the trader an idea of how much risk they're taking relative to the potential reward.
7. Alert Conditions
The alert conditions are defined based on the price hitting the set levels:
Entry Condition: If the price goes up and touches the entry level, the alert is triggered.
Stop Loss Condition: If the price drops and hits the stop loss level, the alert is triggered.
Take Profit Condition: If the price rises and reaches the take profit level, the alert is triggered.
8. Alert Configuration
Each condition is linked to an alert that sends a message when the specific price level is touched. The alerts notify the user when the entry, stop loss, or take profit levels are hit.
9. Lot Calculations
The script includes a function that calculates micro and mini lot sizes based on a preset table and a custom value input by the user. This is useful for adjusting lot sizes to the desired amount and determining position sizes for trades.
10. Entry Price-Based Profit & Loss Table
A table is generated on the chart that displays detailed information about the profit, loss, and risk/reward ratio based on the entry price. It helps traders see the potential outcomes for different lot sizes.
11. Current Price-Based Profit & Loss Table
This second table provides similar information as the first but calculates profit, loss, and risk/reward based on the current price. This allows the trader to see how their position performs as the market price changes in real time.
Point and Figure Displacement IndicatorThe PnF Displacement indicator is my custom script for TradingView, designed to analyze Point and Figure (PnF) charts with displacement features.
Key components of the script include:
User Inputs:
Require FVG: A boolean input to determine if a Fair Value Gap (FVG) is required for displacement calculations.
Displacement Type: Allows users to choose between "Open to Close" and "High to Low" for column range calculations.
Displacement Length: Defines how far back to look for calculating the standard deviation of the column range.
Displacement Strength: Multiplier for the standard deviation to adjust sensitivity.
Box Size: Sets the size of each box in the PnF chart.
Number of Boxes for Minimum Displacement: Specifies how many boxes to consider for calculating the minimum displacement.
Displacement Logic:
The script calculates the column range based on the selected displacement type.
It computes a standard deviation of the candle range and determines a minimum displacement based on user-defined box size and count.
The displacement condition combines the FVG check and the column range against the calculated minimum.
Visual Representation:
The bars are colored based on displacement conditions, enhancing visual analysis on the chart.
This indicator aids traders in identifying significant price movements in PnF charts while incorporating user customization options for better analysis.
All In One Divergences Indicator - By CryptoEasonThis indicator displays divergences for multiple indicators on the chart. It includes divergences for volume, CCI, MACD, OBV, CMF, RSI, MFI, and maybe more in the future.
Below is an explanation of how divergences for these indicators are displayed:
1. Volume
I use volume to assess the strength of demand and supply. The way Volume divergences are calculated is similar to OBV.
Bearish Divergence: The price reaches a new high, but demand starts to weaken.
Bullish Divergence: The price reaches a new low, but supply starts to weaken.
2. CCI
Bearish Divergence: The price reaches a new high, but CCI forms a lower high, and the previous CCI peak is > 200.
Bullish Divergence: The price reaches a new low, but CCI forms a higher low, and the previous CCI low is < -200.
3. MACD
Bearish Divergence: The price reaches a new high, but the MACD lines cross at a lower point.
Bullish Divergence: The price reaches a new low, but the MACD lines cross at a higher point.
4. OBV
Bearish Divergence: The price reaches a new high, but OBV forms a lower high.
Bullish Divergence: The price reaches a new low, but OBV forms a higher low.
5. CMF
Bearish Divergence: The price reaches a new high, but CMF forms a lower high.
Bullish Divergence: The price reaches a new low, but CMF forms a higher low.
6. RSI
Bearish Divergence: The price reaches a new high, but RSI forms a lower high, and the previous RSI peak is > 70.
Bullish Divergence: The price reaches a new low, but RSI forms a higher low, and the previous RSI low is < 30.
7. MFI
Bearish Divergence: The price reaches a new high, but MFI forms a lower high, and the previous MFI peak is > 80.
Bullish Divergence: The price reaches a new low, but MFI forms a higher low, and the previous MFI low is < 20.
This indicator provides a sub-chart that displays seven indicators: Volume, CCI, MACD, OBV, CMF, RSI, and MFI.
When you find a divergence in the chart, I recommend using the sub-chart to check the real-time status of each indicator. This is important and is the way I use this indicator. Whenever a divergence signal appears, check the actual status of all the indicators with divergences.
Reminders:
1.Having too many divergence signals is not always better. Personally, I typically use divergences from four indicators: Volume, CCI, MACD, and OBV, and sometimes I add RSI. I recommend that you use divergence signals only from the indicators you are familiar with. If you're not familiar with a particular indicator, you can disable its divergence signals in the settings.
2.Some indicators are volume-related, such as OBV, Volume, MFI, and CMF. Therefore, the chart you're using should reflect the main trading volume of the market. For example, in the Bitcoin market, I recommend using the COINBASE:BTCUSD chart.
3.The divergence signals for MACD are displayed separately in this indicator. This is because the way MACD divergences are calculated is more complex. It requires the identification of the highs and lows of two MACD line crossovers, which is different from simply identifying the highs and lows of other indicators. Hence, MACD divergences are displayed separately in this indicator.
Note:
Although this indicator currently only shows divergences for seven indicators, I may add more divergence indicators in the future. If you would like to see divergence signals for a particular indicator included, or if you have any feature requests that are not currently offered, feel free to leave a comment and let me know.
============== 中文說明 (Chinese Introduction) ==============
這個指標是一個能在圖表上顯示多個指標背離的指標。
包括:成交量、CCI、MACD、OBV、CMF、RSI、MFI 等多個指標的背離。
以下說明這幾個指標背離的顯示方式:
1、成交量
我用成交量來判斷需求與供應強弱,它的背離判斷方式與OBV類似。
頂背離:價格創新高、但需求卻開始衰竭
底背離:價格創新低,但供應卻開始衰竭
2、CCI
頂背離:價格創新高、但CCI卻更低,且前一個高點 CCI > 200
底背離:價格創新低,但CCI卻更高,且前一個低點 CCI < -200
3、MACD
頂背離:價格創新高、但MACD快慢線交叉創下低點
底背離:價格創新低,但MACD 快慢線交叉雙下高點
4、OBV
頂背離:價格創新高、但OBV卻更低
底背離:價格創新低,但OBV卻更高
5、CMF
頂背離:價格創新高、但CMF卻更低
底背離:價格創新低,但CMF卻更高
6、RSI
頂背離:價格創新高、但RSI卻更低,且前一個高點 RSI > 70
底背離:價格創新低,但RSI卻更高,且前一個低點 RSI < 30
7、MFI
頂背離:價格創新高、但MFI卻更低,且前一個高點 MFI > 80
底背離:價格創新低,但MFI卻更高,且前一個低點 MFI < 20
該指標提供了副圖表,副圖表一共可顯示七個指標:成交量、CCI、MACD、OBV、CMF、RSI、MFI 。
當你發現當前價格出現背離時,我建議使用副圖表來一一檢查指標的真實情況,這很重要,這也是我使用這指標的方式,每當背離訊號出現時,檢查所有背離指標的真實情況。
提醒:
1、背離顯示並不是越多越好,我個人通常只使用 成交量、CCI、MACD、OBV 等四個指標的背離,偶爾會加上 RSI。我也建議你應該只使用自己熟悉的指標的背離,如果你不是很熟悉某個指標,那麼你可以在設定中取消顯示該指標的背離。
2、某些指標與成交量有關,例如OBV、Volume、MFI、CMF 等等,所以你使用的圖表應該要能反應市場的主要成交量,例如在比特幣市場裡,建議以 COINBASE:BTCUSD 圖表為主。
3、MACD 的背離訊號在這個指標裡是個別顯示的,因為MACD的背離判斷方式比較複雜,它需要判斷兩次快慢線交叉的高低點,跟其他指標只需要判斷高低點出現的值不太一樣,所以MACD背離在這個指標裡是單獨顯示的。
註:
雖然目前這個指標只有顯示七個指標的背離,但是未來我可能會加入更多指標的背離。如果你希望某個指標的背離訊號出現在這隻指標中,或是你想要某個功能但是目前這指標沒有提供,歡迎留言讓我知道。
PnF Fibonacci Levels with AlertsMy Pine Script indicator, "PnF Fibonacci Levels with Alerts," overlays on a trading chart to generate alerts based on Fibonacci levels in Point and Figure (PnF) charts.
Key Features:
Inputs and Initialization:
It uses a customizable Fibonacci level (set at 0.236) and initializes variables for tracking the high and low of O and X columns.
O Column Logic:
When the current column is identified as an O column (when the close is less than the open), it calculates the Fibonacci level based on the high and low of that column, drawing a line on the chart.
Buy Alert:
If the closing price of the previous bar is above the Fibonacci level of the O column, a buy alert is triggered.
X Column Logic:
If the current column is an X column and the close is above the previous O column's low, it captures the current high and low, calculates the Fibonacci level, and draws it on the chart.
Sell Alert:
A sell alert is triggered if the closing price of the X column is at or below the specified Fibonacci level.
This indicator aids traders by highlighting critical Fibonacci levels and providing timely alerts for potential buy and sell opportunities.
PnF Bullish & Bearish Trend Line Indicator with Proximity AlertThis Pine Script indicator, "PnF Bullish and Bearish Trend line Proximity Alert," overlays on a trading chart to monitor and alert users about interactions with bullish and bearish trend lines derived from Point and Figure (PnF) charting.
Key Features:
Inputs: Users can set parameters such as box size, bullish and bearish angles (in degrees), and a proximity threshold for detecting touches.
Slope Calculation: The script calculates the slopes for bullish and bearish trendlines using the tangent of the specified angles.
Trendline Management:
It initializes and updates trend lines based on price interactions, adjusting their starting points and positions as conditions change.
Proximity Detection: The indicator checks if the current price is close enough to the trend lines and sets conditions for alerts.
Alerts: Users receive alerts when both trend lines are touched, enhancing decision-making for trading strategies.
Visual Feedback: It highlights areas where both trend lines are touched and plots the trend lines in distinct colors for clarity.
This indicator provides an effective way to track key price levels and potential trend reversals in the market.
WSITEEE Imbalance/FVG (FAIR VALUE GAP)Imbalance/FVG (Fair Value Gap) refers to a price imbalance, representing a range on the chart where little liquidity was provided.
Imbalance implies a strong impulsive movement of a candle, which the price almost always returns to cover.
The best analogy would be to imagine painting a wall with a roller. If you move the roller from top to bottom, what remains on the wall? That’s right, gaps that need to be filled. How do you fill them? Exactly, by moving the roller from bottom to top. The same principle applies to imbalance.
How do you correctly mark an Imbalance?
The first thing we need to find on the chart is three candles, one of which should be impulsive. Next, using the “Fibonacci Retracement” tool, we stretch it from the wick of the first candle to the wick of the last candle.
Imbalance can be used both for determining context and as an entry model. On a higher timeframe, it acts as a point of interest (POI), within which you can look for factors to build a position.
This Pine Script is designed for Smart Money traders who work with Fair Value Gaps (FVG). FVGs are three-candle patterns where the third candle does not fully overlap the first, leaving a gap on the second candle. The script helps to automatically detect these gaps and highlight them on the chart with different colors based on their status and type.
It allows for the visualization of imbalances on the chart, highlighting key zones that can serve as important levels for decision-making. With flexible color and label settings, the script can be tailored to individual needs, enhancing data visualization on the chart.
bar_index inspectorThis is a tool for developers who are working with index based plots and find themselves adding the bar_index to their indicators on a regular basis during development and debugging.
What it does:
shows the bar_index in the status line and data window.
plots optional labels (bar index + time) into the chart every 10 bars
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.