Heikin Ashi inside candle breakout signal
Heikin Ashi Inside Candle Breakout Signal
This custom Pine Script indicator displays Heikin Ashi candles alongside breakout signals based on inside bars. Inside bars occur when the current candle's high is lower than the previous candle's high, and the current candle's low is higher than the previous candle's low. These inside bars indicate a consolidation period, often followed by a strong breakout in either direction.
Key Features:
Heikin Ashi Candles: The indicator plots Heikin Ashi candles, which are calculated using the open, high, low, and close values of the regular candlesticks, providing a smoothed representation of price action.
Green Candles: Indicate bullish price action (when the Heikin Ashi close is higher than the open).
Red Candles: Indicate bearish price action (when the Heikin Ashi close is lower than the open).
Inside Bar Condition: Identifies when a candle's high is lower than the previous high, and its low is higher than the previous low. This signifies a consolidation pattern that might be followed by a breakout.
Breakout Signals:
Buy Signal: Triggered when the price breaks above the previous high after an inside bar.
Sell Signal: Triggered when the price breaks below the previous low after an inside bar.
Background Color: The chart background color is shaded to indicate the presence of inside bars, making it easy to spot consolidation zones.
How to Use:
Buy Signal: A breakout above the previous high is a potential buy signal.
Sell Signal: A breakout below the previous low is a potential sell signal.
This indicator is ideal for traders looking to capture breakouts after periods of consolidation. It can be used for both short-term and long-term trading strategies.
Pine utilities
ScalpZilla Strategy Claude 0.1 (beta)This script is designed to backtest your strategy based on any MA indicator.
In my case I use ScalpZilla Signal Line as a signal line crossovers.
You may put any MA in you source Input.
0.1 Beta Version
Fair Value Gap DetectorHow this indicator works:
It detects two types of FVGs:
Bullish FVG: Occurs when the low of the current candle is higher than the high of the candle from 2 bars ago (creates an upward gap)
Bearish FVG: Occurs when the high of the current candle is lower than the low of the candle from 2 bars ago (creates a downward gap)
Features:
Allows users to toggle both bullish and bearish FVG detection independently
Customizable colors for both bullish (default green) and bearish (default red) FVGs
Visualizes FVGs using:
Boxes that highlight the gap area (with 80% transparency)
Labels that mark each FVG ("Bull FVG" or "Bear FVG")
Visual representation:
Bullish FVGs are marked with green boxes and downward-pointing labels
Bearish FVGs are marked with red boxes and upward-pointing labels
This indicator can be useful for :
Identifying potential areas where price might return to
Finding potential support and resistance zones
Understanding market structure and momentum shifts
Supertrend + KAMA Long StrategyThis strategy combines Supertrend and Kaufman Adaptive Moving Average (KAMA) indicators to identify long positions and manage stop-loss conditions effectively.
**Supertrend**: Determines the trend direction and helps identify entry and exit points.
**KAMA**: Adapts dynamically to market volatility and confirms trend reversals.
The strategy enters a long position when the Supertrend indicates an uptrend and the price is above the KAMA. It exits when the Supertrend switches to a downtrend and the price is below the KAMA, minimizing losses or protecting profits.
AlphaEdge Crypto Tracker [CHE]AlphaEdge Crypto Tracker
This tool is my Christmas gift to all traders. I wish you all a Merry Christmas and successful trades in the coming year!
Efficiently Identify Top Performers and Underperformers Among 40 Crypto Assets at a Glance
In the fast-paced world of cryptocurrency trading, staying ahead requires the ability to quickly assess the performance of multiple assets simultaneously. AlphaEdge Crypto Tracker is an advanced Pine Script™ indicator designed for TradingView that empowers traders to effortlessly monitor and evaluate 40 different crypto assets in real-time.
Why It’s Important to Identify Winners and Losers Among 40 Assets at a Glance:
1. Time Efficiency: Managing a diverse portfolio can be overwhelming. With AlphaEdge Crypto Tracker, traders can swiftly identify which assets are performing exceptionally well (winners) and which are underperforming (losers) without the need to analyze each asset individually.
2. Informed Decision-Making: By having a clear overview of top gainers and losers, traders can make strategic decisions such as reallocating investments, taking profits, or cutting losses, thereby optimizing their trading strategies.
3. Risk Management: Quickly spotting underperforming assets helps in mitigating potential losses and adjusting positions to maintain a balanced and profitable portfolio.
4. Opportunity Identification: Recognizing top-performing assets allows traders to capitalize on emerging trends and maximize their returns by focusing on the most promising opportunities.
Key Features of AlphaEdge Crypto Tracker :
- Comprehensive Asset Tracking: Monitors 40 crypto assets simultaneously, providing a broad view of the market landscape.
- Max Gain and Adjusted Max Loss Calculations: Utilizes a 14-bar (configurable) period to calculate the highest gains and the adjusted maximum losses for each asset, offering insights into potential profitability and risk.
- Dynamic Ranking: Automatically sorts and ranks assets based on their performance, highlighting the top 10 gainers and top 10 losers for easy comparison.
- Customizable Display:
- Table Settings: Adjust the size, position, and colors of the performance table to fit your chart layout.
- Interactive Tooltips: Hover over asset names to view detailed tooltips, enhancing usability and information accessibility.
- Visual Alerts: Changes in asset performance are visually indicated through background color updates, allowing for immediate recognition of significant shifts.
- User-Friendly Interface: Intuitive table layout with clear headers and organized data presentation, making it easy for traders of all levels to interpret the information.
How It Works:
1. Data Calculation: For each of the 40 tracked assets, AlphaEdge Crypto Tracker calculates the maximum gain and adjusted maximum loss over the defined trading period.
2. Sorting and Ranking: The assets are sorted based on their maximum gains and adjusted maximum losses, automatically updating to reflect the latest market movements.
3. Real-Time Display: The top 10 gainers and losers are displayed in a neatly organized table directly on your TradingView chart, providing immediate visual insights.
4. Customization: Users can tailor the tracking period, select specific assets to monitor, and adjust the table’s appearance to match their trading style and preferences.
Conclusion:
AlphaEdge Crypto Tracker is an essential tool for cryptocurrency traders seeking to enhance their market analysis and decision-making processes. By providing a comprehensive and customizable overview of multiple assets, it enables traders to efficiently identify profitable opportunities and manage risks effectively. Whether you’re a seasoned trader or just starting, AlphaEdge Crypto Tracker equips you with the insights needed to navigate the dynamic crypto market with confidence.
Get Started Today:
Integrate AlphaEdge Crypto Tracker into your TradingView setup and take control of your crypto trading strategy with unparalleled clarity and precision.
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.
License Information:
This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0. You can view the full license (mozilla.org).
© chervolino
Winter Is Coming (Snowflake)While attempting to draw a star using Pine Script, I ended up creating another nonsense indicator 🙂
How to Draw a Dynamic Snowflake? 🤦♂️
This indicator provides a customizable snowflake pattern that can be displayed on either a linear or logarithmic chart. Users can change the number of vertices and notches to make the pattern dynamic and versatile. (For added fun, the skull emojis that appear on each tick can be replaced with other symbols, like 🍺—because, hey, it’s Christmas!)
What Can You Learn?
Curious users analyzing this script can uncover practical answers to these questions:
How can line and label drawings be constructed using array functions?
How can trigonometric and logarithmic calculations be implemented effectively?
Details:
The snowflake is composed of symmetrical branches radiating from a central point. Each branch includes adjustable notches along its length, allowing users to control both their count and spacing. At the center of the snowflake, an n-point star is drawn (parameter: gon). This star's outer and inner vertices are aligned with the notches, ensuring perfect harmony with the snowflake’s overall geometry. The star is evenly spaced, with each of its points separated by 360/n degrees, resulting in a visually balanced and symmetrical design.
Best Wishes
I hope 2025 will be the year when we can create more peace, more freedom and more time to drink beer for the whole planet! Happy New Year everyone!
Demo GPT - Bull Market Support BandAI generated pinescript 6 strategy of buying and selling based on Bull Market Support Band. Buy when EMAs cross upward while sell when EMAs cross downward.
AlphaEdge Crypto Tracker [CHE]AlphaEdge Crypto Tracker
Efficiently Identify Top Performers and Underperformers Among 40 Crypto Assets at a Glance
In the fast-paced world of cryptocurrency trading, staying ahead requires the ability to quickly assess the performance of multiple assets simultaneously. AlphaEdge Crypto Tracker is an advanced Pine Script™ indicator designed for TradingView that empowers traders to effortlessly monitor and evaluate 40 different crypto assets in real-time.
This tool is my Christmas gift to all traders. I wish you all a Merry Christmas and successful trades in the coming year!
Why It’s Important to Identify Winners and Losers Among 40 Assets at a Glance:
1. Time Efficiency: Managing a diverse portfolio can be overwhelming. With AlphaEdge Crypto Tracker, traders can swiftly identify which assets are performing exceptionally well (winners) and which are underperforming (losers) without the need to analyze each asset individually.
2. Informed Decision-Making: By having a clear overview of top gainers and losers, traders can make strategic decisions such as reallocating investments, taking profits, or cutting losses, thereby optimizing their trading strategies.
3. Risk Management: Quickly spotting underperforming assets helps in mitigating potential losses and adjusting positions to maintain a balanced and profitable portfolio.
4. Opportunity Identification: Recognizing top-performing assets allows traders to capitalize on emerging trends and maximize their returns by focusing on the most promising opportunities.
Key Features of AlphaEdge Crypto Tracker :
- Comprehensive Asset Tracking: Monitors 40 crypto assets simultaneously, providing a broad view of the market landscape.
- Max Gain and Adjusted Max Loss Calculations: Utilizes a 14-bar (configurable) period to calculate the highest gains and the adjusted maximum losses for each asset, offering insights into potential profitability and risk.
- Dynamic Ranking: Automatically sorts and ranks assets based on their performance, highlighting the top 10 gainers and top 10 losers for easy comparison.
- Customizable Display:
- Table Settings: Adjust the size, position, and colors of the performance table to fit your chart layout.
- Interactive Tooltips: Hover over asset names to view detailed tooltips, enhancing usability and information accessibility.
- Visual Alerts: Changes in asset performance are visually indicated through background color updates, allowing for immediate recognition of significant shifts.
- User-Friendly Interface: Intuitive table layout with clear headers and organized data presentation, making it easy for traders of all levels to interpret the information.
How It Works:
1. Data Calculation: For each of the 40 tracked assets, AlphaEdge Crypto Tracker calculates the maximum gain and adjusted maximum loss over the defined trading period.
2. Sorting and Ranking: The assets are sorted based on their maximum gains and adjusted maximum losses, automatically updating to reflect the latest market movements.
3. Real-Time Display: The top 10 gainers and losers are displayed in a neatly organized table directly on your TradingView chart, providing immediate visual insights.
4. Customization: Users can tailor the tracking period, select specific assets to monitor, and adjust the table’s appearance to match their trading style and preferences.
Conclusion:
AlphaEdge Crypto Tracker is an essential tool for cryptocurrency traders seeking to enhance their market analysis and decision-making processes. By providing a comprehensive and customizable overview of multiple assets, it enables traders to efficiently identify profitable opportunities and manage risks effectively. Whether you’re a seasoned trader or just starting, AlphaEdge Crypto Tracker equips you with the insights needed to navigate the dynamic crypto market with confidence.
Get Started Today:
Integrate AlphaEdge Crypto Tracker into your TradingView setup and take control of your crypto trading strategy with unparalleled clarity and precision.
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.
License Information:
This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0. You can view the full license (mozilla.org).
© chervolino
AmirAli ShiraniBacktest within Specific Date Range . This is a test for understanding it work or not
PineTree-Colors-V6Merry Christmas!!!
This is PineScript Version Tree in COLORS....as a Pine Tree (Christmas Tree) !!! This is how it all started from Version1 (V1) to Version 6 (V6) and on and on....
Enjoy :)
Weekly and daily separators - MKThis indicator is designed to provide easier usability and greater customization for traders. The update brings enhanced stability and reliability in detecting day, week, and month changes across various timeframes, ensuring consistent and accurate visuals on your charts.
Key Features:
Time Zone Customization: Select the time zone to determine when session changes are marked.
Adjustable Line Coverage: Lines can now be customized to only partially cover the top and bottom of the chart, offering a cleaner look.
Optional Labels: Enable labels to display the starting month, calendar week, or day. Day formats include:
Weekday name
Date in formats: dd.MM or MM.dd
Visual Enhancements:
Default line widths and colors now use an orange hue for better visibility.
Added a monthly separator line for better long-term trend tracking.
Higher time frame color options for clarity.
Independent customization of line styles and widths.
Additional Improvements:
Ability to hide daily lines on daily charts and higher timeframes. Similarly, weekly lines can be hidden on weekly charts and higher.
Secondary line width for weekly separators on daily and higher timeframes, ensuring cleaner chart aesthetics.
Updated color selection and default values for better readability.
Buyers VS Sellers V6changed the old v3 version indikator witch chat gpt to make it work with pinescript v6
SSL Channel Indicator V6changed the old v3 version indikator witch chat gpt to make it work with pinescript v6
Santa's Secrets | FractalystSanta’s Secrets is a visually engaging trading tool that infuses holiday cheer into your charts. Inspired by the enchanting, mysterious vibes of the holiday season, this indicator overlays price charts with dynamic, multi-colored glitches that sync with market data, delivering a festive and whimsical visual experience.
The indicator brings a magical touch to your charts, featuring characters from classic holiday themes (e.g., Santa, reindeer, snowflakes, gift boxes) to create a fun and festive “glitch effect.” Users can select a theme for their matrix characters, adding a holiday twist to their trading visuals. As the market data moves, these themed characters are randomly picked and displayed on the chart in a colorful cascade.
Underlying Calculations and Logic
1.Character Management:
The indicator uses arrays to manage different sets of holiday-themed characters, such as Santa’s sleigh, snowflakes, and reindeer. These arrays allow dynamic selection and update of characters as the market moves, mimicking a festive glitch effect.
2. Current and Previous States:
Arrays track the current and previous states of characters, ensuring smooth transitions between visual updates. This dual-state management enables the effects to look like a magical, continuous movement, just like Santa’s sleigh cruising through the winter night.
3. Transparency Control:
Transparency levels are controlled through arrays, adjusting opacity to create subtle fading effects or more intense visual appearances. The result is a festive glow that can fade or intensify depending on the market’s volatility.
4. Rain Effect Simulation:
To create the “snowfall” or “glitching lights” effect, the indicator manages arrays that simulate falling characters, like snowflakes or candy canes, continuously updating their position and visibility. As new characters enter the top of the screen, older ones disappear from the bottom, with fading transparency to simulate a seamless flow.
5. Operational Flow:
• Initialization: Arrays initialize the characters and transparency controls, readying the script for smooth and continuous updates during trading.
• Updates: During each cycle, new characters are selected and the old ones shift, with updates in both content and appearance ensuring the matrix effect is visually appealing.
• Rendering: The arrays control how the characters are rendered, ensuring the magical holiday effect stays lively and eye-catching without interrupting the trading flow.
How to Use Santa’s Secrets Indicator
1. Apply the Indicator to Your Charts:
Add the Santa’s Secrets indicator to your chart, activating the holiday-themed visual effect on your selected trading instrument or time frame.
2. Select Your Holiday Theme:
In the settings, choose the holiday theme or character set. Whether it’s Santa’s sleigh, reindeer, snowflakes, or gift boxes, pick the one that brings the most festive cheer to your charts.
3. Choose Your Visual Effect (Snowfall or Glitch Burst):
Select between the “Snowfall” effect, where characters gently drift down the chart like snowflakes, or the “Glitch Burst” effect, where characters explode outward in a burst of holiday cheer, representing bursts of market volatility.
4. Adjust the Color for Holiday Vibes:
Customize the color of the characters to match your chart’s aesthetic or reflect different market conditions. Choose from red for a downtrend, green for an uptrend, or opt for a gradient of colors to capture a true holiday spirit.
5. Fit the Matrix to Your Display:
Adjust the width and height of the matrix display to make sure it fits perfectly with your chart layout. Ensure it doesn’t obscure your view while still providing the holiday-themed magic.
What Makes Santa’s Secrets Indicator Unique?
Holiday Theme Selection:
Santa’s Secrets allows traders to choose from a variety of holiday-themed characters. Whether you prefer the traditional Santa’s sleigh, snowflakes, reindeer, or gift boxes, you can bring the festive spirit into your trading. This personalized touch adds a fun, holiday twist to your charts and keeps you engaged during the festive season.
Dynamic Effects:
Choose between two exciting visual modes – Snowfall Mode or Glitch Burst Mode. The Snowfall Mode brings a gentle, peaceful effect with characters cascading down the chart like snowflakes, while Glitch Burst Mode creates a more intense effect, radiating characters outward in an explosive, holiday-themed display.
Customizable Holiday Colors:
Traders can fully customize the color of the matrix characters to match their trading environment. Whether you want a traditional red and green for a Christmas mood or a blue and white snow effect, Santa’s Secrets allows you to create the perfect holiday atmosphere while you trade.
Universal Display Compatibility:
No matter what screen or device you’re using – whether it’s a large monitor, laptop, or mobile – Santa’s Secrets is fully adjustable to fit your screen size. The holiday effect remains visually striking without compromising the integrity of your chart data.
Wishing you a happy year filled with success, growth, and profitable trades.🎅🎁
Let's kick off the new year strong with Santa's Secrets! 🚀🎄
Vertical Lines OverlayVertical Lines Overlay with Custom Time Inputs
This script allows users to draw vertical lines on their charts at specific times of the day, providing a customizable tool for marking key events, session changes, or any other time-based analysis.
Features:
Customizable Time Inputs: Set up to 6 distinct times (hours and minutes) to draw vertical lines.
Line Style Options: Choose between solid, dotted, or dashed line styles for each line.
Line Width Control: Adjust the thickness of each line individually.
Color Selection: Assign unique colors to each vertical line for better visibility and organization.
Dynamic Time Offsets: Adjust line positions with predefined time offsets, ensuring compatibility across different trading instruments and time zones.
Automatic Line Drawing: Lines are plotted automatically at the specified times if the conditions are met.
How to Use:
Open the settings panel by clicking the gear icon.
Enable or disable each line by toggling the respective checkboxes.
Set the desired time for each line using the hour and minute inputs.
Customize line styles, widths, and colors for each line.
Optionally, apply a time offset based on your trading instrument or preference.
Divine Christmas Tree [Daveatt]🎄 Divine Christmas Tree - Because Even Your Charts Deserve Holiday FOMO! 🎅
Ever felt like your trading charts were missing that special holiday spirit? Tired of staring at boring candlesticks while everyone else is decorating their houses? Well, hold onto your eggnog because this indicator is about to turn your TradingView into a festive party! 🎉
Introducing the Divine Christmas Tree - the only technical indicator that makes your losses look festive! This isn't your grandmother's Christmas tree... it's a high-tech, market-aware celebration that would make Wall Street jealous.
🌟 What's Inside This Gift Box:
- A tree that changes color based on price action (because even Christmas trees need to respect the 200 SMA!)
- Ornaments that dance around like your portfolio after a Fed announcement
- A Santa who's definitely not checking if your trades were naughty or nice
- Presents under the tree (sorry, they don't contain trading tips)
- Random ornament placement that's more unpredictable than crypto prices
The best part? The ornaments refresh constantly, giving you something fun to watch while you're waiting for that breakout that'll never come! 😅
WARNING: This indicator may cause:
- Uncontrollable holiday cheer
- Sudden urges to buy Santa Coin
- Confusion among serious traders
- Desperate attempts to explain to your spouse why you're watching a Christmas tree on your trading screen
Perfect for:
- Traders who need emotional support during December
- Anyone who wants to pretend they're working while actually watching Christmas decorations
- People who believe Santa Claus is the ultimate swing trader
Remember: Just because your portfolio is in red doesn't mean your Christmas tree has to be! 🎄
Not financial advice, but definitely festive advice! 🎅
Future Interest Indexed by AssetEste script em Pine Script calcula e exibe o índice dos juros futuros (DI1) em relação ao preço de um ativo, utilizando o preço de fechamento do ativo e a taxa de juros futuros (DI1). O cálculo é realizado dividindo a taxa de juros pelos preços do ativo, resultando no índice indice_juros. Para evitar a divisão por zero, o script verifica se o preço do ativo é válido e não nulo. O índice calculado é então plotado em um painel inferior no gráfico, representado por uma linha azul, permitindo aos usuários observar a relação entre a taxa de juros futuros e o preço do ativo de forma clara e intuitiva.
This Pine Script script calculates and displays the future interest rate (DI1) in relation to the price of an asset, using the asset's closing price and the future interest rate (DI1). The calculation is carried out by dividing the interest rate by the asset prices, resulting in the index_interest index. To avoid division by zero, the script checks that the asset's price is valid and not null. The calculated index is then plotted in a lower panel on the chart, represented by a blue line, allowing users to observe the relationship between the future interest rate and the asset price clearly and intuitively.
Asset Indexed by Future Interest
Este script em Pine Script calcula e exibe o índice de um ativo em relação à taxa de juros futuros (DI1) em um painel inferior. Ele obtém o preço de fechamento do ativo e a taxa de juros futuros DI1!, e em seguida, calcula o índice do ativo dividindo o preço do ativo pela taxa de juros futuros. Para evitar a divisão por zero, o script realiza uma validação para garantir que o valor da taxa de juros não seja nulo ou zero. O índice calculado é então plotado no painel inferior, em uma linha verde, permitindo que os usuários visualizem a relação entre o preço do ativo e os juros futuros de curto prazo. Esse índice pode ser útil para analisar como a taxa de juros influencia o comportamento do ativo.
This script in Pine Script calculates and displays the ratio of an asset to the future interest rate (DI1) in a lower panel. It obtains the asset's closing price and the future interest rate DI1!, and then calculates the asset index by dividing the asset price by the future interest rate. To avoid division by zero, the script performs validation to ensure that the interest rate value is not null or zero. The calculated index is then plotted in the bottom panel, in a green line, allowing users to visualize the relationship between the asset's price and short-term future interest. This index can be useful for analyzing how the interest rate influences the asset's behavior.
12 Month Difference - YoY ComparisonEste script foi desenvolvido para calcular e exibir a variação percentual do preço de um ativo nos últimos 12 meses, de forma simples e visual. Ele utiliza dados históricos de preços e apresenta o resultado diretamente no gráfico, permitindo ao usuário acompanhar a relação entre o valor atual e o valor de 12 meses atrás.
O cálculo é baseado em um período de 12 meses, que equivale a 252 dias úteis no mercado financeiro. O script primeiro identifica o preço atual do ativo e o compara com o preço registrado há exatamente 252 dias úteis. A diferença entre esses dois valores é transformada em uma variação percentual, o que facilita a análise de desempenho do ativo ao longo do período.
Além disso, o script define uma cor para destacar o resultado:
Verde, se a variação percentual for positiva (indicando crescimento).
Vermelho, se a variação for negativa (indicando queda).
O valor calculado é exibido de forma prática no canto inferior direito do gráfico, como uma tabela flutuante. Essa tabela contém o texto "Relação 12M" e o valor percentual correspondente, permitindo uma leitura rápida.
Embora o resultado seja calculado para todos os momentos no gráfico, ele é mostrado apenas como uma tabela no último ponto confirmado da série histórica, ou seja, no momento mais recente com dados disponíveis. Além disso, o script inclui o valor da relação na legenda do gráfico, mas ele está oculto visualmente para evitar sobrecarregar o layout.
Esse indicador é útil para analisar rapidamente o desempenho de um ativo ao longo de um ano, ajudando investidores e analistas a entenderem tendências e mudanças no mercado.
This script was developed to calculate and display the percentage change in the price of an asset over the last 12 months, in a simple and visual way. It uses historical price data and displays the result directly on the chart, allowing the user to monitor the relationship between the current value and the value from 12 months ago.
The calculation is based on a 12-month period, which is equivalent to 252 business days in the financial market. The script first identifies the current price of the asset and compares it with the price recorded exactly 252 business days ago. The difference between these two values is transformed into a percentage change, which makes it easier to analyze the asset's performance over the period.
In addition, the script defines a color to highlight the result:
Green, if the percentage change is positive (indicating growth).
Red, if the change is negative (indicating a decline).
The calculated value is displayed conveniently in the bottom right corner of the chart, as a floating table. This table contains the text "12M Ratio" and the corresponding percentage value, allowing for quick reading.
Although the result is calculated for all points in time on the chart, it is only displayed as a table at the last confirmed point in the historical series, i.e. the most recent point in time with available data. In addition, the script includes the ratio value in the chart legend, but it is visually hidden to avoid cluttering the layout.
This indicator is useful for quickly analyzing the performance of an asset over a year, helping investors and analysts understand trends and changes in the market.
First day candle high and low of monthThis script is designed to mark the high and low levels of the first candle of each month on the chart. These levels are often considered significant support and resistance zones, as they can represent key liquidity points in the market.
The idea behind this tool is based on the observation that the low of the first monthly candle can act as a critical support level, especially during a bullish market trend. If the price breaks below this low in a bull market, it may indicate a potential manipulation or stop-loss hunting rather than a genuine shift in trend. Similarly, the high of the first monthly candle may serve as a key resistance level, particularly in consolidating or range-bound markets.
By dynamically plotting these levels, the script provides traders with valuable insights into potential liquidity zones and significant market reactions. It allows for customizable line colors and lengths, making it adaptable to various trading styles and preferences.
This tool is particularly useful for traders who wish to align their strategies with institutional market behaviors, as it highlights areas where liquidity is likely to be targeted. Use it as part of your broader analysis to identify potential trade setups, manage risk effectively, and understand market dynamics more comprehensively.
Watermark with dynamic variables [BM]█ OVERVIEW
This indicator allows users to add highly customizable watermark messages to their charts. Perfect for branding, annotation, or displaying dynamic chart information, this script offers advanced customization options including dynamic variables, text formatting, and flexible positioning.
█ CONCEPTS
Watermarks are overlay messages on charts. This script introduces placeholders — special keywords wrapped in % signs — that dynamically replace themselves with chart-related data. These watermarks can enhance charts with context, timestamps, or branding.
█ FEATURES
Dynamic Variables : Replace placeholders with real-time data such as bar index, timestamps, and more.
Advanced Customization : Modify text size, color, background, and alignment.
Multiple Messages : Add up to four independent messages per group, with two groups supported (A and B).
Positioning Options : Place watermarks anywhere on the chart using predefined locations.
Timezone Support : Display timestamps in a preferred timezone with customizable formats.
█ INPUTS
The script offers comprehensive input options for customization. Each Watermark (A and B) contains identical inputs for configuration.
Watermark settings are divided into two levels:
Watermark-Level Settings
These settings apply to the entire watermark group (A/B):
Show Watermark: Toggle the visibility of the watermark group on the chart.
Position: Choose where the watermark group is displayed on the chart.
Reverse Line Order: Enable to reverse the order of the lines displayed in Watermark A.
Message-Level Settings
Each watermark contains up to four configurable messages. These messages can be independently customized with the following options:
Message Content: Enter the custom text to be displayed. You can include placeholders for dynamic data.
Text Size: Select from predefined sizes (Tiny, Small, Normal, Large, Huge) or specify a custom size.
Text Alignment and Colors:
- Adjust the alignment of the text (Left, Center, Right).
- Set text and background colors for better visibility.
Format Time: Enable time formatting for this watermark message and configure the format and timezone. The settings for each message include message content, text size, alignment, and more. Please refer to Formatting dates and times for more details on valid formatting tokens.
█ PLACEHOLDERS
Placeholders are special keywords surrounded by % signs, which the script dynamically replaces with specific chart-related data. These placeholders allow users to insert dynamic content, such as bar information or timestamps, into watermark messages.
Below is the complete list of currently available placeholders:
bar_index , barstate.isconfirmed , barstate.isfirst , barstate.ishistory , barstate.islast , barstate.islastconfirmedhistory , barstate.isnew , barstate.isrealtime , chart.is_heikinashi , chart.is_kagi , chart.is_linebreak , chart.is_pnf , chart.is_range , chart.is_renko , chart.is_standard , chart.left_visible_bar_time , chart.right_visible_bar_time , close , dayofmonth , dayofweek , dividends.future_amount , dividends.future_ex_date , dividends.future_pay_date , earnings.future_eps , earnings.future_period_end_time , earnings.future_revenue , earnings.future_time , high , hl2 , hlc3 , hlcc4 , hour , last_bar_index , last_bar_time , low , minute , month , ohlc4 , open , second , session.isfirstbar , session.isfirstbar_regular , session.islastbar , session.islastbar_regular , session.ismarket , session.ispostmarket , session.ispremarket , syminfo.basecurrency , syminfo.country , syminfo.currency , syminfo.description , syminfo.employees , syminfo.expiration_date , syminfo.industry , syminfo.main_tickerid , syminfo.mincontract , syminfo.minmove , syminfo.mintick , syminfo.pointvalue , syminfo.prefix , syminfo.pricescale , syminfo.recommendations_buy , syminfo.recommendations_buy_strong , syminfo.recommendations_date , syminfo.recommendations_hold , syminfo.recommendations_sell , syminfo.recommendations_sell_strong , syminfo.recommendations_total , syminfo.root , syminfo.sector , syminfo.session , syminfo.shareholders , syminfo.shares_outstanding_float , syminfo.shares_outstanding_total , syminfo.target_price_average , syminfo.target_price_date , syminfo.target_price_estimates , syminfo.target_price_high , syminfo.target_price_low , syminfo.target_price_median , syminfo.ticker , syminfo.tickerid , syminfo.timezone , syminfo.type , syminfo.volumetype , ta.accdist , ta.iii , ta.nvi , ta.obv , ta.pvi , ta.pvt , ta.tr , ta.vwap , ta.wad , ta.wvad , time , time_close , time_tradingday , timeframe.isdaily , timeframe.isdwm , timeframe.isintraday , timeframe.isminutes , timeframe.ismonthly , timeframe.isseconds , timeframe.isticks , timeframe.isweekly , timeframe.main_period , timeframe.multiplier , timeframe.period , timenow , volume , weekofyear , year
█ HOW TO USE
1 — Add the Script:
Apply "Watermark with dynamic variables " to your chart from the TradingView platform.
2 — Configure Inputs:
Open the script settings by clicking the gear icon next to the script's name.
Customize visibility, message content, and appearance for Watermark A and Watermark B.
3 — Utilize Placeholders:
Add placeholders like %bar_index% or %timenow% in the "Watermark - Message" fields to display dynamic data.
Empty lines in the message box are reflected on the chart, allowing you to shift text up or down.
Using in the message box translates to a new line on the chart.
4 — Preview Changes:
Adjust settings and view updates in real-time on your chart.
█ EXAMPLES
Branding
DodgyDD's charts
Debugging
█ LIMITATIONS
Only supports variables defined within the script.
Limited to four messages per watermark.
Visual alignment may vary across different chart resolutions or zoom levels.
Placeholder parsing relies on correct input formatting.
█ NOTES
This script is designed for users seeking enhanced chart annotation capabilities. It provides tools for dynamic, customizable watermarks but is not a replacement for chart objects like text labels or drawings. Please ensure placeholders are properly formatted for correct parsing.
Additionally, this script can be a valuable tool for Pine Script developers during debugging . By utilizing dynamic placeholders, developers can display real-time values of variables and chart data directly on their charts, enabling easier troubleshooting and code validation.
Up and Downwhat is "Up and Down"?
It is an indicator designed to show you in detail on the chart and warn you when there is an increase or decrease in the market at a level that you consider important.
what it does?
When the price difference between a top and bottom is greater than the level you selected (the default input is 10 percent), it indicates this along with the percentage value on the chart. Then, it indicates the start and end points with lines so that you can see the change from where to where. It shows the price's current percentage distance from the last bottom or top in the upper right corner.
it also colors the candles so you can better understand how fast the price is moving. The greener the candles, the stronger the rise, and conversely, the greater the decline, the redder the candles. Of course, if you set an alarm, it will tell you in which trading pair, in which time period, at what percentage and in which direction there is a movement.
how it does it?
It uses a moving average with a short length to find bottoms and tops. It then measures the distance from the last peak to the bottom and expresses it as a percentage. It uses momentum using the moving average as a source to paint the candles. To compress this momentum between the values 255 and 0, I used a formula that I also used in my limited fisher transform work (because the inputs in the color.rgb function take values between 0 and 255). It was a bit challenging to use the lines correctly, but with the "ta.valuewhen" function and a little experimenting, they were I made sure they were drawn correctly.
how to use it?
It is quite simple to use. First, select the minimum interval you want to receive alarms. If you make this value too high, you will not receive any alarms; if you make it too low, you will receive too many alarms. Choose the range that will benefit you most for the trading pair you are using. Then all you have to do is set an alarm. When you set an alarm, leave the note section blank and the indicator will send you the necessary information.
R-based Strategy Template [Daveatt]Have you ever wondered how to properly track your trading performance based on risk rather than just profits?
This template solves that problem by implementing R-multiple tracking directly in TradingView's strategy tester.
This script is a tool that you must update with your own trading entry logic.
Quick notes
Before we dive in, I want to be clear: this is a template focused on R-multiple calculation and visualization.
I'm using a basic RSI strategy with dummy values just to demonstrate how the R tracking works. The actual trading signals aren't important here - you should replace them with your own strategy logic.
R multiple logic
Let's talk about what R-multiple means in practice.
Think of R as your initial risk per trade.
For instance, if you have a $10,000 account and you're risking 1% per trade, your 1R would be $100.
A trade that makes twice your risk would be +2R ($200), while hitting your stop loss would be -1R (-$100).
This way of measuring makes it much easier to evaluate your strategy's performance regardless of account size.
Whenever the SL is hit, we lose -1R
Proof showing the strategy tester whenever the SL is hit: i.imgur.com
The magic happens in how we calculate position sizes.
The script automatically determines the right position size to risk exactly your specified percentage on each trade.
This is done through a simple but powerful calculation:
risk_amount = (strategy.equity * (risk_per_trade_percent / 100))
sl_distance = math.abs(entry_price - sl_price)
position_size = risk_amount / (sl_distance * syminfo.pointvalue)
Limitations with lower timeframe gaps
This ensures that if your stop loss gets hit, you'll lose exactly the amount you intended to risk. No more, no less.
Well, could be more or less actually ... let's assume you're trading futures on a 15-minute chart but in the 1-minute chart there is a gap ... then your 15 minute SL won't get filled and you'll likely to not lose exactly -1R
This is annoying but it can't be fixed - and that's how trading works anyway.
Features
The template gives you flexibility in how you set your stop losses. You can use fixed points, ATR-based stops, percentage-based stops, or even tick-based stops.
Regardless of which method you choose, the position sizing will automatically adjust to maintain your desired risk per trade.
To help you track performance, I've added a comprehensive statistics table in the top right corner of your chart.
It shows you everything you need to know about your strategy's performance in terms of R-multiples: how many R you've won or lost, your win rate, average R per trade, and even your longest winning and losing streaks.
Happy trading!
And remember, measuring your performance in R-multiples is one of the most classical ways to evaluate and improve your trading strategies.
Daveatt