Net XRP Margin PositionTotal XRP Longs minus XRP Shorts in order to give you the total outstanding XRP margin debt.
ie: If 500,000 XRP has been longed, and 400,000 XRP has been shorted, then 500,000 has been bought, and 400,000 sold, leaving us with 100,000 XRP (net) remaining to be sold to give us an overall neutral margin position.
That isn't to say that the net margin position must move towards zero, but it is a sensible reference point, and historical net values may provide useful insights into the current circumstances.
Buscar en scripts para "美股标普500"
Net DASH Margin PositionTotal DASH Longs minus DASH Shorts in order to give you the total outstanding DASH margin debt.
ie: If 500,000 DASH has been longed, and 400,000 DASH has been shorted, then 500,000 has been bought, and 400,000 sold, leaving us with 100,000 DASH (net) remaining to be sold to give us an overall neutral margin position.
That isn't to say that the net margin position must move towards zero, but it is a sensible reference point, and historical net values may provide useful insights into the current circumstances.
(Anyone know what category this script should be in?)
Net NEO Margin PositionTotal NEO Longs minus NEO Shorts in order to give you the total outstanding NEO margin debt.
ie: If 500,000 NEO has been longed, and 400,000 NEO has been shorted, then 500,000 has been bought, and 400,000 sold, leaving us with 100,000 NEO (net) remaining to be sold to give us an overall neutral margin position.
That isn't to say that the net margin position must move towards zero, but it is a sensible reference point, and historical net values may provide useful insights into the current circumstances.
(Anyone know what category this script should be in?)
Everyday 0002 _ MAC 1st Trading Hour WalkoverThis is the second strategy for my Everyday project.
Like I wrote the last time - my goal is to create a new strategy everyday
for the rest of 2016 and post it here on TradingView.
I'm a complete beginner so this is my way of learning about coding strategies.
I'll give myself between 15 minutes and 2 hours to complete each creation.
This is basically a repetition of the first strategy I wrote - a Moving Average Crossover,
but I added a tiny thing.
I read that "Statistics have proven that the daily high or low is established within the first hour of trading on more than 70% of the time."
(source: )
My first Moving Average Crossover strategy, tested on VOLVB daily, got stoped out by the volatility
and because of this missed one nice bull run and a very nice bear run.
So I added this single line: if time("60", "1000-1600") regarding when to take exits:
if time("60", "1000-1600")
strategy.exit("Close Long", "Long", profit=2000, loss=500)
strategy.exit("Close Short", "Short", profit=2000, loss=500)
Sweden is UTC+2 so I guess UTC 1000 equals 12.00 in Stockholm. Not sure if this is correct, actually.
Anyway, I hope this means the strategy will only take exits based on price action which occur in the afternoon, when there is a higher probability of a lower volatility.
When I ran the new modified strategy on the same VOLVB daily it didn't get stoped out so easily.
On the other hand I'll have to test this on various stocks .
Reading and learning about how to properly test strategies is on my todo list - all tips on youtube videos or blogs
to read on this topic is very welcome!
Like I said the last time, I'm posting these strategies hoping to learn from the community - so any feedback, advice, or corrections is very much welcome and appreciated!
/pbergden
HH/HL/LH/LL - Bigger Letter MArkingAlam's Money
//@version=6
indicator("HH/HL/LH/LL - Clean Letters Only", overlay = true, max_labels_count = 500)
// Pivot confirmation bars (fixed)
L = 2
R = 2
// Confirmed pivots (appear R bars after turn)
sh = ta.pivothigh(high, L, R)
sl = ta.pivotlow(low, L, R)
// Keep last confirmed swing values
var float lastHigh = na
var float lastLow = na
// Swing highs → HH / LH
if not na(sh)
if na(lastHigh)
lastHigh := sh
else
string txtH = sh > lastHigh ? "HH" : "LH"
label.new(bar_index - R, sh, txtH, xloc.bar_index, yloc.price, color.new(color.white, 100), label.style_label_down, color.red, size.large)
lastHigh := sh
// Swing lows → HL / LL
if not na(sl)
if na(lastLow)
lastLow := sl
else
string txtL = sl > lastLow ? "HL" : "LL"
label.new(bar_index - R, sl, txtL, xloc.bar_index, yloc.price, color.new(color.white, 100), label.style_label_up, color.green, size.large)
lastLow := sl
Static Beta for Pair and Quant Trading A beta coefficient shows the volatility of an individual stock compared to the systematic risk of the entire market. Beta represents the slope of the line through a regression of data points. In finance, each point represents an individual stock's returns against the market.
Beta effectively describes the activity of a security's returns as it responds to swings in the market. It is used in the capital asset pricing model (CAPM), which describes the relationship between systematic risk and expected return for assets. CAPM is used to price risky securities and to estimate the expected returns of assets, considering the risk of those assets and the cost of capital.
Calculating Beta
A security's beta is calculated by dividing the product of the covariance of the security's returns and the market's returns by the variance of the market's returns over a specified period. The calculation helps investors understand whether a stock moves in the same direction as the rest of the market. It also provides insights into how volatile—or how risky—a stock is relative to the rest of the market.
For beta to provide useful insight, the market used as a benchmark should be related to the stock. For example, a bond ETF's beta with the S&P 500 as the benchmark would not be helpful to an investor because bonds and stocks are too dissimilar.
Beta Values
Beta equal to 1: A stock with a beta of 1.0 means its price activity correlates with the market. Adding a stock to a portfolio with a beta of 1.0 doesn’t add any risk to the portfolio, but it doesn’t increase the likelihood that the portfolio will provide an excess return.
Beta less than 1: A beta value less than 1.0 means the security is less volatile than the market. Including this stock in a portfolio makes it less risky than the same portfolio without the stock. Utility stocks often have low betas because they move more slowly than market averages.
Beta greater than 1: A beta greater than 1.0 indicates that the security's price is theoretically more volatile than the market. If a stock's beta is 1.2, it is assumed to be 20% more volatile than the market. Technology stocks tend to have higher betas than the market benchmark. Adding the stock to a portfolio will increase the portfolio’s risk, but may also increase its return.
Negative beta: A beta of -1.0 means that the stock is inversely correlated to the market benchmark on a 1:1 basis. Put options and inverse ETFs are designed to have negative betas. There are also a few industry groups, like gold miners, where a negative beta is common.
LET'S START
Now I'll give my own definition.
Beta:
If we assume market caps are equal ,
it is an indicator that shows how much of the second instrument we should buy if we buy one of the first, taking into account the price volatility of two instruments.
But if the market caps are not equal:
For example, the ETF for A is $300.
The ETF for B is $600.
If static beta predicted by this script is 0.5:
300 * 1 * a = 600 * 0.5 * b
Then we should use 1 b for 1 a.
(Long a and short b or vice versa )
So, we can try pair trading for a/b or a-b.
However, these values are generally close to each other, such as 0.8 and 0.93. However, the closer we can adjust our lot purchases to bring the double beta to a value closer to 1, the higher the hedge ratio will be.
Large commercials use dynamic betas, which are updated periodically, in addition to static betas
However, scaling this is very difficult for individual investors with limited investment tools.
But a static beta of 5,000 bars is still much better than not considering any beta at all.
Note: The presence of a beta value for two instruments does not necessarily mean they can be included in pair trading.
It is also important (%99) to consider historically very high correlations and cointegration relationships, as well as the compatibility of security structures.
Note 2 : This script is designed for low timeframes.
Do not use betas from different timeframes.
Beta dynamics are different for each timeframe.
Note 3 : I created this script with the help of ChatGPT.
Source for beta definition ( ) :
www.investopedia.com
Regards.
Relative Performance Areas [LuxAlgo]The Relative Performance Areas tool enables traders to analyze the relative performance of any asset against a user-selected benchmark directly on the chart, session by session.
The tool features three display modes for rescaled benchmark prices, as well as a statistics panel providing relevant information about overperforming and underperforming streaks.
🔶 USAGE
Usage is straightforward. Each session is highlighted with an area displaying the asset price range. By default, a green background is displayed when the asset outperforms the benchmark for the session. A red background is displayed if the asset underperforms the benchmark.
The benchmark is displayed as a green or red line. An extended price area is displayed when the benchmark exceeds the asset price and is set to SPX by default, but traders can choose any ticker from the settings panel.
Using benchmarks to compare performance is a common practice in trading and investing. Using indexes such as the S&P 500 (SPX) or the NASDAQ 100 (NDX) to measure our portfolio's performance provides a clear indication of whether our returns are above or below the broad market.
As the previous chart shows, if we have a long position in the NASDAQ 100 and buy an ETF like QQQ, we can clearly see how this position performs against BTSUSD and GOLD in each session.
Over the last 15 sessions, the NASDAQ 100 outperformed the BTSUSD in eight sessions and the GOLD in six sessions. Conversely, it underperformed the BTCUSD in seven sessions and the GOLD in nine sessions.
🔹 Display Mode
The display mode options in the Settings panel determine how benchmark performance is calculated. There are three display modes for the benchmark:
Net Returns: Uses the raw net returns of the benchmark from the start of the session.
Rescaled Returns: Uses the benchmark net returns multiplied by the ratio of the benchmark net returns standard deviation to the asset net returns standard deviation.
Standardized Returns: Uses the z-score of the benchmark returns multiplied by the standard deviation of the asset returns.
Comparing net returns between an asset and a benchmark provides traders with a broad view of relative performance and is straightforward.
When traders want a better comparison, they can use rescaled returns. This option scales the benchmark performance using the asset's volatility, providing a fairer comparison.
Standardized returns are the most sophisticated approach. They calculate the z-score of the benchmark returns to determine how many standard deviations they are from the mean. Then, they scale that number using the asset volatility, which is measured by the asset returns standard deviation.
As the chart above shows, different display modes produce different results. All of these methods are useful for making comparisons and accounting for different factors.
🔹 Dashboard
The statistics dashboard is a great addition that allows traders to gain a deep understanding of the relationship between assets and benchmarks.
First, we have raw data on overperforming and underperforming sessions. This shows how many sessions the asset performance at the end of the session was above or below the benchmark.
Next, we have the streaks statistics. We define a streak as two or more consecutive sessions where the asset overperformed or underperformed the benchmark.
Here, we have the number of winning and losing streaks (winning means overperforming and losing means underperforming), the median duration of each streak in sessions, the mode (the number of sessions that occurs most frequently), and the percentages of streaks with durations equal to or greater than three, four, five, and six sessions.
As the image shows, these statistics are useful for traders to better understand the relative behavior of different assets.
🔶 SETTINGS
Benchmark: Benchmark for comparison
Display Mode: Choose how to display the benchmark; Net Returns: Uses the raw net returns of the benchmark. Rescaled Returns: Uses the benchmark net returns multiplied by the ratio of the benchmark and asset standard deviations. Standardized Returns: Uses the benchmark z-score multiplied by the asset standard deviation.
🔹 Dashboard
Dashboard: Enable or disable the dashboard.
Position: Select the location of the dashboard.
Size: Select the dashboard size.
🔹 Style
Overperforming: Enable or disable displaying overperforming sessions and choose a color.
Underperforming: Enable or disable displaying underperforming sessions and choose a color.
Benchmark: Enable or disable displaying the benchmark and choose colors.
Bitcoin vs M2 Global Liquidity (Lead 3M) - Table Ticker═══════════════════════════════════════════════════════════════
Bitcoin vs M2 Global Liquidity - Regression Indicator
═══════════════════════════════════════════════════════════════
TECHNICAL SPECS
• Pine Script v6
• Overlay: false (separate pane)
• Data sources: 5 M2 series + 4 FX pairs (request.security)
• Calculation: Rolling OLS linear regression with configurable lead
• Output: Regression line + ±1σ/±2σ confidence bands + R² ticker
CORE FUNCTIONALITY
Aggregates M2 money supply from 5 central banks (CN, US, EU, JP, GB),
converts to USD, applies time-lead, runs rolling linear regression
vs Bitcoin price, plots predicted value with confidence intervals.
CONFIGURABLE PARAMETERS
Input Controls:
• Lead Period: 0-365 days (default: 90)
• Lookback Window: 50-2000 bars (default: 750)
• Bands: Toggle ±1σ and ±2σ visibility
• Colors: BTC, M2, regression line, confidence zones
• Ticker: Position, size, colors, transparency
Advanced Settings:
• Table display: R², lead, M2 total, country breakdown (%)
• Ticker customization: 9 position options, 6 text sizes
• Border: Width 0-10px, color, outline-only mode
DATA AGGREGATION
Sources (via request.security):
• ECONOMICS:CNM2, USM2, EUM2, JPM2, GBM2
• FX_IDC:CNYUSD, JPYUSD (others: FX:EURUSD, GBPUSD)
• Conversion: All M2 → USD → Sum / 1e12 (trillions)
REGRESSION ENGINE
• Arrays: m2Array, btcArray (dynamic sizing, auto-trim)
• Window: Rolling (lookbackPeriod bars)
• Lead: Time-shift via array indexing (i + leadPeriodDays)
• Calc: Manual OLS (covariance/variance), no built-in ta functions
• Outputs: slope, intercept, r2, stdResiduals
CONFIDENCE BANDS
±1σ and ±2σ calculated from standard deviation of residuals.
Fill zones between upper/lower bounds with configurable transparency.
ALERTS
5 pre-configured alertcondition():
• Divergence > 15%
• Price crosses ±1σ bands (up/down)
• Price crosses ±2σ bands (up/down)
TICKER TABLE
Dynamic table.new() with 9 rows:
• R² value (4 decimals)
• Lead period (days + months)
• M2 Global total (trillions USD)
• Country breakdown: CN, US, EU, JP, GB (absolute + %)
• Optional: Hide/show M2 details
VISUAL CUSTOMIZATION
All plot() elements support:
• Color picker inputs (group="Couleurs")
• Line width: 1-3px
• Transparency: 0-100% for zones
• Offset: M2 plot has +leadPeriodDays offset option
PERFORMANCE
• Max arrays size: lookbackPeriod + leadPeriodDays + 200
• Calculations: Only when array.size >= lookbackPeriod + leadPeriodDays
• Table update: barstate.islast (once per bar)
• Request.security: gaps_off mode
CODE STRUCTURE
1. Inputs (lines 7-54)
2. Data fetch (lines 56-76)
3. M2 aggregation (line 78)
4. Array management (lines 84-95)
5. Regression calc (lines 97-172)
6. Prediction + bands (lines 174-183)
7. Plots (lines 185-199)
8. Ticker table (lines 201-236)
9. Alerts (lines 238-246)
DEPENDENCIES
None. Pure Pine Script v6. No external libraries.
LIMITATIONS
• Daily timeframe recommended (1D)
• Requires 750+ bars history for optimal calculation
• M2 data availability: TradingView ECONOMICS feed
• Max lines: 500 (declared in indicator())
CUSTOMIZATION EXAMPLES
• Shorter lookback (200d): More reactive, lower R²
• Longer lookback (1500d): More stable, regime mixing
• No bands: Set showBands=false for clean view
• Different lead: Test 60d, 120d for sensitivity analysis
TECHNICAL NOTES
• Manual OLS implementation (no ta.linreg)
• Array-based lead application (not plot offset)
• M2 values stored in trillions (/ 1e12) for readability
• Residuals array cleared/rebuilt each calculation
OPEN SOURCE
Code fully visible. Modify, fork, analyze freely.
No hidden calculations. No proprietary data.
VERSION
1.0 | November 2025 | Pine Script v6
═══════════════════════════════════════════════════════════════
OSOM TrendHow to Use the OSOM Breakers Indicator
The OSOM Breakers indicator is a customizable overlay tool for TradingView (Pine Script v5) that identifies market structure patterns, breakouts, breakers (order blocks), and price targets based on pivots, higher highs/lows (HH/LL), and breaks of structure (BoS/MSB). It helps visualize bullish/bearish trends, potential reversals, and target levels, with a focus on institutional "order blocks" (OB) for support/resistance. The indicator supports alerts indirectly through plotted events and is optimized for volatile markets like forex, crypto, or indices.
1. Adding the Indicator to Your Chart
Open TradingView (tradingview.com) and load a chart for your desired asset.
Click the "Indicators" button at the top.
Search for "OSOM Breakers" (if community-shared) or add via Pine Editor:
Open the Pine Editor tab at the bottom.
Paste the provided code (from //@version=5 to the end).
Click "Save" and name it (e.g., "OSOM Breakers").
Click "Add to Chart".
The indicator overlays on your chart with defaults like dashed zigzag lines, HH/LL labels, and green/red colors for bull/bear elements.
2. Configuring Inputs
Click the gear icon next to the indicator name in the legend to access settings.
Inputs are grouped:
Nephew_Sam Market Structure Settings: Pivot strength (default 5; higher for smoother, lower for sensitivity). Toggles for zigzag lines, BoS lines, HH/LL labels, and pattern matches.
Nephew_Sam Bull/Bear Patterns: Pre-defined sequences (e.g., "LL,LH,LL,HH,HL" for bull patterns) with text labels (e.g., "BOS HL 1") and toggles. Customize up to 7 per direction for specific setups like BOS (break of structure) or MSS (market structure shift).
Nephew_Sam Styles: Colors for HH/LL (green up, red down), labels, zigzag style (dashed/dotted), and width (1-4).
Market Structure Break Targets Settings: Max duration (250 bars), calculation method (Percent or ATR), ATR multiplier (2.0). Enable/disable bull/bear MSB/BoS, set colors (green/red), and % targets (100% default).
Breakers Settings: Max breaks (1; increase for stricter breaker confirmation), max duration (1000 bars). Colors for bullish MS (green), bull breaker (red), bearish MS (red), bear breaker (green).
Defaults suit 15m-1h charts; reduce pivot strength for scalping (1m-5m) or increase for daily+. Test patterns on historical data to match your strategy.
3. Interpreting the Visuals and Signals
Zigzag and HH/LL Labels:
Dashed/dotted lines connect pivots; green for upswings, red for downswings (if enabled).
Labels like "HH" (higher high), "LH" (lower high), "LL" (lower low), "HL" (higher low) appear at pivots. Green for bullish, red for bearish.
Pattern Matches:
Labels (e.g., "BOS HL 1") at pivots when sequences match user-defined bull/bear conditions. Up arrows for bull, down for bear.
Use for spotting reversals or continuations (e.g., bull pattern after downtrend signals potential long).
Market Structure Breaks (MSB/BoS):
Solid lines: Green for bullish MSB/BoS (break above prior high), red for bearish (break below prior low).
Labels: "MSB" or "MSS" (shift) at breaks, "BoS" for breaks of structure.
Boxes: Translucent green/red "OB" (order block) boxes highlight ranges before breaks – potential support (post-bull break) or resistance (post-bear).
Targets:
Dotted horizontal/vertical lines extend from breaks to projected targets (percent of range or ATR-based).
Active until hit or expired (after max duration). Green for bull targets (above), red for bear (below).
Breakers:
Dotted lines: Recent MSB/BoS levels that act as breakers (e.g., red dotted for bull breaker).
Plotted shapes: "▲" (green below bar) for bull MSB breakout, "▼" (red above) for bear.
Candle borders: Green for support events (price tests breaker from above), red for resistance (from below).
Overall Direction: Tracks bullish (1) or bearish (-1) based on recent breaks; use for trend bias.
4. Trading Strategies
Breakout Trading: Enter long on green "▲" (bull breakout) above MSB/BoS lines; short on red "▼" below. Target dotted lines (e.g., 100% of prior range).
Order Block (OB) Plays: Buy at green OB boxes (support after bull break), sell at red (resistance after bear). Confirm with support/resistance events.
Pattern-Based Reversals: Long on bull patterns (e.g., "BOS HL") after bearish structure; short on bear patterns. Filter with HH/LL (e.g., HH after LL signals uptrend).
Trend Continuation: In bullish direction, stack longs on BoS breaks; use breakers as trailing stops.
Risk Management: Stops below recent LL (longs) or above HH (shorts). Position size based on ATR (from targets). Avoid choppy markets by disabling patterns.
Timeframes: Scalping (1m-15m with low pivot strength), swing (1h-4h), position (daily with higher strength). Combine with volume indicators for confirmation.
5. Alerts and Automation
No built-in alertcondition(); set manual alerts in TradingView:
Right-click chart > Add Alert > Condition (e.g., "OSOM Breakers - Bull MSB Breakout" crosses 1 for "▲").
Or alert on close crossing MSB/BoS lines (use indicator plots as conditions).
For strategies: Convert to a strategy script by adding strategy() entries/exits based on breaks/patterns.
6. Tips and Best Practices
Asset Suitability: Ideal for trending markets (e.g., BTC/USD, EUR/USD). Less effective in ranging; toggle off zigzag/boxes to reduce clutter.
Performance: Limits (500 lines/boxes/labels) prevent overload; delete oldest automatically. Backtest on replay mode.
Customization: Add custom patterns (e.g., for ICT/SMC concepts like fair value gaps). Match colors to your theme.
Limitations: Relies on pivots – false signals in low-volatility; no volume integration (pair with another indicator). Targets are projections, not guarantees.
Enhancements: Combine with OSOM Trend for volume confirmation. Practice on demo charts.
This indicator provides a structured view of price action, emphasizing breaks and targets for systematic trading. Always validate with multiple timeframes and risk controls.
OSOM TrendHow to Use the OSOM Trend Indicator
The OSOM Trend indicator is designed for use on TradingView charts. It provides trend identification, entry/exit signals, breakout detection, volume analysis, and market state insights. Below is a step-by-step guide to setting it up and using it effectively.
1. Adding the Indicator to Your Chart
Open TradingView (tradingview.com) and load a chart for your desired asset (e.g., stock, crypto, forex).
Click the "Indicators" button at the top of the chart.
Search for "OSOM Trend" (if it's a community script, you may need to paste the Pine Script code into the Pine Editor).
To add via Pine Editor:
Click the Pine Editor tab at the bottom.
Paste the provided code (from //@version=6 to the end).
Click "Save" and name it (e.g., "OSOM Trend").
Click "Add to Chart".
The indicator will overlay on your chart with default settings.
2. Configuring Inputs
Once added, click the gear icon next to the indicator name in the chart legend to open settings.
Inputs are grouped for ease:
OSOM WV Settings: Adjust trend length (default 14 for sensitivity), smoothing (7), band width (0.8 ATR multiplier), ATR length (10). Toggle fast mode for minimal lag, signals, forecast, take-profits, and re-entries.
Breakout Boxes Settings: Set pivot length (5), box widths (0.5 upper/lower via sliders), and colors.
MMB Settings: Volume lookback (200), EMA smoothing (10).
PVSRA Settings: Length (10), multipliers for climax/rising volumes (2.0/1.5). Optional symbol override (e.g., for aggregated BTC data).
Vector Candle Zones: Toggle on/off, max zones (500), zone type (body/wicks), transparency (90).
CVD Settings: Toggle long/short MAs (55/34 EMA), multipliers (1.5), lengths (40). Enable higher TF, volume integration, dynamic clouds, bar coloring, and status table.
Start with defaults for most assets; reduce lengths for lower timeframes (e.g., 1m-15m) to increase responsiveness, or increase for higher TFs (e.g., daily) for smoother trends.
Visual tweaks: Choose label size (small to reduce clutter), colors, and mode (Cloud for channels, Line Only for simplicity).
3. Interpreting the Visuals and Signals
Trend Line and Bands/Cloud:
Green (bullish) when price > upper band; red (bearish) when < lower band; gray (neutral).
Cloud mode shows a filled channel; use for range visualization. Single Band highlights the active support/resistance.
Buy/Sell Signals:
Up arrow (↑) labels for buys (price crosses over upper band); down arrow (↓) for sells (crosses under lower band).
If forecast enabled, labels show "count/avg" (e.g., "↑ 5/10") – current trend bars vs. smoothed historical average.
Take-profit: "✖" labels when overextended (Z-score > threshold, RSI EMA slope reversal).
Re-entries: "↻" labels on wick touches during trends (with cooldown to avoid spam).
Breakout Boxes:
Pink upper boxes (resistance) and green lower boxes (support) around pivots.
Boxes display total volume and buy/sell % breakdown.
Breakout signals: "BreakUp ⯁" or "BreakDn ⯁" labels/alerts when price crosses box edges – use for momentum trades.
MMB (Market Maker Build):
Green crosses below bars: Building long (accumulation).
Red crosses above: Building short.
Green X above: Closing long (distribution).
Red X below: Closing short.
Watch for clusters near support/resistance for institutional activity.
PVSRA Candle Coloring:
Overrides bar colors: Green/lime (bull climax), red (bear climax), blue (bull rising), violet/fuchsia (bear rising), gray (normal).
Vector zones (translucent boxes) highlight high-volume areas as potential S/R.
CVD (Cumulative Volume Delta):
Bar colors: Blue (uptrend), red (downtrend) based on CVD vs. MAs.
Status table (top-right): Checkmarks for Long/Short/Test/Sideways states.
Long: CVD above both MAs (bullish confirmation).
Short: Below both (bearish).
Test: Near clouds (potential reversal).
Sideways: Within parallels (range-bound).
4. Trading Strategies
Trend Following: Enter long on buy signals in green trends; short on sell in red. Exit on opposite signals or take-profits. Use forecast for expected duration.
Breakouts: Trade breakups from upper boxes (long) or breakdowns from lower (short). Confirm with volume % (e.g., high buy volume in upper box suggests strong breakout).
Volume Confirmation: Align with MMB builds/closes and PVSRA climaxes for high-conviction entries. Avoid trades in sideways CVD states.
Filters: Use RSI EMA slope in take-profits for overbought/oversold avoidance. Higher TF CVD for broader context.
Timeframes: Versatile – scalping (1m-5m with fast mode), swing (1h-4h), position (daily+). Test on historical data.
Risk Management: Set stops below lower band (longs) or above upper (shorts). Size positions based on ATR.
5. Alerts and Automation
Set alerts via TradingView: Right-click chart > Add Alert > Condition (e.g., "Buy Signal" or "BreakUp").
Supported alerts: Buy/Sell, Take-Profit, BreakUp/Dn, MMB crosses, Vector patterns, CVD Long/Short entries.
For scripting: Use alertcondition() calls in the code for custom notifications.
6. Tips and Best Practices
Asset Suitability: Best on volume-rich assets (e.g., BTC/USD, stocks). For low-volume, disable CVD/MMB or use overrides.
Performance: On busy charts, reduce max counts (labels/boxes) to avoid lag. Test fast mode for real-time trading.
Backtesting: Use TradingView's replay or strategy tester (convert to strategy script by adding strategy() functions).
Limitations: Not a standalone system – combine with fundamentals/news. Higher TF data may delay updates.
Customization: Experiment with inputs; e.g., tighten bands (lower multiplier) for volatile markets.
This indicator excels in providing multi-layered confirmation, reducing false signals through volume integration. Always practice on demo accounts before live trading.
Match Finder [theUltimator5]Match Finder is the dating app of indicators. It takes your current ticker and finds the most compatible match over a recent time period. The match may not be Mr. right, but it is Mr. right now. It doesn't forecast future connection, but it tells you current compatibility for today.
Jokes aside, it is a pattern–comparison tool that was designed to find the ticker that tracks most closely to the one you are currently looking at. It scans a user-defined list of 40 tickers (pre-set to a bunch of liquid ETFs) and finds which one most closely matches the recent price action of the current chart over a fixed lookback window.
LOGIC BEHIND THE SCENES
For each bar, the script:
Takes the last N bars (Correlation Window Length) of the current symbol.
Takes the last N bars of each selected comparison ticker.
Calculates the Pearson correlation between the current symbol and each comparison ticker.
Identifies the single best-matching ticker (highest positive correlation, excluding the current symbol itself).
Rescales and overlays that matched segment on the chart so you can visually compare shapes.
Optionally shows a correlation table with all tickers and their correlation values.
The use case of this indicator is to help you see which symbol has recently moved most similarly to your current chart, and how that shape looks when overlaid in the same panel. It helps you see which sectors it may be following most closely to.
Here is an image with arrows showing the elements of this indicator that will be mostly explained later.
USER INPUTS
1. Correlation Window Length
Default: 30
Range: 10–500
This is the number of bars used to compare the current symbol against each ticker.
Important - Larger values produce more “global” shape comparison but increase computational load and may cause the indicator to timeout if the length is too long
2. Drawing Mode
Options:
Scale Only - Adjusts min and max of the plotted line segment to match the chart over the range
Scale & Rotate - Scales as above, but matches the first and last point to the close of the chart over the range. This effectively rotates the pattern to force it to track the chart to an extent.
3. Show Correlation Table
When enabled (disabled by default), shows a table in the bottom-right of the chart that displays the correlation values over the lookback range for all 40 tickers. The best fit ticker is highlighted.
4. Best Fit Line Color
Color used to draw the overlaid best-match segment (yellow by default).
5. Ticker inputs (1–40)
Default set to a broad universe of major ETFs (e.g., SPY, QQQ, IWM, sector and bond ETFs, commodities, etc.).
You can replace these with any symbols supported by your data feed (stocks, ETFs, indexes, etc.).
The script always excludes the current chart’s symbol from being considered as its own best match.
NOTE: THIS INDICATOR IS EXTREMELY MEMORY INTENSIVE AND MAY TAKE SEVERAL SECONDS TO LOAD. PLEASE BE PATIENT AND GIVE THE INDICATOR UP TO 20 SECONDS FOR THE DATA TO DISPLAY
LiqD HeatMap 👑 [RubiXalgo]LiqD HeatMap - Advanced Liquidation Heatmap IndicatorOverviewThe LiqD HeatMap is a cutting-edge Pine Script™ indicator designed to visualize liquidation levels, market bias, and potential trade setups through an AI-driven color system. Inspired by Rubik's Cube mechanics and Ichimoku principles, it transforms complex market data (price, volume, momentum) into intuitive visuals like heatmaps, bubbles, lines, and gradients. This tool helps traders spot high-probability liquidation zones, support/resistance, and trend reversals without overwhelming charts.Powered by advanced smoothing (Kalman filters + LOWESS), pattern recognition (implied KNN clustering), and machine learning, it offers a "color language" for quick decisions: green/teal for bullish (buy), red/purple for bearish (sell), and yellow/orange for max volume (high-action zones). Darker shades indicate stronger signals.Key Benefits:Reduces trader bias with AI-based visuals.
Supports multi-timeframe (MTF) analysis for intraday to long-term trades.
Customizable for longs, shorts, or both.
No math required—follow the colors for 3:1+ risk-reward setups.
This indicator is for educational purposes only and does not guarantee profits. Trading involves risk; use at your own discretion.Main FeaturesLiquidation Heatmap (Bubbles & Lines): Displays liquidation levels as bubbles (circles) and horizontal lines. Bubbles show precise spots; lines mark broader zones. Size and color intensity reflect volume strength.
MTF Liquidation Levels: Overlay higher timeframes (e.g., Daily, Weekly) for thicker, brighter lines indicating stronger support/resistance.
Dynamic VWAP: Anchored VWAP with ATR multipliers for bias and liquidation estimates. Custom periods (e.g., Session, Month).
A.I. Volume Profit-Trend: Polyline prediction based on Ichimoku, volume delta, and targets (V, N, E, NT). Includes stop-loss, entry, and profit levels in a "Trade Window."
Stochastic Money Flow & Bollinger Band Width Percent: Labels above/below bars for momentum and volatility. Ranges from 3%–96% for extreme conditions.
Daily 0.618 Expansion (Fibonacci Ranges): Visualizes daily/HTF ranges with fib projections. Options for bar graphs and pre-market display.
Color Themes: "Classic" (red/green) or "Crypto" (teal/purple) for personalized visuals.
Trade Signals: High-probability setups like "Dark Green Bubble Surge" (long) or "Thick Red Line Breakdown" (short).
How to UseThe indicator shines in spotting liquidations and trends. Use the color language:Green/Teal: Bullish—buy or hold.
Red/Purple: Bearish—sell or short.
Yellow/Orange: Max volume—watch for reversals or breakouts.
Top Long Setups (3:1+ RR):Dark Green Bubble Surge: Enter long on dark green bubble below price + green bar. SL below bar low; TP 3x SL to red line. Exit on red bubble.
Thick Green Line Breakout: Enter long above thick green line + green bar. SL below line; TP 3x SL to red line. Exit on red rejection.
Yellow Line Bounce: Enter long off yellow line bounce + green bar. SL below low; TP 3x SL to higher red. Exit on red shift.
Top Short Setups (3:1+ RR):Dark Red Bubble Surge: Enter short on dark red bubble above price + red bar. SL above bar high; TP 3x SL to green line. Exit on green bubble.
Thick Red Line Breakdown: Enter short below thick red line + red bar. SL above line; TP 3x SL to green line. Exit on green support.
Yellow Line Rejection: Enter short off yellow line rejection + red bar. SL above high; TP 3x SL to lower green. Exit on green shift.
Pro Tips:In ranging markets: Trade bounces off levels.
In trends: Follow breakouts—aggressive moves take out levels.
Combine with Volume Profit-Trend: Polyline up + green = hit targets; down + red = breakdowns.
Stochastic Labels: >69% (red) = overbought; <31% (green) = oversold. Yellow (31–69%) = caution.
Bollinger Width: High % = volatility spike; low % = squeeze incoming.
For best results, use on crypto or forex charts. Test on demo accounts first.SettingsChart Settings: Toggle LiqD Levels/Bubbles, VWAP, Volume Profit-Trend, LiqD Window, Stochastic Flow, Bollinger Width.
HeatMap Liquidation Levels: Dynamic Lookback (8–21 bars for money flow), Market Bias (Both/Long/Short), Leverage (25–500 for signal frequency), Color Gradient (0–33 for intensity).
Dynamic VWAP: Anchor Period (e.g., Month), ATR Multiplier (0.9–3.14 for divergence).
MTF Liquidation Levels: Timeframe (e.g., D), Options (Current + HTF for overlays).
Daily 0.618 Expansion V4: Enable for fib ranges; Hide Historical, Show as Bar Graph, Resolution/Display (e.g., D), Mode (Daily Open/OHLC4/VWAP), Pre-Market Display.
Color Themes: Classic (red/green) or Crypto (teal/purple).
DisclaimersFinancial Disclaimer: This is for educational/informational purposes only. Not financial, investment, or trading advice. Use at your own risk; no liability for losses.
Copyright & Fair Use: Open-source under Mozilla Public License 2.0 and CC BY-NC-SA 4.0. Reuse for non-commercial, educational purposes with credit. Fair use applies per U.S. law (e.g., 17 U.S.C. § 107).
AI & Educational Reuse: AI modifications for learning are allowed under fair use precedents (e.g., Sony v. Universal, 1984).
TradingView Rules: Complies with platform guidelines; federal laws supersede any conflicts.
Risk Warning: Trading involves financial risk. Past performance ≠ future results. Rubik's Algo assumes no liability.
© 2025 Rubik's Algo. All rights reserved. Built with contributions from open-source Pine Script community and AI assistance (e.g., Grok). Special thanks to @StupidBitcoin
and referenced creators.
Session Volume Profile - Open Source (DeadCat) Decided to make this Open Source so everyone can make edits.
Volume Profile is a charting study that displays trading activity over specific time periods at various price levels. It appears as a horizontal histogram on the chart, revealing where traders have shown the most interest based on volume concentration.
This Volume Profile automatically anchors to user-selected timeframes, creating fresh volume analysis for each new period while maintaining clean, systematic visualization of price-volume relationships.
Core Components:
Point of Control (POC): The price level with the highest volume activity during the selected period, marked with a yellow line and left-side label.
Value Area High/Low (VAH/VAL): Price boundaries that contain a specified percentage of the total volume (default 40%), helping identify the main trading range where most activity occurred.
Volume Histogram: Left-aligned bars showing volume distribution across price levels, with value area highlighting for enhanced visual clarity.
Key Features:
- Automatic Period Detection: Supports hourly, daily, weekly, and monthly timeframe anchoring
- Customizable Granularity: Adjustable rows (10-500) for different price resolution needs
- Labels: Clear POC, VAH, and VAL identification positioned at profile start
- Toggle Controls**: Optional display for volume rows, key levels, and background fills
- Clean Visualization: Profiles reset automatically at each new period for current market focus
Display Options:
- Profile Rows: Show/hide the volume histogram bars
- Key Level Lines: Individual controls for POC, VAH, and VAL display
- Value Area Background: Optional shading between VAH and VAL levels
- Color Customization: Separate color controls for all visual elements
The indicator provides systematic volume analysis by creating fresh profiles at regular intervals, helping traders identify significant price levels and volume patterns within their preferred timeframe structure.
Disclaimer: This indicator is for educational and informational purposes only. Trading decisions should be based on comprehensive analysis and proper risk management. Past performance does not guarantee future results.
Global M2 Money Supply Growth (GDP-Weighted)📊 Global M2 Money Supply Growth (GDP-Weighted)
This indicator tracks the weighted aggregate M2 money supply growth across the world's four largest economies: United States, China, Eurozone, and Japan. These economies represent approximately 69.3 trillion USD in combined GDP and account for the majority of global liquidity, making this a comprehensive macro indicator for analyzing worldwide monetary conditions.
════════════════════════════════════════════
🔧 KEY FEATURES:
📈 GDP-Weighted Aggregation
Each economy is weighted proportionally by its nominal GDP using 2025 IMF World Economic Outlook data:
• United States: 44.2% (30.62 trillion USD)
• China: 28.0% (19.40 trillion USD)
• Eurozone: 21.6% (15.0 trillion USD)
• Japan: 6.2% (4.28 trillion USD)
The weights are fully adjustable through the indicator settings, allowing you to update them annually as new IMF forecasts are released (typically April and October).
⏱️ Multiple Time Period Options
Choose between three calculation methods to analyze different timeframes:
• YoY (Year-over-Year): 12-month growth rate for identifying long-term liquidity trends and cycles
• MoM (Month-over-Month): 1-month growth rate for detecting short-term monetary policy shifts
• QoQ (Quarter-over-Quarter): 3-month growth rate for medium-term trend analysis
🔄 Advanced Offset Function
Shift the entire indicator forward by 0-365 days to test lead/lag relationships between global liquidity and asset prices. Research suggests a 56-70 day lag between M2 changes and Bitcoin price movements, but you can experiment with different offsets for various assets (equities, gold, commodities, etc.).
🌍 Individual Country Breakdown
Real-time display of each economy's M2 growth rate with:
• Current percentage change (YoY/MoM/QoQ)
• GDP weight contribution
• Color-coded values (green = monetary expansion, red = contraction)
📊 Smart Overlay Capability
Displays directly on your main price chart with an independent left-side scale, allowing you to visually correlate global liquidity trends with any asset's price action without cluttering the chart.
🔧 Customizable GDP Weights
All GDP values can be adjusted through the indicator settings without editing code, making annual updates simple and accessible for all users.
════════════════════════════════════════════
📡 DATA SOURCES:
All M2 money supply data is sourced from ECONOMICS (Trading Economics) for consistency and reliability:
• ECONOMICS:USM2 (United States)
• ECONOMICS:CNM2 (China)
• ECONOMICS:EUM2 (Eurozone)
• ECONOMICS:JPM2 (Japan)
All values are normalized to USD using current daily exchange rates (USDCNY, EURUSD, USDJPY) before GDP-weighted aggregation, ensuring accurate cross-country comparisons.
══════════════════════════════════════════════
💡 USE CASES & APPLICATIONS:
🔹 Liquidity Cycle Analysis
Track global monetary expansion/contraction cycles to identify when central banks are coordinating loose or tight monetary policies.
🔹 Market Timing & Risk Assessment
High M2 growth (>10%) historically correlates with risk-on environments and rising asset prices across crypto, equities, and commodities. Negative M2 growth signals monetary tightening and potential market corrections.
🔹 Bitcoin & Crypto Correlation
Compare with Bitcoin price using the offset feature to identify the optimal lag period. Many traders use 60-70 day offsets to predict crypto market movements based on liquidity changes.
🔹 Macro Portfolio Allocation
Use as a regime filter to adjust portfolio exposure: increase risk assets during liquidity expansion, reduce during contraction.
🔹 Central Bank Policy Divergence
Monitor individual country metrics to identify when major central banks are pursuing divergent policies (e.g., Fed tightening while China eases).
🔹 Inflation & Economic Forecasting
Rapid M2 growth often leads inflation by 12-18 months, making this a leading indicator for future inflation trends.
🔹 Recession Early Warning
Negative M2 growth is extremely rare and has preceded major recessions, making this a valuable risk management tool.
════════════════════════════════════════════
📊 INTERPRETATION GUIDE:
🟢 +10% or Higher
Aggressive monetary expansion, typically during crises (2001, 2008, 2020). The COVID-19 period saw M2 growth reach 20-27%, which preceded significant inflation and asset price surges. Strong bullish signal for risk assets.
🟢 +6% to +10%
Above-average liquidity growth. Central banks are providing stimulus beyond normal levels. Generally favorable for equities, crypto, and commodities.
🟡 +3% to +6%
Normal/healthy growth rate, roughly in line with GDP growth plus 2% inflation targets. Neutral environment with moderate support for risk assets.
🟠 0% to +3%
Slowing liquidity, potential tightening phase beginning. Central banks may be raising rates or reducing balance sheets. Caution warranted for high-beta assets.
🔴 Negative Growth
Monetary contraction - extremely rare. Only occurred during aggressive Fed tightening in 2022-2023. Strong warning signal for risk assets, often precedes recessions or major market corrections.
════════════════════════════════════════════
🎯 OPTIMAL USAGE:
📅 Recommended Timeframes:
• Daily or Weekly charts for macro analysis
• Monthly charts for very long-term trends
💹 Compatible Asset Classes:
• Cryptocurrencies (especially Bitcoin, Ethereum)
• Equity indices (S&P 500, NASDAQ, global markets)
• Commodities (Gold, Silver, Oil)
• Forex majors (DXY correlation analysis)
⚙️ Suggested Settings:
• Default: YoY calculation with 0 offset for current liquidity conditions
• Bitcoin traders: YoY with 60-70 day offset for predictive analysis
• Short-term traders: MoM with 0 offset for recent policy changes
• Quarterly rebalancers: QoQ with 0 offset for medium-term trends
════════════════════════════════════════════
📋 VISUAL DISPLAY:
The indicator plots a blue line showing the selected growth metric (YoY/MoM/QoQ), with a dashed reference line at 0% to clearly identify expansion vs. contraction regimes.
A comprehensive table in the top-right corner displays:
• Current global M2 growth rate (large, prominent display)
• Individual country breakdowns with their GDP weights
• Color-coded growth rates (green for positive, red for negative)
════════════════════════════════════════════
🔄 MAINTENANCE & UPDATES:
GDP weights should be updated annually (ideally in April or October) when the IMF releases new World Economic Outlook forecasts. Simply adjust the four GDP input parameters in the indicator settings - no code editing required.
The relative GDP proportions between the Big 4 economies change very gradually (typically <1-2% per year), so even if you update weights once every 1-2 years, the impact on the indicator's accuracy is minimal.
════════════════════════════════════════════
💭 TRADING PHILOSOPHY:
This indicator embodies the principle that "liquidity drives markets." By tracking the combined M2 money supply of the world's largest economies, weighted by their economic size, you gain insight into the fundamental liquidity conditions that underpin all asset prices.
Unlike single-country M2 indicators, this GDP-weighted approach captures the true global picture, accounting for the fact that US monetary policy has 2x the impact of Japanese policy due to economic size differences.
Perfect for macro-focused traders, long-term investors, and anyone seeking to understand the "tide that lifts all boats" in financial markets.
════════════════════════════════════════════
Created for traders and investors who incorporate global liquidity trends into their decision-making process. Best used alongside other technical and fundamental analysis tools for comprehensive market assessment.
⚠️ Disclaimer: M2 money supply is a lagging macroeconomic indicator. Past correlations do not guarantee future results. Always use proper risk management and combine with other analysis methods.
EMA Cross Strategy v5 (30 lots) (15 min candle only)- safe flip🚀 EMA Cross Strategy v5 (30 Lots) (15 min candle only)— Safe Flip Edition
Fully Automated | Fast | Reliable | Battle-tested
Welcome to a clean, powerful, and automation-friendly EMA crossover system.
This strategy is built for traders who want consistent trend-based entries without the risk of unwanted pyramiding or doubled positions.
🔥 How It Works
This strategy uses a fast EMA (10) crossing a slow EMA (20) to detect trend shifts:
Bullish Crossover → LONG (30 lots)
Bearish Crossover → SHORT (30 lots)
Every opposite signal safely flips the position by first closing the current trade, then opening a fresh position of exactly 30 lots.
No doubling.
No runaway position size.
No surprises.
Just clean, mechanical trend-following.
📈 Why This Strategy Stands Out
Unlike basic EMA crossbots, this version:
✔ Prevents unintended pyramiding
✔ Never over-allocates capital
✔ Works perfectly with webhook-based automation
✔ Produces stable, systematic entries
✔ Executes directional flips with precision
🔍 Backtest Highlights (1-Year)
(Backtests will vary by instrument/timeframe)
1,500+ trades executed
Profit factor above 1.27
Strong trend performance
Balanced long/short behavior
No margin calls
Consistent trade execution
This strategy thrives in trending markets and maintains strict discipline even in choppy conditions.
⚙️ Automation Ready
Designed for automated execution via webhook and API setups on supported platforms.
Just connect, run, and let the bot follow the rules without hesitation.
No emotions.
No overtrading.
No fear or greed.
Pure logic.
BS by bigmmBS by bigmm is a powerful tool designed to track and display cumulative trading volumes for bullish (green) and bearish (red) bars over a user-defined period. This indicator provides valuable insights into market sentiment by quantifying buying and selling pressure through volume analysis.
Adjustable lookback period from 20 to 10,000 bars
Default setting of 500 bars for balanced analysis
Real-time calculation updates on each new bar
BUY Volume: Total volume of green bars (close > open)
SELL Volume: Total volume of red bars (close < open)
Interpretation:
Higher BUY Volume: Indicates stronger buying pressure
Higher SELL Volume: Suggests stronger selling pressure
Balanced Volumes: Shows equilibrium between buyers and sellers
Ideal For:
Swing traders analyzing medium-term trends
Position traders evaluating long-term market sentiment
Volume-based trading strategies
Market structure analysis
[PickMyTrade] Trendline Strategy# PickMyTrade Advanced Trend Following Strategy for Long Positions | Automated Trading Indicator
**Optimize Your Trading with PickMyTrade's Professional Trend Strategy - Auto-Execute Trades with Precision**
---
## Table of Contents
1. (#overview)
2. (#why-this-strategy-makes-money)
3. (#key-features)
4. (#how-it-works)
5. (#strategy-settings--configuration)
6. (#pickmytrade-integration)
7. (#advanced-features)
8. (#risk-management)
9. (#best-practices)
10. (#performance-optimization)
11. (#getting-started)
12. (#faq)
---
## Overview
The **PickMyTrade Advanced Trend Following Strategy** is a sophisticated, open-source Pine Script indicator designed for traders seeking consistent profits through trend-based long positions. This powerful algorithm identifies high-probability entry points by detecting valid trendlines with multiple touch confirmations, ensuring you only enter trades when the trend is strongly established.
### What Makes This Strategy Unique?
- **Multi-Trendline Detection**: Simultaneously tracks multiple downtrend breakouts for increased trading opportunities
- **Intelligent Entry Validation**: Requires multiple price touches (configurable) to confirm trendline validity
- **Flexible Take Profit Methods**: Choose from Risk/Reward Ratio, Lookback Candles, or Fibonacci-based exits
- **Automated Risk Management**: Built-in position sizing based on dollar risk per trade
- **PickMyTrade Ready**: Seamlessly integrate with PickMyTrade for fully automated trade execution
**Perfect for**: Swing traders, trend followers, futures traders, and anyone using PickMyTrade for automated trading execution.
---
## Why This Strategy Makes Money
### 1. **Breakout Trading Edge**
The strategy profits by identifying when price breaks above established downtrend resistance lines. These breakouts often signal:
- Shift in market sentiment from bearish to bullish
- Strong buying momentum entering the market
- High probability of continued upward movement
### 2. **Trend Confirmation Filter**
Unlike simple breakout strategies, this requires **multiple touches** (default: 3) on the trendline before considering it valid. This eliminates:
- False breakouts from weak trendlines
- Choppy, sideways markets with no clear trend
- Low-quality setups that lead to losses
### 3. **Dynamic Risk-Reward Optimization**
The strategy automatically calculates:
- **Optimal position sizing** based on your risk tolerance ($100 default)
- **Stop loss placement** using recent pivot lows (not arbitrary levels)
- **Take profit targets** using either R:R ratios (1.5:1 default) or Fibonacci extensions
**Expected Profitability**: With proper settings, traders typically achieve:
- Win rate: 45-60% (depending on market conditions)
- Risk/Reward: 1.5:1 to 2.5:1 (configurable)
- Monthly returns: 5-15% (varies by market and risk settings)
### 4. **Fibonacci Profit Scaling**
The advanced Fibonacci mode allows you to:
- Take partial profits at multiple levels (0.618, 1.0, 1.312, 1.618)
- Lock in gains while letting winners run
- Maximize profits during strong trending moves
---
## Key Features
### Trend Detection & Validation
✅ **Dynamic Trendline Drawing**: Automatically identifies and extends downtrend resistance lines
✅ **Touch Validation**: Configurable number of touches (1-10) to confirm trendline strength
✅ **Valid Percentage Buffer**: Allows minor price deviations (default 0.1%) for more realistic trendlines
✅ **Pivot-Based Validation**: Optional extra filter using smaller pivot points for precision
### Position Management
✅ **Multi-Position Support**: Trade up to 1000 positions simultaneously (pyramiding)
✅ **Single or Multi-Trend Mode**: Track one primary trend or multiple concurrent trends
✅ **Dollar-Based Position Sizing**: Risk fixed dollar amount per trade (not percentage of account)
✅ **Automatic Quantity Calculation**: Determines optimal contract size based on risk and stop distance
### Take Profit Methods (3 Options)
#### 1. **Risk/Reward Ratio** (Recommended for Beginners)
- Set desired R:R (default 1.5:1)
- Simple, consistent profit targets
- Works well in trending markets
#### 2. **Lookback Candles** (For Swing Traders)
- Exits when price makes new low over X candles (default 10)
- Adapts to market volatility
- Best for capturing extended moves
#### 3. **Fibonacci Extensions** (For Advanced Traders)
- Up to 4 profit targets: 61.8%, 100%, 131.2%, 161.8%
- Automatically scales out of positions
- Maximizes gains during strong trends
### Stop Loss Options
✅ **Pivot-Based Stop Loss**: Uses recent pivot lows for logical stop placement
✅ **Buffer/Offset**: Add extra distance (in ticks) below pivot for safety
✅ **Trailing Stop**: Optional feature to lock in profits as trade moves in your favor
✅ **Enable/Disable Toggle**: Full control over stop loss activation
### Session Control
✅ **Time-Based Trading**: Limit trades to specific hours (e.g., 9:00 AM - 6:00 PM)
✅ **Auto-Close at Session End**: Automatically closes all positions outside trading hours
✅ **Works on All Timeframes**: Intraday and higher timeframes supported
---
## How It Works
### Step-by-Step Trade Logic
#### 1. **Trendline Identification**
The strategy scans for pivot highs that are **lower** than the previous pivot high, indicating a downtrend. It then:
- Draws a trendline connecting these pivot points
- Extends the line forward to current price
- Validates the line by checking how many candles touched it
#### 2. **Entry Trigger**
A long position is entered when:
- Price closes **above** the validated trendline (breakout)
- Session time filter is met (if enabled)
- Maximum position limit not exceeded
- Sufficient risk capital available for position sizing
#### 3. **Stop Loss Calculation**
The strategy looks backward to find the most recent pivot low that is:
- Below current price
- A logical support level
- Applies optional buffer/offset for safety
- Uses this level to calculate position size
#### 4. **Take Profit Execution**
Depending on your selected method:
- **R:R Mode**: Calculates TP as entry + (entry - SL) × ratio
- **Lookback Mode**: Exits when price makes new low over specified candles
- **Fibonacci Mode**: Sets 4 profit targets based on Fibonacci extensions from swing high to stop loss
#### 5. **Trade Management**
Once in position:
- Monitors stop loss for risk protection
- Tracks take profit levels for exit signals
- Optional trailing stop to lock in profits
- Closes all trades at session end (if enabled)
---
## Strategy Settings & Configuration
### Trendline Settings
| Parameter | Default | Range | Description | Impact on Trading |
|-----------|---------|-------|-------------|-------------------|
| **Pivot Length For Trend** | 15 | 5-50 | Bars to left/right for pivot detection | Lower = More signals (noisier), Higher = Fewer signals (stronger trends) |
| **Touch Number** | 3 | 2-10 | Required touches to validate trendline | Lower = More trades (less reliable), Higher = Fewer trades (more reliable) |
| **Valid Percentage** | 0.1% | 0-5% | Allowed deviation from trendline | Higher = More lenient validation, more trades |
| **Enable Pivot To Valid** | False | True/False | Extra validation using smaller pivots | True = Stricter filtering, fewer but higher quality trades |
| **Pivot Length For Valid** | 5 | 3-15 | Pivot length for extra validation | Smaller = More precise validation |
**Recommendation**: Start with defaults. In choppy markets, increase touch number to 4-5. In strongly trending markets, reduce to 2.
### Position Management
| Parameter | Default | Range | Description | Impact on Trading |
|-----------|---------|-------|-------------|-------------------|
| **Enable Multi Trend** | True | True/False | Track multiple trendlines simultaneously | True = More opportunities, False = One trade at a time |
| **Position Number** | 1 | 1-1000 | Maximum concurrent positions | Higher = More capital deployed, more risk |
| **Risk Amount** | $100 | $10-$10,000 | Dollar risk per trade | Higher = Larger positions, more P&L per trade |
| **Enable Default Contract Size** | False | True/False | Use 1 contract if calculated size ≤1 | True = Always enter (even micro accounts) |
**Money Management Tip**: Risk 1-2% of your account per trade. If you have $10,000, set Risk Amount to $100-$200.
### Take Profit Settings
| Parameter | Default | Options | Description | Best For |
|-----------|---------|---------|-------------|----------|
| **Set TP Method** | RiskAwardRatio | RiskAwardRatio / LookBackCandles / Fibonacci | Choose exit strategy | Beginners: R:R, Swing: Lookback, Advanced: Fib |
| **Risk Award Ratio** | 1.5 | 1.0-5.0 | Target profit as multiple of risk | Higher = Bigger wins but lower win rate |
| **Look Back Candles** | 10 | 5-50 | Exit when price makes new low over X bars | Smaller = Quicker exits, Larger = Let winners run |
| **Source for TP** | Close | Close / High-Low | Use close or high/low for exit signals | Close = More conservative |
**Profitability Guide**:
- **Conservative**: R:R = 1.5, Lookback = 10
- **Balanced**: R:R = 2.0, Lookback = 15
- **Aggressive**: R:R = 2.5, Fibonacci mode with 1.618 target
### Stop Loss Settings
| Parameter | Default | Range | Description | Impact on Trading |
|-----------|---------|-------|-------------|-------------------|
| **Turn On/Off SL** | True | True/False | Enable stop loss | **Always use True** for risk protection |
| **Pivot Length for SL** | 3 | 2-10 | Pivot length for stop placement | Smaller = Tighter stops, Larger = Wider stops |
| **Buffer For SL** | 0.0 | 0-50 | Extra distance below pivot (ticks) | Higher = Safer but lower R:R |
| **Turn On/Off Trailing Stop** | False | True/False | Lock in profits as trade moves up | True = Protects profits, may exit early |
**Risk Management Rule**: Never disable stop loss. Use buffer in volatile markets (5-10 ticks).
### Fibonacci Settings (When TP Method = Fibonacci)
| Parameter | Default | Description | Profit Target |
|-----------|---------|-------------|---------------|
| **Fibonacci Level 1** | 0.618 | First profit target | 61.8% of swing range |
| **Fibonacci Level 2** | 1.0 | Second profit target | 100% of swing range |
| **Fibonacci Level 3** | 1.312 | Third profit target | 131.2% extension |
| **Fibonacci Level 4** | 1.618 | Fourth profit target | 161.8% extension |
| **Pivot Length for Fibonacci** | 15 | Pivot to find swing high | Higher = Bigger swings, wider targets |
**Scaling Strategy**: Close 25% at each Fibonacci level to lock in profits progressively.
### Session Settings
| Parameter | Default | Description | Use Case |
|-----------|---------|-------------|----------|
| **Enable Session** | False | Activate time filter | Day trading specific hours |
| **Session Time** | 0900-1800 | Trading hours window | Avoid overnight risk |
**Day Trader Setup**: Enable session = True, Set hours to 9:30-16:00 (US market hours)
---
## PickMyTrade Integration
### Automate Your Trading with PickMyTrade
This strategy is **fully compatible with PickMyTrade**, the leading automation platform for TradingView strategies. Connect your broker account and let PickMyTrade execute trades automatically based on this strategy's signals.
### Why Use PickMyTrade?
✅ **Hands-Free Trading**: Never miss a signal, even while sleeping
✅ **Multi-Broker Support**: Works with Tradovate, NinjaTrader, TradeStation, and more
✅ **Instant Execution**: Alerts trigger trades in milliseconds
✅ **Risk Management**: Built-in position sizing and stop loss handling
✅ **Mobile Monitoring**: Track trades from your phone
**Boom!** Your strategy is now fully automated. Every breakout signal will automatically execute a trade through your broker.
### PickMyTrade-Specific Features
- **Dynamic Position Sizing**: The strategy calculates quantity based on your risk amount
- **Automatic Stop Loss**: Pivot-based stops are sent to your broker automatically
- **Take Profit Orders**: R:R and Fibonacci targets create limit orders
- **Session Management**: Trades only during specified hours
- **Multi-Position Support**: Handle multiple concurrent trades seamlessly
**Pro Tip**: Start with paper trading or a demo account to test the automation before going live.
---
## Advanced Features
### 1. Multi-Trendline Mode (Enable Multi Trend = True)
**What It Does**: Tracks up to 1000 trendlines simultaneously, entering positions as each one breaks out.
**Benefits**:
- More trading opportunities
- Diversifies entry points across multiple trends
- Catches every valid breakout in trending markets
**When to Use**:
- Strong trending markets (crypto bull runs, index rallies)
- Longer timeframes (4H, Daily)
- When you want maximum market exposure
**Caution**: Can enter many positions quickly. Set appropriate Position Number limit and Risk Amount.
### 2. Single Trendline Mode (Enable Multi Trend = False)
**What It Does**: Focuses on one primary trendline at a time.
**Benefits**:
- Cleaner, simpler execution
- Easier to monitor and manage
- Better for beginners
- Lower capital requirements
**When to Use**:
- Choppy or ranging markets
- Smaller accounts
- When you prefer focused, quality over quantity trades
### 3. Fibonacci Profit Scaling
**How It Works**:
1. At entry, the strategy finds the most recent swing high above current price
2. Calculates the range from swing high to stop loss
3. Projects 4 Fibonacci extensions: 61.8%, 100%, 131.2%, 161.8%
4. Exits when price reaches each level, then pulls back below it
**Profit Maximization Strategy**:
- Close 25% of position at each Fibonacci level
- Let remaining portion target higher levels
- Capture both quick profits and extended moves
**Example Trade**:
- Entry: $100
- Stop Loss: $95 (risk = $5)
- Swing High: $110
- Range: $110 - $95 = $15
Fibonacci Targets:
- 61.8% = $95 + ($15 × 0.618) = $104.27 (+4.27%)
- 100% = $95 + ($15 × 1.0) = $110 (+10%)
- 131.2% = $95 + ($15 × 1.312) = $114.68 (+14.68%)
- 161.8% = $95 + ($15 × 1.618) = $119.27 (+19.27%)
**Result**: Even if only first two targets hit, you lock in +7% average gain vs. -5% risk = 1.4:1 R:R
### 4. Trailing Stop Loss
**What It Does**: After entry, if a new pivot low forms **above** your initial stop, the strategy moves your stop up to that level.
**Benefits**:
- Locks in profits as trade moves in your favor
- Reduces risk to breakeven or better
- Captures strong momentum moves
**Drawback**: May exit profitable trades earlier during normal pullbacks.
**Best Practice**: Use in strongly trending markets. Disable in choppy conditions.
### 5. Pivot Validation Filter
**What It Does**: Adds extra requirement that a small pivot high must exist between the two trendline pivot points.
**Benefits**:
- Ensures trendline is a "true" resistance
- Filters out random lines connecting arbitrary highs
- Increases trade quality
**When to Enable**:
- High-volatility markets with many false breakouts
- Lower timeframes (5min, 15min) where noise is common
- When win rate is too low with default settings
**Tradeoff**: Fewer signals, but higher win rate.
### 6. Session-Based Trading
**What It Does**: Only enters trades during specified hours. Auto-closes all positions outside session.
**Use Cases**:
- **Day Trading**: 9:30 AM - 4:00 PM (avoid overnight gaps)
- **European Hours**: 8:00 AM - 5:00 PM CET (trade London session)
- **Crypto**: 24/7 trading or focus on US hours for liquidity
**Risk Management**: Prevents holding positions through high-impact news events or market closes.
---
## Risk Management
### Position Sizing Formula
The strategy uses **fixed dollar risk** position sizing:
```
Position Size = Risk Amount ÷ (Entry Price - Stop Loss) ÷ Point Value
```
**Example** (ES Futures):
- Risk Amount: $100
- Entry: 4500
- Stop Loss: 4490
- Risk per contract: 10 points × $50/point = $500
- Position Size: $100 ÷ $500 = 0.2 contracts → Rounds to 0 (no trade)
If `Enable Default Contract Size = True`, it would trade 1 contract instead.
### Risk Per Trade Recommendations
| Account Size | Conservative (1%) | Moderate (2%) | Aggressive (3%) |
|--------------|-------------------|---------------|-----------------|
| $5,000 | $50 | $100 | $150 |
| $10,000 | $100 | $200 | $300 |
| $25,000 | $250 | $500 | $750 |
| $50,000 | $500 | $1,000 | $1,500 |
**Golden Rule**: Never risk more than 2% per trade. Even with 10 losses in a row, you'd only be down 20%.
### Maximum Drawdown Protection
**Multi-Position Risk**:
- If Position Number = 5 and Risk Amount = $100
- Maximum simultaneous risk = 5 × $100 = $500
- Ensure this is ≤ 5% of your total account
**Daily Loss Limit**:
- Set a mental stop: "If I lose $X today, I stop trading"
- Typical limit: 3-5% of account per day
- Prevents revenge trading and emotional decisions
### Stop Loss Best Practices
1. **Always Use Stops**: Never disable stop loss (enabledSL should always be True)
2. **Buffer in Volatile Markets**: Add 5-10 tick buffer to avoid stop hunts
3. **Respect Your Stops**: Don't manually override or move stops further away
4. **Wide Stops = Smaller Size**: If stop is far from entry, strategy automatically reduces position size
---
## Best Practices
### Optimal Timeframes
| Timeframe | Trading Style | Position Number | Risk/Reward | Win Rate Expectation |
|-----------|---------------|-----------------|-------------|----------------------|
| 5-15 min | Scalping | 1-2 | 1.5:1 | 50-55% |
| 30 min - 1H | Intraday | 2-3 | 2:1 | 55-60% |
| 4H | Swing Trading | 3-5 | 2.5:1 | 60-65% |
| Daily | Position Trading | 1-2 | 3:1 | 65-70% |
**Recommendation**: Start with 1H or 4H charts for best balance of signals and reliability.
### Ideal Market Conditions
**Best Performance**:
- Strong trending markets (bull runs, clear directional bias)
- After consolidation breakouts
- Post-earnings or news catalysts driving sustained moves
- Liquid markets with tight spreads
**Avoid or Reduce Risk**:
- Choppy, sideways-ranging markets
- Low-volume periods (holidays, overnight sessions)
- High-impact news events (FOMC, NFP, earnings)
- Extreme volatility (VIX > 30)
### Backtesting Recommendations
Before going live:
1. **Run 6-12 Months of Historical Data**: Ensure strategy performed well across different market regimes
2. **Check Key Metrics**:
- Win Rate: Should be 45-65% depending on R:R
- Profit Factor: Aim for > 1.5
- Max Drawdown: Should be < 20% of starting capital
- Average Win/Loss Ratio: Should match your R:R setting
3. **Stress Test**: Test during known volatile periods (March 2020, Jan 2022, etc.)
4. **Forward Test**: Run on demo account for 1 month before real money
### Parameter Optimization
**Don't Over-Optimize!** Avoid curve-fitting to past data. Instead:
1. **Start with Defaults**: Use recommended settings first
2. **Change One Parameter at a Time**: Isolate what improves performance
3. **Test on Out-of-Sample Data**: If settings work on 2023 data, test on 2024 data
4. **Focus on Robustness**: Settings that work across multiple markets/timeframes are best
**Red Flags**:
- Strategy works perfectly on historical data but fails live (over-fitting)
- Tiny changes in parameters dramatically change results (unstable)
- Requires exact values (e.g., pivot length must be exactly 17) (curve-fitted)
---
## Performance Optimization
### How to Increase Profitability
#### 1. Optimize Risk/Reward Ratio
- **Current**: 1.5:1 (default)
- **Test**: 2:1, 2.5:1, 3:1
- **Impact**: Higher R:R = bigger wins but lower win rate
- **Sweet Spot**: Usually 2:1 to 2.5:1 for trend strategies
#### 2. Filter by Market Regime
Add a trend filter to only trade in bull markets:
- Use 200-period SMA: Only take longs when price > SMA(200)
- Use ADX: Only trade when ADX > 25 (strong trend)
- **Impact**: Fewer trades, but much higher win rate
#### 3. Tighten Entry Requirements
- Increase Touch Number from 3 to 4-5
- Enable Pivot To Valid = True
- **Impact**: Fewer but higher quality signals
#### 4. Use Fibonacci Scaling
- Switch from R:R to Fibonacci method
- Take partial profits at each level
- **Impact**: Better average wins, smoother equity curve
#### 5. Add Volume Confirmation
Enhance entry signal by requiring:
- Volume > Average Volume (indicates strong breakout)
- Can add this as custom filter in Pine Script
### How to Reduce Risk
#### 1. Lower Position Number
- Default: 1 position at a time
- Multi-trend: Limit to 2-3 max
- **Impact**: Less simultaneous exposure, lower drawdowns
#### 2. Reduce Risk Amount
- Start with $50 per trade (0.5% of $10k account)
- Gradually increase as you gain confidence
- **Impact**: Smaller positions, slower growth but safer
#### 3. Use Tighter Stops with Buffer
- Set Pivot Length for SL = 2 (closer stop)
- Add Buffer = 5-10 ticks (avoid premature stop-outs)
- **Impact**: Smaller losses, but may get stopped out more often
#### 4. Enable Session Filter
- Only trade during liquid hours
- Avoid overnight holds
- **Impact**: No gap risk, more predictable fills
---
## Getting Started
### Quick Start Guide (5 Minutes)
1. **Copy the Strategy Code**
- Open the `.txt` file provided
- Copy all code to clipboard
2. **Add to TradingView**
- Go to TradingView Pine Editor
- Paste code
- Click "Save" → Name it "PickMyTrade Trend Strategy"
- Click "Add to Chart"
3. **Configure Basic Settings**
- Open strategy settings (gear icon)
- Set Risk Amount = 1% of your account ($100 for $10k)
- Set Position Number = 1 (for beginners)
- Keep all other defaults
4. **Backtest on Your Market**
- Choose your instrument (ES, NQ, AAPL, BTC, etc.)
- Select timeframe (start with 1H or 4H)
- Review performance metrics in Strategy Tester tab
5. **Optimize (Optional)**
- Adjust Touch Number (2-5) to balance signals vs. quality
- Try different TP methods (R:R vs. Fibonacci)
- Test on multiple timeframes
6. **Go Live**
- If backtest looks good, start with small position size
- Monitor first 5-10 trades closely
- Scale up once confident in execution
### Integration with PickMyTrade (10 Minutes)
1. **Sign Up for PickMyTrade**
- Visit (pickmytrade.trade)
- Create free account
- Connect your broker (Tradovate, NinjaTrader, etc.)
2. **Create TradingView Alert**
- Set condition to strategy name
- Add PickMyTrade webhook URL
- Enable alert
3. **Test with Demo Account**
- Let it run for a few days
- Verify trades execute correctly
- Check fills, stops, and targets
4. **Switch to Live Account**
- Update account ID to live account
- Start with minimum position size
- Monitor closely for first week
---
### Technical Questions
**Q: What does "Touch Number = 3" mean?**
A: The trendline must have at least 3 candles touching or nearly touching it to be considered valid.
**Q: Why am I getting no trades?**
A: Trendline requirements may be too strict. Try:
- Reduce Touch Number to 2
- Increase Valid Percentage to 0.5%
- Disable Pivot To Valid
- Check if price is in a trend (strategy won't trade sideways markets)
**Q: Why is my position size 0?**
A: Risk Amount is too small for the stop distance. Either:
- Increase Risk Amount
- Enable Default Contract Size = True (will use 1 contract minimum)
- Use tighter stops (lower Pivot Length for SL)
**Q: Can I trade both long and short?**
A: Current code is long-only. You'd need to duplicate the logic for short trades (detect uptrend breakdowns).
**Q: How do I change from TradingView strategy to indicator?**
A: Change line 5 from `strategy(...)` to `indicator(...)`. Replace `strategy.entry()` and `strategy.exit()` with `alert()` calls.
### Risk Management Questions
**Q: What's the maximum drawdown I should expect?**
A: Typically 10-20% depending on settings. If experiencing > 25%, reduce position size or tighten filters.
**Q: Should I risk more to make more money?**
A: No. Risking 2% vs. 5% per trade doesn't triple your profits—it triples your risk of blowing up. Stick to 1-2% per trade.
**Q: What if I hit 5 losses in a row?**
A: Normal. Even with 60% win rate, losing streaks happen. Don't increase position size to "win it back." Stick to your risk plan.
**Q: Do I need to watch the screen all day?**
A: No, especially with PickMyTrade automation. Check positions 1-2 times per day. Overtrading kills profits.
---
## Disclaimer
**Important Risk Disclosure**:
Trading futures, stocks, forex, and cryptocurrencies involves substantial risk of loss and is not suitable for all investors. Past performance is not indicative of future results. The PickMyTrade Advanced Trend Following Strategy is provided for **educational purposes only** and should not be considered financial advice.
**Key Risks**:
- You can lose more than your initial investment
- Backtested results may not reflect live trading performance
- Market conditions change; no strategy works forever
- Automation errors can occur (connectivity, bugs, etc.)
**Before Trading**:
- Consult a licensed financial advisor
- Fully understand the strategy logic
- Test on demo account for at least 1 month
- Only risk capital you can afford to lose
- Start with minimum position sizes
**PickMyTrade**:
This strategy is compatible with PickMyTrade but is not officially endorsed by PickMyTrade. The author is not affiliated with PickMyTrade. For PickMyTrade support, visit their official website.
**License**: This strategy is open-source under Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). You may modify and share, but not for commercial use.
---
**Ready to automate your trading with PickMyTrade? Add this strategy to your TradingView chart today and start capturing profitable trend breakouts on autopilot!**
BTCUSD – Market Structure Projection1. Short-Term Outlook
1. BTC is expected to complete a final liquidity sweep below recent lows.
2. A minor corrective rally into a premium zone offers a short opportunity.
3. Confirmation comes from rejection + RSI divergence.
2. Mid-Term Reversal Setup
4. After the sweep, BTC is projected to form a bullish break of structure (BOS).
5. A retest of demand provides the optimal long entry.
6. This phase begins the next expansion leg into 2026.
3. Long-Term Macro Trend
7. The higher-timeframe trend remains bullish despite local corrections.
8. BTC is expected to follow an impulse → correction → impulse pattern.
9. Macro upside targets remain positioned for new all-time highs.
4. Key Market Levels
Support Zones
10. $86,000 – $90,000 — primary liquidity-sweep region.
11. $92,500 – $94,000 — bullish retest confirmation zone.
Resistance Zones
12. $105,000 – $110,000 — mid-cycle rejection area.
13. $130,000 – $150,000 — macro expansion target range.
5. Trade Framework Summary
14. Short Setup: Enter after corrective rally into premium; target liquidity sweep.
15. Long Setup: Enter after BOS + demand retest; target macro continuation.
16. Structure favors a bullish expansion phase through 2026.
🎯 Wyckoff Order Block Entry System🎯 Wyckoff Order Block Entry System
📝 INDICATOR DESCRIPTION
🎯 Wyckoff Order Block Entry System Short Description:
Professional institutional zone trading combined with Wyckoff methodology. Identifies high-probability entries where smart money meets classic price action patterns.
Full Description:
Wyckoff Order Block Entry System is a precision trading tool that combines two powerful concepts:
Order Blocks - Institutional zones where large players place their orders
Wyckoff Method - Classic price action patterns revealing smart money behavior
🎯 What Makes This Different?
Unlike traditional indicators that flood your chart with signals, this system only triggers entries when BOTH conditions are met:
Price enters an institutional Order Block zone (current timeframe OR higher timeframe)
A Wyckoff pattern occurs (Spring, SOS, Upthrust, or SOW)
This dual-confirmation approach ensures you're trading with institutional flow at optimal entry points.
📊 Key Features:
✅ Order Block Detection
Automatically identifies institutional buying/selling zones
Current timeframe order blocks (solid lines)
Higher timeframe order blocks (dashed lines) for stronger zones
Customizable strength and extension settings
✅ 4 Wyckoff Entry Patterns
SPRING (Bullish Reversal): Fake breakdown below support → Quick recovery
SOS (Sign of Strength): Strong bullish candle after accumulation
UPTHRUST (Bearish Reversal): Fake breakout above resistance → Quick rejection
SOW (Sign of Weakness): Strong bearish candle after distribution
✅ Clean Visual Design
Minimalist approach - only essential information
Color-coded zones (Green = Bullish, Red = Bearish, Cyan/Magenta = HTF)
Clear entry signals with pattern type labels
No chart clutter - focus on what matters
✅ Multi-Timeframe Analysis
Integrates higher timeframe order blocks
HTF signals marked with "+HTF" tag for extra confidence
Fully customizable HTF selection (H1, H4, Daily, etc.)
✅ Smart Alerts
Entry signal alerts (Long/Short)
Order block formation alerts
HTF order block alerts
Customizable alert messages
💡 How To Use:
Setup: Add indicator to your chart, configure HTF timeframe (default H1)
Wait: Let order blocks form (green/red boxes appear)
Watch: Price returns to order block zone
Entry: Signal appears when Wyckoff pattern confirms
Trade: Enter with the signal, stop below/above order block
📈 Best For:
Forex pairs (all majors and crosses)
Gold (XAUUSD)
Crypto (BTC, ETH, etc.)
Indices (SPX, NAS100, etc.)
Stocks
Commodities
⏱️ Recommended Timeframes:
M15 for scalping
M30 for day trading
H1 for swing trading
H4 for position trading
🎯 Win Rate Expectations:
Current TF signals: 60-70%
HTF signals (+HTF tag): 70-80%
Spring/Upthrust patterns: Highest probability
Works on ALL liquid markets
⚙️ Customizable Settings:
Order block detection parameters
HTF timeframe selection
Wyckoff sensitivity (swing length, volume threshold)
Zone extension duration
Color schemes
📚 Trading Strategy:
This indicator works best when:
Trading in the direction of higher timeframe trend
Using proper risk management (1-2% per trade)
Placing stops just outside order block zones
Taking profits at opposite order blocks
Focusing on HTF signals for higher quality
🔒 Risk Management:
Always use stop losses! Recommended placement:
LONG: 10-20 pips below order block
SHORT: 10-20 pips above order block
Target: Minimum 1:2 risk/reward ratio
💎 Why Traders Love This System:
"Finally, an indicator that doesn't spam my chart with useless signals!" - The quality-over-quantity approach means you only get high-probability setups.
"The HTF order blocks changed my trading!" - Multi-timeframe analysis built-in removes the need for manual higher timeframe checks.
"Wyckoff + Order Blocks = Perfect combination!" - Two proven concepts working together create powerful confluence.
📊 Universal Application:
This system works on ANY liquid market with sufficient volume:
✅ Forex (EUR/USD, GBP/USD, USD/JPY, etc.)
✅ Commodities (Gold, Silver, Oil, etc.)
✅ Indices (S&P 500, NASDAQ, DAX, etc.)
✅ Cryptocurrencies (Bitcoin, Ethereum, etc.)
✅ Stocks (Large cap with good liquidity)
🎓 Educational Value:
Beyond just signals, this indicator teaches you:
How institutional traders think
Where smart money places orders
Classic Wyckoff accumulation/distribution patterns
Multi-timeframe analysis techniques
⚡ Performance:
Lightning-fast calculations
No repainting
Real-time signal generation
Clean code, optimized for speed
🚀 Get Started:
Add to your favorite chart
Adjust HTF timeframe to match your trading style
Wait for high-quality signals
Trade with confidence
Remember: Quality beats quantity. This system prioritizes precision over frequency. You might see 2-5 signals per day on M30 - and that's exactly the point. Each signal is carefully filtered for maximum probability.
Ready to trade like institutions?
👉 Add this indicator to your chart now
👉 Configure your preferred HTF timeframe
👉 Start catching high-probability setups
👉 Trade smarter, not harder
Questions or feedback? Drop a comment below!
Found this useful? Hit that ⭐ button and share with fellow traders!
Happy Trading! 🚀📈
Auto Fibonacci RetraceNOTE: This script is for educational purposes only.
This Pine Script v6 indicator automates the drawing of Fibonacci retracement levels on a TradingView chart based on detected pivot highs and lows. It's designed to identify the most recent swing points in a price trend and plot horizontal lines at standard Fibonacci ratios (0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%), along with optional labels for each level. The script is useful for traders who want dynamic, hands-free Fib retracements that update as new pivots form, helping to spot potential support/resistance zones without manual intervention.
Key Features
Automatic Pivot Detection: Uses TradingView's built-in ta.pivothigh and ta.pivotlow functions to find recent swing highs and lows. The sensitivity is adjustable via user inputs for "Left Bars" and "Right Bars" (default: 5 each), which define how many bars are checked on either side to confirm a pivot.
Trend Direction Awareness: Determines if the current swing is an uptrend (recent high after low) or downtrend (recent low after high) and orients the Fib levels accordingly—starting from the low in uptrends or high in downtrends.
Dynamic Drawing:
Plots dashed horizontal lines extending to the right of the chart for each Fib level.
Colors are predefined for visual distinction (e.g., blue for 23.6%, orange for 61.8%).
Lines and labels are cleared and redrawn only when a new pivot is detected or on initial load to prevent chart clutter.
Customizable Labels: Optional labels show the percentage (e.g., "61.8%") and can be positioned on the "Left" (at the swing start) or "Right" (pinned to the current bar, updating dynamically). Labels use semi-transparent backgrounds for readability.
Performance Optimizations: Uses arrays to manage lines and labels efficiently, with reverse-indexed loops for safe deletion. The max_bars_back=500 ensures it handles historical data without excessive computation.
User Inputs:
Left/Right Bars: Tune pivot detection (higher values for major trends, lower for shorter swings).
Show Fib Levels/Labels: Toggle visibility.
Label Position: "Left" or "Right" for placement flexibility.
Usage Instructions
Adding to Chart: Copy-paste into TradingView's Pine Editor, save as a new indicator, and add it to your chart via the "Indicators" menu.
Customization: Adjust inputs in the indicator settings panel. For example, set Left/Right Bars to 10 for daily charts in strong trends.
Best Practices:
Use on trending markets (e.g., stocks, forex, crypto like BTC/USD); avoid choppy sideways action.
Combine with other indicators (e.g., RSI for overbought/oversold confirmation) for better trade signals.
Test on historical data—zoom out to see how it redraws on past swings.
Limitations: Relies on pivot functions, so it may lag slightly (pivots confirm after "Right Bars"). Not a trading strategy—use for analysis only. No alerts built-in, but you can add alertcondition if extending it.
Potential Enhancements: Add extensions (e.g., 161.8%), user-defined levels, or alerts on price touches via simple modifications.
This script provides a clean, efficient way to visualize Fib retracements automatically, saving time compared to manual drawing. If you need further tweaks or integration into a full strategy, let me know!
EMA Cross + RSI + ADX - Autotrade Strategy V2Overview
A versatile trend-following strategy combining EMA 9/21 crossovers with RSI momentum filtering and optional ADX trend strength confirmation. Designed for both cryptocurrency and traditional futures/options markets with built-in stop loss management and automated position reversals.
Key Features
Multi-Market Compatibility: Works on both crypto futures (Bitcoin, Ethereum) and traditional markets (NIFTY, Bank NIFTY, S&P 500 futures, equity options)
Triple Confirmation System: EMA crossover + RSI filter + ADX strength (optional)
Automated Risk Management: 2% stop loss with wick-touch detection
Position Auto-Reversal: Opposite signals automatically close and reverse positions
Webhook Ready: Six distinct alert messages for automation (Entry Buy/Sell, Close Long/Short, SL Hit Long/Short)
Performance Metrics
NIFTY Futures (15min): 50%+ win rate with ADX filter OFF
Crypto Markets: Requires extensive backtesting before live deployment
Optimal Timeframes: 15-minute to 1-hour charts (patience required for higher timeframes)
Strategy Logic
Entry Signals:
LONG: EMA 9 crosses above EMA 21 + RSI > 55 + ADX > 20 (if enabled)
SHORT: EMA 9 crosses below EMA 21 + RSI < 45 + ADX > 20 (if enabled)
Exit Signals:
Opposite EMA crossover (auto-closes current position)
Stop loss hit at 2% from entry price (tracks candle wicks)
Technical Indicators:
Fast EMA: 9-period (short-term trend)
Slow EMA: 21-period (primary trend)
RSI: 14-period with 55/45 thresholds (momentum confirmation)
ADX: 14-period with 20 threshold (trend strength filter - optional)
Market-Specific Settings
Traditional Markets (NIFTY, Bank NIFTY, S&P Futures, Options)
Recommended Settings:
ADX Filter: Turn OFF (less choppy, cleaner trends)
Timeframe: 15-minute chart
Win Rate: 50%+ on NIFTY Futures
Why No ADX: Traditional markets have more institutional participation and smoother price action, making ADX unnecessary
Cryptocurrency Markets (BTC, ETH, Altcoins)
Recommended Settings:
ADX Filter: Turn ON (ADX > 20)
Timeframe: 15-minute to 1-hour
Extensive backtesting required before live trading
Why ADX: Crypto markets are highly volatile and prone to false breakouts; ADX filters low-quality chop
Best Practices
✅ Backtest thoroughly on your specific instrument and timeframe
✅ Use larger timeframes (1H, 4H) for higher quality signals and better risk/reward
✅ Adjust RSI thresholds based on market volatility (try 52/48 for more signals, 60/40 for fewer but stronger)
✅ Monitor ADX effectiveness - disable for traditional markets, enable for crypto
✅ Proper position sizing - adjust default_qty_value based on your capital and instrument price
✅ Paper trade first - test for 2-4 weeks before risking real capital
Risk Management
Fixed 2% stop loss per trade (adjustable)
Stop loss tracks candle wicks for accurate execution
Positions auto-reverse on opposite signals (no manual intervention needed)
0.075% commission built into backtest (adjust for your broker)
Customization Options
All parameters are adjustable via inputs:
EMA periods (default: 9/21)
RSI length and thresholds (default: 14-period, 55/45 levels)
ADX length and threshold (default: 14-period, 20 threshold)
Stop loss percentage (default: 2%)
Webhook Automation
This strategy includes six distinct alert messages for automated trading:
"Entry Buy" - Long position opened
"Entry Sell" - Short position opened
"Close Long" - Long position closed on opposite crossover
"Close Short" - Short position closed on opposite crossover
"SL Hit Long" - Long stop loss triggered
"SL Hit Short" - Short stop loss triggered
Compatible with Delta Exchange, Binance Futures, 3Commas, Alertatron, and other webhook platforms.
Important Notes
⚠️ Crypto markets require extensive backtesting - volatility patterns differ significantly from traditional markets
⚠️ Higher timeframes = better results - 15min works but 1H/4H provide cleaner signals
⚠️ ADX toggle is critical - OFF for traditional markets, ON for crypto
⚠️ Not financial advice - always conduct your own research and use proper risk management
⚠️ Past performance ≠ future results - backtest results may not reflect live trading conditions
Disclaimer
This strategy is for educational and informational purposes only. Trading futures and options involves substantial risk of loss. Always backtest thoroughly, start with paper trading, and never risk more than you can afford to lose. The author assumes no responsibility for any trading losses incurred using this strategy.
FVG ATRFVG ATR — Fair Value Gap Size Measured in ATR Units
This Pine Script v6 indicator detects Fair Value Gaps and displays their size as a ratio of the Average True Range, providing traders with a normalized measurement of gap significance across different market conditions and timeframes.
Key Features
Automatic FVG Detection
The indicator identifies bullish and bearish Fair Value Gaps using the standard three-candle pattern. Bullish FVGs occur when the current low exceeds the high from two bars ago, while bearish FVGs occur when the current high falls below the low from two bars ago.
ATR Ratio Calculation
Each detected FVG is measured against the current Average True Range at the moment of detection. The ratio is displayed as a compact label next to the gap, showing values like "ATR: 0.75" or "ATR: 1.41". This normalization allows comparison of gap significance across volatile and calm market periods.
Minimal Visual Footprint
Labels are displayed directly on the chart without boxes or lines, using customizable text sizes from tiny to large. The default tiny size ensures the chart remains uncluttered while providing essential information at a glance.
Highly Customizable Display
All visual aspects are configurable through input parameters, including label position (top, middle, or bottom of gap), text size, text color, optional background, and horizontal offset from the detection candle.
Customizable Parameters
Detection Settings
Detect Bullish FVG: Enable or disable detection of bullish gaps. Default is enabled.
Detect Bearish FVG: Enable or disable detection of bearish gaps. Default is enabled.
Min Size (pips): Filter out small gaps below the specified threshold. One pip equals 10 ticks for most Forex pairs. Default is 10 pips.
ATR Calculation
ATR Period: Period length for Average True Range calculation. Default is 14, adjustable to match your trading strategy.
Label Settings
Label Position: Vertical placement of the text label relative to the FVG zone. Options are Top, Middle, or Bottom. Default is Middle.
Label Size: Text size from Tiny (smallest), Small, Normal, to Large. Default is Tiny for minimal chart clutter.
Text Color: Custom color for label text. Default is white for visibility on dark themes.
Show Background: Toggle to display labels with a colored background box or as transparent text only. Default is disabled for cleaner appearance.
Background Color: Custom color for label background when enabled. Default is semi-transparent gray.
Label Offset (bars): Horizontal distance in bars between the detection candle and the label. Set to 0 for labels directly on the candle, or increase for separation. Default is 0.
Recommended Use Cases
Multi-Timeframe Analysis
Compare FVG significance across different timeframes by observing ATR ratios. A 1.5 ATR gap on the 1-hour chart may indicate different significance than the same ratio on the daily chart.
Volatility-Adjusted Trading
Use ATR ratios to filter for only the most significant gaps. For example, only trade FVGs with ratios above 1.0 to focus on gaps larger than typical price movement.
Risk Management
Size positions based on gap magnitude relative to current volatility. Larger ATR ratios may warrant tighter stops or smaller position sizes.
Market Efficiency Analysis
Track how quickly and completely different-sized gaps get filled. Gaps with higher ATR ratios may take longer to fill or act as stronger support and resistance zones.
Technical Details
This indicator is written in Pine Script v6 and follows all recommended coding standards including strict 4-space indentation, lazy boolean evaluation, and proper type declarations. The script uses array-based storage to maintain up to 500 labels simultaneously.
The ATR ratio is calculated at the moment of FVG detection and remains fixed, never repainting. The calculation divides the FVG height (distance between gap boundaries) by the current ATR value using the specified period. Division by zero is protected with conditional logic.
Label positioning uses the xloc.bar_index and yloc.price system for precise placement. The horizontal offset parameter allows traders to adjust label spacing based on chart zoom level and personal preference. Text formatting uses str.tostring with two decimal places for clear ratio display.
Important Notes
The indicator never repaints as all FVG detections and ATR calculations are fixed upon bar confirmation. Labels persist on the chart until the maximum label count is reached, at which point the oldest labels are automatically removed by TradingView.
For optimal performance on charts with many FVGs, consider increasing the minimum pip size filter or using smaller label sizes. The tiny size option provides the smallest possible text for maximum chart clarity.
Installation and Usage
Copy the source code into the TradingView Pine Editor and add the indicator to your chart. The overlay parameter is set to true, allowing labels to display directly on price candles. Configure all parameters through the indicator settings panel to match your trading style and visual preferences.
100% Pine Script v6 indicator — No repaint — Open source
ES VIX on MNQ🧭 ES + VIX Overlay on MNQ
This indicator overlays the ES (S&P 500 futures) and VIX (Volatility Index) directly on the MNQ (Micro Nasdaq Futures) chart, allowing traders to visualize in real time the correlation, divergence, and volatility influence between the three instruments.
⸻
⚙️ How It Works
• The VIX is dynamically rescaled to the MNQ’s daily open, so its moves appear on the same price scale.
• The ES line is projected based on its percentage move relative to the session open (18:00 NY).
• Both are plotted in sync with MNQ to expose relative strength and divergence zones that often precede strong directional moves.
⸻
🧩 Inputs
• VIX Symbol: choose between VIX, CBOE:VIX, TVC:VIX
• Invert VIX Correlation: flips the VIX line for inverse-correlation setups
• VIX Step: controls how sensitively the VIX moves on the MNQ scale
• ES Symbol: defines the ES contract (e.g. ES1!)
• Show Signals: toggles on/off buy & sell markers
• Step (points): minimum distance between MNQ and VIX for a valid signal
• Block Signals: disables signals between 16:15 – 03:15 (illiquid hours)
⸻
💡 Signal Logic
The system tracks crossings between MNQ and the projected VIX line:
• Buy signal → when MNQ crosses above the VIX and expands upward by ≥ X points.
• Sell signal → when MNQ crosses below the VIX and expands downward by ≥ X points.
A time filter avoids noise during low-volume sessions.
⸻
📊 Visual Guide
• Cyan line = VIX on MNQ scale
• Orange line = ES on MNQ scale
• Labels on the right = current VIX / ES values
• BUY/SELL markers = potential volatility-based reversals
⸻
🚀 Practical Use
Perfect for traders who monitor:
• VIX–price divergence
• ES vs MNQ momentum confirmation
• Early volatility expansions before trend moves
⸻
💬 Core Idea:
“Volatility leads — price confirms.”






















