[EmreKb] MTF FTRDescription
Multi time frame version of "Failed to Return by EmreKb" indicator.
What is FTR?
There is no definitive, fixed perspective on FTR. Some sources may choose the FTR zone differently. I will use the single bearish candle in an uptrend (or the single bullish candle in a downtrend) as the FTR in this indicator.
Settings
Update Last: Number of how many boxes will be updated in the new candle
Timeframes: Presets for timeframe option
Use Custom: For use custom timeframes
Custom Timeframes: Text area for write custom timeframes without space and separate with comma.
Multitimeframe
Naive Bayes Candlestick Pattern Classifier v1.1 BETAAn intermezzo on why i made this script publication..
A : Candlestick Pattern took hours to backtest, why not using Machine Learning techniques?
B : Machine Learning, no that's gonna be really heavy bro!
A : Not really, because we use Naive Bayes.
B : The simplest, yet powerful machine learning algorithm to separate (a.k.a classify) multivariate data.
----------------------------------------------------------------------------------------------------------------------
Hello, everyone!
After deep research in extracting meaningful information from the market, I ended up building this powerful machine learning indicator based on the evolution of Bayesian Statistics. This indicator not only leverages the simplicity of Naive Bayes but also extends its application to candlestick pattern analysis, making it an invaluable tool for traders who are looking to enhance their technical analysis without spending countless hours manually backtesting each pattern on each market!.
What most interesting part is actually after learning all of likely useless methods like fibonacci, supply and demand, volume profile, etc. We always ended up back to basic like support and resistance and candlestick patterns, but with a slight twist on strategy algorithm design and statistical approach. Thus, the only reason why i made this, because i exactly know that you guys will ended up in this position as time goes by.
The essence of this indicator lies in its ability to automate the recognition and statistical evaluation of various candlestick patterns. Traditionally, traders have relied on visual inspection and manual backtesting to determine the effectiveness of patterns like Bullish Engulfing, Bearish Engulfing, Harami variations, Hammer formations, and even more complex multi-candle patterns such as Three White Soldiers, Three Black Crows, Dark Cloud Cover, and Piercing Pattern. However, these conventional methods are both time-consuming and prone to subjective bias.
To address these challenges, I employed Naive Bayes—a probabilistic classifier that, despite its simplicity, offers robust performance in various domains. Naive Bayes assumes that each feature is independent of the others given the class label, which, although a strong assumption, works remarkably well in practice, especially when the dataset is large like market data and the feature space is high-dimensional. In our case, each candlestick pattern acts as a feature that can be statistically evaluated based on its historical performance. The indicator calculates a probability that a given pattern will lead to a price reversal, by comparing the pattern’s close price to the highest or lowest price achieved in a lookahead window.
One of the standout features of this script is its flexibility. Each candlestick pattern is not only coded into the system but also comes with individual toggles to enable or disable them based on your trading strategy. This means you can choose to focus on single-candle patterns like Bullish Engulfing or more complex multi-candle formations such as Three White Soldiers, without modifying the core code. The built-in customization options allow you to adjust colors and labels for each pattern, giving you the freedom to tailor the visual output to your preference. This level of customization ensures that the indicator integrates seamlessly into your existing TradingView setup.
Moreover, the indicator isn’t just about pattern recognition—it also incorporates outcome-based learning. Every time a pattern is detected, it looks ahead a predefined number of bars to evaluate if the expected reversal actually materialized. This outcome is then stored in arrays, and over time, the script dynamically calculates the probability of success for each pattern. These probabilities are presented in a real-time updating table on your chart, which shows not only the percentage probability but also the count of historical occurrences. With this information at your fingertips, you can quickly gauge the reliability of each pattern in your chosen market and timeframe.
Another significant advantage of this approach is its speed and efficiency. While more complex machine learning models like neural networks might require heavy computational resources and longer training times, the Naive Bayes classifier in this script is lightweight, instantaneous and can be updated on the fly with each new bar. This real-time capability is essential for modern traders who need to make quick decisions in fast-paced markets.
Furthermore, by automating the process of backtesting, the indicator frees up your time to focus on other aspects of trading strategy development. Instead of manually analyzing hundreds or even thousands of candles, you can rely on the statistical power of Naive Bayes to provide you with insights on which patterns are most likely to result in profitable moves. This not only enhances your efficiency but also helps to eliminate the cognitive biases that often plague manual analysis.
In summary, this indicator represents a fusion of traditional candlestick analysis with modern machine learning techniques. It harnesses the simplicity and effectiveness of Naive Bayes to deliver a dynamic, real-time evaluation of various candlestick patterns. Whether you are a seasoned trader looking to refine your technical analysis or a beginner eager to understand market dynamics, this tool offers a powerful, customizable, and efficient solution. Welcome to a new era where advanced statistical methods meet practical trading insights—happy trading and may your patterns always be in your favor!
Note : On this current released beta version, you must manually adjust reversal percentage move based on each market. Further updates may include automated best range detection and probability.
Fibonacci Reversal FinderPurpose of the indicator
This indicator is designed to identify potential reversal points on a price chart using Fibonacci retracement levels combined with price action confirmation. It generates buy and sell signals based on retracement levels and price action patterns, providing entry points along with stop-loss (SL) and take-profit (TP) targets.
How It Works
1. Input Settings for Fibonacci Levels
The script allows the user to input Fibonacci retracement levels (default: 0.618 and 0.786).
These levels are extracted from a string and converted into an array for later calculations.
2. Convert String to Fibonacci Retracement Values
The script retrieves the two selected Fibonacci levels and ensures they are correctly converted to float values.
3. Detect Swing High and Swing Low
Identifies swing high and swing low over the past 20 bars.
These values serve as reference points for Fibonacci retracement calculations.
4. Calculate Fibonacci Retracement Levels
Computes retracement levels based on swing high/low and the selected Fibonacci ratios.
5. Price Action Confirmation (Optional)
The indicator checks for bullish engulfing and bearish engulfing candlestick patterns as an additional confirmation method.
6. Define Buy & Sell Conditions
Buy Signal: If price touches the Fibonacci support levels AND (optionally) a bullish engulfing pattern appears.
Sell Signal: If price reaches the Fibonacci resistance levels AND (optionally) a bearish engulfing pattern appears.
7. Calculate Stop-Loss (SL) and Take-Profit (TP)
SL (Stop Loss): For buy trades, the SL is set to the previous swing low; for sell trades, it's set to the previous swing high.
TP (Take Profit): Uses a 1:2 risk-reward ratio.
8. Improve Label Visibility
Adds an offset to move labels away from the candlestick, improving visibility.
9. Plot Buy/Sell Labels & Connecting Lines
Labels: Display buy/sell signals, entry price, SL, and TP.
Lines: Draw dotted connectors from the candlestick to the label for better clarity.
What This Indicator Can Do
✅ Identifies Reversal Points using Fibonacci retracements (0.618 & 0.786)
✅ Confirms Reversals with bullish/bearish engulfing candlestick patterns (optional)
✅ Plots Buy/Sell Labels with entry price, SL, and TP values
✅ Draws Lines connecting labels to the candlestick for visibility
✅ Uses a 1:2 Risk-Reward Ratio to determine Take-Profit levels
How to Use This Indicator
Add the Indicator to your TradingView chart.
Look for Buy/Sell Labels:
Buy when price retraces to Fibonacci support and a bullish engulfing pattern appears.
Sell when price retraces to Fibonacci resistance and a bearish engulfing pattern appears.
Use the Stop-Loss (SL) & Take-Profit (TP) from the label to manage your trade.
Combine with Other Indicators (e.g., RSI, MACD) for additional confirmation.
Multi-timeframe Difference Forecast (MTD)Description:
The Multi-timeframe Difference Forecast indicator projects potential future price levels by comparing open prices across multiple timeframe pairs. It uses 12 predefined timeframe pairs where each pair consists of a lower and a higher timeframe. For each pair, the indicator calculates a forecast value by adding the difference between the lower timeframe’s open and the higher timeframe’s open to the current bar’s close. These forecast values are then plotted as points into the future and connected by blue line segments, forming a continuous projection line on your chart.
How It Works:
Timeframe Pairs:
The indicator defines 12 pairs. For example:
Pair 1: Lower timeframe = 15 minutes; Higher timeframe = 150 minutes
Pair 2: Lower timeframe = 30 minutes; Higher timeframe = 165 minutes
⋮
Pair 12: Lower timeframe = 180 minutes; Higher timeframe = 720 minutes
Forecast Calculation:
For each pair, the forecast is computed as:
forecast = close + (lower timeframe open - higher timeframe open)
This produces a series of forecast values that are then plotted on the chart.
Time Offset:
Each forecast point is offset into the future by a number of bars calculated as the ratio between the lower timeframe’s duration (in seconds) and the current chart’s timeframe (in seconds). This adjustment helps align the forecast points correctly on the time axis.
Visualization:
The indicator draws blue lines (width = 2) connecting the current price to each forecast point sequentially, forming a polyline that visually represents the projected price trajectory.
How to Use:
Overlay on Chart:
Apply this indicator to any chart, and it will automatically overlay the forecast line on your current price chart.
Timeframe Flexibility:
The calculations adjust to the chart’s timeframe, so you can use it on various timeframes without needing to change the code.
Interpretation:
The forecast line is intended to provide a visual estimate of potential future price movement based on historical open price differences. It is meant to serve as an additional analytical tool rather than a standalone trading signal.
Disclaimer:
This script is provided for educational and informational purposes only and should not be construed as financial or trading advice. Trading involves significant risk, and past performance is not indicative of future results. You should perform your own analysis and consult with a qualified professional before making any trading decisions. Use this indicator at your own risk.
Grambos Final Countdown - 4 TimeframesA script that shows countdown timers for multiple time frames all in the same place. I edited the original by @SamRecio so that it only shows 4 time frames.
Default time frames are 4H, 1H, 15m, and 5m, and can be changed to any 4 you like.
Forex SessionsThis indicator displays the main Forex trading sessions on your chart, highlighting the New York, London, Tokyo, and Sydney sessions with custom background colors. You can toggle the visibility of each session to suit your strategy. Perfect for traders looking to optimize their analysis and time their trades according to the market’s peak liquidity hours. Enhance your decision-making with this visual tool!
BullDozz Fibo ZigZagFibo ZigZag - Advanced Fibonacci Retracement Tool 🔥
📌 Overview
The Fibo ZigZag indicator is a powerful tool for trend structure analysis using the ZigZag pattern and Fibonacci retracement levels. It automatically identifies swing highs & lows, draws ZigZag lines, and overlays Fibonacci levels with price labels at the right end for better readability.
This indicator is designed for traders who use price action, trend reversal strategies, and support/resistance analysis.
🛠 Features
✅ Automatic ZigZag detection with customizable depth, deviation, and backstep
✅ Fibonacci retracement levels (0%, 23.6%, 38.2%, 50%, 61.8%, 100%, 161.8%, 261.8%, 423.6%)
✅ Price labels at Fibonacci levels (placed at the right end of the levels)
✅ Alerts for new swing highs & lows
✅ Customizable line colors, text colors, and label sizes
✅ Lightweight and optimized for fast performance
📊 How It Works
1️⃣ The script detects ZigZag structure points based on price swings
2️⃣ It connects recent highs & lows with a ZigZag line
3️⃣ Fibonacci retracement levels are calculated and drawn between the last two significant swing points
4️⃣ Each Fibo level is labeled with its percentage & exact price, placed at the right end for clarity
5️⃣ Alerts trigger automatically when a new swing high or low is detected
⚙ Customization Options
🔹 ZigZag Settings: Adjust Depth, Deviation, BackStep, and Leg length
🔹 Fibonacci Levels: Modify line colors, label text colors, and visibility
🔹 Alerts: Enable/disable trend change alerts
📈 Best Use Cases
🚀 Identifying Trend Reversals – Detect key turning points using Fibonacci levels
📉 Support & Resistance Trading – Use retracement levels as entry/exit points
📊 Swing Trading & Scalping – Combine ZigZag with price action for effective strategies
🔔 Alert-Based Trading – Get notified when new swing highs/lows form
🚀 How to Use
📌 Add the indicator to your chart
📌 Adjust the settings to match your trading strategy
📌 Use the Fibonacci levels & ZigZag lines to analyze trend direction & key price zones
📌 Wait for alerts or manually enter trades based on price reaction to Fibo levels
📢 Final Thoughts
The Fibo ZigZag is an essential tool for traders who rely on price action, trend reversals, and Fibonacci levels. Whether you're a beginner or a pro, this indicator helps you spot high-probability trading opportunities with ease.
⚡ Try it now & enhance your trading strategy! 🚀
💬 Let us know your feedback & suggestions in the comments! Happy trading! 📊🔥
Lines at Key Levels with BoxesPlaces lines at key levels at intervals of your choice, you can adjust box width and line spacing in the settings. Shout out to MrPresident for the original indicator, and Evanture (Evan Cabral) for the inspiration.
Multi Timeframe VWMA RibbonThis indicator is used to plot VWMA in multiple time frames on the same chart. You can also change the length and time frame of each as well.
Optimized Dynamic SupertrendDetailed Explanation of the Optimized Dynamic Supertrend Script
This Supertrend script is designed to dynamically adapt to different market conditions using ATR expansion, volume confirmation, and trend filtering. Below is a step-by-step breakdown of how it works and its functions.
1 ATR-Based Supertrend Calculation
📌 Key Purpose:
The script calculates an adaptive ATR-based Supertrend line, which acts as a dynamic support or resistance level for trend direction.
📌 How it Works:
ATR (Average True Range) is used to measure market volatility.
A dynamic ATR multiplier is applied based on price standard deviation (instead of a fixed value).
The Supertrend is calculated as:
Upper Band: SMA(close, ATR length) + (ATR Multiplier * ATR Value)
Lower Band: SMA(close, ATR length) - (ATR Multiplier * ATR Value)
The Supertrend flips when price crosses and holds beyond the Supertrend line.
🔹 Dynamic Adjustment:
Instead of using a fixed ATR multiplier, the script adjusts it using:
pinescript
Copy
Edit
dynamicFactor = ta.stdev(close, atrLength) / ta.sma(close, atrLength)
atrMultiplier = input(1.5, title="Base ATR Multiplier") * dynamicFactor
High volatility → Wider Supertrend bands (to avoid false signals).
Low volatility → Tighter Supertrend bands (for faster detection).
2 Trend Detection Logic
📌 Key Purpose:
Determines if the market is in a bullish or bearish trend based on price action.
Uses volume sensitivity and ATR expansion to reduce false signals.
📌 How it Works:
pinescript
Copy
Edit
var float supertrend = na
supertrend := close > nz(supertrend , lowerBand) ? lowerBand : upperBand
The Supertrend value updates dynamically.
If price is above the Supertrend line, the trend is bullish (green).
If price is below the Supertrend line, the trend is bearish (red).
3 Volume Sensitivity Confirmation
📌 Key Purpose:
Avoid false trend flips by confirming with volume (approximated using a CVD proxy).
📌 How it Works:
pinescript
Copy
Edit
priceChange = close - close
volumeWeightedTrend = priceChange * volume // Approximate CVD Behavior
trendConfirmed = volumeWeightedTrend > 0 ? close > supertrend : close < supertrend
Positive price change + High volume → Confirms bullish momentum.
Negative price change + High volume → Confirms bearish momentum.
If there’s low volume, the trend change is ignored to avoid false breakouts.
4 Noise Reduction (Final Trend Confirmation)
📌 Key Purpose:
Filter out weak or choppy price movements using ATR expansion.
📌 How it Works:
pinescript
Copy
Edit
trendUp = trendConfirmed and ta.atr(atrLength) > ta.atr(atrLength)
trendDown = not trendUp
Trend only flips when confirmed by volume + ATR expansion.
If ATR is not expanding, the script ignores weak price movements.
This ensures Supertrend signals align with strong market moves.
5 Can This Be Used on All Timeframes?
✅ YES! This Supertrend is adaptive, meaning it adjusts dynamically based on:
Volatility: Uses ATR expansion to adjust for different market conditions.
Timeframe Sensitivity: Works on any timeframe (1M, 5M, 15M, 1H, 4H, 1D, 1W).
Market Structure: Confirms trend flips using volume & price movement strength.
🚀 Best Timeframes for Trading:
For Scalping (1M - 15M) → Quick execution, best with order flow confirmation.
For Swing Trading (1H - 4H - 1D) → Stronger trend signals, reduced noise.
For High Timeframes (3D - 1W) → Identifies major market shifts.
🔥 Advantages & Disadvantages in Your Trading Setup
✅ Advantages:
✔ Fully Dynamic & Adaptive → Adjusts to different timeframes & volatility.
✔ Reduces False Signals → Uses ATR expansion & volume confirmation.
✔ Precise Trend Reversals → Labels LONG & SHORT entries clearly.
✔ Works on Any Market → Crypto, Forex, Stocks, Commodities.
✔ No Extra Indicators → Pure Supertrend-based (fits your setup).
❌ Disadvantages:
⚠ Lagging Indicator → ATR & volume confirmation add slight delay.
⚠ Needs High Volume to Confirm → Weak volume → no trend flip.
⚠ Choppy Market = Late Entries → Sideways movement can cause delays.
🚀 Final Thoughts:
It’s fully dynamic & adaptive (unlike traditional static Supertrends).
No extra indicators → Uses only Supertrend logic
Refines entry points using volume & ATR confirmation (removes noise).
This ensures you get high-probability trend signals while filtering out weak breakouts! 🎯
Lagging Span Bull/Bear ZonesThis indicator marks bullish or bearish trading zones based on the position of the Chikou Span above or below the Kumo of the Ichimoku cloud, across different timeframes.
Zero Lag Trend Signals (Improved with MACD)Fixed Buy/Sell Signals: Now clearly visible with "BUY" (Green) and "SELL" (Red) labels.
Improved Moving Line Colors: Adjusted to show trends better.
Added High Timeframe Confirmation: More accurate trend filtering.
Filtered Out Weak Signals: Using ATR & VWMA.
Lagging Span Bull/Bear ZonesThis indicator marks bullish or bearish trading zones based on the position of the Chikou Span above or below the Kumo of the Ichimoku cloud, across different timeframes.
Binhu Scalping 1,5,15BEST ONE FOR LEVERAGE TRADING. I use the 1min chart to go in and out of trades. but u can use others
MTF RSI/MACD Momentum ScalperMTF RSI/MACD Momentum Scalper is designed for multi-timeframe (MTF) trend analysis using the Relative Strength Index (RSI) and the Moving Average Convergence Divergence (MACD) indicators. It provides trading signals and visual cues for traders seeking to capitalize on short-term market momentum.
Key Features and How to Use :
1. Multi-Timeframe Analysis : The script uses three different timeframes to determine the trend (e.g., 5, 15 minutes). It combines the results of RSI and MACD indicators from these timeframes to confirm a strong trend before signaling potential trade opportunities.
- RSI identifies whether a market is in a bullish or bearish condition based on a 14-period length (default).
- MACD provides an additional layer of confirmation by comparing fast and slow moving averages, with customizable lengths.
2. Buy/Sell Signals : The script generates buy signals when all selected timeframes show a bullish trend (both RSI and MACD) and sell signals when all timeframes indicate a bearish trend. These signals are displayed as triangle shapes on the chart for easy identification.
3. Take Profit Signals : Separate signals for taking profits are available, activated when the trend reverses (bullish to bearish or vice versa). These are represented as square shapes on the chart.
4. Candle Color Changes : Optionally, the color of the candlesticks can be adjusted to reflect the prevailing trend, providing a visual cue for market conditions. Bullish candles are teal, bearish candles are red, and neutral conditions are gray.
5. Alert Conditions : The script includes customizable alert conditions for buy and sell signals, which can notify traders when to enter or exit positions.
Why It's Unique:
- Multi-Timeframe Trend Confirmation : Unlike other indicators that rely on a single timeframe, this script combines three timeframes for a more reliable trend analysis. This reduces the chances of false signals by ensuring that the market trend is consistent across different time periods.
- Visual and Alert-Based Signals : It not only changes the candle colors to match the trend but also provides both visual (on-screen) and alert-based notifications for buy, sell, and take-profit opportunities. This makes it easier for traders to make quick decisions.
Why It's Useful:
- Comprehensive Trend Analysis : The combination of RSI and MACD across multiple timeframes provides a robust method for identifying strong market trends, which is especially useful for momentum-based scalping strategies.
- Helps Manage Risk : With take-profit signals and clear buy/sell alerts, the script helps traders capture profits while avoiding the risk of holding positions too long.
- Customizable for Different Strategies : The user can adjust the parameters (e.g., RSI length, MACD settings, and timeframes) to tailor the script to their trading style and asset preferences.
In summary, the MTF RSI/MACD Momentum Scalper is a powerful tool for traders who focus on capturing short-term market movements. By using multi-timeframe analysis combined with popular technical indicators, it offers a more reliable and visually intuitive way to trade.
NFP High/Low LevelsChart the last 12 NFP Day High and Low values automatically.
Review and update indicator settings accordingly.
*Feel free to use/edit/improve
*shoutout to DeepSeek for coding help
Refined MACD Heikin Ashi Indicator v1.2 with ATR VisualsRefined MACD Heikin Ashi Indicator v1.2
Overview
This advanced MACD-based trading indicator integrates Heikin Ashi trend confirmation with MACD crossovers, enhanced by ATR-based stop-loss and take-profit levels. It provides buy and sell signals (triangles) derived from Heikin Ashi and MACD double confirmation, while ATR-based take-profit and stop-loss markers act as optional trade management tools.
🚀 Works on both regular and Heikin Ashi candles
🔹 Recommended for manual entries with LuxAlgo Smart Money Concepts – an exceptional supply & demand indicator for confluence trading.
Key Features
✅ Dual Confirmation System – Combines Heikin Ashi trend shifts & MACD crossovers for reliable entry/exit signals.
✅ Buy & Sell Triangles – Standalone signals based on HA & MACD confirmation for precise trade execution.
✅ ATR-Based Risk Management (Optional) –
Potential Take-Profit & Stop-Loss Levels calculated dynamically based on market volatility.
✅ Multi-Timeframe Adaptability – Works across all timeframes for strategic trading.
✅ Compatible with Regular Candles – The indicator processes Heikin Ashi values internally, allowing seamless use on any chart type.
✅ Great for Manual Trading – Best when used alongside LuxAlgo Smart Money Concepts for supply & demand confluence.
How It Works
🔹 MACD & Heikin Ashi Confirmation for Entries & Exits –
Bullish Entry (Buy Signal) – Green Triangle appears when both Heikin Ashi and MACD confirm an uptrend.
Bearish Exit (Sell Signal) – Red Triangle appears when Heikin Ashi and MACD confirm a downtrend.
🔹 ATR-Based Stop-Loss & Take-Profit (Optional) –
Red Dots – Suggested Stop-Loss levels based on ATR.
Green Dots – Suggested Take-Profit targets based on ATR.
🔹 No Need for Heikin Ashi Chart – The indicator calculates Heikin Ashi values internally, meaning it works on any chart type.
🔹 Enhanced Manual Trading – Combine with LuxAlgo Smart Money Concepts for precision trading.
Who is This For?
📌 Trend Traders – Identify high-probability trend reversals.
📌 Swing Traders – ATR-based targets help manage risk effectively.
📌 Multi-Timeframe Analysts – Works across different timeframes for better trade confirmation.
📌 Smart Money Traders – Use alongside LuxAlgo Smart Money Concepts for supply & demand insights.
How to Use
1️⃣ Add to Chart – Works on stocks, crypto, forex, and more.
2️⃣ Adjust Settings – Customize MACD lengths, ATR multipliers, and styling.
3️⃣ Follow Buy & Sell Triangles for Entries/Exits – These signals work independently based on Heikin Ashi & MACD double confirmation.
4️⃣ Use ATR-Based SL/TP as Optional Trade Management – The red and green dots can help plan potential exit points, but they are not required to follow the trade signals.
5️⃣ Optimize with Multi-Timeframe Analysis – Works best when viewed across different timeframes for confirmation.
6️⃣ Boost Accuracy – Combine with LuxAlgo Smart Money Concepts for refined entry/exit points based on institutional supply & demand zones.
Customization Options
MACD Fast Length (default: 10)
MACD Slow Length (default: 26)
MACD Signal Length (default: 9)
ATR Multiplier for Stop-Loss (default: 1.8)
ATR Multiplier for Take-Profit (default: 3)
Example Use Case:
Side by side on 4H and 15M charts, showing:
✅ Green & Red Triangles marking potential good buy/sell entries & exits.
✅ ATR-based Stop-Loss (Red Dots) and Take-Profit (Green Dots) acting as optional trade management tools.
✅ Supply & Demand Zones from LuxAlgo Smart Money Concepts providing high-probability manual trade setups.
Grambo's Final CountdownA script that shows countdown timers for multiple time frames all in the same place. I editing the original by @SamRecio so that it only shows 4 time frames.
MACD Histogram Color Tabledisplaying the MACD Histogram color and divergences across multiple timeframes. Here's how it works step by step:
1. Setting the Table Position
The script allows the user to choose where the table will be placed using the positionOption input. The three options are:
Top Right
Top Left
Top Center
Depending on the selected option, the table is created at the corresponding position.
2. Creating the Table
A table (macdTable) is created with 8 columns (for different timeframes) and 3 rows (for different data points).
3. MACD Histogram Color Function (f_get_macd_color)
This function calculates the MACD line, signal line, and histogram for a given timeframe.
The histogram (histLine) is used to determine the cell background color:
Green if the histogram is positive.
Red if the histogram is negative.
4. Divergence Detection Function (f_detect_divergence)
This function looks for bullish and bearish divergences using the MACD histogram:
Bullish Divergence (🟢)
The price makes a lower low.
The MACD histogram makes a higher low.
Bearish Divergence (🔴)
The price makes a higher high.
The MACD histogram makes a lower high.
The function returns:
🟢 (green circle) for bullish divergence.
🔴 (red circle) for bearish divergence.
"" (empty string) if no divergence is detected.
5. Populating the Table
The table has three rows for each timeframe:
First row: Displays the timeframe labels (5m, 15m, 30m, etc.).
Second row: Shows MACD Histogram color (red/green).
Third row: Displays divergences (🟢/🔴).
This is done using table.cell() for each timeframe.
6. Final Result
A table is displayed on the chart.
Each column represents a different timeframe.
The color-coded row shows the MACD histogram status.
The bottom row shows detected divergences.
Multiple Simple Moving Averages with Bollinger BandsThis is the study on 45 Min Time frame with all quarterly Moving Average
Open/Close Candle MarkersHere’s a Pine Script code that will plot lines marking the opening and closing prices of each candle with different colors. This script will work on all timeframes and you can customize the colors as needed.
Bsk : Auto P.day High & Low - (22-1-2025)Historical day highs and lows, Bollinger bands ema 8, 15 and all in 1 indicator for the day traders.