Cash And Carry Arbitrage BTC Compare Month 6 by SeoNo1Detailed Explanation of the BTC Cash and Carry Arbitrage Script
Script Title: BTC Cash And Carry Arbitrage Month 6 by SeoNo1
Short Title: BTC C&C ABT Month 6
Version: Pine Script v5
Overlay: True (The indicators are plotted directly on the price chart)
Purpose of the Script
This script is designed to help traders analyze and track arbitrage opportunities between the spot market and futures market for Bitcoin (BTC). Specifically, it calculates the spread and Annual Percentage Yield (APY) from a cash-and-carry arbitrage strategy until a specific expiry date (in this case, June 27, 2025).
The strategy helps identify profitable opportunities when the futures price of BTC is higher than the spot price. Traders can then buy BTC in the spot market and short BTC futures contracts to lock in a risk-free profit.
1. Input Settings
Spot Symbol: The real-time BTC spot price from Binance (BTCUSDT).
Futures Symbol: The BTC futures contract that expires in June 2025 (BTCUSDM2025).
Expiry Date: The expiration date of the futures contract, set to June 27, 2025.
These inputs allow users to adjust the symbols or expiry date according to their trading needs.
2. Price Data Retrieval
Spot Price: Fetches the latest closing price of BTC from the spot market.
Futures Price: Fetches the latest closing price of BTC futures.
Spread: The difference between the futures price and the spot price (futures_price - spot_price).
The spread indicates how much higher (or lower) the futures price is compared to the spot market.
3. Time to Maturity (TTM) and Annual Percentage Yield (APY) Calculation
Current Date: Gets the current timestamp.
Time to Maturity (TTM): The number of days left until the futures contract expires.
APY Calculation:
Formula:
APY = ( Spread / Spot Price ) x ( 365 / TTM Days ) x 100
This represents the annualized return from holding a cash-and-carry arbitrage position if the trader buys BTC at the spot price and sells BTC futures.
4. Display Information Table on the Chart
A table is created on the chart's top-right corner showing the following data:
Metric: Labels such as Spread and APY
Value: Displays the calculated spread and APY
The table automatically updates at the latest bar to display the most recent data.
5. Alert Condition
This sets an alert condition that triggers every time the script runs.
In practice, users can modify this alert to trigger based on specific conditions (e.g., APY exceeds a threshold).
6. Plotting the APY and Spread
APY Plot: Displays the annualized yield as a blue line on the chart.
Spread Plot: Visualizes the futures-spot spread as a red line.
This helps traders quickly identify arbitrage opportunities when the spread or APY reaches desirable levels.
How to Use the Script
Monitor Arbitrage Opportunities:
A positive spread indicates a potential cash-and-carry arbitrage opportunity.
The larger the APY, the more profitable the arbitrage opportunity could be.
Timing Trades:
Execute a buy on the BTC spot market and simultaneously sell BTC futures when the APY is attractive.
Close both positions upon futures contract expiry to realize profits.
Risk Management:
Ensure you have sufficient margin to hold both positions until expiry.
Monitor funding rates and volatility, which could affect returns.
Conclusion
This script is an essential tool for traders looking to exploit price discrepancies between the BTC spot market and futures market through a cash-and-carry arbitrage strategy. It provides real-time data on spreads, annualized returns (APY), and visual alerts, helping traders make informed decisions and maximize their profit potential.
Indicateurs et stratégies
RVOL Color-Coded VolumeRVOL Color-Coded Volume Indicator
This tool visualizes volume intensity through color-coded bars in a separate panel, making it easy to identify significant market moves driven by unusual volume.
Key Features:
- Displays volume bars with varying colors and intensities based on RVOL (Relative Volume)
- Shows a customizable moving average line for volume reference
- Includes alert conditions for different RVOL thresholds
Color System:
Blue shades (Bullish):
- Light: Normal volume (RVOL < 1)
- Medium: Above average volume
- Dark: Heavy buying volume
- Solid: Extreme volume surge
Pink shades (Bearish):
- Light: Normal volume (RVOL < 1)
- Medium: Increased selling
- Dark: Heavy selling
- Solid: Extreme selling pressure
Gray shades (Neutral):
- Used when opening and closing prices are equal
- Intensity varies with RVOL level
Additional Features:
- Dotted threshold lines for easy reference
- Background highlighting for extreme volume events
- Data window shows exact RVOL values
- Multiple alert conditions for volume thresholds
The indicator helps traders spot potential trend changes and momentum shifts by highlighting unusual volume patterns without interfering with price analysis.
Bot for Spot Market - Custom GridThis script is designed to create a trading bot for the spot market, specifically for buying and selling bitcoins profitably. Recommended for timeframes above two hours. Here are the main functions and features of the script:
Strategy Setup: The bot is set up with a custom grid strategy, defining parameters like pyramiding (allowed number of simultaneous trades), margin requirements, commission, and initial capital.
Order Requirements: It calculates the order price and amount based on the minimum requirements set by the exchange and rounds them appropriately.
Entry Conditions: The bot makes new entries if the closing price falls a certain percentage below the last entry price. It continues to make entries until the closing price rises a certain percentage above the average entry price.
Targets and Plots:
It calculates and plots the target profit level.
It plots the average entry price and the last entry price.
It plots the next entry price based on the defined conditions.
It plots the maximum number of orders allowed based on equity and the number of open orders.
Timerange: The bot can start trading from a specific date and time defined by the user.
Entries: It places orders if the timerange conditions are met. It also places new orders if the closing price is below the last entry price by a defined percentage.
Profit Calculation: The script calculates open profit or loss for the open positions.
Exit Conditions: It closes all positions if the open profit is positive and the closing price is above the target profit level.
Performance Table: The bot maintains and displays statistics like the number of open and closed trades, net profit, and equity in a table format.
The script is customizable, allowing users to adjust parameters like initial capital, commission, order values, and profit targets to fit their specific trading needs and exchange requirements.
PriceCatch Stock Range Binning-v1Hi Traders.
This is a simple script that will show you the number of times an instrument was within a change% zone. For example, you will know how many times it was between 5% and 10%, or 1% and 3%. So with this info, you will be able to set your expectation regarding the move the instrument is likely to make on any trading day. So, if you notice that the instrument has moved into a higher zone, then you can estimate to an extent where it will attempt to go.
Play with it and you will know its use.
I have kept the source open so that you can study it yourself and make any changes as per your needs.
Remember, this is not an indicator but just an info script.
All the best with your trades.
EMA POD Indicator #gangesThis script is a technical analysis indicator that uses multiple Exponential Moving Averages (EMAs) to identify trends and track price changes in the market. Here's a breakdown:
EMA Calculation: It calculates six different EMAs (for periods 5, 10, 20, 50, 100, and 150) to track short- and long-term trends.
Trend Identification:
Uptrend: The script identifies an uptrend when the EMAs are in ascending order (EMA5 > EMA10 > EMA20 > EMA50 > EMA100 > EMA150).
Downtrend: A downtrend is identified when the EMAs are not in ascending order.
Trend Change Tracking: It tracks when an uptrend starts and ends, displaying the duration of the trend and the percentage price change during the trend.
Visuals:
It plots the EMAs on the chart with different colors.
It adds green and red lines to represent the ongoing uptrend and downtrend.
Labels are displayed showing when the uptrend starts and ends, along with the trend's duration and price change percentage.
In short, this indicator helps visualize trends, track their changes, and measure the impact of those trends on price.
Pulse of Cycle Oscillator"Pulse of Cycle" Oscillator: Logic and Usage
What Is It and How Does It Work?
The "Pulse of Cycle" is an oscillator that measures the cycles of price rises and falls, helping you spot overbought and oversold conditions. Unlike classic indicators, it doesn’t focus on how much the price moves but tracks its direction (up or down) like a "pulse." Here’s the logic:
Price Movement:
If the price rises compared to the previous bar, it adds +1.
If the price falls, it subtracts -1.
If the price stays the same, it adds 0.
Decay Factor: Each step, the previous value is multiplied by a factor (e.g., 0.9) to shrink it slightly. This keeps the oscillator from growing too big and focuses it on recent price action.
Signals: The oscillator moves around zero. When it crosses certain levels (e.g., 5 and 10), it warns you about overbought or oversold zones:
Weak Signal: Above ±5, the market might be stretching a bit.
Strong Signal: Above ±10, a reversal is more likely.
In short, it tracks the "rhythm" of price streaks (consecutive ups or downs) and signals when things might be getting extreme.
How It Looks on the Chart
Line: The oscillator moves around a zero line.
Colors:
Blue: Normal zone (between -5 and +5).
Orange: Weak overbought (+5 and up) or oversold (-5 and down).
Red: Strong overbought (+10 and up).
Lime: Strong oversold (-10 and down).
Threshold Lines: You’ll see lines at 0, ±5, and ±10 on the chart to show where you are.
How to Use It?
Here’s how to trade with this oscillator:
Buy Opportunity (Long Position):
When?: The oscillator drops below -5 (weak) or -10 (strong), then starts moving back toward zero. This suggests the price has hit a bottom and might rise.
Example: It falls to -12 (lime), then rises to -8. You could buy, expecting a bounce.
Tip: Wait for a green candle to confirm if you want to be safer.
Sell Opportunity (Short Position):
When?: The oscillator rises above +5 (weak) or +10 (strong), then starts dropping back toward zero. This indicates the price might have peaked and could fall.
Example: It hits +11 (red), then drops to +7. You could sell, expecting a decline.
Tip: Look for a red candle to confirm the turn.
Neutral Zone: If it’s between -5 and +5, the market is balanced. You can wait for a clearer signal.
Practical Steps to Use
Add to TradingView:
Paste the code into Pine Editor and click “Add to Chart.”
Adjust Settings (Optional):
Decay (0.9): Lower to 0.7 for faster response, raise to 0.95 for smoother movement.
Thresholds (5 and 10): Change them (e.g., 4 and 8) based on your market.
Watch Signals:
Follow the color changes and threshold crossings.
Set Alerts:
Right-click the oscillator > “Add Alert” to get notified on overbought/oversold signals.
Things to Watch Out For
Confirmation: Pair it with support/resistance levels or candlestick patterns for stronger signals.
Market Type: Works best in range-bound (sideways) markets. In strong trends (all up or down), signals might mislead.
Risk: Always use a stop loss—below the last low for buys, above the last high for sells.
Summary
The "Pulse of Cycle" is a simple yet powerful tool that tracks price movement streaks. Use it to catch reversals at strong signals (-10/+10) or get early warnings at weak signals (±5). The colors and lines on the chart make it easy to see when to act.
NSE Index Strategy with Entry/Exit MarkersExplanation of the Code
Trend Filter (200 SMA):
The line trendSMA = ta.sma(close, smaPeriod) calculates the 200‑period simple moving average. By trading only when the current price is above this SMA (inUptrend = close > trendSMA), we aim to trade in the direction of the dominant trend.
RSI Entry Signal:
The RSI is calculated with rsiValue = ta.rsi(close, rsiPeriod). The script checks for an RSI crossover above the oversold threshold using ta.crossover(rsiValue, rsiOversold). This helps capture a potential reversal from a minor pullback in an uptrend.
ATR-Based Exits:
ATR is computed by atrValue = ta.atr(atrPeriod) and is used to set the stop loss and take profit levels:
Stop Loss: stopLossPrice = close - atrMultiplier * atrValue
Take Profit: takeProfitPrice = close + atrMultiplier * atrValue
This dynamic approach allows the exit levels to adjust according to the current market volatility.
Risk and Money Management:
The strategy uses a fixed percentage of equity (10% by default) for each trade. The built‑in commission parameter helps simulate real-world trading costs.
Holy MollySell when the last closed candle has the purpe marking.
Buy when the last candle gets a green marking.
TP is alawys the horizontal line.
Tweak the settings for your liking, the threshold should be set always to the actual pair, to be within a few pips or points, you can get references from the chart, where you have two loes or highs really close almost with zero difference, if those are shown only, your settings is ok.
Do a back test, you will see, price eventually always gets there. Mostly the very next candle but sometimes it takes a few candles.
Range Breakout [BigBeluga]Range Breakout is a dynamic channel-based indicator designed to identify breakout opportunities and price reactions within defined ranges. It automatically creates upper and lower bands with a midline, helping traders spot breakout zones, retests, and potential fakeouts.
🔵 Key Features:
Dynamic Channel Formation:
Automatically plots upper and lower channel bands with a midline based on ATR calculations.
Channels adjust upon breakout events or after a predefined number of bars to reflect new price ranges.
Breakout Detection:
Green circles appear when price breaks above the upper channel edge.
Red circles appear when price breaks below the lower channel edge.
A new channel is formed after each breakout, allowing traders to monitor evolving price ranges.
Retest Signals:
Upward-pointing green triangles signal a retest of the lower band, indicating potential support.
Downward-pointing red triangles indicate a retest of the upper band, suggesting possible resistance.
Filter Signals by Trends (New Feature):
Optional toggle to filter ▲ and ▼ signals based on channel breakout conditions.
When enabled:
In a bullish channel (confirmed by a green circle breakout), only ▲ signals are displayed.
In a bearish channel (confirmed by a red circle breakout), only ▼ signals are displayed.
Helps traders align retest signals with the prevailing trend for higher-quality trade setups.
Fakeout Identification:
'X' symbols appear when price breaks the upper or lower edge of the channel and quickly returns back inside.
Helps traders identify and avoid false breakouts.
🔵 Usage:
Breakout Trading: Use the green and red circle signals to identify potential breakout trades.
Retest Confirmation: Look for triangle markers to confirm retests of key levels, aiding in entry or exit decisions.
Fakeout Alerts: Utilize the 'X' signals to spot and avoid potential trap moves.
Dynamic Range Monitoring: Stay aware of changing market conditions with automatically updating channels.
Range Breakout is an essential tool for traders seeking to capitalize on range breakouts, retests, and fakeout scenarios. Its dynamic channels and clear visual signals provide a comprehensive view of market structure and potential trade setups.
Price Change IndicatorPrice Change Indicator (PCI)
Version: 1.0
Author: LazyTrader 🚀
🔍 Overview
The Price Change Indicator (PCI) helps traders visualize and compare price changes between the current bar and the previous bar. It provides a customizable display of price changes in two formats:
Percentage (%) Change – Relative price movement.
Natural Change – Absolute difference in price units.
⚙️ Key Features
✅ Customizable Calculation Method: Choose how the price change is calculated:
Opening Price
Closing Price
High
Low
✅ Flexible Display Format:
Show Percentage (%) Change.
Show Natural (Absolute) Change in price.
✅ Adjustable Sensitivity with Multiplier:
100 (Standard Change)
1000 (Small Change)
10000 (Tiny Change)
✅ Intuitive Labeling:
Green label (above bar) for increase.
Red label (below bar) for decrease.
No label if no change.
Large, easy-to-read labels for better visibility.
✅ Perfect for Any Market:
Stocks 📈
Forex 💱
Crypto 🚀
Commodities 🛢️
📊 How It Works
The indicator calculates the difference between the current and previous bar’s price based on your chosen method.
The result is displayed as either a percentage (%) or a natural price change.
If the price has increased, a green label is displayed above the bar.
If the price has decreased, a red label is displayed below the bar.
⚡ How to Use
Add the indicator to your chart.
Go to settings and customize:
Select calculation method (Open, Close, High, Low).
Choose display format (% or Natural Change).
Adjust multiplier for more sensitivity.
Analyze the labels to see price movements easily!
🔧 Settings Explained
Setting Description
Price Calculation Method: Choose Open, Close, High, or Low price for comparison.
Display Format: Show either % Change or Natural Change.
Multiplier: Apply 100, 1000, or 10000 to scale small price changes.
Show Labels: Toggle labels on/off.
🎯 Best Use Cases
🔹 Identifying strong price movements
🔹 Spotting trends and momentum shifts
🔹 Comparing price movement intensity
🔹 Works for scalping, swing trading, and long-term analysis
NLS - 52W High Screener (3, 5, 7 Days)This indicator automatically detects stocks that have reached a new 52-week high within the last 3, 5, or 7 days. Perfect for traders looking for breakouts and strong momentum stocks!
📊 Features:
✅ Identifies new 52-week highs within the last 3, 5, or 7 days
✅ Fully Screener-compatible – Easily filter stocks in the TradingView Screener
✅ Plots the 52-week high as a blue line in the chart for better visualization
✅ Built-in alerts to notify you when a new 52W high is reached
✅ Optimized for the 1D (daily) timeframe
🛠️ How to Use in the Screener:
1️⃣ Add & activate the indicator
2️⃣ Open the TradingView Screener
3️⃣ Filter using one of these columns:
Screener 52W High Last 3 Days
Screener 52W High Last 5 Days
Screener 52W High Last 7 Days
4️⃣ Set the filter to "is true" to see relevant stocks
📢 Alerts:
Get notified when a stock reaches a new 52-week high in the last 3, 5, or 7 days!
🔍 Ideal for:
✔ Trend-following & breakout traders 🚀
✔ Swing traders looking for strong stocks 📈
✔ Screener users searching for momentum setups
EMA/MA with OHCL Candle and Long Wick – A Comprehensive Trading
Dear Traders,
I am excited to introduce EMA/MA with OHCL Candle and Long Wick, a powerful trading indicator designed to enhance market analysis by combining Exponential Moving Averages (EMA), Simple Moving Averages (MA), OHCL candle patterns, and long wick detection into a single tool.
Key Features:
✅ Customizable Wick Size & Timeframe – Adapt the indicator to different market conditions by adjusting wick size and analyzing price action over any timeframe.
✅ EMA & MA for Trend Analysis – Includes multiple EMAs and MAs (5, 9, 15, 20, 50, 100, 200) to help identify trends and potential reversals.
✅ Long Wick Signal Detection – Identifies strong Buy and Sell opportunities based on wick size, signaling potential market turning points.
✅ OHCL Candle Analysis – Highlights OHCL patterns to provide additional insights into price action.
✅ User-Friendly & Lightweight – Efficiently coded for seamless performance on TradingView.
This indicator is perfect for traders looking to refine their entry and exit strategies by leveraging price action and moving averages. Whether you're a scalper, day trader, or swing trader, this tool provides valuable insights to enhance your decision-making.
Give it a try, and let me know your feedback! 🚀
Best regards,
Purnendu Singh
Price and Longitude Angles Planetary Price & Longitude Angles Indicator
This indicator plots planetary price and longitude angles starting from a user-selected date and time, offering a distinctive lens to explore the relationship between price and planetary timing. It supports both heliocentric and geocentric, enabling flexible and in-depth planetary analysis. The angles can be plotted across any time frame for maximum versatility.
How to Use
Once the indicator is loaded, you’ll be prompted to select a starting date and time for your analysis. From there, customize it as follows:
Select Planetary Options:
To plot the price and longitude for a single planet, choose the same planet in both dropdown menus.
To plot the average of two planets, select a different planet in each dropdown.
Set the Price Per Degree of Longitude: Adjust this value to define the scaling of the planetary angles relative to price.
Customize Fan Settings:
Toggle the mirroring of the fan on or off based on your needs.
Show or hide specific angle divisions to tailor the display to your preferences.
Display or conceal the information label that indicates the price per longitude and the number of degrees traveled.
This indicator is inspired by the methodologies of W.D. Gann and Patrick Mikula, expanding on concepts from Gann Scientific Method Unveiled, Volume 2. It was built using Astrolib by @BarefootJoey
I crafted this tool through dedication to support my own study of these ideas. I’m sharing it open-source not only to deepen my understanding and honor the work of Gann and Mikula, but also to invite collaboration. There’s always room for improvement—whether in functionality, accuracy, or design—and I hope others will join me in refining it. This is for those like me: eager to explore these concepts but lacking tools to experiment with. Let’s build on it together.
Crystal Order BlockThe Crystal Order Block Indicator is a powerful tool designed to help traders identify key institutional order blocks with high precision. This indicator is ideal for traders following Smart Money Concepts (SMC) and Institutional Trading Strategies, providing clear insights into potential high-probability trade setups.
🔹 Key Features:
✔ Automatic Order Block Detection: Identifies valid bullish & bearish order blocks.
✔ Unmitigated Order Blocks Highlighted: Focuses on fresh order blocks for improved trade opportunities.
✔ Trend-Focused Trading: Works best when combined with market structure analysis.
✔ Multi-Timeframe Support: Suitable for scalping, swing trading, and intraday trading.
✔ Risk Management Enhancement: Helps traders refine entries and exits based on institutional price movements.
📈 How to Use the Crystal Order Block Indicator:
🔹 Identifying Order Blocks:
➡ The indicator automatically detects order blocks formed by institutional trading activity.
➡ Unmitigated order blocks are highlighted, indicating areas where price may react.
🔹 High-Probability Trade Setups:
➡ Buy Setup: Look for a bullish order block in an uptrend, confirming strength.
➡ Sell Setup: Identify a bearish order block in a downtrend for potential short trades.
🔹 Order Block Mitigation:
➡ The updated version filters out mitigated order blocks, allowing traders to focus on fresh trading opportunities.
📊 Best Practices & Timeframes:
🔸 Works on all timeframes, but higher accuracy is observed on M30 and above.
🔸 Best suited for Smart Money Trading, Institutional Trading, and Price Action Strategies.
🔸 Should be used with liquidity concepts and market structure analysis for enhanced precision.
⚠ Important Note:
This indicator is a technical tool designed to assist traders in market analysis. It does not guarantee success and should be used alongside proper risk management and trading discipline.
TradFi Fundamentals: Enhanced Macroeconomic Momentum Trading Introduction
The "Enhanced Momentum with Advanced Normalization and Smoothing" indicator is a tool that combines traditional price momentum with a broad range of macroeconomic factors. I introduced the basic version from a research paper in my last script. This one leverages not only the price action of a security but also incorporates key economic data—such as GDP, inflation, unemployment, interest rates, consumer confidence, industrial production, and market volatility (VIX)—to create a comprehensive, normalized momentum score.
Previous indicator
Explanation
In plain terms, the indicator calculates a raw momentum value based on the change in price over a defined lookback period. It then normalizes this momentum, along with several economic indicators, using a method chosen by the user (options include simple, exponential, or weighted moving averages, as well as a median absolute deviation (MAD) approach). Each normalized component is assigned a weight reflecting its relative importance, and these weighted values are summed to produce an overall momentum score.
To reduce noise, the combined momentum score can be further smoothed using a user-selected method.
Signals
For generating trade signals, the indicator offers two modes:
Zero Cross Mode: Signals occur when the smoothed momentum line crosses the zero threshold.
Zone Mode: Overbought and oversold boundaries (which are user defined) provide signals when the momentum line crosses these preset limits.
Definition of the Settings
Price Momentum Settings:
Price Momentum Lookback: The number of days used to compute the percentage change in price (default 50 days).
Normalization Period (Price Momentum): The period over which the price momentum is normalized (default 200 days).
Economic Data Settings:
Normalization Period (Economic Data): The period used to normalize all economic indicators (default 200 days).
Normalization Method: Choose among SMA, EMA, WMA, or MAD to standardize both price and economic data. If MAD is chosen, a multiplier factor is applied (default is 1.4826).
Smoothing Options:
Apply Smoothing: A toggle to enable further smoothing of the combined momentum score.
Smoothing Period & Method: Define the period and type (SMA, EMA, or WMA) used to smooth the final momentum score.
Signal Generation Settings:
Signal Mode: Select whether signals are based on a zero-line crossover or by crossing user-defined overbought/oversold (OB/OS) zones.
OB/OS Zones: Define the upper and lower boundaries (default upper zones at 1.0 and 2.0, lower zones at -1.0 and -2.0) for zone-based signals.
Weights:
Each component (price momentum, GDP, inflation, unemployment, interest rates, consumer confidence, industrial production, and VIX) has an associated weight that determines its contribution to the overall score. These can be adjusted to reflect different market views or risk preferences.
Visual Aspects
The indicator plots the smoothed combined momentum score as a continuous blue line against a dotted zero-line reference. If the Zone signal mode is selected, the indicator also displays the upper and lower OB/OS boundaries as horizontal lines (red for overbought and green for oversold). Buy and sell signals are marked by small labels ("B" for buy and "S" for sell) that appear at the bottom or top of the chart when the score crosses the defined thresholds, allowing traders to quickly identify potential entry or exit points.
Conclusion
This enhanced indicator provides traders with a robust approach to momentum trading by integrating traditional price-based signals with a suite of macroeconomic indicators. Its normalization and smoothing techniques help reduce noise and mitigate the effects of outliers, while the flexible signal generation modes offer multiple ways to interpret market conditions. Overall, this tool is designed to deliver a more nuanced perspective on market momentum.
Market Structure [ActiveQuants]The Market Structure indicator is a powerful tool designed to help traders identify key market structure shifts and change of character (CHoCH) points. By plotting swing highs, swing lows, and structural breaks , this indicator allows traders to track price action dynamics, improving trade execution and strategy development.
█ KEY FEATURES
Market Structure Visualization : Automatically detects and plots pivot highs and pivot lows , highlighting structural points on the chart.
Change of Character (CHoCH) Detection : Identifies bullish and bearish CHoCH events, marking key shifts in market sentiment.
Customizable Sensitivity : Adjust the pivot sensitivity to fine-tune market structure identification based on different trading styles and timeframes.
Dynamic Labeling & Line Management : Automatically removes old lines and labels to keep the chart clean and focused on recent price action.
User-Defined Display Options : Customize the colors, visibility, and number of bars shown to match your personal trading preferences.
█ CONCLUSION
The Market Structure & CHoCH Indicator is an essential tool for traders who rely on price action and structure-based strategies. By visually mapping key swing points and structure shifts , it enhances decision-making, helping traders align with the market trend and spot potential reversals.
█ IMPORTANT
⚠ CHoCH signals should be used in conjunction with other confluences such as supply & demand zones, order flow, or trend confirmation.
⚠ Adjust pivot sensitivity based on your preferred timeframe and asset class to optimize accuracy.
Incorporate this indicator into your trading workflow to enhance market structure analysis and refine entry & exit strategies .
📈 Happy trading! 🚀
Daily & Weekly False-Breakout DetectorDaily & Weekly Lines
We retrieve previous day/week’s High and Low.
lookahead=barmerge.lookahead_on means we see the “final” daily/weekly bar values intraday, so it may repaint in real‐time.
False Breakout Logic
Intraday crosses of close above the previous high (PDH or PWH).
By the end of the daily/weekly bar, close is back below that high.
Similarly for false breakdowns below PDL or PWL.
Shape/Alert
Each time an intraday bar crosses up or down, if the final daily/weekly close reverts back inside the prior range, a label is drawn and an alert is triggered.
Because we are “peeking” at the daily/weekly close, these signals can appear or disappear in real‐time.
If you only want a confirmed signal after the period’s close, switch to lookahead_off, which will finalize them at the next day or next week.
Bitcoin Power Law: Complete with Oscillator + Future Projection
Firstly, we would like to give credit to @apsk32 and @x_X_77_X_x as part of the code originates from their work. Additionally, @apsk32 is widely credited with applying the Power Law concept to Bitcoin and popularizing this model within the crypto community. Additionally, the visual layout is fully inspired by @apsk32's designs, and we think it looks amazing. So much so that we had to turn it into a TradingView script. Thank you!
Understanding the Bitcoin Power Law Model
Also called the Long-Term Bitcoin Power Law Model. The Bitcoin Power Law model tries to capture and predict Bitcoin's price growth over time. It assumes that Bitcoin's price follows an exponential growth pattern, where the price increases over time according to a mathematical relationship.
By fitting a power law to historical data, the model creates a trend line that represents this growth. It then generates additional parallel lines (support and resistance lines) to show potential price boundaries, helping to visualize where Bitcoin’s price could move within certain ranges.
In simple terms, the model helps us understand Bitcoin's general growth trajectory and provides a framework to visualize how its price could behave over the long term.
The Bitcoin Power Law has the following function:
Power Law = 10^(a + b * log10(d))
Consisting of the following parameters:
a: Power Law Intercept (default: -17.668).
b: Power Law Slope (default: 5.926).
d: Number of days since a reference point(calculated by counting bars from the reference point with an offset).
Explanation of the a and b parameters:
Roughly explained, the optimal values for the a and b parameters are determined through a process of linear regression on a log-log scale (after applying a logarithmic transformation to both the x and y axes). On this log-log scale, the power law relationship becomes linear, making it possible to apply linear regression. The best fit for the regression is then evaluated using metrics like the R-squared value, residual error analysis, and visual inspection. This process can be quite complex and is beyond the scope of this post.
Applying vertical shifts to generate the other lines:
Once the initial power-law is created, additional lines are generated by applying a vertical shift . This shift is achieved by adding a specific number of days (or years in case of this script) to the d-parameter. This creates new lines perfectly parallel to the initial power law with an added vertical shift, maintaining the same slope and intercept.
In the case of this script, shifts are made by adding +365 days, +2 * 365 days, +3 * 365 days, +4 * 365 days, and +5 * 365 days, effectively introducing one to five years of shifts. This results in a total of six Power Law lines, as outlined below (From lowest to highest):
Base Power Law Line (no shift)
1-year shifted line
2-year shifted line
3-year shifted line
4-year shifted line
5-year shifted line
The six power law lines:
Bitcoin Power Law Oscillator
This publication also includes the oscillator version of the Bitcoin Power Law. This version applies a logarithmic transformation to the price, Base Power Law Line, and 5-year shifted line using the formula log10(x) .
The log-transformed price is then normalized using min-max normalization relative to the log-transformed Base Power Law Line and 5-year shifted line with the formula:
normalized price = log(close) - log(Base Power Law Line) / log(5-year shifted line) - log(Base Power Law Line)
Finally, the normalized price was multiplied by 5 to map its value between 0 and 5, aligning with the shifted lines. The Oscillator version can be found here .
Interpretation of the Bitcoin Power Law Model:
The shifted Power Law lines provide a framework for predicting Bitcoin's future price movements based on historical trends. These lines are created by applying a vertical shift to the initial Power Law line, with each shifted line representing a future time frame (e.g., 1 year, 2 years, 3 years, etc.).
By analyzing these shifted lines, users can make predictions about minimum price levels at specific future dates. For example, the 5-year shifted line will act as the main support level for Bitcoin’s price in 5 years, meaning that Bitcoin’s price should not fall below this line, ensuring that Bitcoin will be valued at least at this level by that time. Similarly, the 2-year shifted line will serve as the support line for Bitcoin's price in 2 years, establishing that the price should not drop below this line within that time frame.
On the other hand, the 5-year shifted line also functions as an absolute resistance , meaning Bitcoin's price will not exceed this line prior to the 5-year mark. This provides a prediction that Bitcoin cannot reach certain price levels before a specific date. For example, the price of Bitcoin is unlikely to reach $100,000 before 2021, and it will not exceed this price before the 5-year shifted line becomes relevant. After 2028, however, the price is predicted to never fall below $100,000, thanks to the support established by the shifted lines.
In essence, the shifted Power Law lines offer a way to predict both the minimum price levels that Bitcoin will hit by certain dates and the earliest dates by which certain price points will be reached. These lines help frame Bitcoin's potential future price range, offering insight into long-term price behavior and providing a guide for investors and analysts. Lets examine some examples:
Example 1:
In Example 1 it can be seen that point A on the 5-year shifted line acts as major resistance . Also it can be seen that 5 years later this price level now corresponds to the Base Power Law Line and acts as a major support (Note: Vertical yearly grid lines have been added for this purpose👍).
Example 2:
In Example 2, the price level at point C on the 3-year shifted line becomes a major support three years later at point C, now aligning with the Base Power Law Line.
Finally, let's explore some future price predictions, as this script provides projections on the weekly timeframe :
Example 3:
In Example 3, the Bitcoin Power Law indicates that Bitcoin's price cannot surpass approximately $808K before 2030 as can be seen at point E, while also ensuring it will be at least $224K by then (point F).
Wickless Candle Indicator with Extended Lines (final)This Pine Script indicator identifies “wickless” candles—those with no upper wick (when the close equals the high) or no lower wick (when the open equals the low)—and marks these events on the chart. When such a candle is detected, it:
Records the Level and Bar Index:
Saves the price level (high for wickless tops, low for wickless bottoms) and the bar index where the condition occurred.
Draws an Extended Horizontal Line:
Creates a green horizontal line for a wickless top or a red line for a wickless bottom, starting at the detection bar and extending across subsequent bars as long as the price remains below (for tops) or above (for bottoms) the recorded level.
Resets When the Price Breaks the Level:
If a future bar’s price moves beyond the saved level (i.e., a high above a wickless top or a low below a wickless bottom), the indicator resets that level, ending the extension of the line.
Visual Markers:
Additionally, it plots a small triangle above a wickless top and below a wickless bottom for easy identification on the chart.
Overall, this script helps traders visualize potential support or resistance levels created by candles that close at their highs or open at their lows, with lines that dynamically adjust as price evolves.
RSI with Bollinger Bands and Buy/Sell SignalsPurpose:
This indicator combines the Relative Strength Index (RSI) with Bollinger Bands to identify overbought and oversold conditions in the market. It also generates buy and sell signals based on the interaction between the RSI and the Bollinger Bands. It is particularly useful for traders looking for opportunities in volatile or trending markets.
How It Works:
RSI (Relative Strength Index):
The RSI measures the magnitude of recent price changes to evaluate whether an asset is overbought (values > 70) or oversold (values < 30).
In this indicator, horizontal lines at levels 70 (overbought) and 30 (oversold) are used as reference points.
Bollinger Bands:
Bollinger Bands are calculated around a smoothed moving average of the RSI. The upper band represents dynamic overbought levels, while the lower band indicates dynamic oversold levels.
These bands automatically adjust their width based on the volatility of the RSI, allowing them to adapt to different market conditions.
Buy and Sell Signals:
Buy Signal: A buy signal is generated when the RSI exceeds both the upper Bollinger Band and the overbought level (70). This suggests that the asset is in an extreme bullish phase.
Sell Signal: A sell signal is generated when the RSI falls below both the lower Bollinger Band and the oversold level (30). This suggests that the asset is in an extreme bearish phase.
Alerts:
The indicator includes automatic alerts to notify you when buy or sell signals are generated. This allows traders to act quickly on new opportunities.
Best Practices:
Confirmation in Lower Timeframes:
Although this indicator is powerful, it is recommended to confirm signals in lower timeframes before making trading decisions. For example:
If you receive a buy signal on a 4-hour chart, check if the RSI and Bollinger Bands on lower timeframes (such as 1 hour or 15 minutes) also show bullish signals.
This reduces the risk of false positives and increases the accuracy of your entries.
Use in Trends:
This indicator works best in markets with clear trends. In sideways or low-volatility markets, signals may be less reliable due to the lack of directional momentum.
Risk Management:
Always use stop-loss and take-profit to protect your positions. Buy and sell signals are just one tool for analysis; they do not guarantee results.
Combination with Other Indicators:
To improve accuracy, consider combining this indicator with others, such as MACD, Stochastic Oscillator, or Japanese candlestick patterns. This can provide additional confirmation before opening a position.
Summary:
The RSI + Bollinger Bands with Buy/Sell Signals indicator is an advanced tool designed to identify entry and exit points in the market based on extreme overbought and oversold conditions. However, to maximize its effectiveness, it is crucial to confirm signals in lower timeframes and use it in combination with other technical analysis tools. With proper risk management and careful interpretation of signals, this indicator can be a valuable ally in your trading strategy.
2:30 [LuciTech]this is a technical analysis tool designed to highlight key price levels and patterns during a specific trading window, based on UK time (Europe/London). It overlays visual elements on the chart, including a 12 PM reference line, Buy Side Liquidity (BSL) and Sell Side Liquidity (SSL) levels, a highlighted 2:30 PM candle, and Engulfing Fair Value Gaps (FVGs). This indicator is intended for traders who focus on intraday price action and liquidity zones.
Features
The 12 PM Line displays a vertical line at 12:00 PM (UK time) to mark the start of the session. It’s customizable, allowing you to enable or disable it and adjust its color.
BSL/SSL Lines track the highest high (BSL) and lowest low (SSL) from 12:00 PM to 2:00 PM (UK time). These lines extend horizontally until 3:30 PM, after which they remain static at their last recorded levels. You can customize them by enabling or disabling visibility, adjusting colors, choosing a line style (solid, dashed, or dotted), and setting the width.
The 2:30 PM Candle highlights the candle at 2:30 PM (UK time) with a distinct color. It’s customizable, with options to enable or disable it and change its color.
Engulfing FVG (Fair Value Gap) identifies bullish and bearish engulfing patterns with a gap from the prior candle’s range. It draws a shaded box over the FVG area, and you can customize it by enabling or disabling it and adjusting the box color.
How It Works
The indicator operates within a session starting at 12:00 PM (UK time). BSL/SSL levels update between 12:00 PM and 2:00 PM, with lines extending until 3:30 PM. After 3:30 PM, these lines freeze.
BSL/SSL lines show the highest price (BSL) and lowest price (SSL) reached during the 12:00 PM to 2:00 PM window. After 3:30 PM, they remain static, marking the final range boundaries.
The 2:30 PM candle emphasizes a key timestamp, often of interest to intraday traders.
Engulfing FVGs detect significant price gaps created by engulfing candles, which may indicate potential reversal or continuation zones.
Settings
12 PM Line Settings let you toggle visibility and set the line color.
BSL/SSL Line Settings allow you to toggle visibility, set BSL and SSL colors, choose a line style (Solid, Dashed, Dotted), and adjust width (1-4).
2:30 Candle Settings let you toggle visibility and set the candle color.
Engulfing FVG Settings allow you to toggle visibility and set the box color.
Interpretation
The 12 PM Line serves as a reference for the session start.
BSL/SSL Lines may act as potential support or resistance zones or highlight liquidity areas. After 3:30 PM, they remain static, showing the session’s final range.
The 2:30 PM Candle can be monitored for price action signals, such as reversals or breakouts.
Engulfing FVGs shaded areas may indicate imbalances in supply and demand, useful for identifying trade opportunities or stop-loss placement.
Notes
The timezone is set to Europe/London (UK time). Ensure your chart’s timezone aligns for accurate results.
This indicator is best used on intraday timeframes, such as 1-minute or 5-minute charts.
It provides visual aids for analysis and does not generate buy or sell signals on its own.
Price Action: Engulfing PatternsBullish Engulfing Pattern Detection: A bullish engulfing pattern is identified when the previous candle is bearish (close < open ), the current candle is bullish (close > open), and the current candle's body engulfs the previous candle's body (close >= open and open <= close ).
Bearish Engulfing Pattern Detection: A bearish engulfing pattern is identified when the previous candle is bullish (close > open ), the current candle is bearish (close < open), and the current candle's body engulfs the previous candle's body (open >= close and close <= open ).
Plotting the Patterns: The plotshape function is used to mark the detected patterns on the chart. Bullish engulfing patterns are marked below the bar with a green upward label, while bearish engulfing patterns are marked above the bar with a red downward label.
ATR BandsThe ATR Bands indicator is a volatility-based tool that plots dynamic support and resistance levels around the price using the Average True Range (ATR). It consists of two bands:
Upper Band: Calculated as current price + ATR, representing an upper volatility threshold.
Lower Band: Calculated as current price - ATR, serving as a lower volatility threshold.
Key Features:
✅ Measures Volatility: Expands and contracts based on market volatility.
✅ Dynamic Support & Resistance: Helps identify potential breakout or reversal zones.
✅ Customizable Smoothing: Supports multiple moving average methods (RMA, SMA, EMA, WMA) for ATR calculation.
How to Use:
Trend Confirmation: If the price consistently touches or exceeds the upper band, it may indicate strong bullish momentum.
Reversal Signals: A price approaching the lower band may suggest a potential reversal or increased selling pressure.
Volatility Assessment: Wide bands indicate high volatility, while narrow bands suggest consolidation.
This indicator is useful for traders looking to incorporate volatility-based strategies into their trading decisions