Candle Color Based on TimeThis Pine Script indicator highlights ETH session candles with a user-specified color, allowing traders to distinguish between ETH and RTH sessions without switching charts. It provides a clearer visual separation compared to session boxes. The RTH session hours are also customizable in the settings, ensuring flexibility for different market hours if the trader wishes to do so.
Indicators and strategies
TDI 7 MA and HISTOGRAMTDI %K Histogram with 7 MA
Overview
This indicator enhances trend and momentum analysis using the %K line from the Traders Dynamic Index (TDI), combined with a 7-period moving average (MA) and a histogram.
How It Works
The script calculates %K (similar to Stochastic RSI), representing the relative price position within a given range.
A 7-period Simple Moving Average (SMA) is applied to smooth the %K line, reducing noise and improving trend clarity.
A histogram is plotted based on the difference between %K and the 7-period MA:
Green bars indicate that %K is above the 7-period MA, suggesting bullish momentum.
Red bars indicate that %K is below the 7-period MA, suggesting bearish momentum.
Key Features
-%K Line (Blue) – Reflects short-term momentum shifts.
-7-period MA (Purple) – Helps smooth out fluctuations in %K for better trend identification.
-Histogram (Green/Red Columns) – Highlights momentum shifts visually.
Overbought (68), Midpoint (50), and Oversold (32) Levels – Provides reference points for potential reversals or trend continuation.
How to Use
Bullish Confirmation: When the histogram turns green and %K is above the 7 MA, it suggests upward momentum.
Bearish Confirmation: When the histogram turns red and %K is below the 7 MA, it suggests downward momentum.
Overbought/Oversold Conditions: Use the 68 and 32 levels as potential reversal zones, but always confirm with price action.
Midpoint (50 Level): Acts as a dynamic support/resistance area for momentum shifts.
This indicator is suitable for trend-following and momentum-based trading strategies, whether on lower timeframes for scalping or higher timeframes for swing trading.
Try it out and integrate it with your trading system to refine your entries and exits!
AyebaleJohnBob-Trading-BotAyebale John Bob - Trading-Bot Overview:
This trading strategy is designed to automate trades based on the "Smart Money Concepts" and "Fair Value Gaps" (FVG). The bot leverages multiple technical indicators and logic to execute buy and sell trades with dynamic stop-loss and take-profit (TP) levels.
Key Features:
User Inputs:
Bull & Bear Colors: Customizable colors for bullish and bearish trends.
Fair Value Gap (FVG) Color: Customizable color for visualizing FVG zones.
ATR Multiplier: Defines the sensitivity of stop-loss calculations based on Average True Range (ATR).
Take-Profit Multipliers: A set of five multipliers that scale take-profit levels dynamically.
Trade Signals:
Buy Signal: Generated when the price crosses above a certain low or when a bullish Fair Value Gap (FVG) is detected.
Sell Signal: Triggered when the price crosses below a high or when a bearish FVG is identified.
Stop-Loss & Take-Profit Logic:
Stop-loss levels are calculated using ATR and the specified multiplier.
Take-profit levels are dynamically determined based on the ATR multipliers, with five different levels for each trade.
Trade Execution:
The strategy allows for five simultaneous buy or sell entries, with each having its own take-profit and stop-loss levels.
The bot operates continuously, without any session restrictions, allowing trades at any time.
Visual Indicators:
Entry Signals: Visual shapes (green for buy and red for sell) appear on the chart to indicate entry points.
Progress Bar: A real-time progress bar is plotted, tracking the percentage gain/loss from the entry price.
Trade Information Table:
A dynamic table is used to display important trade information, including entry price, take-profit levels, and stop-loss. This table updates for each new trade (buy or sell), and shows real-time trade progress.
Risk Management:
The stop-loss is dynamically adjusted based on the ATR calculation, ensuring that the bot adapts to changing market volatility.
Take-profit levels are spread across five increments, offering multiple opportunities for profit capture.
Summary:
The Ayebale John Bob - Trading-Bot is designed to implement a sophisticated strategy that combines smart money concepts, fair value gap analysis, and robust risk management. It provides real-time trade information, progress tracking, and a flexible approach to stop-loss and take-profit strategies. The bot is ideal for traders looking to automate trades and visually track their progress directly on the chart.
Investment Tracker Profit/lossThe Investment Tracker is a custom-built indicator designed to help traders and investors track their performance in real time. With this tool, you can easily monitor the gains or losses from your initial investment based on the price movement of a specific token. The indicator dynamically updates to show how much you've earned or lost, providing valuable insights into your investment strategy.
Key Features:
Profit/Loss Tracking: Instantly see whether you're in profit (green) or loss (red) based on the token's price movement.
Current Value Calculation: Tracks your investment’s current value by comparing the price at which you bought the token with its current price.
Visual Representation: Displays your initial investment, current value, and profit/loss on the chart with dynamic color coding (green for profit, red for loss).
Top-Right Display: Profit/loss data is conveniently displayed in the top-right corner of the chart, providing a clean and non-intrusive way to monitor your position.
Transparency: The indicator's lines have reduced opacity, allowing you to view your position without obstructing the price action.
How to Use:
Input your initial investment amount (in USD or your desired currency).
Set the buy price of the token when you made the purchase.
Watch the indicator update as the price of the token changes, providing real-time tracking of your profit or loss.
Whether you're holding a single position or monitoring multiple investments, this tracker gives you a clear and up-to-date view of how your portfolio is performing.
Perfect For:
Crypto traders who want to monitor their positions in real time.
Long-term investors looking to track the performance of their investments.
Anyone who wants a simple, visual way to measure their gains and losses in the market.
waves█ OVERVIEW
This library intended for use in Bar Replay provides functions to generate various wave forms (sine, cosine, triangle, square) based on time and customizable parameters. Useful for testing and in creating oscillators, indicators, or visual effects.
█ FUNCTIONS
• getSineWave()
• getCosineWave()
• getTriangleWave()
• getSquareWave()
█ USAGE EXAMPLE
//@version=6
indicator("Wave Example")
import kaigouthro/waves/1
plot(waves.getSineWave(cyclesPerMinute=15))
█ NOTES
* barsPerSecond defaults to 10. Adjust this if not using 10x in Bar Replay.
* Phase shift is in degrees.
---
Library "waves"
getSineWave(cyclesPerMinute, bar, barsPerSecond, amplitude, verticalShift, phaseShift)
`getSineWave`
> Calculates a sine wave based on bar index, cycles per minute (BPM), and wave parameters.
Parameters:
cyclesPerMinute (float) : (float) The desired number of cycles per minute (BPM). Default is 30.0.
bar (int) : (int) The current bar index. Default is bar_index.
barsPerSecond (float) : (float) The number of bars per second. Default is 10.0 for Bar Replay
amplitude (float) : (float) The amplitude of the sine wave. Default is 1.0.
verticalShift (float) : (float) The vertical shift of the sine wave. Default is 0.0.
phaseShift (float) : (float) The phase shift of the sine wave in radians. Default is 0.0.
Returns: (float) The calculated sine wave value.
getCosineWave(cyclesPerMinute, bar, barsPerSecond, amplitude, verticalShift, phaseShift)
`getCosineWave`
> Calculates a cosine wave based on bar index, cycles per minute (BPM), and wave parameters.
Parameters:
cyclesPerMinute (float) : (float) The desired number of cycles per minute (BPM). Default is 30.0.
bar (int) : (int) The current bar index. Default is bar_index.
barsPerSecond (float) : (float) The number of bars per second. Default is 10.0 for Bar Replay
amplitude (float) : (float) The amplitude of the cosine wave. Default is 1.0.
verticalShift (float) : (float) The vertical shift of the cosine wave. Default is 0.0.
phaseShift (float) : (float) The phase shift of the cosine wave in radians. Default is 0.0.
Returns: (float) The calculated cosine wave value.
getTriangleWave(cyclesPerMinute, bar, barsPerSecond, amplitude, verticalShift, phaseShift)
`getTriangleWave`
> Calculates a triangle wave based on bar index, cycles per minute (BPM), and wave parameters.
Parameters:
cyclesPerMinute (float) : (float) The desired number of cycles per minute (BPM). Default is 30.0.
bar (int) : (int) The current bar index. Default is bar_index.
barsPerSecond (float) : (float) The number of bars per second. Default is 10.0 for Bar Replay
amplitude (float) : (float) The amplitude of the triangle wave. Default is 1.0.
verticalShift (float) : (float) The vertical shift of the triangle wave. Default is 0.0.
phaseShift (float) : (float) The phase shift of the triangle wave in radians. Default is 0.0.
Returns: (float) The calculated triangle wave value.
getSquareWave(cyclesPerMinute, bar, barsPerSecond, amplitude, verticalShift, dutyCycle, phaseShift)
`getSquareWave`
> Calculates a square wave based on bar index, cycles per minute (BPM), and wave parameters.
Parameters:
cyclesPerMinute (float) : (float) The desired number of cycles per minute (BPM). Default is 30.0.
bar (int) : (int) The current bar index. Default is bar_index.
barsPerSecond (float) : (float) The number of bars per second. Default is 10.0 for Bar Replay
amplitude (float) : (float) The amplitude of the square wave. Default is 1.0.
verticalShift (float) : (float) The vertical shift of the square wave. Default is 0.0.
dutyCycle (float) : (float) The duty cycle of the square wave (0.0 to 1.0). Default is 0.5 (50% duty cycle).
phaseShift (float) : (float) The phase shift of the square wave in radians. Default is 0.0.
Returns: (float) The calculated square wave value.
Source StrategyThis strategy converts indicator signals into buy/sell executions. It looks for non-zero values from your chosen source. The strategy will execute a trade when the source produces any value other than zero.
The strategy supports both longs and shorts. For long trades, it looks at your selected long source; for short trades, it looks at your chosen short source. The strategy executes a trade when either source produces any value except zero.
Stop loss and take profit orders are incorporated for risk management. These orders are calculated as a percentage of your position's value, providing dynamic risk management as price moves. The percentage levels for stop loss and take profit orders are configurable in the settings, allowing you to adjust your risk parameters based on market conditions and trading style.
To use the strategy, add it to your chart. The input parameters can be configured in the strategy's settings panel, including your signal sources for long and short trades and the percentage levels for stop loss and take profit orders. This flexibility allows you to adapt the strategy to different markets and timeframes while maintaining your preferred risk management approach.
Unix Time (Seconds)This is a simple indicator that places the current UNIX time down to the seconds for the current candle on your chart. It updates with every new candle.
Table can be customized to fit chart layout.
Custom Watermark by matarMATAR CUSTOM WATERMARK SCRIPT DESCRIPTION Type: TradingView Chart Watermark & Info Panel
Version: 1.0
Compatibility: All TradingView Charts
CORE FEATURES
1️⃣ Customizable Watermark
Add main title and subtitle
Adjust text color, size, and alignment
9 positioning options (Top-Center, Bottom-Right, etc.)
2️⃣ Smart Symbol Info Panel
Real-time symbol display (e.g., BTC/USDT)
Timeframe details (e.g., 15 Minutes, 4 Hours)
Last candle date (DD/MM/YYYY)
Toggle panel visibility
3️⃣ Visual Flexibility
Background color selection (including transparent)
6 font sizes (Tiny > Huge)
Precise positioning with margin controls
USE CASES
✅ Branding
Add company name/logo to screenshots
Credit sources in educational materials
✅ Risk Management
Permanent reminders like "Max 2% Risk"
Position size warnings
✅ Data Tracking
Quick reference for multi-timeframe analysis
Automatic date stamps for backtests
SETTINGS PANEL
📝 Text Customization
Main Title: Default "MATAR TRADING" (editable)
Subtitle: Add your trading motto
🎨 Appearance
16+ color options (HEX code support)
Font scaling for different screen sizes
📍 Positioning
Vertical/horizontal alignment
Margin adjustments for spacing
ℹ Symbol Info
Independent panel positioning
Customizable date format
INSTALLATION & USAGE
Add script to TradingView
Click "Settings" icon (top-right)
Modify parameters in dedicated tabs
Changes apply instantly (no reload needed)
KEY BENEFITS
Non-Intrusive: 90% transparency support
Lightweight: Zero performance impact
Multi-Timeframe: Show D1 data on H1 charts
Universal: Works with stocks, forex, crypto
EXAMPLE SCENARIOS
Intraday Trader:
Title: "Scalping Strategy v2.0"
Subtitle: "15M-1H TF Only"
Symbol Panel: Top-right
Educator:
Title: "Training Demo - Do Not Copy"
Background: Red transparency
Date: Auto watermark for recordings
Portfolio Manager:
Subtitle: "Max 3 Trades Daily"
Symbol Info: Bottom-left
SUPPORTED ASSETS
All TradingView symbols
Custom instruments (any listed asset)
Historical data compatible (backtesting)
This script combines practical trading discipline with brand identity management, helping you maintain professional charts while avoiding distractions. 🚀
Note: Requires basic TradingView navigation skills. No coding knowledge needed.
KalmanfilterLibrary "Kalmanfilter"
A sophisticated Kalman Filter implementation for financial time series analysis
@author Rocky-Studio
@version 1.0
initialize(initial_value, process_noise, measurement_noise)
Initializes Kalman Filter parameters
Parameters:
initial_value (float) : (float) The initial state estimate
process_noise (float) : (float) The process noise coefficient (Q)
measurement_noise (float) : (float) The measurement noise coefficient (R)
Returns: A tuple containing
update(prev_state, prev_covariance, measurement, process_noise, measurement_noise)
Update Kalman Filter state
Parameters:
prev_state (float)
prev_covariance (float)
measurement (float)
process_noise (float)
measurement_noise (float)
calculate_measurement_noise(price_series, length)
Adaptive measurement noise calculation
Parameters:
price_series (array)
length (int)
calculate_measurement_noise_simple(price_series)
Parameters:
price_series (array)
update_trading(prev_state, prev_velocity, prev_covariance, measurement, volatility_window)
Enhanced trading update with velocity
Parameters:
prev_state (float)
prev_velocity (float)
prev_covariance (float)
measurement (float)
volatility_window (int)
model4_update(prev_mean, prev_speed, prev_covariance, price, process_noise, measurement_noise)
Kalman Filter Model 4 implementation (Benhamou 2018)
Parameters:
prev_mean (float)
prev_speed (float)
prev_covariance (array)
price (float)
process_noise (array)
measurement_noise (float)
model4_initialize(initial_price)
Initialize Model 4 parameters
Parameters:
initial_price (float)
model4_default_process_noise()
Create default process noise matrix for Model 4
model4_calculate_measurement_noise(price_series, length)
Adaptive measurement noise calculation for Model 4
Parameters:
price_series (array)
length (int)
MACD Crossover SignalsThis is a way of saying thank you to everyone who has been sharing opensource scripts for indicators and strategies on TV.
This indicator generates a "Buy" or "Sell" signal based on two rules.
1. "Buy" when the MACD crosses above the signal
2. "Sell" when the MACD crosses below the signal
The MACD parameters are configurable so you can even configure it for the LBR 3-10 Oscillator. :)
Hope you find this useful in your learning journey.
Daily COC Strategy with SHERLOCK WAVESThis indicator implements a unique trading strategy known as the "Daily COC (Candle Over Candle) Strategy" enhanced with "SHERLOCK WAVES" for pattern recognition. It's designed for traders looking to capitalize on specific candlestick formations with a negative risk-reward ratio, with the aim of achieving a high win rate (over 70%) through numerous trading opportunities, despite each trade having a higher risk relative to the reward.
Key Features:
Pattern Recognition: Identifies a setup based on three consecutive candles - a red candle followed by a shooting star, then an entry candle that does not break below the shooting star's low.
Negative Risk/Reward Trade Selection: Focuses on entries where the potential stop loss is greater than the take profit, banking on a high win rate to offset the individual trade's negative risk-reward ratio.
Visual Signals:
Green Label: Marks potential entry points at the high of the candle before the entry.
Green Dot: Indicates a winning trade closure.
Red Dot: Signals a losing trade closure.
Blue Circle: Warns when the current candle is within 2% of breaking above the previous candle's high, suggesting a potential setup is developing.
Green Circle: Plots the take profit level.
Red Circle: Plots the stop loss level.
Dynamic Statistics: A live updating label showing the number of trades, wins, losses, open trades, current account balance, and win percentage.
Customizable Parameters:
Risk % per Trade: Adjust the percentage of your account balance you're willing to risk on each trade.
Initial Account Balance: Set your starting balance for tracking performance.
Start Date for Strategy: Define when the strategy should start calculating from, allowing for backtesting.
Alerts:
An alert condition is set for when a potential trade setup is developing, helping traders prepare for entries.
Usage Tips:
This strategy is predicated on the idea that a high win rate can compensate for the negative risk-reward ratio of individual trades. It might not suit all market conditions or traders' risk profiles.
Use this strategy in conjunction with other analysis methods to validate trade setups.
Note: Always backtest thoroughly before applying to live markets. Consider this tool as part of a broader trading strategy, not a standalone solution. Monitor your win rate and adjust your risk management accordingly to ensure the strategy remains profitable over time.
This description now correctly explains the purpose behind the negative risk-reward ratio in the context of your trading strategy.
Timeframe Levels for Price Action📖 Introduction
Timeframe Levels Indicator is a powerful tool for identifying key support and resistance zones based on historical price action. By plotting weekly, daily, and 4-hour closing levels, this indicator helps traders understand where price is likely to:
✅ Range & Consolidate – Identify congestion zones where price action stalls.
✅ Break & Expand – Spot areas where price can rapidly move to the next level.
✅ Form MMXM Structures – Find market maker expansion and distribution levels.
These levels are critical for traders looking to anticipate price action, identify high-probability trade setups, and manage risk effectively.
The indicator dynamically plots historical close price levels across three key timeframes:
✅ Weekly Close Levels – Identify key levels based on weekly closes.
✅ Daily Close Levels – Spot daily open/close levels for refined entries.
✅ 4-Hour Close Levels – Track intra-day significant price points.
⚙️ How It Works
This indicator retrieves and displays the past 10 close levels for each selected timeframe using request.security().
🔹 Lines are customizable – Adjust the number of lines per timeframe (0-10).
🔹 Dynamic styling – Choose colors and line styles (solid, dashed, or dotted).
🔹 Extend historical levels – Lines extend across the chart for easy visualization.
🎨 Customization Options
🔧 Timeframe Selection: Choose how many weekly, daily, and 4-hour levels to display.
🎨 Color Settings: Customize the colors for each timeframe.
📏 Line Styles: Select between solid, dashed, or dotted lines for better visibility.
📊 Why Use This Indicator?
✅ Identify Key Support & Resistance Zones – Track where price has historically reacted.
✅ Adapt to Any Trading Style – Works for scalping, swing trading, and long-term investing.
✅ Enhance Multi-Timeframe Analysis – Quickly compare price action across different timeframes.
📊 How This Helps You Trade
✔ Pinpoint Key Trading Levels – Use past close levels to identify major market turning points.
✔ Confirm Ranges & Expansions – Understand whether price is likely to consolidate or break into a new trend by evaluating the next level above or below.
✔ Optimize Entries & Exits – Avoid getting trapped in congestion zones and capitalize on breakout opportunities. The more overlapping lines, the more congestion.
✔ Backtest Historical Reactions – See how price has responded to these levels in the past to refine your strategy. As price breaks out, any daily or 4 hour level will slow down the continued momentum.
🛠 How to Use
1️⃣ Add the indicator to your TradingView chart.
2️⃣ Adjust the number of levels per timeframe (Weekly, Daily, 4-Hour).
3️⃣ Customize the line colors and styles to match your chart preferences.
4️⃣ Observe how price reacts to historical levels and plan your trades accordingly.
📜 Code Highlights : What Makes This Indicator Powerful?
This Multi-Timeframe Open/Close Levels Indicator is built with dynamic customization, efficiency, and structured market insights in mind. Here are some key highlights of the code:
The script fetches historical closing prices from three critical timeframes:
✅ Weekly Close Levels (W) – Major swing levels for long-term positioning.
✅ Daily Close Levels (D) – Useful for intraday and swing trading.
✅ 4-Hour Close Levels (240) – Ideal for short-term traders and scalpers.
Each timeframe’s close levels act as dynamic support and resistance zones, helping traders spot key areas for price reactions and liquidity grabs.
The indicator retrieves and stores up to 10 past close levels using request.security(), making it easy to track key price points without lagging the chart.
✅ Uses bar_index to extend levels both left and right.
✅ Ensures proper deletion and redrawing of lines to prevent clutter.
✅ Automatically updates levels as new bars print.
Instead of storing all lines at once, the script:
⚡ Deletes old lines before redrawing new ones.
⚡ Uses var line to ensure memory efficiency.
⚡ Prevents exceeding TradingView's 10,000-cell limit by limiting the number of stored lines.
This results in a smooth, non-laggy experience even with multiple timeframes displayed.
The levels plotted by this indicator help traders:
📊 Identify consolidation zones where price might range.
🚀 Spot breakout areas where price expands to the next key level.
📉 Recognize market maker structures (MMXM) to predict liquidity grabs.
These insights give traders a strategic edge in planning their entries, exits, and trade management.
Final Thoughts
This indicator is a powerful tool for traders looking to integrate historical price levels into their strategy.
Whether you’re a scalper, a day trader, or a swing trader, this indicator provides valuable insights into where price is likely to range, reverse, or break out.
Don’t trade blind—trade with structure. Use this tool to refine your entries, exits, and risk management, and start making more confident trading decisions today!
📌 Interested in accessing this indicator? 📩 Contact me for details!
Micha Stocks Custom Watermark Reva fixed version of the original Micha Stocks custom watermark that offers location position and have the information order to be presented visually better
thank you micha :)
Daily MA Ribbon + MACD Crossover with Buy/Sell Signals - MaheshAll integrated strategy with MACD and MA for intraday trading
Kalman Filter Trend BreakersKalman filter is a recursive algorithm that has been invented in the 1960s to track a moving target, remove any noisy measurements of its position and predict its future position.
In trading, KF might be a good replacement for a moving average, as it reacts to price changes in a different way. Not only it follows price direction, but can also track the velocity of price changes. This specific behaviour of KF is used in this indicator to track changes in trends.
Trend is characterized by price moving directionally, however, any trend comes to pause or complete stop and reversal, as the price changes more slowly (a trend fades into a sideways movement for a while) or the price movement changes direction, thus making a reversal.
This indicator detects the points where such changes occur (trend breaker points), and produces signals, which serve as points of current trend pausing or reversing. By applying different settings for KF calculation, you can produce less or more signals that indicate change in trend character, and either detect only significant trends changes, or less and shorter trends changes as well.
The signals do not differentiate the exact type of a trend change (it can be a brief trend pause followed by a continuation, as well as a complete reversal). However, once you are in a trend, the significant velocity change indicates a change in trend structure. In this sense, trend breaker signals should not be followed blindly, and can be used only as trend (and position) exit confirmations, but not the entry contrarian confirmations.
For better visual representation, you can use chart signals attached to bars, and additionally a vertical gradient which shows significant trend velocity change.
Dow Theory Swing Trading-DexterThis Pine Script strategy that implements a basic price action-based trading system inspired by Dow Theory, focusing on swing highs and swing lows. This strategy will generate buy and sell signals based on the formation of higher highs (HH) and higher lows (HL) for an uptrend, and lower highs (LH) and lower lows (LL) for a downtrend.
Swing Highs and Swing Lows:
The script identifies swing highs and swing lows using the ta.highest and ta.lowest functions over a specified lookback period.
A swing high is identified when the high of the current bar is the highest high over the lookback period.
A swing low is identified when the low of the current bar is the lowest low over the lookback period.
Trend Detection:
An uptrend is detected when the current low is higher than the last identified swing low.
A downtrend is detected when the current high is lower than the last identified swing high.
Buy and Sell Signals:
A buy signal is generated when the price closes above the last swing high during an uptrend.
A sell signal is generated when the price closes below the last swing low during a downtrend.
Plotting:
Swing highs and swing lows are plotted on the chart using plotshape.
Buy and sell signals are also plotted on the chart for visual reference.
How to Use:
Copy and paste the script into the Pine Script editor in TradingView.
Adjust the lookback period as needed to suit your trading style and timeframe.
Apply the script to your chart and it will generate buy and sell signals based on the price action.
NOTE: Please uncheck the all the unwanted symbol from chart for clear view .
Global M2 Index Percentage### **Global M2 Index Percentage**
**Description:**
The **Global M2 Index Percentage** is a custom indicator designed to track and visualize the global money supply (M2) in a normalized percentage format. It aggregates M2 data from major economies (e.g., the US, EU, China, Japan, and the UK) and adjusts for exchange rates to provide a comprehensive view of global liquidity. This indicator helps traders and investors understand the broader macroeconomic environment, identify trends in money supply, and make informed decisions based on global liquidity conditions.
---
### **How It Works:**
1. **Data Aggregation**:
- The indicator collects M2 data from key economies and adjusts it using exchange rates to calculate a global M2 value.
- The formula for global M2 is:
\
2. **Normalization**:
- The global M2 value is normalized into a percentage (0% to 100%) based on its range over a user-defined period (default: 13 weeks).
- The formula for normalization is:
\
3. **Visualization**:
- The indicator plots the M2 Index as a line chart.
- Key reference levels are highlighted:
- **10% (Red Line)**: Oversold level (low liquidity).
- **50% (Black Line)**: Neutral level.
- **80% (Green Line)**: Overbought level (high liquidity).
---
### **How to Use the Indicator:**
#### **1. Understanding the M2 Index:**
- **Below 10%**: Indicates extremely low liquidity, which may signal economic contraction or tight monetary policy.
- **Above 80%**: Indicates high liquidity, which may signal loose monetary policy or potential inflationary pressures.
- **Between 10% and 80%**: Represents a neutral to moderate liquidity environment.
#### **2. Trading Strategies:**
- **Long-Term Investing**:
- Use the M2 Index to assess global liquidity trends.
- **High M2 Index (e.g., >80%)**: Consider investing in risk assets (stocks, commodities) as liquidity supports growth.
- **Low M2 Index (e.g., <10%)**: Shift to defensive assets (bonds, gold) as liquidity tightens.
- **Short-Term Trading**:
- Combine the M2 Index with technical indicators (e.g., RSI, MACD) for timing entries and exits.
- **M2 Index Rising + RSI Oversold**: Potential buying opportunity.
- **M2 Index Falling + RSI Overbought**: Potential selling opportunity.
#### **3. Macroeconomic Analysis**:
- Use the M2 Index to monitor the impact of central bank policies (e.g., quantitative easing, rate hikes).
- Correlate the M2 Index with inflation data (CPI, PPI) to anticipate inflationary or deflationary trends.
---
### **Key Features:**
- **Customizable Timeframe**: Adjust the lookback period (e.g., 13 weeks, 26 weeks) to suit your trading style.
- **Multi-Economy Data**: Aggregates M2 data from the US, EU, China, Japan, and the UK for a global perspective.
- **Normalized Output**: Converts raw M2 data into an easy-to-interpret percentage format.
- **Reference Levels**: Includes key levels (10%, 50%, 80%) for quick analysis.
---
### **Example Use Case:**
- **Scenario**: The M2 Index rises from 49% to 62% over two weeks.
- **Interpretation**: Global liquidity is increasing, potentially due to central bank stimulus.
- **Action**:
- **Long-Term**: Increase exposure to equities and commodities.
- **Short-Term**: Look for buying opportunities in oversold assets (e.g., RSI < 30).
---
### **Why Use the Global M2 Index Percentage?**
- **Macro Insights**: Understand the broader economic environment and its impact on financial markets.
- **Risk Management**: Identify periods of high or low liquidity to adjust your portfolio accordingly.
- **Enhanced Timing**: Combine with technical analysis for better entry and exit points.
---
### **Conclusion:**
The **Global M2 Index Percentage** is a powerful tool for traders and investors seeking to incorporate macroeconomic data into their strategies. By tracking global liquidity trends, this indicator helps you make informed decisions, whether you're trading short-term or planning long-term investments. Add it to your TradingView charts today and gain a deeper understanding of the global money supply!
---
**Disclaimer**: This indicator is for informational purposes only and should not be considered financial advice. Always conduct your own research and consult with a professional before making investment decisions.
On Balance Volume with Cross DetectionThis indicator enhances the On Balance Volume (OBV) indicator by detecting and visually highlighting crossovers and crossunders between the OBV and its smoothed moving average. The script colors the background of the chart to make these key events more noticeable: red highlights a bearish crossunder when the OBV crosses below the smoothed OBV, while green marks a bullish crossover when the OBV crosses above the smoothed OBV. By focusing on these significant interactions, the script provides traders with a clear visual cue to help identify potential buying and selling opportunities based on the relationship between OBV and its smoothed trend.
This script offers several customizable features to suit different trading preferences. The main editable parameter is the type of moving average used to smooth the OBV: you can choose from options such as Simple Moving Average (SMA), Exponential Moving Average (EMA), Smoothed Moving Average (RMA), Weighted Moving Average (WMA), or Volume Weighted Moving Average (VWMA). The length of the moving average can also be adjusted to better match the trader’s desired sensitivity, with the default set to 14 periods. These options allow traders to tailor the script to their preferred smoothing method and time frame, making it a flexible tool for a variety of strategies. The ability to switch between different moving averages and adjust their lengths ensures that the script can be adapted to various market conditions and trading styles.
This indicator enhances the analysis of the On Balance Volume (OBV) indicator by visually highlighting key crossovers and crossunders with its smoothed moving average. With customizable settings for different moving averages and lengths, traders can tailor the script to their specific strategies. By offering clear visual cues through background coloring, it helps quickly identify potential buy and sell signals. When combined with other technical analysis tools, this script can further improve trading decisions by providing additional context and confirmation, allowing traders to create a more robust and comprehensive trading strategy.
Binance Pseudo Funding FeeThe indicator calculates the Funding Fee for Binance based on the Premium Index provided by TradingView. The calculation formula can be found here: Binance Funding Rate Introduction . This is NOT the official rate visible on binance.com and used for settlements, but rather an estimated rate, which is inherently INACCURATE . The accuracy of the calculation heavily depends on the timeframe, with almost perfect results on minute-based timeframes.
For the most accurate calculations, you need to visit Binance Funding History and fill in the corresponding Interval , Interest Rate , and Funding Cap/Floor settings for the specific symbol in the indicator's settings. I understand this is not convenient, but for now, this is how it works.
The blue bars indicate the settlement time. Funding can be smoothed using moving averages. Both the funding rate and the moving averages are displayed using plot and are labeled, so you can set alerts on them.
Tomorrow's CPR by Maddycpr A Central Pivot Range (CPR) indicator calculates and displays key support and resistance levels based on the previous trading session's high, low, and close prices. It consists of a Pivot Point (PP), a Bottom CPR (BC), and a Top CPR (TC). Traders use these levels to anticipate potential price movements, identify possible support and resistance areas, and make informed trading decisions. The CPR is often used in conjunction with other technical analysis tools.for tomorrow
Displaced MAsDisplaced Moving Averages with Customizable Bands
Overview
The "Displaced Moving Averages with Customizable Bands" indicator is a powerful and versatile tool designed to provide a comprehensive view of price action in relation to various moving averages (MAs) and their volatility. It offers a high degree of customization, allowing traders to tailor the indicator to their specific needs and trading styles. The indicator features a primary moving average with multiple configurable percentage-based displacement bands. It also includes additional moving averages with standard deviation bands for a more in-depth analysis of different timeframes.
Key Features
Multiple Moving Average Types:
Choose from a wide range of popular moving average types for the primary MA calculation:
WMA (Weighted Moving Average)
EMA (Exponential Moving Average)
SMA (Simple Moving Average)
HMA (Hull Moving Average)
VWAP (Volume-Weighted Average Price)
Smoothed VWAP
Rolling VWAP
The flexibility to select the most appropriate MA type allows you to adapt the indicator to different market conditions and trading strategies.
Smoothed VWAP with Customizable Smoothing:
When "Smoothed VWAP" is selected, you can further refine it by choosing a smoothing type: SMA, EMA, WMA, or HMA.
Customize the smoothing period based on the chart's timeframe (1H, 4H, D, W) or use a default period. This feature offers fine-grained control over the responsiveness of the VWAP calculation.
Rolling VWAP with Adjustable Lookback:
The "Rolling VWAP" option calculates the VWAP over a user-defined lookback period.
Customize the lookback length for different timeframes (1H, 4H, D, W) or use a default period. This provides a dynamic VWAP calculation that adapts to the chosen timeframe.
Customizable Lookback Lengths:
Define the lookback period for the primary moving average calculation.
Tailor the lookback lengths for different timeframes (1H, 4H, D, W) or use a default value.
This allows you to adjust the sensitivity of the MA to recent price action based on the timeframe you are analyzing. Also has inputs for 5m, and 15m timeframes.
Percentage-Based Displacement Bands:
The core feature of this indicator is the ability to plot multiple displacement bands above and below the primary moving average.
These bands are calculated as a percentage offset from the MA, providing a clear visualization of price deviations.
Visibility Toggles: Independently show or hide each band (+/- 2%, 5%, 7%, 10%, 15%, 20%, 25%, 30%, 40%, 50%, 60%, 70%).
Customizable Colors: Assign unique colors to each band for easy visual identification.
Adjustable Multipliers: Fine-tune the percentage displacement for each band using individual multiplier inputs.
The bands are useful for identifying potential support and resistance levels, overbought/oversold conditions, and volatility expansions/contractions.
Labels for Displacement Bands:
The indicator displays labels next to each plotted band, clearly indicating the percentage displacement (e.g., "+7%", "-15%").
Customize the label text color for optimal visibility.
The labels can be horizontally offset by a user-defined number of bars.
Additional Moving Averages with Standard Deviation Bands:
The indicator includes three additional moving averages, each with upper and lower standard deviation bands. These are designed to provide insights into volatility on different timeframes.
Timeframe Selection: Choose the timeframes for these additional MAs (e.g., Weekly, 4-Hour, Daily).
Sigma (Standard Deviation Multiplier): Adjust the standard deviation multiplier for each MA.
MA Length: Set the lookback period for each additional MA.
Visibility Toggles: Show or hide the lower band of MA1, the middle/upper/lower bands of MA2, and the bands of MA3.
4h Bollinger Middle MA is unticked by default to provide a less cluttered chart
These additional MAs are particularly useful for multi-timeframe analysis and identifying potential trend reversals or volatility shifts.
How to Use
Add the indicator to your TradingView chart.
Customize the settings:
Select the desired Moving Average Type for the primary MA.
If using Smoothed VWAP, choose the Smoothing Type and adjust the Smoothing Period for different timeframes.
If using Rolling VWAP, adjust the Lookback Length for different timeframes.
Set the Lookback Length for the primary MA for different timeframes.
Toggle the visibility of the Displacement Bands and adjust their Colors and Multipliers.
Customize the Label Text Color and Offset.
Configure the Timeframes, Sigma, and MA Length for the additional moving averages.
Toggle the visibility of the additional MA bands.
Interpret the plotted lines and bands:
Primary MA: Represents the average price over the selected lookback period, calculated using the chosen MA type.
Displacement Bands: Indicate potential support and resistance levels, overbought/oversold conditions, and volatility ranges. Price trading outside these bands may signal significant deviations from the average.
Additional MAs with Standard Deviation Bands: Provide insights into volatility on different timeframes. Wider bands suggest higher volatility, while narrower bands indicate lower volatility.
Potential Trading Applications
Trend Identification: Use the primary MA to identify the overall trend direction.
Support and Resistance: The displacement bands can act as dynamic support and resistance levels.
Overbought/Oversold: Price reaching the outer displacement bands may suggest overbought or oversold conditions, potentially indicating a pullback or reversal.
Volatility Analysis: The standard deviation bands of the additional MAs can help assess volatility on different timeframes.
Multi-Timeframe Analysis: Combine the primary MA with the additional MAs to gain a broader perspective on price action across multiple timeframes.
Entry and Exit Signals: Use the interaction of price with the MA and bands to generate potential entry and exit signals. For example, a bounce off a lower band could be a buy signal, while a rejection from an upper band could be a sell signal.
Disclaimer
This indicator is for informational and educational purposes only and should not be considered financial advice. Trading involves risk, and past performance is not indicative of future results. Always conduct thorough research and consider your risk tolerance before making any trading decisions.
Enjoy using the "Displaced Moving Averages with Customizable Bands" indicator!
Higher Timeframe SeparatorThis script helps visually identify when a higher timeframe candle starts by drawing a vertical line. It also shades the area above or below the opening price, making it easier to track price movement relative to the higher timeframe.
Why It's Useful
If you use multiple timeframes, this indicator provides a clear visual reference for where the price is relative to the higher timeframe. This is much more convenient than constantly switching between charts. You can see in the screenshot below how much clearer the price action becomes when the indicator is enabled:
Additional Benefit
If you trade on a lower timeframe and notice that the number of bars between separators is inconsistent, it means there weren’t enough trades during that period—indicating low liquidity. Illiquid instruments can be riskier to trade. For example, observe how the vertical lines on the left side of the image below are densely packed: