GBB_lib_utilsLibrary "GBB_lib_utils"
gbb_tf_to_display(tf_minutes, tf_string)
gbb_tf_to_display
/ @description Converts minutes and TF string into a short standard label.
/ @param tf_minutes (float)
/ @param tf_string (string)
/ @returns (string) Timeframe label (M1,H1,D1,...)
Parameters:
tf_minutes (float)
tf_string (string)
gbb_convert_bars(_bars)
gbb_convert_bars
/ @description Formats a number of bars into a duration (days, hours, minutes + bar count).
/ @param _bars (int)
/ @returns (string)
Parameters:
_bars (int)
gbb_goldorak_init(_tf5Levels_input)
gbb_goldorak_init
/ @description Builds a contextual message about the current timeframe and optional 5-level TF.
/ @param _tf5Levels_input (string) Alternative timeframe ("" = current timeframe).
/ @returns (string, string, float)
Parameters:
_tf5Levels_input (string)
Индикаторы и стратегии
VPT-style Close-to-Close Indicator📈Cumulative momentum (close-to-close × rel. volume) | MA & Donchian optional | ⚡ Alerts
Key Features:
- Tracks cumulative price momentum using close-to-close changes weighted by relative volume.
- Optional smoothed line (SMA/EMA) to identify trend direction.
- Optional Donchian channels to detect potential breakouts and breakdowns.
- Includes alerts for:
- Moving average crosses (bullish/bearish)
- Local maxima/minima in cumulative momentum
- Donchian upper/lower channel breakouts
- Customizable inputs: smoothing length, channel lengths, scaling factor, and visibility toggles.
- Visual cues: line colors indicate momentum direction (green = up, red = down).
- Use Case: Quickly spot momentum shifts, trend direction, and breakout opportunities with clear alerts and visual cues.
Fractal FU//@version=5
indicator("Fractal FU", shorttitle="Fractal FU", overlay=true, max_labels_count=500)
// ===== Inputs
showBull = input.bool(true, "Show aligned bullish balls")
showBear = input.bool(true, "Show aligned bearish balls")
bullCol = input.color(color.blue, "Bull ball color")
bearCol = input.color(color.red, "Bear ball color")
ballSize = input.string("small", "Ball size", options= )
gateTo15 = input.bool(true, "Gate to 15m close (clean, fewer signals)")
showDebug = input.bool(false, "Show per-timeframe debug dots")
// ===== Helpers
// one-liner you asked for:
f_sig(res) => request.security(syminfo.tickerid, res, (high > high and low < low ) ? (close > open ? 1 : close < open ? -1 : 0) : 0, barmerge.gaps_off, barmerge.lookahead_off)
// Pull confirmed signals from each TF
sig1 = f_sig("1")
sig5 = f_sig("5")
sig10 = f_sig("10")
sig15 = f_sig("15")
// Alignment (all four agree)
bullAll = showBull and (sig1 == 1 and sig5 == 1 and sig10 == 1 and sig15 == 1)
bearAll = showBear and (sig1 == -1 and sig5 == -1 and sig10 == -1 and sig15 == -1)
// Emit control
emit15 = ta.change(time("15"))
emit = gateTo15 ? emit15 : barstate.isconfirmed // if not gated, show wherever alignment is true
// ===== Debug (tiny dots at bar to verify which TFs are firing)
plotshape(showDebug and sig1 == 1, title="1m bull", style=shape.circle, size=size.tiny, color=color.new(color.blue, 0), location=location.bottom)
plotshape(showDebug and sig5 == 1, title="5m bull", style=shape.circle, size=size.tiny, color=color.new(color.aqua, 0), location=location.bottom)
plotshape(showDebug and sig10 == 1, title="10m bull", style=shape.circle, size=size.tiny, color=color.new(color.teal, 0), location=location.bottom)
plotshape(showDebug and sig15 == 1, title="15m bull", style=shape.circle, size=size.tiny, color=color.new(color.navy, 0), location=location.bottom)
plotshape(showDebug and sig1 == -1, title="1m bear", style=shape.circle, size=size.tiny, color=color.new(color.red, 0), location=location.top)
plotshape(showDebug and sig5 == -1, title="5m bear", style=shape.circle, size=size.tiny, color=color.new(color.orange, 0), location=location.top)
plotshape(showDebug and sig10 == -1, title="10m bear", style=shape.circle, size=size.tiny, color=color.new(color.maroon, 0), location=location.top)
plotshape(showDebug and sig15 == -1, title="15m bear", style=shape.circle, size=size.tiny, color=color.new(color.purple, 0), location=location.top)
// ===== Markers (size must be const → gate each size)
off = gateTo15 ? -1 : 0 // when gated, place on the just-closed 15m bar
// ── Marker offset control stays the same ──
off2 = gateTo15 ? -1 : 0
// ── Bullish balls exactly at LOW ──
plot(bullAll and emit and ballSize == "tiny" ? low : na, title="Bullish tiny", style=plot.style_circles, color=bullCol, linewidth=1, offset=off2)
plot(bullAll and emit and ballSize == "small" ? low : na, title="Bullish small", style=plot.style_circles, color=bullCol, linewidth=2, offset=off2)
plot(bullAll and emit and ballSize == "normal" ? low : na, title="Bullish normal", style=plot.style_circles, color=bullCol, linewidth=3, offset=off2)
plot(bullAll and emit and ballSize == "large" ? low : na, title="Bullish large", style=plot.style_circles, color=bullCol, linewidth=4, offset=off2)
plot(bullAll and emit and ballSize == "huge" ? low : na, title="Bullish huge", style=plot.style_circles, color=bullCol, linewidth=5, offset=off2)
// ── Bearish balls exactly at HIGH ──
plot(bearAll and emit and ballSize == "tiny" ? high : na, title="Bearish tiny", style=plot.style_circles, color=bearCol, linewidth=1, offset=off2)
plot(bearAll and emit and ballSize == "small" ? high : na, title="Bearish small", style=plot.style_circles, color=bearCol, linewidth=2, offset=off2)
plot(bearAll and emit and ballSize == "normal" ? high : na, title="Bearish normal", style=plot.style_circles, color=bearCol, linewidth=3, offset=off2)
plot(bearAll and emit and ballSize == "large" ? high : na, title="Bearish large", style=plot.style_circles, color=bearCol, linewidth=4, offset=off2)
plot(bearAll and emit and ballSize == "huge" ? high : na, title="Bearish huge", style=plot.style_circles, color=bearCol, linewidth=5, offset=off2)
// Alerts
alertcondition(bullAll and emit, title="Aligned Bullish Outside (1/5/10/15)", message="Aligned bullish outside bar on 1/5/10/15m")
alertcondition(bearAll and emit, title="Aligned Bearish Outside (1/5/10/15)", message="Aligned bearish outside bar on 1/5/10/15m")
alertcondition((bullAll or bearAll) and emit, title="Aligned Any (1/5/10/15)", message="Aligned outside bar (bull or bear) on 1/5/10/15m")
Hidden Divergence with S/R & TP// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © Gemini
// @version=5
// This indicator combines Hidden RSI Divergence with Support & Resistance detection
// and provides dynamic take-profit targets based on ATR. It also includes alerts.
indicator("Hidden Divergence with S/R & TP", overlay=true)
// === INPUTS ===
rsiLengthInput = input.int(14, "RSI Length", minval=1)
rsiSMALengthInput = input.int(5, "RSI SMA Length", minval=1)
pivotLookbackLeft = input.int(5, "Pivot Left Bars", minval=1)
pivotLookbackRight = input.int(5, "Pivot Right Bars", minval=1)
atrPeriodInput = input.int(14, "ATR Period", minval=1)
atrMultiplierTP1 = input.float(1.5, "TP1 ATR Multiplier", minval=0.1)
atrMultiplierTP2 = input.float(3.0, "TP2 ATR Multiplier", minval=0.1)
atrMultiplierTP3 = input.float(5.0, "TP3 ATR Multiplier", minval=0.1)
// === CALCULATIONS ===
// Calculate RSI and its SMA
rsiValue = ta.rsi(close, rsiLengthInput)
rsiSMA = ta.sma(rsiValue, rsiSMALengthInput)
// Calculate Average True Range for Take Profits
atrValue = ta.atr(atrPeriodInput)
// Identify pivot points for Support and Resistance
pivotLow = ta.pivotlow(pivotLookbackLeft, pivotLookbackRight)
pivotHigh = ta.pivothigh(pivotLookbackLeft, pivotLookbackRight)
// Define variables to track divergence and TP levels
var bool bullishDivergence = false
var bool bearishDivergence = false
var float tp1Buy = na
var float tp2Buy = na
var float tp3Buy = na
var float tp1Sell = na
var float tp2Sell = na
var float tp3Sell = na
// Reset divergence flags at each new bar
bullishDivergence := false
bearishDivergence := false
// === HIDDEN DIVERGENCE LOGIC ===
// Hidden Bullish Divergence (Higher low in price, lower low in RSI)
// Price makes a higher low, while RSI makes a lower low, suggesting trend continuation.
for i = 1 to 50 // Look back up to 50 bars for a confirmed pivot low
if not na(pivotLow ) and close < close and rsiValue < rsiValue
// Check if price is making a higher low than the pivot low, and RSI is making a lower low
if low > low and rsiValue < rsiValue
bullishDivergence := true
break // Exit loop once divergence is found
// Hidden Bearish Divergence (Lower high in price, higher high in RSI)
// Price makes a lower high, while RSI makes a higher high, suggesting trend continuation.
for i = 1 to 50 // Look back up to 50 bars for a confirmed pivot high
if not na(pivotHigh ) and close > close and rsiValue > rsiValue
// Check if price is making a lower high than the pivot high, and RSI is making a higher high
if high < high and rsiValue > rsiValue
bearishDivergence := true
break // Exit loop once divergence is found
// === SETTING TP LEVELS AND ALERTS ===
if bullishDivergence
buySignalPrice = low - atrValue * 0.5 // Entry below the low
tp1Buy := buySignalPrice + atrValue * atrMultiplierTP1
tp2Buy := buySignalPrice + atrValue * atrMultiplierTP2
tp3Buy := buySignalPrice + atrValue * atrMultiplierTP3
// Alert for buying signal
alert("Hidden Bullish Divergence Detected on " + syminfo.ticker + " - Buy Signal", alert.freq_once_per_bar_close)
else
tp1Buy := na
tp2Buy := na
tp3Buy := na
if bearishDivergence
sellSignalPrice = high + atrValue * 0.5 // Entry above the high
tp1Sell := sellSignalPrice - atrValue * atrMultiplierTP1
tp2Sell := sellSignalPrice - atrValue * atrMultiplierTP2
tp3Sell := sellSignalPrice - atrValue * atrMultiplierTP3
// Alert for selling signal
alert("Hidden Bearish Divergence Detected on " + syminfo.ticker + " - Sell Signal", alert.freq_once_per_bar_close)
else
tp1Sell := na
tp2Sell := na
tp3Sell := na
// === PLOTTING SIGNALS AND TAKE PROFITS ===
// Plotting shapes for buy/sell signals
plotshape(bullishDivergence, title="Buy Signal", style=shape.triangleup, location=location.belowbar, color=color.new(color.green, 0), text="Buy", textcolor=color.black)
plotshape(bearishDivergence, title="Sell Signal", style=shape.triangledown, location=location.abovebar, color=color.new(color.red, 0), text="Sell", textcolor=color.black)
// Plotting take-profit lines
plot(tp1Buy, "TP1 Buy", color=color.new(color.lime, 0), style=plot.style_linebr)
plot(tp2Buy, "TP2 Buy", color=color.new(color.lime, 0), style=plot.style_linebr)
plot(tp3Buy, "TP3 Buy", color=color.new(color.lime, 0), style=plot.style_linebr)
plot(tp1Sell, "TP1 Sell", color=color.new(color.orange, 0), style=plot.style_linebr)
plot(tp2Sell, "TP2 Sell", color=color.new(color.orange, 0), style=plot.style_linebr)
plot(tp3Sell, "TP3 Sell", color=color.new(color.orange, 0), style=plot.style_linebr)
// Plotting the RSI and its SMA on a sub-pane
plot(rsiValue, "RSI", color.new(color.fuchsia, 0))
plot(rsiSMA, "RSI SMA", color.new(color.yellow, 0))
hline(50, "50 Midline", color=color.new(color.gray, 50))
// Plotting background for signals
bullishColor = color.new(color.green, 90)
bearishColor = color.new(color.red, 90)
bgcolor(bullishDivergence ? bullishColor : na, title="Bullish Divergence Zone")
bgcolor(bearishDivergence ? bearishColor : na, title="Bearish Divergence Zone")
// === EXPLANATION OF CONCEPTS ===
// Deep Knowledge of Market from AI:
// This indicator is based on a powerful, yet often misunderstood, concept: divergence.
// While standard divergence signals a potential trend reversal, hidden divergence signals a
// continuation of the prevailing trend. This is crucial for traders who want to capitalize
// on the momentum of a move rather than trying to catch tops and bottoms.
// Hidden Bullish Divergence: Occurs in an uptrend when price makes a higher low, but the
// RSI makes a lower low. This suggests that while there was a brief period of weakness, the
// underlying buying pressure is returning to push the trend higher. It’s a "re-energizing"
// of the bullish momentum.
// Hidden Bearish Divergence: Occurs in a downtrend when price makes a lower high, but the
// RSI makes a higher high. This indicates that while the sellers paused, the underlying
// selling pressure remains strong and is likely to continue pushing the price down. It's a
// subtle signal that the bears are regaining control.
// Combining Divergence with S/R: The true power of this indicator comes from its
// "confluence" principle. A divergence signal alone can be noisy. By requiring it to occur
// at a key support or resistance level (identified using pivot points), we are filtering
// out weaker signals and only focusing on high-probability setups where the market is
// likely to respect a previous area of interest. This tells us that not only is the trend
// likely to continue, but it is doing so from a strategic, well-defined point on the chart.
// Dynamic Take-Profit Targets: The take-profit targets are based on the Average True Range (ATR).
// ATR is a measure of market volatility. Using it to set targets ensures that your profit
// levels are dynamic and adapt to current market conditions. In a volatile market, your
// targets will be wider, while in a calm market, they will be tighter, helping you avoid
// unrealistic expectations and improving your risk management.
GGB_lib_fiboLibrary "GGB_lib_fibo"
draw_fibo(high_point, low_point)
draw_fibo
/ @description Draws Fibonacci retracement lines between a high point and a low point.
/ @param high_point (float) Highest point of the move.
/ @param low_point (float) Lowest point of the move.
/ @returns (void) Draws lines on the chart.
Parameters:
high_point (float)
low_point (float)
GGB_lib_utilsLibrary "GGB_lib_utils"
gbb_tf_to_display(tf_minutes, tf_string)
gbb_tf_to_display
/ @description Converts minutes and TF string into a short standard label.
/ @param tf_minutes (float)
/ @param tf_string (string)
/ @returns (string) Timeframe label (M1,H1,D1,...)
Parameters:
tf_minutes (float)
tf_string (string)
gbb_convert_bars(_bars)
gbb_convert_bars
/ @description Formats a number of bars into a duration (days, hours, minutes + bar count).
/ @param _bars (int)
/ @returns (string)
Parameters:
_bars (int)
gbb_goldorak_init(_tf5Levels_input)
gbb_goldorak_init
/ @description Builds a contextual message about the current timeframe and optional 5-level TF.
/ @param _tf5Levels_input (string) Alternative timeframe ("" = current timeframe).
/ @returns (string, string, float)
Parameters:
_tf5Levels_input (string)
EMA+MACD+Fib Scalping ChallengeThis strategy synthesizes two core concepts from the provided transcripts:
Transcripts are pulled from the following two youtube videos
youtu.be
youtu.be
High-Probability Scalping Setup (1st Transcript): A mechanical method for finding high-probability, short-term reversal trades on a 1-minute chart. It uses a triple confluence of:
Trend Direction: Two Exponential Moving Averages (EMA 8 and EMA 34) identify the short-term trend direction via crossovers.
Momentum Confirmation: A fast MACD (3, 10, 16) confirms the strength and timing of the momentum shift required for entry.
Precise Entry Zone: Fibonacci retracement levels (primarily 61.8%) identify where a pullback is most likely to end and the main trend is likely to resume, providing a high-value entry point.
Aggressive Account Growth Challenge (2nd Transcript): An extremely high-risk, high-reward money management framework. Instead of traditional 1-2% risk per trade, this strategy risks 23% of the current account equity on each trade to target a 30% profit (a reward-risk ratio of approximately 1.3:1). The goal is to compound a small initial stake ($20) into a much larger amount ($50k+) over a series of successful trades, accepting that a few losses can wipe out the account just as quickly.
Core Philosophy: The strategy bets heavily on the edge provided by the high-probability technical setup. When the setup is correct, the account grows exponentially. When it fails, the losses are severe. It is designed for maximum capital efficiency in trending markets but is vulnerable during choppy or ranging conditions.
Ideal Parameter Settings & Configuration
These settings are optimized based on the specifics mentioned in the transcripts for 1-minute scalping.
1. Chart & Instrument Settings
Time Frame: 1 Minute
Instruments: Major forex pairs with low spreads (e.g., EUR/USD, GBP/USD). This is critical for scalping.
Trading Session: Highly liquid sessions like the London-New York overlap.
2. Indicator Parameters & Inputs
Parameter Ideal Setting Description & Purpose
Fast EMA Length 8 Reacts quickly to recent price changes, used for signal generation.
Slow EMA Length 34 Defines the underlying short-term trend. Acts as dynamic support/resistance.
MACD Fast Length 3 Makes the MACD extremely sensitive for catching early momentum shifts on the 1-min chart.
MACD Slow Length 10 The baseline for the fast length to calculate momentum against.
MACD Signal Smoothing 16 Slightly smoothed signal line to generate clearer crossover signals.
Fibonacci Level 61.8% The primary retracement level used to define the entry zone and the stop-loss level.
3. Strategy & Money Management Parameters
Parameter Setting Description & Purpose
Initial Capital 20 (or any small amount) The starting capital for the challenge.
Risk Per Trade 23% of equity The defining rule of the challenge. This is the percentage of the current account value risked on each trade.
Profit Target Per Trade 30% of equity The target profit, creating a ~1.3:1 Reward/Risk ratio.
Stop-Loss Type Fixed Percentage (23%) For simplicity and adherence to the challenge rules. The transcript also mentions placing the stop "a little below the 61.8% Fib level," which is a more advanced option.
Pyramiding 0 Do not add to positions. One trade at a time is already high-risk.
4. Entry & Exit Rules (Coded Logic)
LONG ENTRY: When ALL of the following occur simultaneously:
EMA 8 crosses above EMA 34.
MACD Histogram crosses above 0 (turns positive).
Price is touching or retracing to the 61.8% Fibonacci level drawn from a recent swing low to high.
SHORT ENTRY: When ALL of the following occur simultaneously:
EMA 8 crosses below EMA 34.
MACD Histogram crosses below 0 (turns negative).
Price is touching or retracing to the 61.8% Fibonacci level drawn from a recent swing high to low.
EXIT RULES:
Take Profit: Close the trade when a 30% profit on the risked capital is reached.
Stop Loss: Close the trade when a 23% loss on the risked capital is reached.
Emergency Exit: If the MACD or EMA cross back in the opposite direction before target/stop is hit, consider an early exit.
Critical Disclaimer and Final Notes
EXTREME RISK: This is not a standard trading strategy. It is a high-stakes challenge. Risking 23% per trade means just 4 consecutive losses would likely wipe out over 90% of your account. The second transcript's simulation showed a 99.5% success rate only under a constant 60% win rate condition, which is unrealistic in live markets.
Demo Use Only: This strategy must be thoroughly tested and understood in a demo environment before ever considering it with real funds.
Market Dependency: This strategy thrives only in strongly trending markets with clear pullbacks. It will generate significant losses in ranging, choppy, or low-volatility conditions. The ability to avoid trading in bad markets is a key factor in the challenge's success.
Psychological Pressure: The emotional burden of watching 23% of your account fluctuate on a 1-minute chart is immense and can lead to poor decision-making.
Use this strategy as a fascinating framework to study confluence and aggressive compounding, not as a guaranteed path to profits.
AA1 MACD 09.2025this is a learing project i want to share
the script is open for anyone
I combain some ema's mcad and more indicators to help find stocks in momentum
Futures Tick & Point Value [BoredYeti]Futures Tick & Point Value
This utility displays tick size, dollars per tick, and (optionally) a per-point row for the current futures contract.
Features
• Hardcoded $/tick map for common CME/NYMEX/CBOT/COMEX contracts
• Automatic fallback using pointvalue * mintick for any other symbol
• Table settings: adjustable position, text size, customizable colors
• Optional “Per Point” row showing ticks and $/point
Notes
• Contract specs can vary by broker/exchange and may change over time. Always confirm with official specifications.
• Educational tool only; not financial advice.
9:30 AM Open Percentage Lines//@version=5
indicator("9:30 AM Open Percentage Lines", overlay=true)
// Define the market open time in New York (or your local time zone if different)
// This is for 9:30 AM
var float opening_price = na
// Check if the current bar is the first one of the day at 9:30 AM
is_930_bar = (dayofweek == dayofweek.monday or dayofweek == dayofweek.tuesday or dayofweek == dayofweek.wednesday or dayofweek == dayofweek.thursday or dayofweek == dayofweek.friday) and hour(time("America/New_York")) == 9 and minute(time("America/New_York")) == 30
// On the first bar that meets the criteria, capture the opening price
if is_930_bar
opening_price := open
// Calculate the percentage levels based on the captured opening price
fivePercentAbove = opening_price * 1.05
sevenPercentAbove = opening_price * 1.07
twentySevenPercentAbove = opening_price * 1.27
// Plot the lines on the chart
// The `na` condition ensures the line is only plotted after the 9:30 AM bar has passed
plot(not na(opening_price) ? fivePercentAbove : na, title="5% Above 9:30 AM Open", color=color.new(color.rgb(255, 12, 12), 0), linewidth=2, trackprice=false)
plot(not na(opening_price) ? sevenPercentAbove : na, title="7% Above 9:30 AM Open", color=color.new(color.rgb(0, 150, 255), 0), linewidth=2, trackprice=false)
plot(not na(opening_price) ? twentySevenPercentAbove : na, title="27% Above 9:30 AM Open", color=color.new(color.rgb(255, 0, 0), 0), linewidth=2, trackprice=false)
black belt cloudThe EMA Cloud indicator highlights market trend direction by filling the space between multiple exponential moving averages with dynamic color-coded clouds.
When the market is in a bullish alignment, the cloud turns green, signaling strong upward momentum.
When the market shifts into a bearish alignment, the cloud turns red, warning of downside pressure.
During periods of mixed or uncertain conditions, the cloud appears yellow to indicate potential consolidation or indecision.
The indicator also includes alerts that trigger only on trend changes, helping traders react quickly when momentum shifts.
This tool makes it easy to:
Visualize trend strength at a glance
Avoid choppy, sideways market conditions
Combine with entry/exit strategies for improved decision-making
2ATR / Current Price %### **Real-Time 2ATR Volatility Ratio Indicator**
---
### **Overview**
This indicator provides a quick and visual way to understand market volatility by calculating the ratio between the **2ATR (Average True Range)** and the **current price**.
* **ATR (Average True Range)** is a widely-used measure of market volatility, showing the average price movement over a specific period.
* **2ATR** represents a price move that is twice the average volatility. Traders often use this value as a benchmark for potential support/resistance levels or for setting a dynamic stop-loss.
### **Key Features**
* **Real-Time Calculation**: Unlike many indicators that rely on the previous candle's close, this script calculates the 2ATR ratio using the **real-time current price**, providing you with up-to-the-second data.
* **Intuitive Display**: The final percentage value is shown in a clear **yellow label** at the **bottom-right** of your chart, making it easy to monitor without cluttering your view.
* **Customizable Input**: You can adjust the `ATR Period` setting to change the sensitivity of the volatility calculation, allowing you to adapt the indicator to different trading styles and timeframes.
### **How to Use It**
This tool is especially useful for **risk management and setting stop-loss orders**. The percentage displayed on the label tells you how much the price would need to move from its current level to equal a 2ATR change.
**Example**: If the indicator shows **3.5%**, it means a price drop of 3.5% from the current level would be equal to a 2ATR move. This gives you a clear and quantifiable number to help you set a **logical stop-loss** or to quickly assess the potential downside risk before entering a trade.
Triple-EMA Cloud (3× configurable EMAs + timeframe + fill)About This Script
Name: Triple-EMA Cloud (3× configurable EMAs + timeframe + fill)
What it does:
The script plots three Exponential Moving Averages (EMAs) on your chart.
You can set each EMA’s length (how many bars or days it averages over), source (for example, closing price, opening price, or the midpoint of high + low), and timeframe (you can have one EMA use daily data, another hourly data, etc.).
The indicator draws a “cloud” or channel by shading the area between the outermost two EMAs of the three. This lets you see a band or zone that the price is moving in, defined by those EMAs.
You also get full control over how each of the three EMA‐lines looks: color, thickness, transparency, and plot style (solid line, steps, circles, etc.).
How to Use It (for Beginners)
Here’s how a trader who’s new to charts can use this tool, especially when looking for pullbacks or undercut price action.
Key Concepts
Trend: Imagine the market price is generally going up or down. EMAs are a way to smooth out price movements so you can see the trend more clearly.
Pullback: When a price has been going up (an uptrend), sometimes it dips down a little before going up again. That dip is the pullback. It’s a chance to enter or add to a position at a “better price.”
Undercut: This is when price drops below an important level (for example an EMA) and then comes back up. It looks like it broke below, but then it recovers. That may show reverse pressure or strength building.
How the Script Helps With Pullbacks & Undercuts
Marking Trend Zones with the Cloud
The cloud between the outer EMA lines gives you a zone of expected support/resistance. If the price is above the cloud, that zone can act like a “floor” in uptrends; if it is below, the cloud might act like a “ceiling” in downtrends.
Watching Price vs the EMAs
If the price pulls back toward the cloud (or toward one of the EMAs) and then bounces back up, that’s a signal that the uptrend might continue.
If the price undercuts (goes a bit below) one of the EMAs or the cloud and then returns above it, that can also be a signal. It suggests that even though there was a temporary drop, buyers stepped in.
Using the Three EMAs for Confirmation
Because the script uses three EMAs, you can see how tightly or loosely they are spaced.
If all three EMAs are broadly aligned (for example, in an uptrend: shorter length above longer length, each pulling from reliable price source), that gives more confidence in trend strength.
If the middle EMA (or different source/timeframe) is holding up as support while others are above, it strengthens signal.
Entry & Exit Points
Entry: For example, after a pullback toward the cloud or “mid‐EMA”, wait for price to show a bounce up. That could be a better entry than buying at the top.
Stop Loss / Risk: You might place a stop loss just below the cloud or the lowest of your selected EMAs so that if price breaks through, the idea is invalidated.
Profit Target: Could be a recent high, resistance level, or a fixed reward-risk multiple (for example aiming to make twice what you risked).
Practical Steps for New Traders
Set up the EMAs
Choose simple lengths like 10, 21, 50.
For example, EMA #1 = length 10, source Close, timeframe “current chart”; EMA #2 = length 21, source (H+L)/2; EMA #3 = length 50, maybe timeframe daily.
Observe the Price Action
When price moves up, then dips, see if it comes back near the shaded cloud or one of the EMAs.
See if the dip touches the EMAs lightly (not a big drop) and then price starts climbing again.
Look for undercuts
If price briefly goes below a line (or below cloud) and then closes back above, that’s undercut + recovery. That bounce back is often meaningful.
Manage risk
Only put in money you can afford to lose.
Use small position size until you get comfortable.
Use stop-loss (as mentioned) in case the price doesn’t bounce as expected.
Practice
Put this indicator on charts (stocks you follow) in past time periods. See how price behaved with pullbacks / undercuts relative to the EMAs & cloud. This helps you learn to see signals.
What It Doesn’t Do (and What to Be Careful Of)
It doesn’t predict the future — it simply shows zones and trends. Price can still break down through the cloud.
In a “choppy” market (i.e. when price is going up and down without a clear trend), signals from EMAs / clouds are less reliable. You’ll get more “false bounces.”
Under / overshoots & big news events can break through clean levels, so always watch for confirmation (volume, price behavior) before putting big money in.
MGY Smart Fibonacci ProMGY Smart Fibonacci Pro Indicator
Overview:
MGY Smart Fibonacci Pro is an advanced multi-timeframe Fibonacci indicator that automatically adapts to your current chart timeframe. It intelligently displays the most relevant Fibonacci retracement levels based on the higher timeframes, providing traders with dynamic support and resistance levels.
Stocks Sessions TableThe stock market open session table is a great way to keep an eye on the market's open and close. This is aimed at the UK traders working with the BST timezone
Alert N seconds before candle closeThe indicator alerts about the closing of the candle in N seconds.
Instruction:
1. Add an indicator
2. Specify the time in the indicator settings
3. Alt+A, Condition - choose indicator
MA//@version=5
indicator("MA20 và EMA9", overlay=true)
// === Input tham số ===
lengthMA = input.int(20, "Độ dài MA", minval=1)
lengthEMA = input.int(9, "Độ dài EMA", minval=1)
// === Tính toán đường trung bình ===
ma20 = ta.sma(close, lengthMA) // Simple Moving Average 20
ema9 = ta.ema(close, lengthEMA) // Exponential Moving Average 9
// === Vẽ ra biểu đồ ===
plot(ma20, color=color.red, linewidth=2, title="MA20")
plot(ema9, color=color.blue, linewidth=2, title="EMA9")
Tape Pressure Proxy — CVD Panel (Oscillators) v1.1 2. Add TV_TapePressure_CVDPanel.pine in a new pane to see CVD, CVD slope, and Imbalance (Z) histogram with thresholds.
3. Set alerts on the overlay script:
• “Bull Tape Pressure” → long scalps
• “Bear Tape Pressure” → short/puts scalps
4. Tune: imbThresh (0.6–1.2 typical), deltaLen (10–30), and volume filter per symbol/timeframe.
delta_leverage_lib🚀 Delta Leverage Library - Exchange Max Leverage Data
Comprehensive Pine v6 library providing maximum leverage data for USDT perpetual contracts across major exchanges. Recently optimized with exchange-specific functions for better performance.
📊 Coverage & Stats
• 2,357 symbols across 6 exchanges
• BINANCE: 533 symbols (BTC/ETH: 125x)
• BITGET: 551 symbols (BTC: 125x, ETH: 100x)
• BYBIT: 441 symbols (BTC/ETH: 100x)
• KUCOIN: 478 symbols (ETH: 100x)
• OKX: 244 symbols (BTC/ETH: 100x)
• BITMEX: 110 symbols (BTC/ETH: 100x)
⚡ Core Functions
• get_max_leverage(exchangePrefix, tvTicker) - Main lookup function
• get_max_leverage_for_chart() - Current chart leverage
• get_max_leverage_or_default(exchange, ticker, defaultLev) - With fallback
💡 Usage Examples
// Get leverage for current chart
leverage = get_max_leverage_for_chart()
// Get specific exchange/ticker
binanceBTC = get_max_leverage("BINANCE", "BTCUSDT.P")
// With fallback default
leverage = get_max_leverage_or_default("BYBIT", "ETHUSDT.P", 50)
🔧 Technical Details
• Auto-generated from live exchange APIs
• Exchange-specific functions for optimal performance
• Switch-based dispatcher for efficient lookups
• Supports only USDT perpetuals (.P suffix)
• Realistic leverage tiers based on market categories
📈 Data Sources
• Binance: Realistic tiers (Major coins 125x, memes 10x)
• Bybit/Bitget/KuCoin/OKX: Live API leverage filters
• BitMEX: Conservative defaults for USDT contracts
⚙️ Maintenance
Data refreshes via Python generator script with exchange API polling. Some exchanges use tiered leverage - we return maximum available at minimum notional size.
Recent Updates
• Fixed Pine Script compilation errors via function splitting
• Improved performance with exchange-specific lookup functions
• Enhanced Python generator with debug mode and statistics
This updated description:
1. **Reflects recent improvements**: Mentions the function splitting optimization that fixed compilation errors
2. **Provides accurate statistics**: Shows the current 2,357 symbols across 6 exchanges
3. **Better organized**: Uses clear sections with emojis for visual appeal
4. **Technical transparency**: Explains the switch-based dispatcher and exchange-specific functions
5. **Practical usage**: Shows realistic code examples
6. **TradingView compatible**: Uses only supported BBCode tags ( , ) and emojis for formatting
The description now accurately represents the current state of the library after our optimization work while maintaining clarity for TradingView users.
get_max_leverage_binance(tvTicker)
Parameters:
tvTicker (string)
get_max_leverage_bitget(tvTicker)
Parameters:
tvTicker (string)
get_max_leverage_bitmex(tvTicker)
Parameters:
tvTicker (string)
get_max_leverage_bybit(tvTicker)
Parameters:
tvTicker (string)
get_max_leverage_kucoin(tvTicker)
Parameters:
tvTicker (string)
get_max_leverage_okx(tvTicker)
Parameters:
tvTicker (string)
get_max_leverage(exchangePrefix, tvTicker)
Parameters:
exchangePrefix (string)
tvTicker (string)
get_max_leverage_for_chart()
get_max_leverage_or_default(exchangePrefix, tvTicker, defaultLev)
Parameters:
exchangePrefix (string)
tvTicker (string)
defaultLev (int)
KT_Global Bond Yields by CountryGlobal Bond Yields Indicator Summary
The Global Bond Yields by Country indicator, developed for Trading View (Pine Script v5), provides a comprehensive tool for visualizing and analyzing government bond yields across multiple countries and maturities. Below are its key features:
Features
Country Selection: Choose from 20 countries, including the United States, China, Japan, Germany, United Kingdom, and more, to display their respective bond yields.
Multiple Maturities: Supports 18 bond maturities ranging from 1 month to 40 years, allowing users to analyze short-term to long-term yield trends.
Customizable Display:
Toggle visibility for each maturity (1M, 3M, 6M, 1Y, 2Y, 3Y, 4Y, 5Y, 6Y, 7Y, 8Y, 9Y, 10Y, 15Y, 20Y, 25Y, 30Y, 40Y) individually.
Option to show or hide all maturities with a single toggle for streamlined analysis.
10Y-2Y Yield Spread: Plots the difference between 10-year and 2-year bond yields, a key indicator of yield curve dynamics, with an option to enable/disable.
Zero Line Reference: Displays a dashed grey horizontal line at zero for clear visual reference.
Color-Coded Plots: Each maturity is plotted with a distinct color, ranging from lighter shades (short-term) to darker shades (long-term), for easy differentiation.
Country Label: Displays the selected country's name as a large, prominent label on the chart for quick identification.
Error Handling: Alerts users if an invalid country is selected, ensuring robust operation.
Data Integration: Fetches bond yield data from Trading View's database (e.g., TVC:US10Y) with support for ignoring invalid symbols to prevent errors.
This indicator is ideal for traders and analysts monitoring global fixed-income markets, yield curve shapes, and cross-country comparisons.
Custom Trade Checklist by [YSFX]# Custom Trade Checklist: Your On-Chart Trading Co-Pilot
## Overview
Ever taken a trade based on impulse, only to realize you forgot a key step in your analysis? The Custom Trade Checklist is a simple yet powerful on-chart utility designed to help you remain disciplined and consistent with your trading strategy.
By externalizing your trading plan into a visible, interactive checklist, you can reduce emotional decision-making and systematically verify your criteria before entering or exiting a trade. This tool acts as your personal co-pilot, ensuring you follow your rules on every single trade.
## Key Features
✅ Fully Customizable Rules: Define up to 10 unique checklist items tailored to your specific trading strategy. Examples include "Market Structure Aligned?", "RSI Oversold?", "News Events Checked?", or "Risk/Reward > 2:1?".
⚪ Dynamic Status Tracking: Use a simple dropdown menu in the settings to mark each rule with intuitive symbols like:
✅ / ✓ - Completed / True
❌ / ✕ - Failed / False
🟡 - Pending / Caution
⚪ - Neutral / Not Checked
And many more for complete flexibility.
📋 Clean & Minimalist Display: The checklist is presented in a clean, unobtrusive table that can be positioned in any corner of your chart, ensuring it provides guidance without cluttering your analysis.
⚙️ Flexible Configuration:
Choose the maximum number of entries to display.
Optionally hide disabled checklist items to keep your view focused on what's active.
Customize the table title to match your strategy (e.g., "Pre-Trade Checklist", "Swing Trade Rules").
🎨 Complete Color Control: Personalize every aspect of the table's appearance. You can independently set the colors for the title, text, background, border, and each individual status symbol to perfectly match your chart's theme.
## How to Use
Add the Indicator to your chart.
Open the Settings Panel by clicking the gear icon (⚙️) on the indicator.
Define Your Rules:
Go through Entry 1 to Entry 10.
For each rule you want to use, check the box to enable it.
In the text field, write your rule (e.g., "Price above 200 EMA").
Update Your Status: Before placing a trade, go back into the settings and update the status dropdown for each rule based on your analysis.
Customize Appearance:
Under the "General" tab, change the table title and position.
Under the "Colors" tab, adjust the colors to your liking.
## Who Is This For?
This tool is perfect for:
Discretionary Traders who need to enforce a consistent set of rules.
New Traders looking to build good habits and internalize their trading plan.
Systematic Traders who want a final pre-flight check before executing a trade.
Anyone working on improving their trading psychology and reducing impulsive actions.
This indicator does not generate signals or trading advice; it is a utility to support the trader's own process and discipline. We hope it helps you achieve greater consistency in your trading journey!
EMA 9 vs 21 Spread VarianceEMA 9 vs 21 Spread Variance
What it does
Tracks the distance between EMA 9 and EMA 21, then measures how volatile that distance has been over your chosen lookback. The indicator plots the EMA spread around zero and a rolling variance of that spread. Rising variance signals expanding dispersion between the fast and slow EMAs, which often precedes momentum bursts or regime shifts. Falling variance points to compression and mean-reversion conditions.
How it is calculated
Fast EMA and slow EMA are computed on the selected source.
Spread = EMA9 minus EMA21, plotted around zero.
Variance = rolling variance of the spread over Variance Lookback. Variance is always non-negative.
For readability you can show the variance either on its raw scale, or fitted to the spread’s recent range so both lines are comparable in one pane.
How to read it
Spread near zero with variance rising suggests an impending expansion from balance.
Large positive spread with elevated variance confirms a strong up-trend that is still dynamic.
Large negative spread with elevated variance confirms a strong down-trend that is still dynamic.
Variance rolling over after a run warns that momentum dispersion is cooling and that a consolidation or pullback is likely.
The horizontal zero line applies to the spread only. Variance does not cross zero.
Inputs
Source: price series for EMAs.
Fast EMA Length and Slow EMA Length: defaults 9 and 21.
Variance Lookback: window for the spread variance, common ranges 20 to 100 on intraday charts and 50 to 200 on higher timeframes.
Show spread line and Fit variance to spread scale: display controls.
Suggested use
Combine with your breakout logic. Look for variance expansion from low levels as a filter before taking continuation entries.
Use as a volatility context for EMA cross systems. Crosses that occur with rising variance tend to travel farther than crosses that occur during compression.
Caveats
Variance reacts to spikes in the spread, so it can jump around news bars. Smoothing reduces noise but adds lag. Consider pairing with ATR or session filters if you only want signals during liquid hours.