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! 🎅
Pine utilities
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! 🚀🎄
Scalping BTC Ottimizzato - Grafica Chiara---
Scalping BTC Optimized Strategy – Clear Visualization and Dynamic Risk Management
Overview:
The Scalping BTC Optimized Strategy is designed for high-frequency trading on Bitcoin using a 15-minute timeframe. It combines key technical indicators to maximize trading efficiency while maintaining clear visual cues and dynamic risk management.
Key Indicators Used:
1. EMA (Exponential Moving Averages)
- EMA Fast (9 periods): Tracks short-term price momentum.
- EMA Slow (21 periods): Identifies long-term trend direction.
- Purpose: EMA crossovers generate Long and Short signals.
2. RSI (Relative Strength Index)
- Length: 14 periods
- Overbought Level: 70
- Oversold Level: 30
- Purpose: Filters trades in extreme price conditions.
3. ADX (Average Directional Index)
- Length: 14 periods
- Smoothing: 14 periods
- Threshold: 20
- Purpose: Confirms if the market is trending strongly to avoid false signals.
4. ATR (Average True Range)
- Length: 14 periods
- Stop Loss Multiplier: 1.5x ATR
- Take Profit Multiplier: 2.0x ATR
- Purpose: Dynamically adjusts Stop Loss and Take Profit levels based on market volatility.
How the Strategy Works:
1. Long Entry:
- Condition: EMA Fast crosses above EMA Slow.
- Filter: RSI is below 70, ADX is above 20.
- Execution: Place Long order with ATR-based Stop Loss and Take Profit.
2. Short Entry:
- Condition: EMA Fast crosses below EMA Slow.
- Filter: RSI is above 30, ADX is above 20.
- Execution: Place Short order with ATR-based Stop Loss and Take Profit.
3. Exit Rules:
- Positions are automatically closed based on ATR thresholds.
- Manual Exit Trigger: RSI exceeding overbought or oversold levels.
Visual Representation on the Chart:
- EMA Lines: Clearly plotted and anchored to the candles.
- Trade Signals:
- Green Triangles (Long Entry).
- Red Triangles (Short Entry).
- Indicator Panels (Separate):
- RSI Panel: Tracks overbought or oversold zones.
- ADX Panel: Highlights trend strength.
- ATR Panel: Displays market volatility.
Advantages of the Strategy:
- Trend Alignment: EMA crossovers identify trend changes accurately.
- Dynamic Risk Management: ATR adjusts Stop Loss and Take Profit levels based on volatility.
- Momentum Validation: RSI prevents entering overbought or oversold zones.
- Trend Strength Filter: ADX ensures trades are executed in strong trending markets.
- Clear Visualization: Organized layout with distinct panels and chart signals.
Alerts:
Automatic alerts for Long and Short signals ensure you never miss a trading opportunity.
Recommended Settings:
- Timeframe: 15-minute chart
- ATR Multiplier: 1.0–2.5
- ADX Threshold: 20–25
- RSI Length: 7–14
This strategy provides a balanced approach to scalping, combining trend-following signals, momentum filtering, and dynamic risk management. Its clean and intuitive visualization makes it ideal for both manual traders and automated setups.
---
CobynRushs PPO/ADX Pinch StrategyThis tool can help analyze the momentum and trend strength of an asset to identify:
Periods of Strong Trends: Indicated by a high ADX.
Potential Reversals or Breakouts: Highlighted during "pinch zones."
Momentum Shifts: Tracked using the PPO Line, Signal Line, and histogram.
The script uses the asset's closing price to calculate all indicators, providing actionable insights for both short-term and long-term trading strategies.\This Pine Script plots two technical indicators, the Percentage Price Oscillator (PPO) and the Average Directional Index (ADX), for the underlying asset (e.g., stock, forex pair, or cryptocurrency). It helps identify periods of trend strength and potential price "pinch" zones, which can signal consolidations or reversals.
PPO/ADX Pinch Strategy CobyTweak 2 This tool can help analyze the momentum and trend strength of an asset to identify:
Periods of Strong Trends: Indicated by a high ADX.
Potential Reversals or Breakouts: Highlighted during "pinch zones."
Momentum Shifts: Tracked using the PPO Line, Signal Line, and histogram.
The script uses the asset's closing price to calculate all indicators, providing actionable insights for both short-term and long-term trading strategies.\This Pine Script plots two technical indicators, the Percentage Price Oscillator (PPO) and the Average Directional Index (ADX), for the underlying asset (e.g., stock, forex pair, or cryptocurrency). It helps identify periods of trend strength and potential price "pinch" zones, which can signal consolidations or reversals.
5 EMA / 20 EMA Crossover Strategy5 EMA / 20 EMA Crossover Strategy
shortEMA: The 5-period EMA.
longEMA: The 20-period EMA.
ta.crossover(ema5, ema20): This function checks if the 5-period EMA crosses above the 20-period EMA, generating a buy signal.
ta.crossunder(ema5, ema20): This function checks if the 5-period EMA crosses below the 20-period EMA, generating a sell signal.
strategy.entry("Buy", strategy.long): This function enters a long position when a buy signal is triggered.
strategy.close("Buy"): This closes the long position when a sell signal is triggered.
The strategy also includes visual markers (plotshape) to highlight buy and sell signals on the chart with labels "BUY" and "SELL."
XRP/USD Scalping Strategy with Alerts
The strategy in your script is designed for scalping XRP/USD, utilizing a combination of Exponential Moving Averages (EMAs), Relative Strength Index (RSI), Volume analysis, and N-Bar detection to identify potential buy and sell signals. It aims to make quick, small profits by taking advantage of short-term price movements. Here's a detailed breakdown:
Key Components of the Strategy:
Exponential Moving Averages (EMAs):
Short EMA (8-period) and Long EMA (21-period) are used to identify the trend.
A buy signal is generated when the Short EMA crosses above the Long EMA (bullish crossover).
A sell signal is generated when the Short EMA crosses below the Long EMA (bearish crossunder).
Relative Strength Index (RSI):
The RSI (with a 14-period) is used to assess whether the market is in an overbought or oversold condition.
For a long position, the strategy checks if the RSI is above 50 to ensure that the market is not in an oversold condition.
For a short position, the strategy checks if the RSI is below 50, which signals a weaker or bearish market.
Volume Analysis:
The strategy checks if the current volume is greater than the average volume over a defined period (20 bars in this case).
Higher volume indicates stronger market participation and gives more confidence in the signals.
N-Bar Detection:
The strategy uses a custom function to detect the price action of the last n bars.
Bullish N-bars: If the lowest low of the last n_bars is higher than the lowest low of the previous 2*n_bars (indicating a bullish reversal pattern).
Bearish N-bars: If the highest high of the last n_bars is lower than the highest high of the previous 2*n_bars (indicating a bearish reversal pattern).
Buy (Long) Condition:
EMA Crossover: The Short EMA crosses above the Long EMA, indicating a potential upward trend.
RSI > 50: The market is not in an oversold state (indicating that the market is bullish).
Volume > Average Volume: The current volume is higher than the average volume, signaling increased market activity.
Bullish N-bars: The price action of the last n_bars shows a bullish reversal, providing additional confirmation for a buy.
Sell (Short) Condition:
EMA Crossunder: The Short EMA crosses below the Long EMA, indicating a potential downward trend.
RSI < 50: The market is not in an overbought state (indicating that the market is bearish).
Volume > Average Volume: The current volume is higher than the average volume, signaling increased market activity.
Bearish N-bars: The price action of the last n_bars shows a bearish reversal, providing additional confirmation for a sell.
Take Profit and Stop Loss:
The strategy includes a take profit and stop loss mechanism to limit the risk and secure profits.
Take Profit: Set at 1.5% of the entry price.
Stop Loss: Set at 0.7% of the entry price.
Alerts:
The strategy has alerts for both buy and sell signals.
When the buy or sell conditions are met, it triggers an alert, sending notifications (pop-up, email, etc.) to the user.
Summary of the Strategy:
Trend Following with EMA: The strategy relies on the crossover of short and long EMAs to determine the trend direction.
Momentum Analysis with RSI: The RSI confirms that the market is not overbought or oversold, ensuring that the trade is made in favorable conditions.
Volume Confirmation: Only signals with increased market participation (higher volume than the average) are considered valid.
Reversal Patterns with N-bars: The N-bar detection adds a layer of confirmation for potential reversals, improving the accuracy of entry signals.
Risk Management: The take profit and stop loss levels are designed to capture small, profitable moves while protecting from large losses.
This scalping strategy aims for quick, small profits with controlled risk, making it suitable for highly liquid markets like XRP/USD. The use of EMAs, RSI, volume analysis, and N-bar patterns increases the reliability of the signals and helps minimize false entries.
Supply and Demand with Stochastic DivergenceI've developed a Pine Script strategy that combines the power of supply and demand zone analysis with divergence detection using the Stochastic RSI. This script identifies potential trading opportunities based on the confluence of these two powerful technical analysis concepts.
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.
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
Extended Support and Resistance LevelsIndicator: Extended Support and Resistance Levels
This Pine Script indicator dynamically calculates support and resistance levels based on recent price action and projects these levels into the future.
Support is determined by the lowest low over a user-defined period, while Resistance is defined by the highest high over the same period.
The indicator draws lines at the calculated support and resistance levels and extends them into the future, allowing traders to visualize potential future levels where price might react.
The extension of these lines helps in identifying areas where price may respect support or resistance in the upcoming bars.
The user can adjust the period for support/resistance calculation and the number of bars for projection, providing flexibility to adapt to different timeframes and market conditions.
This tool is ideal for traders looking to anticipate future key price levels based on historical price data, helping with decision-making on potential entry or exit points.
FIR Low Pass Filter Suite (FIR)The FIR Low Pass Filter Suite is an advanced signal processing indicator that applies finite impulse response (FIR) filtering techniques to price data. At its core, the indicator uses windowed-sinc filtering, which provides optimal frequency response characteristics for separating trend from noise in financial data.
The indicator offers multiple window functions including Kaiser, Kaiser-Bessel Derived (KBD), Hann, Hamming, Blackman, Triangular, and Lanczos. Each window type provides different trade-offs between main-lobe width and side-lobe attenuation, allowing users to fine-tune the frequency response characteristics of the filter. The Kaiser and KBD windows provide additional control through an alpha parameter that adjusts the shape of the window function.
A key feature is the ability to operate in either linear or logarithmic space. Logarithmic filtering can be particularly appropriate for financial data due to the multiplicative nature of price movements. The indicator includes an envelope system that can adaptively calculate bands around the filtered price using either arithmetic or geometric deviation, with separate controls for upper and lower bands to account for the asymmetric nature of market movements.
The implementation handles edge effects through proper initialization and offers both centered and forward-only filtering modes. Centered mode provides zero phase distortion but introduces lag, while forward-only mode operates causally with no lag but introduces some phase distortion. All calculations are performed using vectorized operations for efficiency, with carefully designed state management to handle the filter's warm-up period.
Visual feedback is provided through customizable color gradients that can reflect the current trend direction, with optional glow effects and background fills to enhance visibility. The indicator maintains high numerical precision throughout its calculations while providing smooth, artifact-free output suitable for both analysis and visualization.
Lanczos CandlesThis indicator reconstructs price action using Lanczos resampling, incorporating lower timeframe data to create a more detailed representation of market movements. Traditional candle aggregation on higher timeframes tends to lose some price action detail - this indicator attempts to preserve more of that information through mathematical resampling.
The indicator samples price data from a lower timeframe and uses the Lanczos algorithm, a mathematical method commonly used in signal processing and image resampling, to reconstruct the price series at the chart's timeframe. The process helps maintain price movements that might otherwise be smoothed out in regular candle aggregation.
The main settings allow you to select the source timeframe for sampling, adjust the Lanczos filter width to balance smoothness versus detail preservation, and optionally enable Heikin Ashi calculation. The filter width parameter (default: 3) affects how aggressive the smoothing is - higher values produce smoother results while lower values retain more of the original variation.
This approach can be useful for technical analysis when you want to work with higher timeframes while maintaining awareness of significant price movements that occurred within those candles. The optional Heikin Ashi mode can help visualize trends in the resampled data.
The indicator works best when there's a clear ratio between your chart timeframe and the source timeframe (for example, using 1-minute data to build 5-minute candles).
Calculate Order Entry Units based on set Dollar ValuesFUNCTIONS
- Calculate UNITS quantity based on user's input dollar values.
- Show Units in table
USAGE
- Enter 6 usual order $ values
- Use units value in order entry
Tradingview doesn't have order entry in dollar value for most connections/exchanges so it's really tedious to calculate Units some other way every time.
This gives you the Units based on your most used order value sizes in a quick way.
Possible future updates
- Allow user settings for number of values to display
- Allow user option to set titles for each row
Note:
Tradingview really need to get off their butts and give us a real DOM panel and working dollar value order entry for all exchanges among other order entry panel updates.
I hope everyone is suggesting this to them.
DynamicPeriodPublicDynamic Period Calculation Library
This library provides tools for adaptive period determination, useful for creating indicators or strategies that automatically adjust to market conditions.
Overview
The Dynamic Period Library calculates adaptive periods based on pivot points, enabling the creation of responsive indicators and strategies that adjust to market volatility.
Key Features
Dynamic Periods: Computes periods using distances between pivot highs and lows.
Customizable Parameters: Users can adjust detection settings and period constraints.
Robust Handling: Includes fallback mechanisms for cases with insufficient pivot data.
Use Cases
Adaptive Indicators: Build tools that respond to market volatility by adjusting their periods dynamically.
Dynamic Strategies: Enhance trading strategies by integrating pivot-based period adjustments.
Function: `dynamic_period`
Description
Calculates a dynamic period based on the average distances between pivot highs and lows.
Parameters
`left` (default: 5): Number of left-hand bars for pivot detection.
`right` (default: 5): Number of right-hand bars for pivot detection.
`numPivots` (default: 5): Minimum pivots required for calculation.
`minPeriod` (default: 2): Minimum allowed period.
`maxPeriod` (default: 50): Maximum allowed period.
`defaultPeriod` (default: 14): Fallback period if no pivots are found.
Returns
A dynamic period calculated based on pivot distances, constrained by `minPeriod` and `maxPeriod`.
Example
//@version=6
import CrimsonVault/DynamicPeriodPublic/1
left = input.int(5, "Left bars", minval = 1)
right = input.int(5, "Right bars", minval = 1)
numPivots = input.int(5, "Number of Pivots", minval = 2)
period = DynamicPeriodPublic.dynamic_period(left, right, numPivots)
plot(period, title = "Dynamic Period", color = color.blue)
Implementation Notes
Pivot Detection: Requires sufficient historical data to identify pivots accurately.
Edge Cases: Ensures a default period is applied when pivots are insufficient.
Constraints: Limits period values to a user-defined range for stability.