Adaptive Normalized Global Liquidity OscillatorAdaptive Normalized Global Liquidity Oscillator
A dynamic, non-repainting oscillator built on real central bank balance sheet data. This tool visualizes global liquidity shifts by aggregating monetary asset flows from the world’s most influential central banks.
🔍 What This Script Does:
Aggregates Global Liquidity:
Includes Federal Reserve (FED) assets and subtracts liabilities like the Treasury General Account (TGA) and Reverse Repo Facility (RRP), combined with asset positions from the ECB, BOJ, PBC, BOE, and over 10 other central banks. All data is normalized into USD using FX rates.
Adaptive Normalization:
Optimizes the lookback period dynamically based on rate-of-change stability—no fixed lengths, enabling adaptation across macro conditions.
Self-Optimizing Weighting:
Applies inverse standard deviation to balance raw liquidity, smoothed momentum (HMA), and standardized deviation from the mean.
Percentile-Ranked Highlights:
Liquidity readings are ranked relative to history—extremes are visually emphasized using gradient color and adaptive transparency.
Non-Repainting Design:
Data is anchored with bar index awareness and offset techniques, ensuring no forward-looking bias. What you see is what was known at that time.
⚠️ Important Interpretation Note:
This is not a zero-centered oscillator like RSI or MACD. The signal line does not represent neutrality at zero.
Instead, a dynamic baseline is calculated using a rolling mean of scaled liquidity.
0 is irrelevant on its own—true directional signals come from crosses above or below this adaptive baseline.
Even negative values may signal strength if they are rising above the moving average of past liquidity conditions.
✅ What to Watch For:
Crossover Above Dynamic Baseline:
Indicates liquidity is expanding relative to recent conditions—supports a risk-on interpretation.
Crossover Below Dynamic Baseline:
Suggests deteriorating liquidity conditions—may align with risk-off shifts.
Percentile Extremes:
Readings near the top or bottom historical percentiles can act as contrarian or confirmation signals, depending on momentum.
⚙️ How It Works:
Bounded Normalization:
The final oscillator is passed through a tanh function, keeping values within and reducing distortion.
Adaptive Transparency:
The strength of deviations dynamically adjusts plot intensity—visually highlighting stronger liquidity shifts.
Fully Customizable:
Toggle which banks are included, adjust dynamic optimization ranges, and control visual display options for plot and background layers.
🧠 How to Use:
Trend Confirmation:
Sustained rises in the oscillator above baseline suggest underlying monetary support for asset prices.
Macro Turning Points:
Reversals or divergences, especially near OB/OS zones, can foreshadow broader risk regime changes.
Visual Context:
Use the dynamic baseline to see if liquidity is supportive or suppressive relative to its own adaptive history.
📌 Disclaimer:
This indicator is for educational and informational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always consult a qualified financial advisor before making trading or investment decisions.
Indicators and strategies
Flow & Analytics (Normalized)Flow & Analytics (Normalized)
A multi‐metric lower‐pane indicator that condenses volume imbalances and flow dynamics into four normalized measures—Δ %, Ratio, Z-Score, and Cumulative Δ—plus optional buy/sell “flow” bars. All series are scaled to –1…+1 for direct comparison.
How to Add & Configure
Add the script to your chart (overlay = false).
In Settings → Inputs, toggle on/off the four metrics and the background flow bars.
Adjust look-back windows:
Flow Lookback controls how much history the bars normalize over.
Z Window sets the period for the Z-Score’s mean/standard deviation.
Cum Δ Lookback determines how reactive the cumulative Δ line is.
Choose colors, line widths, and opacity to match your style.
Reading the Metrics
Flow Bars (teal/green & red overlay):
Plotted as vertical columns from –1…+1, they show buy vs. sell pressure each bar.
The taller bar is drawn behind, the shorter in front—so you always see both sides of the fight.
Use: Quickly spot bars where one side dominates (e.g. an all-green or all-red bar).
Δ % (orange line, thick):
(
B
u
y
s
−
S
e
l
l
s
)
/
(
B
u
y
s
+
S
e
l
l
s
)
(Buys−Sells)/(Buys+Sells).
Measures net imbalance as a percentage of total flow.
Crosses of 0 indicate a shift from selling to buying pressure (or vice versa).
Values near ±1 reveal nearly pure one-sided flow.
Ratio (purple dashed):
Defined as
(
B
/
S
−
1
)
/
(
B
/
S
+
1
)
(B/S−1)/(B/S+1), which algebraically equals Δ %.
Plotted separately so you can style or overlay it for confirmation.
Note: It will track exactly on top of Δ %, so if you need a distinct signal consider replacing it with a “raw” B/S ratio or a different transform.
Z-Score (yellow):
Standardizes the bar’s raw Δ (
B
−
S
B−S) versus its recent mean/σ over Z Window.
Caps at ±Z Cap Threshold, then scales back to ±1.
Highlights bars that are unusually imbalanced compared to recent history.
Bar-coloring marks extreme |Z| > 1 in solid yellow.
Cumulative Δ (teal):
A running sum of bar-by-bar Δ, normalized to its peak absolute over Cum Δ Lookback.
Tracks whether buying or selling has been dominant over the last N bars.
Values above zero show net buying accumulation; values below, net selling.
Putting It All Together
Trend Entry/Exit
A sustained positive Cum Δ plus repeated high-Z bars confirms institutional buying.
Conversely, negative Cum Δ with extreme Z down-bars signals strong selling.
Divergence
When price makes new highs but Δ % or Cum Δ fails to follow, suspect weakening momentum.
A Z-Score peak without corresponding price movement often precedes reversals.
Micro-structure
Single-bar Flow Bars show quick supply/demand switches.
Use the opacity controls to “ghost” the losing side behind the winner—ideal for scalping or order-flow analysis.
Pro Tips
Align Look-back Windows with your chart timeframe (e.g. 20–50 bars on a 1 min chart).
Combine with price support/resistance zones: an extreme Z-Score at a pivot often marks a high-probability turn.
Customize the Ratio plot to raw buy/sell ratio if you need a different sensitivity curve.
Use this tool as a real-time “flow compass”—it blends volume, imbalance, and statistical context into one clean pane, helping you spot when buying or selling truly takes over.
Open Lines (Bruins.J)Session breaks, open lines, each trading session hour can be marked with an independant open line.
Pivot Points StandardThis is an indicator that has multiple EMAs and pivot points and RSI table. It will help to trade better. ShubhTrades
ATR & Ticker + SMA Display (Table)Displays ATR with moving average of choice
Allows display by screen location and by selection of moving average type
Timeframe Resistance Evaluation And Detection - CoffeeKillerTREAD - Timeframe Resistance Evaluation And Detection Guide
🔔 Important Technical Limitation 🔔
**This indicator does NOT fetch true higher timeframe data.** Instead, it simulates higher timeframe levels by aggregating data from your current chart timeframe. This means:
- Results will vary depending on what chart timeframe you're viewing
- Levels may not match actual higher timeframe candle highs/lows
- You might miss important wicks or gaps that occurred between chart timeframe bars
- **Always verify levels against actual higher timeframe charts before trading**
Welcome traders! This guide will walk you through the TREAD (Timeframe Resistance Evaluation And Detection) indicator, a multi-timeframe analysis tool developed by CoffeeKiller that identifies support and resistance confluence across different time periods.(I am 50+ year old trader and always thought I was bad a teaching and explaining so you get a AI guide. I personally use this on the 5 minute chart with the default settings, but to each there own and if you can improve the trend detection methods please DM me. I would like to see the code. Thanks)
Core Components
1. Dual Timeframe Level Tracking
- Short Timeframe Levels: Tracks opening price extremes within shorter periods
- Long Timeframe Levels: Tracks actual high/low extremes within longer periods
- Dynamic Reset Mechanism: Levels reset at the start of each new timeframe period
- Momentum Detection: Identifies when levels change mid-period, indicating active price movement
2. Visual Zone System
- High Zones: Areas between long timeframe highs and short timeframe highs
- Low Zones: Areas between long timeframe lows and short timeframe lows
- Fill Coloring: Dynamic colors based on whether levels are static or actively changing
- Momentum Highlighting: Special colors when levels break during active periods
3. Customizable Display Options
- Multiple Plot Styles: Line, circles, or cross markers
- Flexible Timeframe Selection: Wide range of short and long timeframe combinations
- Color Customization: Separate colors for each level type and momentum state
- Toggle Controls: Show/hide different elements based on trading preference
Main Features
Timeframe Settings
- Short Timeframe Options: 15m, 30m, 1h, 2h, 4h
- Long Timeframe Options: 1h, 2h, 4h, 8h, 12h, 1D, 1W
- Recommended Combinations:
- Scalping: 15m/1h or 30m/2h
- Day Trading: 30m/4h or 1h/4h
- Swing Trading: 4h/1D or 1D/1W
Display Configuration
- Level Visibility: Toggle short/long timeframe levels independently
- Fill Zone Control: Enable/disable colored zones between levels
- Momentum Fills: Special highlighting for actively changing levels
- Line Customization: Width, style, and color options for all elements
Color System
- Short TF High: Default red for resistance levels
- Short TF Low: Default green for support levels
- Long TF High: Transparent red for broader resistance context
- Long TF Low: Transparent green for broader support context
- Momentum Colors: Brighter colors when levels are actively changing
Technical Implementation Details
How Level Tracking Works
The indicator uses a custom tracking function that:
1. Detects Timeframe Periods: Uses `time()` function to identify when new periods begin
2. Tracks Extremes: Monitors highest/lowest values within each period
3. Resets on New Periods: Clears tracking when timeframe periods change
4. Updates Mid-Period: Continues tracking if new extremes are reached
The Timeframe Limitation Explained
`pinescript
// What the indicator does:
short_tf_start = ta.change(time(short_timeframe)) != 0 // Detects 30m period start
= track_highest(open, short_tf_start) // BUT uses chart TF opens!
// What true multi-timeframe would be:
// short_tf_high = request.security(syminfo.tickerid, short_timeframe, high)
`
This means:
- On a 5m chart with 30m/4h settings: Tracks 5m bar opens during 30m and 4h windows
- On a 1m chart with same settings: Tracks 1m bar opens during 30m and 4h windows
- Results will be different between chart timeframes
- May miss important price action that occurred between your chart's bars
Visual Elements
1. Level Lines
- Short TF High: Upper resistance line from shorter timeframe analysis
- Short TF Low: Lower support line from shorter timeframe analysis
- Long TF High: Broader resistance context from longer timeframe
- Long TF Low: Broader support context from longer timeframe
2. Zone Fills
- High Zone: Area between long TF high and short TF high (potential resistance cluster)
- Low Zone: Area between long TF low and short TF low (potential support cluster)
- Regular Fill: Standard transparency when levels are static
- Momentum Fill: Enhanced visibility when levels are actively changing
3. Dynamic Coloring
- Static Periods: Normal colors when levels haven't changed recently
- Active Periods: Momentum colors when levels are being tested/broken
- Confluence Zones: Different intensities based on timeframe alignment
Trading Applications
1. Support/Resistance Trading
- Entry Points: Trade bounces from zone boundaries
- Confluence Areas: Focus on areas where short and long TF levels cluster
- Zone Breaks: Enter on confirmed breaks through entire zones
- Multiple Timeframe Confirmation: Stronger signals when both timeframes align
2. Range Trading
- Zone Boundaries: Use fill zones as range extremes
- Mean Reversion: Trade back toward opposite zone when price reaches extremes
- Breakout Preparation: Watch for momentum color changes indicating potential breakouts
- Risk Management: Place stops outside the opposite zone
3. Trend Following
- Direction Bias: Trade in direction of zone breaks
- Pullback Entries: Enter on pullbacks to broken zones (now support/resistance)
- Momentum Confirmation: Use momentum coloring to confirm trend strength
- Multiple Timeframe Alignment: Strongest trends when both timeframes agree
4. Scalping Applications
- Quick Bounces: Trade rapid moves between zone boundaries
- Momentum Signals: Enter when momentum colors appear
- Short-Term Targets: Use opposite zone as profit target
- Tight Stops: Place stops just outside current zone
Optimization Guide
1. Timeframe Selection
For Different Trading Styles:
- Scalping: 15m/1h - Quick levels, frequent updates
- Day Trading: 30m/4h - Balanced view, good for intraday moves
- Swing Trading: 4h/1D - Longer-term perspective, fewer false signals
- Position Trading: 1D/1W - Major structural levels
2. Chart Timeframe Considerations
**Important**: Your chart timeframe affects results
- Lower Chart TF: More granular level tracking, but may be noisy
- Higher Chart TF: Smoother levels, but may miss important price action
- Recommended: Use chart timeframe 2-4x smaller than short indicator timeframe
3. Display Settings
- Busy Charts: Disable fills, show only key levels
- Clean Analysis: Enable all fills and momentum coloring
- Multi-Monitor Setup: Use different color schemes for easy identification
- Mobile Trading: Increase line width for visibility
Best Practices
1. Level Verification
- Always Cross-Check: Verify levels against actual higher timeframe charts
- Multiple Timeframes: Check 2-3 different chart timeframes for consistency
- Price Action Confirmation: Wait for candlestick confirmation at levels
- Volume Analysis: Combine with volume for stronger confirmation
2. Risk Management
- Stop Placement: Use zones rather than exact prices for stops
- Position Sizing: Reduce size when zones are narrow (higher risk)
- Multiple Targets: Scale out at different zone boundaries
- False Break Protection: Allow for minor zone penetrations
3. Signal Quality Assessment
- Momentum Colors: Higher probability when momentum coloring appears
- Zone Width: Wider zones often provide stronger support/resistance
- Historical Testing: Backtest on your preferred timeframe combinations
- Market Conditions: Adjust sensitivity based on volatility
Advanced Features
1. Momentum Detection System
The indicator tracks when levels change mid-period:
`pinescript
short_high_changed = short_high != short_high and not short_tf_start
`
This identifies:
- Active level testing
- Potential breakout situations
- Increased market volatility
- Trend acceleration points
2. Dynamic Color System
Complex conditional logic determines fill colors:
- Static Zones: Regular transparency for stable levels
- Active Zones: Enhanced colors for changing levels
- Mixed States: Different combinations based on user preferences
- Custom Overrides: User can prioritize certain color schemes
3. Zone Interaction Analysis
- Convergence: When short and long TF levels approach each other
- Divergence: When timeframes show conflicting levels
- Alignment: When both timeframes agree on direction
- Transition: When one timeframe changes while other remains static
Common Issues and Solutions
1. Inconsistent Levels
Problem: Levels look different on various chart timeframes
Solution: Always verify against actual higher timeframe charts
2. Missing Price Action
Problem: Important wicks or gaps not reflected in levels
Solution: Use chart timeframe closer to indicator's short timeframe setting
3. Too Many Signals
Problem: Excessive level changes and momentum alerts
Solution: Increase timeframe settings or reduce chart timeframe granularity
4. Lagging Signals
Problem: Levels seem to update too slowly
Solution: Decrease chart timeframe or use more sensitive timeframe combinations
Recommended Setups
Conservative Approach
- Timeframes: 4h/1D
- Chart: 1h
- Display: Show fills only, no momentum coloring
- Use: Swing trading, position management
Aggressive Approach
- Timeframes: 15m/1h
- Chart: 5m
- Display: All features enabled, momentum highlighting
- Use: Scalping, quick reversal trades
Balanced Approach
- Timeframes: 30m/4h
- Chart: 15m
- Display: Selective fills, momentum on key levels
- Use: Day trading, multi-session analysis
Final Notes
**Remember**: This indicator provides a synthetic view of multi-timeframe levels, not true higher timeframe data. While useful for identifying potential confluence areas, always verify important levels by checking actual higher timeframe charts.
**Best Results When**:
- Combined with actual multi-timeframe analysis
- Used for confluence confirmation rather than primary signals
- Applied with proper risk management
- Verified against price action and volume
**DISCLAIMER**: This indicator and its signals are intended solely for educational and informational purposes. The timeframe limitation means results may not reflect true higher timeframe levels. Always conduct your own analysis and verify levels independently before making trading decisions. Trading involves significant risk of loss.
SuperTrend Adaptive (STD Smooth)Supertrend Adaptive (Smoothed StdDev)
Supertrend Adaptive is a refined trend-following indicator based on the classic Supertrend. It enhances the original by incorporating smoothed standard deviation into the volatility calculation, instead of relying solely on ATR. This hybrid approach enables more responsive and adaptive trend detection, reducing noise and false signals in volatile or ranging markets. The indicator also features confidence-weighted signal labels and a clean, uncluttered display, making it practical for any trading timeframe.
🔍 Detailed Methodology and Conceptual Foundation
Unlike traditional Supertrend indicators that use only absolute volatility (ATR) to define trend bands, this version blends standard deviation — a relative volatility measure — into the calculation. Standard deviation helps capture the dispersion of price, not just its range, and when smoothed, it filters out erratic jumps caused by sudden spikes or drops.
This fusion creates trend bands that expand and contract dynamically based on recent price variability. As a result:
Fewer whipsaws : The trend bands adjust to both low and high volatility environments, which helps avoid unnecessary signal flips during consolidation.
Stronger trend adherence : Signals are less reactive to momentary price movements. This allows the indicator to hold positions longer in trending markets, giving traders the opportunity to ride extended moves.
Bollinger Band-style adaptation : By including standard deviation, this indicator behaves similarly to Bollinger Bands — accounting for relative price change rather than absolute moves alone.
These enhancements make the tool suitable not only for identifying directional bias, but also for refining entries and exits with more context-aware volatility filtering.
📈 How to Use the Indicator
Trend Direction: The script draws a colored line beneath (uptrend) or above (downtrend) price. Green indicates bullish trend, red indicates bearish.
Buy/Sell Labels: Only the most recent signal is shown to reduce clutter:
🟢 Green "Buy" label = trend reversal to bullish, with strong confidence.
🔵 Blue "Buy" label = same reversal, but with lower volume confidence.
🔴 Red "Sell" label = trend reversal to bearish, with strong confidence.
🟠 Orange "Sell" label = bearish signal with lower volume confidence.
These color codes are derived from comparing current volume to its average — a higher-than-average volume gives greater confidence to the signal.
Settings:
ATR Period: Controls the smoothing window for volatility calculation.
ATR Multiplier: Adjusts the size of the trend bands.
Std Smooth: Controls smoothing applied to standard deviation to reduce jitter.
Change ATR Method: Option to toggle between default and smoothed ATR.
Show Signals: Toggle for label display.
📢 Alerts
The script includes three built-in alert conditions:
Buy Signal: Triggered when the trend flips to bullish.
Sell Signal: Triggered when the trend flips to bearish.
Trend Direction Change: Alerts on any switch in trend regardless of confidence level.
These alerts allow traders to automate notifications or integrations with bots or trading platforms.
🧼 Clean Chart Display
To ensure clarity and comply with best practices:
The chart shows only this indicator.
Trend lines are drawn in real time for visual context.
Only one label per direction is shown — the most recent one — to keep the chart readable.
No drawings or unrelated indicators are included.
This setup ensures the script’s signals and structure are immediately understandable at a glance.
📌 Best Use Cases
This tool is designed for:
Traders who want adaptive volatility filters instead of rigid ATR-based models.
Scalpers and swing traders who prefer clean charts with minimal lag and fewer false signals.
Any asset class — works well on crypto, FX, and equities.
Shortcoming of this tool is sideway price action (will be tackled in next versions).
Credit for www.tradingview.com the version which this script extends.
My script/@version=5
indicator("dvp - Engulfing Strategy", overlay=true)
// Moving Averages
sma1 = input.int(6,"Trend SMA")
ema1 = input.int(3,"Engulf EMA")
sma6 = ta.sma(close, sma1)
ema3 = ta.ema(close, ema1)
// Helper candles
c3 = close < open // 3 days ago was a red candle
c2 = close > open // 2 days ago was a green candle
engulfed = (low < low ) and (high > high ) // bullish engulfing
c0_bull = close > open // current candle is green
close_above_c2high = close > high
c3_below_sma6 = close < sma6
c0_above_ema3 = close > ema3
// Bullish Engulfing Conditions
bullishSignal = c3 and c2 and engulfed and c0_bull and close_above_c2high and c3_below_sma6 and c0_above_ema3
// Plotting text for bullish engulfing
plotshape(bullishSignal, title="Bullish Engulfing", location=location.belowbar, color=color.green, style=shape.labelup, text="BuE")
// Optional: Bearish Engulfing Detection
c3_bear = close > open // 3 days ago green
c2_bear = close < open // 2 days ago red
engulfed_bear = (high > high ) and (low < low )
c0_bear = close < open // current red
close_below_c2low = close < low
c3_above_sma6 = close > sma6
c0_below_ema3 = close < ema3
bearishSignal = c3_bear and c2_bear and engulfed_bear and c0_bear and close_below_c2low and c3_above_sma6 and c0_below_ema3
plotshape(bearishSignal, title="Bearish Engulfing", location=location.abovebar, color=color.red, style=shape.labeldown, text="BeU")
// Plotting Moving Averages
plot(sma6, color=color.orange, title="SMA 6")
plot(ema3, color=color.blue, title="EMA 3")
```
Swing Counter – Alleen eerste label per reeksCounts upward en downward swings. Number 7 or 8 is a warning.
Dual HalfTrend Enhanced"Hello friends, this is a trend indicator,
I created this indicator inspired by HalfTrend.
"It's a very simple logic on how to trade in this. There are two types of trend periods in this, one small and one large. Whichever is the larger trend, that is our pro-trend. Now, we enter that trend when the pro-trend comes in the smaller trend. For example...
if the bigger trend is showing an uptrend, we will only look for buy signals. When the smaller trend also turns into an uptrend, we enter a buy trade.
the sell scenarios are the same.
CrumpBot Short - Górny Knot z filtrem wzrostu (knots)The indicator works on the same principle as Crumpbot, this one is for shorts
BTC Buy/Sell SignalUse in higher time frames (weekly works best)
Condition Interpretation:
Red Shading: Indicates a scenario where Copper/Gold is strong (above zero), Copper/Bitcoin is weak (below zero), and the difference between them is pronounced (Smoothed MA Difference above Copper/Gold Z-Score).
Green Shading: Indicates the opposite, where Copper/Gold is weak, Copper/Bitcoin is strong, and the difference is below the Copper/Gold Z-Score.
The zones only indicate that the trader should consider buying or selling. Use with another indicator to confirm.
TimeframeToStringToolLibrary "TimeframeToStringTool"
Maps a worded string for timeframes useful when working with the input.timeframe input. Use like timeframeToString("120") and the output will be "2 hour"
timeframeToString(timeframeString)
Converts timeframe strings e.g. 60" will return Day
Parameters:
timeframeString (string)
Returns: returns a map
SMA 20/50 Crossover Strategy - Peter GangmeiSMA 20/50 Crossover Strategy – Peter Gangmei
This indicator visualizes a classic moving average crossover strategy using Simple Moving Averages (SMA). It plots the 20, 50, and 200 period SMAs and generates clear Buy and Sell signals based on the crossover between the 20 and 50 SMAs:
✅ Buy Signal: When the 20 SMA crosses above the 50 SMA
🔻 Sell Signal: When the 20 SMA crosses below the 50 SMA
📈 The 200 SMA is also plotted for long-term trend context.
Visual cues are displayed on the chart using up/down triangles to indicate entry opportunities. The script also includes built-in alerts so you never miss a trading signal.
Ideal for traders who want a simple, visually intuitive way to follow trend shifts and momentum.
BackTestLibLibrary "BackTestLib"
Allows backtesting indicator performance. Tracks typical metrics such as won/loss, profit factor, draw down, etc. Trading View strategy library provides similar (and more comprehensive)
functionality but only works with strategies. This libary was created to address performance tracking within indicators.
Two primary outputs are generated:
1. Summary Table: Displays overall performance metrics for the indicator over the chart's loaded timeframe and history
2. Details Table: Displays a table of individual trade entries and exits. This table can grow larger than the available chart space. It does have a max number of rows supported. I haven't
found a way to add scroll bars or scroll bar equivalents yet.
f_init(data, _defaultStopLoss, _defaultTakeProfit, _useTrailingStop, _useTraingStopToBreakEven, _trailingStopActivation, _trailingStopOffset)
f_init Initialize the backtest data type. Called prior to using the backtester functions
Parameters:
data (backtesterData) : backtesterData to initialize
_defaultStopLoss (float) : Default trade stop loss to apply
_defaultTakeProfit (float) : Default trade take profit to apply
_useTrailingStop (bool) : Trailing stop enabled
_useTraingStopToBreakEven (bool) : When trailing stop active, trailing stop will increase no further than the entry price
_trailingStopActivation (int) : When trailing stop active, trailing will begin once price exceeds base stop loss by this number of points
_trailingStopOffset (int) : When trailing stop active, it will trail the max price achieved by this number of points
Returns: Initialized data set
f_buildResultStr(_resultType, _price, _resultPoints, _numWins, _pointsWon, _numLoss, _pointsLost)
f_buildResultStr Helper function to construct a string of resutling data for exit tooltip labels
Parameters:
_resultType (string)
_price (float)
_resultPoints (float)
_numWins (int)
_pointsWon (float)
_numLoss (int)
_pointsLost (float)
f_buildResultLabel(data, labelVertical, labelOffset, long)
f_buildResultLabel Helper function to construct an Exit label for display on the chart
Parameters:
data (backtesterData)
labelVertical (bool)
labelOffset (int)
long (bool)
f_updateTrailingStop(_entryPrice, _curPrice, _sl, _tp, trailingStopActivationInput, trailingStopOffsetInput, useTrailingStopToBreakEven)
f_updateTrailingStop Helper function to advance the trailing stop as price action dictates
Parameters:
_entryPrice (float)
_curPrice (float)
_sl (float)
_tp (float)
trailingStopActivationInput (float)
trailingStopOffsetInput (float)
useTrailingStopToBreakEven (bool)
Returns: Updated stop loss for current price action
f_enterShort(data, entryPrice, fixedStopLoss)
f_enterShort Helper function to enter a short and collect data necessary for tracking the trade entry
Parameters:
data (backtesterData)
entryPrice (float)
fixedStopLoss (float)
Returns: Updated backtest data
f_enterLong(data, entryPrice, fixedStopLoss)
f_enterLong Helper function to enter a long and collect data necessary for tracking the trade entry
Parameters:
data (backtesterData)
entryPrice (float)
fixedStopLoss (float)
Returns: Updated backtest data
f_exitTrade(data)
f_enterLong Helper function to exit a trade and update/reset tracking data
Parameters:
data (backtesterData)
Returns: Updated backtest data
f_checkTradeConditionForExit(data, condition, curPrice, enableRealTime)
f_checkTradeConditionForExit Helper function to determine if provided condition indicates an exit
Parameters:
data (backtesterData)
condition (bool) : When true trade will exit
curPrice (float)
enableRealTime (bool) : When true trade will evaluate if barstate is relatime or barstate is confirmed; otherwise just checks on is confirmed
Returns: Updated backtest data
f_checkTrade(data, curPrice, curLow, curHigh, enableRealTime)
f_checkTrade Helper function to determine if current price action dictates stop loss or take profit exit
Parameters:
data (backtesterData)
curPrice (float)
curLow (float)
curHigh (float)
enableRealTime (bool) : When true trade will evaluate if barstate is relatime or barstate is confirmed; otherwise just checks on is confirmed
Returns: Updated backtest data
f_fillCell(_table, _column, _row, _title, _value, _bgcolor, _txtcolor, _text_size)
f_fillCell Helper function to construct result table cells
Parameters:
_table (table)
_column (int)
_row (int)
_title (string)
_value (string)
_bgcolor (color)
_txtcolor (color)
_text_size (string)
Returns: Table cell
f_prepareStatsTable(data, drawTesterSummary, drawTesterDetails, summaryTableTextSize, detailsTableTextSize, displayRowZero, summaryTableLocation, detailsTableLocation)
f_fillCell Helper function to populate result table
Parameters:
data (backtesterData)
drawTesterSummary (bool)
drawTesterDetails (bool)
summaryTableTextSize (string)
detailsTableTextSize (string)
displayRowZero (bool)
summaryTableLocation (string)
detailsTableLocation (string)
Returns: Updated backtest data
backtesterData
backtesterData - container for backtest performance metrics
Fields:
tradesArray (array) : Array of strings with entries for each individual trade and its results
pointsBalance (series float) : Running sum of backtest points won/loss results
drawDown (series float) : Running sum of backtest total draw down points
maxDrawDown (series float) : Running sum of backtest total draw down points
maxRunup (series float) : Running sum of max points won over the backtest
numWins (series int) : Number of wins of current backtes set
numLoss (series int) : Number of losses of current backtes set
pointsWon (series float) : Running sum of points won to date
pointsLost (series float) : Running sum of points lost to date
entrySide (series string) : Current entry long/short
tradeActive (series bool) : Indicates if a trade is currently active
tradeComplete (series bool) : Indicates if a trade just exited (due to stop loss or take profit)
entryPrice (series float) : Current trade entry price
entryTime (series int) : Current trade entry time
sl (series float) : Current trade stop loss
tp (series float) : Current trade take profit
defaultStopLoss (series float) : Default trade stop loss to apply
defaultTakeProfit (series float) : Default trade take profit to apply
useTrailingStop (series bool) : Trailing stop enabled
useTrailingStopToBreakEven (series bool) : When trailing stop active, trailing stop will increase no further than the entry price
trailingStopActivation (series int) : When trailing stop active, trailing will begin once price exceeds base stop loss by this number of points
trailingStopOffset (series int) : When trailing stop active, it will trail the max price achieved by this number of points
resultType (series string) : Current trade won/lost
exitPrice (series float) : Current trade exit price
resultPoints (series float) : Current trade points won/lost
summaryTable (series table) : Table to deisplay summary info
tradesTable (series table) : Table to display per trade info
HOG Trifecta HOG Trifecta
📊 Overview
HOG Trifecta is a real-time market monitor that blends three core elements of price action — trend, momentum, and volume positioning — into one clean directional output. Built for tactical traders, it cuts through the noise and highlights when the market is ready to move or stay neutral.
⚙️ How It Works
• Scores five key signals:
• EMA 9/21 crossover for directional trend
• RSI > 50 or < 50 for momentum bias
• MACD histogram for momentum expansion (WAE-style logic)
• Price relative to EMA 50 as a volume anchor
• ADX-powered trend strength confirmation
• Combines the signals into a score that determines a single bias:
BULLISH, NEUTRAL, or BEARISH
• Displays a floating, color-coded label above price for instant clarity
• Optional background shading tied to sentiment (toggleable)
🎯 Inputs
• Show Label — toggle the sentiment word on/off
• Show Background — toggle chart shading based on bias
✅ Benefits
• Monitors trend, momentum, and volume in real time
• Tells you when conditions align for directional setups
• Avoids false signals with NEUTRAL states
• Fully self-contained — no external dependencies
• Lightweight and fast for daily or intraday use
📈 Use Cases
• Entry confirmation in trend strategies
• Swing trade bias filter
• Anchor higher timeframe sentiment for lower timeframe entries
⚠️ Notes
• Score thresholds:
+2 or more → BULLISH
−2 or less → BEARISH
−1 to +1 → NEUTRAL
• Built using only standard Pine Script tools
Dinámicas de Mercado ProUser Manual: Indicator "Dinámicas de Mercado Pro" (DMP)
Author: @Profit_Quant
Created by: Gemini AI (2025)
1. General Concept
The "Dinámicas de Mercado Pro" indicator is an all-in-one technical analysis tool designed to be overlaid directly onto your price chart. Its goal is to provide a clear and concise view of the market structure by combining three crucial trading elements:
The Overall Trend: What is the main direction of the market?
Liquidity Zones: Where is the price likely to react (supports and resistances)?
Breakout Momentum: When is the price breaking out of a range with force and volume?
By integrating these components, the DMP helps you make more informed trading decisions by identifying high-probability zones for entering or exiting trades.
2. Essential Step! - Initial Chart Setup
For the indicator to work as designed, it is essential to hide the original candles of the TradingView chart.
The indicator already draws its own candles with the market sentiment colors. If you do not hide the original ones, you will see both sets of candles overlapping, which will make the chart confusing and unreadable.
How to hide the chart's candles?
There are two simple ways:
Method 1 (Recommended):
Once you have the "DMP" indicator on your chart, look for the symbol's name in the top-left corner of your screen (e.g., BTCUSD, EURUSD, etc.).
Right next to the name, you will see an eye icon (👁️).
Click that eye icon to hide the main symbol (the original candles, bars, or lines). The chart will become clean, showing only the candles drawn by the DMP indicator.
Method 2 (Alternative):
Click the gear icon (⚙️) for the chart settings.
Go to the "Symbol" tab.
Uncheck the boxes for "Body," "Borders," and "Wicks," or set their opacity to 0%.
3. Main Components and Their Interpretation
The indicator has 3 key visual components you need to understand.
a) Supply and Demand Zones (Order Blocks)
These are the colored rectangles drawn automatically on the chart.
What are they?: They represent zones where there was a strong imbalance between buyers and sellers, often caused by the activity of large institutions.
Demand Zone (Blue Rectangle): A potential support zone. When the price returns to this area, buying pressure is expected to increase, pushing the price up.
Supply Zone (Red Rectangle): A potential resistance zone. When the price reaches this area, selling pressure is expected to increase, pushing the price down.
Mitigated Zone (Gray Rectangle): When the price touches a supply or demand zone, it becomes "mitigated," meaning the liquidity in that zone has already been used. The zone turns gray to indicate that it is less reliable and the price is more likely to break through it in the future.
b) Candle Coloring (Market Sentiment)
The chart candles will change color based on a priority system to give you an instant read of market sentiment.
Green Candles (Uptrend): Indicate that the price is above the long-term Exponential Moving Average (EMA) (200 by default). This suggests the overall trend is bullish, and you should look for buying opportunities.
Red Candles (Downtrend): Indicate that the price is below the 200 EMA. This suggests the overall trend is bearish, and you should look for selling opportunities.
White Candles (Bullish Breakout): Alert! This occurs when the price breaks a recent range high AND is accompanied by above-average volume. It's a strong sign of bullish momentum.
Purple Candles (Bearish Breakout): Alert! This occurs when the price breaks a recent range low with high volume. It's a strong sign of bearish momentum.
Gray Candles (Neutral): Appear when the price is very close to the 200 EMA, indicating indecision or consolidation in the market. This is a time for caution.
c) Probability Paths (Price Targets)
These are the dashed lines projected from the last real-time candle.
Demand Path (Blue Dashed Line): Points from the current price to the center of the nearest unmitigated demand zone. It acts as a potential support target.
Supply Path (Red Dashed Line): Points from the current price to the center of the nearest unmitigated supply zone. It acts as a potential resistance target.
4. Basic Trading Strategies
Confluence Strategy: Look for buying opportunities when the price pulls back to a blue demand zone while the candles are green (uptrend). Look for selling opportunities when the price rallies to a red supply zone with red candles (downtrend).
Breakout Strategy: Use the white or purple candles as an aggressive entry signal in the direction of the breakout. The stop-loss could be placed on the other side of the breakout candle.
Range Strategy: When the price is trapped between a clear supply and demand zone (with no breakout candles), you can trade the bounces between them until one zone is broken with a white or purple candle, signaling the end of the range.
5. Indicator Settings (Parameters)
You can customize every aspect of the indicator in its settings panel (the options are self-explanatory in the indicator's menu).
RSI Confluence - 3 Timeframes V1.1RSI Confluence – 3 Timeframes V1.1
RSI Confluence – 3 Timeframes v1.1 is a powerful multi-timeframe momentum indicator that detects RSI alignment across three timeframes. It helps traders identify high-probability reversal or continuation zones where momentum direction is synchronized, offering more reliable entry signals.
✅ Key Features:
📊 3-Timeframe RSI Analysis: Compare RSI values from current, higher, and highest timeframes.
🔁 Customizable Timeframes: Select any combination of timeframes for precision across scalping, swing, or positional trading.
🎯 Overbought/Oversold Zones: Highlights when all RSI values align in extreme zones (e.g., <30 or >70).
🔄 Confluence Filter: Confirms trend reversals or continuations only when all RSIs agree in direction.
📈 Visual Signals: Displays visual cues (such as background color or labels) when multi-timeframe confluence is met.
⚙️ Inputs:
RSI Length: Define the calculation length for RSI.
Timeframe 1 (TF1): Lower timeframe (e.g., current chart)
Timeframe 2 (TF2): Medium timeframe (e.g., 1H or 4H)
Timeframe 3 (TF3): Higher timeframe (e.g., 1D or 1W)
OB/OS Levels: Customizable RSI overbought/oversold thresholds (default: 70/30)
Show Visuals: Toggle for background color or signal markers when confluence conditions are met
📈 Use Cases:
Identify trend continuation when all RSIs support the same direction
Spot strong reversal zones with RSI agreement across TFs
Improve entry accuracy by avoiding false signals on a single timeframe
Suitable for multi-timeframe strategy confirmation
MACD-VWAP-BB Oscillator with DivergenceHow to Use the Indicator for Trading
Here’s how to interpret and use the indicator’s signals as a beginner:
Look for Buy Signals:
Green Triangle Up (“BUY”):
Appears when MACD, VWAP, and Bollinger Bands all signal a strong bullish trend.
The ribbon turns green, and the background fill is green.
Action: Consider buying the asset, as this is a strong signal the price may rise.
Example: If you see a green triangle on a 1-hour chart for BTC/USD, it suggests a potential upward move.
Green Circle (“Div Buy”):
Indicates a bullish divergence, where the price is dropping, but the indicator suggests the downtrend may weaken or reverse.
This is a weaker signal than the triangle but can be an early warning of a trend change.
Action: Watch closely or consider a smaller buy position, especially if followed by a triangle signal.
Look for Sell Signals:
Red Triangle Down (“SELL”):
Appears when all three indicators signal a strong bearish trend.
The ribbon turns red, and the background fill is red.
Action: Consider selling or shorting the asset, as the price may fall.
Example: A red triangle on a stock chart suggests it’s time to exit a long position or go short.
Red Circle (“Div Sell”):
Indicates a bearish divergence, where the price is rising, but the indicator suggests the uptrend may weaken or reverse.
Action: Be cautious with long positions or consider preparing to sell, especially if a triangle signal follows.
Check the Ribbon and Background:
Green Ribbon and Fill: Confirms a bullish trend. Feel more confident in buy signals.
Red Ribbon and Fill: Confirms a bearish trend. Feel more confident in sell signals.
The ribbon’s spread (how far apart the lines are) shows trend strength: wider = stronger trend, tighter = weaker trend.
Use Divergence Signals for Early Warnings:
Divergence signals (circles) often appear before triangle signals, hinting at potential reversals.
Example: A green circle (“Div Buy”) on a downtrending chart suggests the price might stop falling soon. Wait for a green triangle to confirm before acting.
Choose a Timeframe:
Short-term traders (day trading): Use shorter timeframes like 5-minute, 15-minute, or 1-hour charts.
Swing traders: Use 4-hour or daily charts for signals that last days or weeks.
Long-term investors: Use daily or weekly charts for bigger trends.
Example: On a 4-hour chart, a green triangle might signal a trend lasting hours to days.
Combine with Price Action:
Don’t rely on the indicator alone. Look at the candlesticks:
Are there support/resistance levels nearby?
Is the price near a key level (e.g., a moving average or trendline)?
Use the indicator to confirm what you see in the price chart.
Risk Management:
Set Stop-Losses: Place a stop-loss below recent lows for buys or above recent highs for sells to limit losses.
Position Sizing: Only risk a small portion of your account (e.g., 1-2%) per trade.
Wait for Confirmation: Triangle signals are stronger than divergence signals. Consider waiting for a triangle before entering a trade, especially as a beginner.
Example Trading Scenario
Let’s say you’re trading EUR/USD on a 1-hour chart:
You see a green circle (“Div Buy”) at the bottom of the indicator panel, and the price is near a support level (a price where it stopped falling before).
This suggests a potential reversal, but it’s not confirmed yet.
Action: Watch closely but don’t enter a trade yet.
A few candles later, a green triangle (“BUY”) appears, the ribbon turns green, and the background fill is green.
This confirms a strong bullish signal (MACD, VWAP, and Bollinger Bands all agree).
Action: Enter a buy trade, set a stop-loss below the recent low, and aim for a target near a resistance level or a 1:2 risk-reward ratio.
Later, you see a red circle (“Div Sell”) while the price is still rising.
This warns that the uptrend might weaken.
Action: Tighten your stop-loss or prepare to exit if a red triangle appears.
A red triangle (“SELL”) appears, with the ribbon and fill turning red.
Action: Exit the buy trade or consider a short position.
Tips for Beginners
Start with a Demo Account: Practice using the indicator on a TradingView paper trading account or a broker’s demo account to avoid risking real money.
Test on Different Assets: Try the indicator on stocks, forex, or crypto to see where it performs best.
Avoid Overtrading: Wait for clear triangle signals for stronger trades. Divergence signals (circles) are less reliable, so use them as warnings.
Learn Basic Chart Patterns: Combine the indicator with simple patterns like support/resistance or candlestick patterns (e.g., pin bars) for better results.
Adjust Settings Carefully: The default settings (e.g., MACD 12,26,9; ribbon 8,13,21,34) are balanced, but you can tweak them in the indicator settings to match your trading style.
Common Questions
What timeframe should I use?
It depends on your trading style. Day traders might use 5-minute or 1-hour charts; swing traders might use 4-hour or daily charts. Test different timeframes to find what suits you.
Are divergence signals reliable?
Divergence signals (green/red circles) are early warnings and less reliable than triangle signals. Use them to prepare for a trade but wait for triangles for confirmation.
Can I use this on any asset?
Yes! It works on stocks, forex, crypto, or commodities. Adjust settings like pivotLookback or smoothWavy for volatile assets like crypto.
What if I see conflicting signals?
If a green circle appears but no green triangle, the trend isn’t confirmed yet. Wait for alignment of all indicators (triangle signal) for stronger trades.
How to Customize (Optional)
If you want to tweak the indicator:
Open the indicator settings (double-click its name on the chart).
Adjust Pivot Lookback for Divergence (default 5) to make divergence signals more frequent (smaller number) or less frequent (larger number).
Change Signal Line Smoothing Period (default 9) for a smoother or wavier signal line.
Modify EMA Ribbon Periods (default 8,13,21,34) for a tighter or wider ribbon.
CrumpBot
Main functions of the indicator:
Filters candles based on volume:
Can compare the launch volume to the basic volume of the next date (e.g. 20 or 50 candles), excluding extremely high values so that the average is not distorted.
Can also have, if the volume exceeds the set, utility value.
Analyzes shaped candles:
Checks if the lower node of the candle is long enough in relation to its body (e.g. at least 50%), which can occur with strong demand and rejection of generated prices.
RSI indicator indicator:
Optionally filters only when RSI is below the basic level (e.g. 50), which is an external oversold market.
Additional conditions:
Can generate a signal only if the candle is covered by a percentage of candles.
Optionally requires that the price has fallen by a percentage (e.g. at least 3%) in the last 15 minutes, which could be a potential low and a chance to reject the trend.
Signal:
Draws on the chart as a green triangle below the candle when all the required candle requirements are connected.
Additional draws a blue circle above the candle if the candle meets the candle cover condition.
ORB Breakout Indicator - NQ1!The purpose of this indicator is to assist traders in rapidly identifying high-probability Opening Range Breakout (ORB) setups on the NQ1! 1-minute time frame (Nasdaq Futures)
Key Features:
Opening Range: Automatically plots the high and low of the 1st 15min of the (NYSE session) (09:30–09:45 EST)
Breakout Signals : Illustrates the first candle that breaks upward or downward and:
Green arrow for a bullish breakout
Red arrow for a bearish breakout
Clean Visuals: Dynamic lines show the high and low of the ORB window for easy reference.
(DON'T USE THIS ONLY FOR ENTRY SIGNALS, PAIR THIS WITH OTHER INFLUENCES TO GET HIGH PROBABILITY BREAKOUTS)
TAIndicatorsThis library offers a comprehensive suite of enhanced technical indicator functions, building upon TradingView's built-in indicators. The primary advantage of this library is its expanded flexibility, allowing you to select from a wider range of moving average types for calculations and smoothing across various indicators.
The core difference between these functions and TradingView's standard ones is the ability to specify different moving average types beyond the default. While a standard ta.rsi() is fixed, the rsi() in this library, for example, can be smoothed by an 'SMMA (RMA)', 'WMA', 'VWMA', or others, giving you greater control over your analysis.
█ FEATURES
This library provides enhanced versions of the following popular indicators:
Moving Average (ma): A versatile MA function that includes optional secondary smoothing and Bollinger Bands.
RSI (rsi): Calculate RSI with an optional smoothed signal line using various MA types, plus built-in divergence detection.
MACD (macd): A MACD function where you can define the MA type for both the main calculation and the signal line.
ATR (atr): An ATR function that allows for different smoothing types.
VWAP (vwap): A comprehensive anchored VWAP with multiple configurable bands.
ADX (adx): A standard ADX calculation.
Cumulative Volume Delta (cvd): Provides CVD data based on a lower timeframe.
Bollinger Bands (bb): Create Bollinger Bands with a customizable MA type for the basis line.
Keltner Channels (kc): Keltner Channels with selectable MA types and band styles.
On-Balance Volume (obv): An OBV indicator with an optional smoothed signal line using various MA types.
... and more to come! This library will be actively maintained, with new useful indicator functions added over time.
█ HOW TO USE
To use this library in your scripts, import it using its publishing link. You can then call the functions directly.
For example, to calculate a Weighted Moving Average (WMA) and then smooth it with a Simple Moving Average (SMA) :
import ActiveQuants/TAIndicators/1 as tai
// Calculate a 20-period WMA of the close
// Then, smooth the result with a 10-period SMA
= tai.ma("WMA", close, 20, "SMA", 10)
plot(myWma, color = color.blue)
plot(smoothedWma, color = color.orange)
█ Why Choose This Library?
If you're looking for more control and customization than what's offered by the standard built-in functions, this library is for you. By allowing for a variety of smoothing methods across multiple indicators, it enables a more nuanced and personalized approach to technical analysis. Fine-tune your indicators to better fit your trading style and strategies.