Estrategia Bollinger con PSAR y TP Máximo/ Mínimo Nasdaq 100 M5//@version=6
strategy("Estrategia Bollinger con PSAR y TP Máximo/ Mínimo", overlay=true)
// Parámetros de las Bandas de Bollinger
bb_length = input.int(20, title="Periodo de Bandas de Bollinger", minval=1)
bb_stddev = input.float(2.0, title="Desviación Estándar", step=0.1)
// Parámetros del Parabolic SAR
psar_start = input.float(0.02, title="PSAR Factor Inicial", step=0.01)
psar_increment = input.float(0.02, title="PSAR Incremento", step=0.01)
psar_max = input.float(0.2, title="PSAR Máximo", step=0.01)
// Cálculo de Bandas de Bollinger
basis = ta.sma(close, bb_length)
upper_band = basis + bb_stddev * ta.stdev(close, bb_length)
lower_band = basis - bb_stddev * ta.stdev(close, bb_length)
// Cálculo del Parabolic SAR
psar = ta.sar(psar_start, psar_increment, psar_max)
// Cálculo del cuerpo de la vela
body_high = math.max(open, close)
body_low = math.min(open, close)
body_length = body_high - body_low
total_length = high - low
body_ratio = body_length / total_length
// Condiciones de Entrada
long_condition = close > upper_band and body_ratio >= 0.33
short_condition = close < lower_band and body_ratio >= 0.33
// Filtro de tiempo: Operar solo de 7:30 AM a 4:00 PM hora colombiana
start_time = timestamp("GMT-5", year, month, dayofmonth, 7, 30)
end_time = timestamp("GMT-5", year, month, dayofmonth, 16, 0)
time_condition = (time >= start_time) and (time <= end_time)
// Variables para mantener el TP máximo y mínimo
var float max_tp = na
var float min_tp = na
var float dynamic_stop = na
// Condiciones de Entrada y Salida
if (long_condition and time_condition)
entry_price = close // Precio de entrada
stop_loss = low // SL en el mínimo de la vela
take_profit = entry_price + 3 * (entry_price - stop_loss) // TP con relación 1:3
strategy.entry("Compra", strategy.long)
strategy.exit("Exit Compra", "Compra", stop=stop_loss, limit=take_profit)
// Dibujar las etiquetas para SL y TP para la operación larga
label.new(bar_index, stop_loss, text="SL: " + str.tostring(stop_loss), style=label.style_label_up, color=color.red, textcolor=color.white, size=size.small)
label.new(bar_index, take_profit, text="TP: " + str.tostring(take_profit), style=label.style_label_down, color=color.green, textcolor=color.white, size=size.small)
if (short_condition and time_condition)
entry_price = close // Precio de entrada
stop_loss = high // SL en el máximo de la vela
take_profit = entry_price - 3 * (stop_loss - entry_price) // TP con relación 1:3
strategy.entry("Venta", strategy.short)
strategy.exit("Exit Venta", "Venta", stop=stop_loss, limit=take_profit)
// Dibujar las etiquetas para SL y TP para la operación corta
label.new(bar_index, stop_loss, text="SL: " + str.tostring(stop_loss), style=label.style_label_down, color=color.red, textcolor=color.white, size=size.small)
label.new(bar_index, take_profit, text="TP: " + str.tostring(take_profit), style=label.style_label_up, color=color.green, textcolor=color.white, size=size.small)
// Dibujar Bandas de Bollinger
plot(upper_band, color=color.red, title="Banda Superior")
plot(lower_band, color=color.green, title="Banda Inferior")
plot(basis, color=color.blue, title="Media Base")
// Dibujar Parabolic SAR
plot(psar, style=plot.style_circles, color=color.orange, title="Parabolic SAR")
Pengurusan portfolio
Consistency Rule CalculatorThis script, titled "Consistency Rule Calculator" is designed for use on the TradingView platform. It allows traders to input specific values related to their account, daily highest profit, and a consistency rule (as a decimal).
The script then calculates the "Amount Needed to Withdraw" based on the user's input. This value is calculated using the formula:
Amount Needed to Withdraw = (Daily Highest Profit/Consistency Rule )+ Account Type
Each prop firm has its own consistency rule. Follow their rule, and you will be second to payout!
Additionally, it displays the input values and the calculated amount in a customizable table on the chart. The table is formatted with colors for clarity, and it provides a motivational quote about successful trading. Plus, user can adjust the table's position on the screen.
Precision Trade Zone By KittisakIndicator นี้มีไว้สำหรับคำนวณ Money Management ซึ่งจะช่วยอำนวยความสะดวกในการจัดการความเสี่ยงในการเทรด การคำนวณ Leverage ที่เหมาะสมกับความเสี่ยงที่คุณยอมรับได้ และจัดการจุด Stop Loss ให้เหมาะสมกับ Leverage นั้น
คำอธิบายเกี่ยวกับคำย่อ
LR หมายถึง Leverage ที่เหมาะสม
EP หมายถึง Entry Price หรือราคาเข้าซื้อ
BEP หมายถึง Break-Even Point หรือจุดคุ้มทุน (คุณสามารถย้าย Stop Loss มาที่จุดนี้เมื่อราคาไปถึงจุดหนึ่งเพื่อป้องกันการขาดทุนได้)
SL หมายถึง Stop Loss (ซึ่งเป็น Stop Loss ที่คำนวณใหม่เพื่อให้ตำแหน่งเหมาะสมกับ Leverage ที่คำนวณได้ คุณควรใช้จุดนี้เพื่อเป็นราคา Stop Loss แทนจุด Stop Loss ที่คุณกำหนดไว้ในตอนแรก)
TP หมายถึง Take Profit (เป็นจุดที่คุณจะขายทำกำไรตาม RR ที่กำหนดไว้)
* หมายเหตุ เมื่อเริ่มเปิด Indicator จะเกิด Error ขึ้น และไม่มีผลลัพท์ใด ๆ แสดงให้เห็น นั่นเป็นเพราะคุณต้องเข้าไปกำหนด Entry Price และ Stop Loss ในการตั้งค่าของ Indicator เสียก่อน
MAM IndikatorDer Indikator gibt eine grobe Marktrichtung vor und vereint mehrere essenzielle Indikatoren miteinander.
Bear Market LevelMarks the bear market level. Calculated as 20% drop from highs. Useful on indices to determine technical Bull or Bear markets.
BTC vs Mag7 Combined IndexThis Mag7 Combined Index script is a custom TradingView indicator that calculates and visualizes the collective performance of the Magnificent 7 (Mag7) stocks—Apple, Microsoft, Alphabet, Amazon, NVIDIA, Tesla, and Meta (red line) compared to Bitcoin (blue line). It normalizes the daily closing prices of each stock to their initial value on the chart, scales them into percentages, and then computes their simple average to form a combined index. The result is plotted as a single red line, offering a clear view of the aggregated performance of these influential stocks over time compared to Bitcoin.
This indicator is ideal for analyzing the overall market impact of Bitcoin compared to the Mag7 stocks.
Simple Average Price & Target ProfitThis script is designed to help users calculate and visualize the weighted average price of an asset based on multiple entry points, along with the target price and the potential profit. The user can input specific prices for three different entries, along with the percentage of total investment allocated to each price point. The script then calculates the weighted average price based on these entries and displays it on the chart. Additionally, it calculates the potential profit at a given target price, which is plotted on the chart.
Market Regime DetectorMarket Regime Detector
The Market Regime Detector is a tool designed to help traders identify and adapt to the prevailing market environment by analyzing price action in relation to key macro timeframe levels. This indicator categorizes the market into distinct regimes—Bullish, Bearish, or Reverting—providing actionable insights to set trading expectations, manage volatility, and align strategies with broader market conditions.
What is a Market Regime?
A market regime refers to the overarching state or condition of the market at a given time. Understanding the market regime is critical for traders as it determines the most effective trading approach. The three main regimes are:
Bullish Regime:
Characterized by upward momentum where prices are consistently trending higher.
Trading strategies often focus on buying opportunities and trend-following setups.
Bearish Regime:
Defined by downward price pressure and declining trends.
Traders typically look for selling opportunities or adopt risk-off strategies.
Reverting Regime:
Represents a consolidation phase where prices move within a defined range.
Ideal for mean-reversion strategies or range-bound trading setups.
Key Features of the Market Regime Detector:
Dynamic Market Regime Detection:
Identifies the market regime based on macro timeframe high and low levels (e.g., weekly or monthly).
Provides clear and actionable insights for each regime to align trading strategies.
Visual Context for Price Levels:
Plots the macro high and low levels on the chart, allowing traders to visualize critical support and resistance zones.
Enhances understanding of volatility and trend boundaries.
Regime Transition Alerts:
Sends alerts only when the market transitions into a new regime, ensuring traders are notified of meaningful changes without redundant signals.
Alert messages include clear regime descriptions, such as "Market entered a Bullish Regime: Price is above the macro high."
Customizable Visualization:
Background colors dynamically adjust to the current regime:
Blue for Reverting.
Aqua for Bullish.
Fuchsia for Bearish.
Option to toggle high/low line plotting and background highlights for a tailored experience.
Volatility and Expectation Management:
Offers insights into market volatility by showing when price action approaches, exceeds, or reverts within macro timeframe levels.
Helps traders set realistic expectations and adjust their strategies accordingly.
Use Cases:
Trend Traders: Identify bullish or bearish regimes to capture sustained price movements.
Range Traders: Leverage reverting regimes to trade between defined support and resistance zones.
Risk Managers: Use macro high and low levels as dynamic stop-loss or take-profit zones to optimize trade management.
The Market Regime Detector equips traders with a deeper understanding of the market environment, making it an essential tool for informed decision-making and strategic planning. Whether you're trading trends, ranges, or managing risk, this indicator provides the clarity and insights needed to navigate any market condition.
Dynamic Risk-Adjusted Performance Ratios with TableWith this indicator, you have everything you need to monitor and compare the Sharpe ratio, Sortino ratio, and Omega ratio across multiple assets—all in one place. This tool is designed to help save time and improve efficiency by letting you track up to 15 assets simultaneously in a fully customizable table. You can adjust the lookback period to fit your trading strategy and get a clearer picture of how your assets perform over time. Instead of switching between charts, this indicator puts all the critical information you need at your fingertips.
Sharpe Ratio -
Helps evaluate the overall efficiency of investments by comparing the average return to the total risk (measured by the standard deviation of all returns). Essentially, it tells you how much excess return you’re getting for each unit of risk you’re taking. A higher Sharpe ratio means you’re getting better risk-adjusted performance—something you’ll want to aim for in your portfolio.
Sortino Ratio -
Goes a step further by focusing only on downside risk—because let’s face it, no one worries about positive volatility. This ratio is calculated by dividing the average return by the standard deviation of only the negative returns. Perfect for those concerned about avoiding losses rather than chasing extreme gains. It gives you a sharper view of how well your assets are performing relative to the risks you’re trying to avoid.
Omega Ratio -
Offers a unique perspective by comparing the sum of positive returns to the absolute sum of negative returns. It’s a straightforward way to see if your wins outweigh your losses. A higher Omega ratio means your positive returns significantly exceed the downside, which is exactly what you want when building a strong, reliable portfolio.
This indicator is perfect for traders who want to streamline their decision-making process and gain an edge. Bringing together these three critical ratios into a single user-defined table makes it easy to compare and rank assets at a glance. Whether optimizing a portfolio or looking for the best opportunities, this tool helps you stay ahead by focusing on risk-adjusted returns. The customizable lookback period lets you tailor the analysis to fit your unique trading approach, giving you insights that align with your goals. If you’re serious about making data-driven decisions and improving your trading outcomes, this indicator is a game-changer for your toolkit.
HMA Buy Sell Signals - Profit ManagerNote : Settings should be adjusted according to the selected time frame. Try to find the best setting according to the profitability rate
Overall Functionality
This script combines several trading tools to create a comprehensive system for trend analysis, trade execution, and performance tracking. Users can identify market trends using specific moving averages and RSI indicators while managing profit and loss levels automatically.
Trend Detection and Trade Signals
Hull Moving Averages (HMA):
Two HMAs (a faster one and a slower one) are used to determine the market trend.
A buy signal is generated when the faster HMA crosses above the slower HMA.
Conversely, a sell signal is triggered when the faster HMA crosses below the slower one.
Visual Feedback:
Trend lines on the chart change color to reflect the trend direction (e.g., green for upward trends and red for downward trends).
Trade Levels and Management
Entry, Take-Profit, and Stop-Loss Levels:
When the trend shifts upwards, the script calculates entry, take-profit, and stop-loss levels based on the opening price.
Similarly, for downward trends, these levels are determined for short trades.
Commission Tracking:
Each trade includes a commission cost, which is factored into net profit and loss calculations.
Dynamic Labels:
Entry, take-profit, and stop-loss levels are visually marked on the chart for easier tracking.
Performance Tracking
Profit and Loss Tracking:
The script keeps a running total of profits, losses, and commissions for both long and short trades.
It also calculates the net profit after all costs are considered.
Performance Table:
A table is displayed on the chart summarizing:
The number of trades.
Total profit and loss for long and short positions.
Commission costs.
Net profit.
Fractal Support and Resistance
Dynamic Lines:
The script identifies the most recent significant highs and lows using fractals.
It draws support and resistance lines that automatically update as new fractals form.
Simplified Visuals:
The chart always shows the last two support and resistance lines, keeping the visualization clean and focused.
RSI-Based Signals
Overbought and Oversold Levels:
RSI is used to identify overbought (above 80) and oversold (below 20) conditions.
The script generates buy signals at oversold levels and sell signals at overbought levels.
Chart Indicators:
Arrows and labels appear on the chart to highlight these RSI-based opportunities.
Customization
The script allows users to customize key parameters such as:
Moving average lengths for trend detection.
Take-profit and stop-loss percentages.
Timeframes for backtesting.
Starting capital and commission rates.
Conclusion
This script is a versatile tool for traders, combining trend detection, automated trade management, and visual feedback. It simplifies decision-making by providing clear signals and tracking performance metrics, making it suitable for both beginners and experienced traders.
* The most recently drawn fractals represent potential support and resistance levels. If the price aligns with these levels at the time of entering a trade, it may indicate a likelihood of reversal. In such cases, it’s advisable to either avoid entering the trade altogether or proceed with increased caution.
Buffett Indicator: Wilshire 5000 to GDP Ratio [Enhanced]Funktionen:
Buffett-Indikator Berechnung:
Der Indikator basiert auf Daten von FRED:
Wilshire 5000 Total Market Index (WILL5000PR): Darstellung der gesamten Marktkapitalisierung des US-Marktes.
Bruttoinlandsprodukt (GDP): Darstellung der gesamten Wirtschaftsleistung der USA.
Der Indikator wird als Prozentsatz berechnet:
Marktkapitalisierung / GDP * 100
Gleitender Durchschnitt (optional):
Du kannst einen gleitenden Durchschnitt aktivieren, um Trends des Buffett-Indikators zu analysieren.
Zwei Typen stehen zur Verfügung:
SMA (Simple Moving Average): Einfacher gleitender Durchschnitt.
EMA (Exponential Moving Average): Gewichteter gleitender Durchschnitt.
Die Länge des gleitenden Durchschnitts ist konfigurierbar.
Visuelle Darstellung:
Der Buffett-Indikator wird als blaue Linie auf dem Chart dargestellt.
Horizontalen Schwellenwerte (50, 100, 150, 200) zeigen wichtige Level an:
50: Niedrig (grün).
100: Durchschnittlich (gelb).
150: Hoch (orange).
200: Extrem hoch (rot).
Alerts:
Alerts informieren dich, wenn der Buffett-Indikator über oder unter einen von dir definierten Schwellenwert geht.
Ideal für automatisches Monitoring und Benachrichtigungen.
Eingabemöglichkeiten:
Moving Average Einstellungen:
Enable Moving Average: Aktiviert den gleitenden Durchschnitt.
Type: Wähle zwischen SMA und EMA.
Length: Bestimme die Länge des gleitenden Durchschnitts (Standard: 200).
Alert Level:
Setze den Schwellenwert, ab dem Alerts ausgelöst werden (z. B. 150).
Anwendung:
Marktanalyse: Der Buffett-Indikator hilft dabei, die Bewertung des Aktienmarktes im Verhältnis zur Wirtschaftsleistung zu bewerten. Ein Wert über 100 % deutet auf eine mögliche Überbewertung hin.
Trendverfolgung: Der gleitende Durchschnitt zeigt langfristige Trends des Indikators.
Benachrichtigungen: Alerts ermöglichen eine effiziente Überwachung, ohne den Indikator ständig manuell überprüfen zu müssen.
EMA Crossover for Investing
This TradingView script dynamically recolors candles based on the relationship between the 10-period Exponential Moving Average (EMA) and the 50-period EMA, providing a visual cue for asset allocation decisions. It is designed specifically for use on the 30-minute chart during Regular Trading Hours only.
How to Use This Script
Use the 30-Minute chart on SPY or QQQ.
📈 When the 10 EMA is above the 50 EMA, candles are highlighted to indicate favorable conditions for allocating 100% to stocks.
📉 When the 10 EMA is below the 50 EMA, candles are highlighted to suggest allocating 100% to bonds.
Visual Range Position Size CalculatorVisual Range Position Size Calculator
The "VR Position Size Calculator" helps traders determine the appropriate position size based on their risk tolerance and the current market conditions. Below is a detailed description of the script, its functionality, and how to use it effectively.
---
Key Features
1. Risk Calculation: The script allows users to input their desired risk in monetary terms (in the currency of the ticker). It then calculates the position sizes for both long and short trades based on this risk.
2. Dynamic High and Low Tracking: The script dynamically tracks the highest and lowest prices within the visible range of the chart, allowing for more accurate position sizing.
3. Formatted Output: The calculated values are displayed in a user-friendly table format with thousands separators for better readability.
4. Visual Indicators: Dashed lines are drawn on the chart at the high and low points of the visible range, providing a clear visual reference for traders.
5. If the risk in security price is 1% or less, the background of the cells displaying position sizes will be green for long positions and red for short positions. If the risk is between 1% and 5%, the background changes to gray, indicating that the risk may be too high for an effective trade. If the risk exceeds 5% of the price, the text also turns gray, rendering it invisible, which signifies that there is no justification for such a trade.
---
Code Explanation
The script identifies the start and end times of the visible range on the chart, ensuring calculations are based only on the data currently in view. It updates and stores the highest (hh) and lowest (ll) prices within this visible range. At the end of the range, dashed lines are drawn at the high and low prices, providing a visual cue for traders.
Users can input their risk amount, which is then used to calculate potential position sizes for both long and short trades based on the current price relative to the tracked high and low. The calculated risk values and position sizes are displayed in a table on the right side of the chart, with color coding to indicate whether the calculated position size meets specific criteria.
---
Usage Instructions
1. Add the Indicator: To use this script, copy and paste it into Pine Script editor, then add it to your chart.
2. Input Your Risk: Adjust the 'Risk in money' input to reflect your desired risk amount for trading.
3. Analyze Position Sizes: Observe the calculated position sizes for both long and short trades displayed in the table. Use this information to guide your trading decisions.
4. Visual Cues: Utilize the dashed lines on the chart to understand recent price extremes within your visible range.
RISK MANAGEMENT TABLEThis updated Risk Management Indicator is a powerful and customizable tool designed to help traders effectively manage risk on every trade. By dynamically calculating position size, stop-loss, and take-profit levels, it enables traders to stay disciplined and follow predefined risk parameters directly on their charts.
Features:
Dynamic Stop-Loss and Take-Profit Levels:
Stop-loss is based on the Average True Range (ATR), offering a flexible way to account for
market volatility.
Take-profit levels can be customized as a percentage of the entry price, providing a clear
target for trade exits.
Position Sizing Calculation:
The indicator computes the maximum position size by considering:
Trade amount (montant_ligne).
Risk percentage per trade.
Transaction fees.
Visual Representation:
Displays stop-loss and take-profit levels on the chart as customizable lines.
Optional visibility of these lines through checkboxes in the settings panel.
Comprehensive Risk Table:
A table on the chart summarizes essential risk metrics:
Stop-loss value.
Distance from entry in percentage.
Position size (maximum suggested).
Take-profit price.
Customizable:
Adjust parameters like ATR length, smoothing type, risk percentage, transaction fees,
and take-profit percentage.
Modify the visual length of lines representing stop-loss and take-profit levels.
How It Works:
Stop-Loss Calculation:
The stop-loss level is calculated using ATR and a volatility factor (default: 2).
This ensures your stop-loss adapts to market conditions.
Take-Profit Calculation:
Take-profit is derived as a percentage increase from the entry price.
Position Size:
The optimal position size is computed as:
Position Size = Risk per Trade /ATR-based Stop Distance
The risk per trade deducts transaction fees to provide a more accurate calculation.
Visual Lines:
Risk Table:
The table displays updated stop-loss, position size, and take-profit metrics at a glance.
Settings Panel:
Length: ATR length for calculating market volatility.
Smoothing: Choose RMA, SMA, EMA, or WMA for ATR smoothing.
Trade Amount: The capital allocated to a single trade.
Risk by Trade (%): Define how much of your trade capital is at risk per trade.
Transaction Fees: Input fees to ensure realistic calculations.
Take Profit (%): Specify your desired take-profit percentage.
Show Entry Stop Loss: Toggle visibility of the stop-loss line.
Show Entry Take Profit: Toggle visibility of the take-profit line.
BTC Slayer 9000 - Relative Risk-adjusted performanceBTC Slayer 9000: Relative Risk-Adjusted Performance
Dear friends and fellow traders,
I am pleased to introduce the BTC Slayer 9000, a script designed to provide clear insights into risk-adjusted performance relative to a benchmark. Whether you're navigating the volatile world of cryptocurrencies or exploring opportunities in stocks, this tool helps you make informed decisions by comparing assets against your chosen benchmark.
What Does It Do?
This indicator is based on the Ulcer Index (UI), a metric that measures downside risk. It calculates the Ulcer Performance Index (UPI), which combines returns and downside risk, and compares it to a benchmark (like BTC/USDT, SPY500, or any trading pair).
The result is the Relative UPI (RUPI):
Positive RUPI (green area): The asset's risk-adjusted performance is better than the benchmark.
Negative RUPI (red area): The asset's risk-adjusted performance is worse than the benchmark.
Why Use It?
Risk vs. Reward: See if the extra risk of an asset is justified by its returns.
Customizable Benchmark: Compare any asset against BTC, SPY500, or another chart.
Dynamic Insights: Quickly identify outperforming assets for long positions and underperformers for potential shorts.
How to Use:
Inputs:
Adjust the lookback period to set the time frame for analysis. 720 Period is meant to represent 30 days. I like to use 168 period because I do not hold trades for long.
Choose your comparison chart (e.g., BTC/USDT, SPY500, AAPL, etc.).
Interpretation:
Green Area Above 0: The asset offers better risk-adjusted returns than the benchmark.
Red Area Below 0: The benchmark is a safer or more rewarding option.
Perfect for All Traders
Whether you:
Trade Cryptocurrencies: Compare altcoins to BTC.
Invest in Stocks: Compare individual stocks to indices like SPY500.
Evaluate Portfolio Options: Decide between assets like AAPL or TSLA.
This indicator equips you with a systematic way to evaluate "Is the extra risk worth it?".
The script was compiled in Collaboration with ChatGPT
Average Trading Volume per Minute & Suitable Position SizeDescription:
This indicator calculates an average trading volume per minute for the specified lookback period (default 377 bars). It then estimates a suitable position size in USD (or contracts on specific exchanges) by multiplying the average volume by a user-defined percentage (default 8%). The script discards extreme data points (top and bottom 20%) before finding the median, so it provides a more robust measure of typical volume.
How It Works:
1. Each bar’s volume is converted to a USD-based figure, either by taking volume directly (if the exchange quotes in USD) or multiplying volume by the midpoint price.
2. Values are stored in an array, which is then sorted to remove the most extreme 40% (20% from each tail). The remaining 60% is used to calculate a median.
3. You enter a position size percentage (e.g. 8%), and the script multiplies the median volume-per-minute by this percentage to get your recommended position size.
4. For certain exchanges like BitMEX/Deribit, the script adapts how it treats volume (in quotes vs. base), so it can display the final position size properly (USD or contracts).
5. The script displays the result in a small table on the chart, showing the recommended position size in USD (or, for some perpetual contracts, in contract units). If no valid data is available, it indicates “Data Invalid.”
Usage Tips:
• The default Position Size Percentage is 8%. You can adjust it higher for more aggressive trading or lower for smaller exposure.
• The default lookback (Average Calculation Period) is 377 bars. Experiment with different values (e.g. 200 or 500) to capture more or fewer historical bars.
• On certain exchanges and symbols (e.g. BitMEX or Deribit’s “.P” pairs), the script automatically switches how it calculates volume (USD vs. coin-based).
• If you see “Data Invalid,” it likely means the current symbol or timeframe lacks sufficient volume info, or you’re running it on a symbol like BTC.D.
Why This Helps:
• Many traders size positions by guesswork or a fixed fraction of their account. This script instead ties position size to actual average trading volume, ensuring your position is neither too large (risk of poor fills) nor too small (wasting leverage potential).
• Removing top/bottom outliers and using the median aims to give a stable volume measure—less influenced by sudden spikes or extremely quiet bars.
Feel free to tweak the inputs and experiment with different timeframes or pairs. By aligning your position size with typical market liquidity, you can potentially improve overall trade execution and manage risk more effectively.
Lot size calculator for futuresEasily and quickly calculate lot sizes with this unique indicator for futures trading. Whether you're dealing with full contracts or micro contracts, this tool simplifies the process by allowing you to input your account balance, risk percentage, and stop loss in pips. The indicator then automatically calculates the optimal number of contracts to trade based on your risk parameters. Designed for both novice and experienced traders, it ensures precise risk management and enhances your trading strategy. Experience the ease and efficiency of lot size calculation like never before!
Crypto Price Volatility Range# Cryptocurrency Price Volatility Range Indicator
This TradingView indicator is a visualization tool for tracking historical volatility across multiple major cryptocurrencies.
## Features
- Real-time volatility tracking for 14 major cryptocurrencies
- Customizable period and standard deviation multiplier
- Individual color coding for each currency pair
- Optional labels showing current volatility values in percentage
## Supported Cryptocurrencies
- Bitcoin (BTC)
- Ethereum (ETH)
- Avalanche (AVAX)
- Dogecoin (DOGE)
- Hype (HYPE)
- Ripple (XRP)
- Binance Coin (BNB)
- Cardano (ADA)
- Tron (TRX)
- Chainlink (LINK)
- Shiba Inu (SHIB)
- Toncoin (TON)
- Sui (SUI)
- Stellar (XLM)
## Settings
- **Period**: Timeframe for volatility calculation (default: 20)
- **Standard Deviation Multiplier**: Multiplier for standard deviation (default: 1.0)
- **Show Labels**: Toggle label display on/off
## Calculation Method
The indicator calculates volatility using the following method:
1. Calculate daily logarithmic returns
2. Compute standard deviation over the specified period
3. Annualize (multiply by √252)
4. Convert to percentage (×100)
## Usage
1. Add the indicator to your TradingView chart
2. Adjust parameters as needed
3. Monitor volatility lines for each cryptocurrency
4. Enable labels to see precise current volatility values
## Notes
- This indicator displays in a separate window, not as an overlay
- Volatility values are annualized
- Data for each currency pair is sourced from USD pairs
Highest Volume FuturesScript tracks the volume of futures contracts which are not expired for the current and next year. Provides a label at the real-time bar and when a different contract has higher volume in the last bar of the timeframe input as long as it is different from the current ticker. It should display on continuous and lower volume contract charts.
Intended to be used with a higher timeframe input.
Currently supports ES, MES, NQ, MNQ, RTY, M2K, YM, MYM, BTC, MBT, CL, MCL, GC, MGC, E7 and J7. If you'd like to add your own, then include the syminfo.root of your ticker and the appropriate month codes for that contract in the validMonthCodes switch list.
Market MonitorOverview
The Market Monitor Indicator provides a customisable view of dynamic percentage changes across selected indices or sectors, calculated by comparing current and previous closing prices over the chosen timeframe.
Key Features
Choose up to 20 predefined indices or your own selected indices/stocks.
Use checkboxes to show or hide individual entries.
Monitor returns over daily, weekly, monthly, quarterly, half-yearly, or yearly timeframes
Sort by returns (descending) to quickly identify top-performing indices or alphabetically for an organised and systematic review.
Customisation
Switch between Light Mode (Blue or Green themes) and Dark Mode for visual clarity.
Adjust the table’s size, position, and location.
Customise the table title to your own choice e.g. Sectoral, Broad, Portfolio etc.
Use Cases
Use multiple instances of the script with varying timeframes to study sectoral rotation and trends.
Customise the stocks to see your portfolio returns for the day or over the past week, or longer.
IPO Lifecycle Sell Strategy [JARUTIR]IPO Lifecycle Sell Strategy with Dynamic Buy Date and Multiple Sell Rules
This custom TradingView script is designed for traders looking to capitalize on dynamic strategies for IPOs and growth stocks, by implementing several sell rules based on price action and technical indicators. It provides a set of sell rules that are applied dynamically depending on the stock's lifecycle and price action, allowing users to lock in profits and minimize drawdowns based on key technical thresholds.
The four sell strategies incorporated into this script are inspired by the book "The Lifecycle Trade", a resource that focuses on capturing profits while managing risk in different phases of a stock's lifecycle, from IPO to high-growth stages.
Key Features:
Buy Price and Buy Date: You can either manually input your buy price and date or let the script automatically detect the buy date based on the specified buy price.
Multiple Sell Strategies: Choose from 4 predefined sell strategies:
Ascender Rule : Captures strong momentum from IPO stocks by selling portions at specific price levels or technical conditions.
Midterm Rule : Focuses on holding for longer periods, with defensive sell signals triggered when the stock deviates significantly from peak price or key moving averages.
40 Week Rule : Designed for long-term holds, this rule triggers a sell when the stock closes below the 40-week moving average.
Everest Rule : Aggressive strategy for selling into strength based on parabolic moves or gap downs, ideal for high momentum stocks.
Interactive Features:
Horizontal Green Line showing the buy price level from the buy date.
Visual Sell Signals appear only after the buy date to ensure that your analysis is relevant to the stock lifecycle.
Customizable settings, allowing you to choose your preferred sell rule strategy and automate buy date detection.
This script is perfect for traders using a strategic, systematic approach to IPOs and high-growth stocks, whether you're looking for quick exits during momentum phases or holding for longer-term growth.
Usage:
Input your Buy Price and Buy Date, or allow the script to automate the buy date detection.
Select a Sell Rule strategy based on your risk profile and trading style.
View visual signals for selling when specific conditions are met.
Frequently Asked Questions (FAQs):
Q1: How do I input my Buy Price and Buy Date?
The script allows you to either manually input the Buy Price and Buy Date or use the automated detection. If you choose automated detection, the script will automatically assign the buy date when the price crosses above your set Buy Price.
Q2: What is the purpose of the "Sell Rules"?
The script offers four sell strategies to help manage different types of stocks in varying phases of their lifecycle:
Ascender Rule: Targets IPO stocks showing positive momentum.
Midterm Rule: A defensive strategy for stocks in a steady uptrend.
40 Week Rule: Long-term hold strategy designed to ride stocks through extended growth.
Everest Rule: Aggressive strategy to capture profits during parabolic price moves.
Q3: What is the significance of the Green Line at Buy Price?
The Green Line represents your entry point (Buy Price) on the chart. It will appear from the buy date onwards, helping you track the performance of your stock relative to your entry.
Q4: Can I customize the Sell Strategy?
Yes! You can choose from the available Sell Rules (Ascender Rule, Midterm Rule, 40 Week Rule, Everest Rule) via an input option in the script. Each strategy has its own unique triggers based on price action, moving averages, and time-based conditions.
Q5: Does this script work for stocks and crypto?
Yes, this script is designed for both stocks and cryptocurrencies. It works on any asset where price data and timeframes are available.
Q6: How do the Weekly Moving Averages (WSMA) work in this strategy?
The script uses weekly moving averages (WSMA) to track longer-term trends. These are essential for some of the sell rules, such as the Midterm Rule and 40 Week Rule, which rely on the stock's movement relative to the 40-week moving average.
Q7: Will the script plot a Sell Signal immediately after the Buy Date?
No, sell signals will only be plotted after the Buy Date. This ensures that the sell strategy is relevant to your actual holding period and avoids premature triggers.
Q8: How do I interpret the Sell Signal?
The script will plot a Red Sell Signal above the bar when the sell conditions are met, based on the selected strategy. This indicates that it may be a good time to exit the position according to your chosen rule.
Q9: Can I use this strategy on different timeframes?
Yes, you can apply the script to any timeframe. However, some sell strategies, like the Midterm Rule and 40 Week Rule, are designed to work best with weekly data, so it's recommended to use these strategies with longer timeframes.
Q10: Does this script have any alerts?
Yes! The script supports alert conditions that will notify you when the sell conditions are met according to your selected rule. You can set up alerts to stay informed without needing to watch the chart constantly.
Q11: What if I want to disable some of the sell rules?
You can select your preferred sell rule using the "Select Sell Rule" dropdown. If you don’t want to use a particular rule, simply choose a different strategy or leave it inactive.
------------------------------
Disclaimer:
This strategy is intended for educational purposes only. It should not be considered financial advice. Always perform your own research and consult with a professional before making any trading decisions. Trading involves significant risk, and you should never trade with money you cannot afford to lose.
Employee Portfolio Generator [By MUQWISHI]▋ INTRODUCTION :
The “Employee Portfolio Generator” simplifies the process of building a long-term investment portfolio tailored for employees seeking to build wealth through investments rather than traditional bank savings. The tool empowers employees to set up recurring deposits at customizable intervals, enabling to make additional purchases in a list of preferred holdings, with the ability to define the purchasing investment weight for each security. The tool serves as a comprehensive solution for tracking portfolio performance, conducting research, and analyzing specific aspects of portfolio investments. The output includes an index value, a table of holdings, and chart plots, providing a deeper understanding of the portfolio's historical movements.
_______________________
▋ OVERVIEW:
● Scenario (The chart above can be taken as an example) :
Let say, in 2010, a newly employed individual committed to saving $1,000 each month. Rather than relying on a traditional savings account, chose to invest the majority of monthly savings in stable well-established stocks. Allocating 30% of monthly saving to AMEX:SPY and another 30% to NASDAQ:QQQ , recognizing these as reliable options for steady growth. Additionally, there was an admired toward innovative business models of NASDAQ:AAPL , NASDAQ:MSFT , NASDAQ:AMZN , and NASDAQ:EBAY , leading to invest 10% in each of those companies. By the end of 2024, after 15 years, the total monthly deposits amounted to $179,000, which would have been the result of traditional saving alone. However, by sticking into long term invest, the value of the portfolio assets grew, reaching nearly $900,000.
_______________________
▋ OUTPUTS:
The table can be displayed in three formats:
1. Portfolio Index Title: displays the index name at the top, and at the bottom, it shows the index value, along with the chart timeframe, e.g., daily change in points and percentage.
2. Specifications: displays the essential information on portfolio performance, including the investment date range, total deposits, free cash, returns, and assets.
3. Holdings: a list of the holding securities inside a table that contains the ticker, last price, entry price, return percentage of the portfolio's total deposits, and latest weighted percentage of the portfolio. Additionally, a tooltip appears when the user passes the cursor over a ticker's cell, showing brief information about the company, such as the company's name, exchange market, country, sector, and industry.
4. Indication of New Deposit: An indication of a new deposit added to the portfolio for additional purchasing.
5. Chart: The portfolio's historical movements can be visualized in a plot, displayed as a bar chart, candlestick chart, or line chart, depending on the preferred format, as shown below.
_______________________
▋ INDICATOR SETTINGS:
Section(1): Table Settings
(1) Naming the index.
(2) Table location on the chart and cell size.
(3) Sorting Holdings Table. By securities’ {Return(%) Portfolio, Weight(%) Portfolio, or Ticker Alphabetical} order.
(4) Choose the type of index: {Assets, Return, or Return (%)}, and the plot type for the portfolio index: {Candle, Bar, or Line}.
(5) Positive/Negative colors.
(6) Table Colors (Title, Cell, and Text).
(7) To show/hide any of selected indicator’s components.
Section(2): Recurring Deposit Settings
(1) From DateTime of starting the investment.
(2) To DateTime of ending the investment
(3) The amount of recurring deposit into portfolio and currency.
(4) The frequency of recurring deposits into the portfolio {Weekly, 2-Weeks, Monthly, Quarterly, Yearly}
(5) The Depositing Model:
● Fixed: The amount for recurring deposits remains constant throughout the entire investment period.
● Increased %: The recurring deposit amount increases at the selected frequency and percentage throughout the entire investment period.
(5B) If the user selects “ Depositing Model: Increased % ”, specify the growth model (linear or exponential) and define the rate of increase.
Section(3): Portfolio Holdings
(1) Enable a ticker in the investment portfolio.
(2) The selected deposit frequency weight for a ticker. For example, if the monthly deposit is $1,000 and the selected weight for XYZ stock is 30%, $300 will be used to purchase shares of XYZ stock.
(3) Select up to 6 tickers that the investor is interested in for long-term investment.
Please let me know if you have any questions