Order Block Volumatic FVG StrategyInspired by: Volumatic Fair Value Gaps —
License: CC BY-NC-SA 4.0 (Creative Commons Attribution–NonCommercial–ShareAlike).
This script is a non-commercial derivative work that credits the original author and keeps the same license.
What this strategy does
This turns BigBeluga’s visual FVG concept into an entry/exit strategy. It scans bullish and bearish FVG boxes, measures how deep price has mitigated into a box (as a percentage), and opens a long/short when your mitigation threshold and filters are satisfied. Risk is managed with a fixed Stop Loss % and a Trailing Stop that activates only after a user-defined profit trigger.
Additions vs. the original indicator
✅ Strategy entries based on % mitigation into FVGs (long/short).
✅ Lower-TF volume split using upticks/downticks; fallback if LTF data is missing (distributes prior bar volume by close’s position in its H–L range) to avoid NaN/0.
✅ Per-FVG total volume filter (min/max) so you can skip weak boxes.
✅ Age filter (min bars since the FVG was created) to avoid fresh/immature boxes.
✅ Bull% / Bear% share filter (the 46%/53% numbers you see inside each FVG).
✅ Optional candle confirmation and cooldown between trades.
✅ Risk management: fixed SL % + Trailing Stop with a profit trigger (doesn’t trail until your trigger is reached).
✅ Pine v6 safety: no unsupported args, no indexof/clamp/when, reverse-index deletes, guards against zero/NaN.
How a trade is decided (logic overview)
Detect FVGs (same rules as the original visual logic).
For each FVG currently intersected by the bar, compute:
Mitigation % (how deep price has entered the box).
Bull%/Bear% split (internal volume share).
Total volume (printed on the box) from LTF aggregation or fallback.
Age (bars) since the box was created.
Apply your filters:
Mitigation ≥ Long/Short threshold.
Volume between your min and max (if enabled).
Age ≥ min bars (if enabled).
Bull% / Bear% within your limits (if enabled).
(Optional) the current candle must be in trade direction (confirm).
If multiple FVGs qualify on the same bar, the strategy uses the most recent one.
Enter long/short (no pyramiding).
Exit with:
Fixed Stop Loss %, and
Trailing Stop that only starts after price reaches your profit trigger %.
Input settings (quick guide)
Mitigation source: close or high/low. Use high/low for intrabar touches; close is stricter.
Mitigation % thresholds: minimal mitigation for Long and Short.
TOTAL Volume filter: skip FVGs with too little/too much total volume (per box).
Bull/Bear share filter: require, e.g., Long only if Bull% ≥ 50; avoid Short when Bull% is high (Short Bull% max).
Age filter (bars): e.g., ≥ 20–30 bars to avoid fresh boxes.
Confirm candle: require candle direction to match the trade.
Cooldown (bars): minimum bars between entries.
Risk:
Stop Loss % (fixed from entry price).
Activate trailing at +% profit (the trigger).
Trailing distance % (the trailing gap once active).
Lower-TF aggregation:
Auto: TF/Divisor → picks 1/3/5m automatically.
Fixed: choose 1/3/5/15m explicitly.
If LTF can’t be fetched, fallback allocates prior bar’s volume by its close position in the bar’s H–L.
Suggested starting presets (you should optimize per market)
Mitigation: 60–80% for both Long/Short.
Bull/Bear share:
Long: Bull% ≥ 50–70, Bear% ≤ 100.
Short: Bull% ≤ 60 (avoid shorting into strong support), Bear% ≥ 0–70 as you prefer.
Age: ≥ 20–30 bars.
Volume: pick a min that filters noise for your symbol/timeframe.
Risk: SL 4–6%, trailing trigger 1–2%, distance 1–2% (crypto example).
Set slippage/fees in Strategy Properties.
Notes, limitations & best practices
Data differences: The LTF split uses request.security_lower_tf. If the exchange/data feed has sparse LTF data, the fallback kicks in (it’s deliberate to avoid NaNs but is a heuristic).
Real-time vs backtest: The current bar can update until close; results on historical bars use closed data. Use “Bar Replay” to understand intrabar effects.
No pyramiding: Only one position at a time. Modify pyramiding in the header if you need scaling.
Assets: For spot/crypto, TradingView “volume” is exchange volume; in some markets it may be tick volume—interpret filters accordingly.
Risk disclosure: Past performance ≠ future results. Use appropriate position sizing and risk controls; this is not financial advice.
Credits
Visual FVG concept and original implementation: BigBeluga.
This derivative strategy adds entry/exit logic, volume/age/share filters, robust LTF handling, and risk management while preserving the original spirit.
License remains CC BY-NC-SA 4.0 (non-commercial, attribution required, share-alike).
Indikatoren und Strategien
DBO_Prod Updated Sept 27Added News Day Support, has support for variable sizing on recoup trading. This does a opposite trade using YM in real time, but keeps MYM on historical bars.
Known bug: On the historical view, I'm getting a ghost trade causing results to be 13% inflated.
Elliott Wave Auto + Fib Targets + Scalper Strategy (Fixed)// Elliott Wave Auto + Fib Targets + Scalper Strategy
//
// Fixed by expert trader:
// - Replaced table with label-based visualization to avoid 'Column 2 is out of table bounds' error.
// - Uses label.new to display buy/sell signal counts in top-right corner, mimicking table layout.
// - Fixed array.sum() error: Replaced invalid range-based array.sum() with custom sum_array_range() function.
// - Removed barstate usage to fix 'Undeclared identifier barstate' error.
// - Replaced barstate.isconfirmed with true (process every bar).
// - Replaced barstate.isfirstconfirmed with bar_index == 0 (first bar).
// - Replaced strategy.alert with label.new for long/short entry signals (buy/sell markers).
// - Fixed array index out-of-bounds: Protected array.get() calls with size checks.
// - Fixed pyramiding: Set constant pyramiding=4 (max 5 entries); use allow_pyramiding to limit entries.
// - Fixed default_qty_value: Set constant default_qty_value=100.0; use entry_size_pct to scale qty.
// - Replaced alertcondition with labels for Elliott Wave patterns.
// - Fixed partial exits: 50% at TP1 with fixed SL, 50% at TP2 with fixed SL or trailing.
// - Fixed Elliott Wave pivot indexing for alternating H/L check.
// - Ensured proper position sizing and exit logic.
BOCS Channel Scalper Strategy - Automated Mean Reversion System# BOCS Channel Scalper Strategy - Automated Mean Reversion System
## WHAT THIS STRATEGY DOES:
This is an automated mean reversion trading strategy that identifies consolidation channels through volatility analysis and executes scalp trades when price enters entry zones near channel boundaries. Unlike breakout strategies, this system assumes price will revert to the channel mean, taking profits as price bounces back from extremes. Position sizing is fully customizable with three methods: fixed contracts, percentage of equity, or fixed dollar amount. Stop losses are placed just outside channel boundaries with take profits calculated either as fixed points or as a percentage of channel range.
## KEY DIFFERENCE FROM ORIGINAL BOCS:
**This strategy is designed for traders seeking higher trade frequency.** The original BOCS indicator trades breakouts OUTSIDE channels, waiting for price to escape consolidation before entering. This scalper version trades mean reversion INSIDE channels, entering when price reaches channel extremes and betting on a bounce back to center. The result is significantly more trading opportunities:
- **Original BOCS**: 1-3 signals per channel (only on breakout)
- **Scalper Version**: 5-15+ signals per channel (every touch of entry zones)
- **Trade Style**: Mean reversion vs trend following
- **Hold Time**: Seconds to minutes vs minutes to hours
- **Best Markets**: Ranging/choppy conditions vs trending breakouts
This makes the scalper ideal for active day traders who want continuous opportunities within consolidation zones rather than waiting for breakout confirmation. However, increased trade frequency also means higher commission costs and requires tighter risk management.
## TECHNICAL METHODOLOGY:
### Price Normalization Process:
The strategy normalizes price data to create consistent volatility measurements across different instruments and price levels. It calculates the highest high and lowest low over a user-defined lookback period (default 100 bars). Current close price is normalized using: (close - lowest_low) / (highest_high - lowest_low), producing values between 0 and 1 for standardized volatility analysis.
### Volatility Detection:
A 14-period standard deviation is applied to the normalized price series to measure price deviation from the mean. Higher standard deviation values indicate volatility expansion; lower values indicate consolidation. The strategy uses ta.highestbars() and ta.lowestbars() to identify when volatility peaks and troughs occur over the detection period (default 14 bars).
### Channel Formation Logic:
When volatility crosses from a high level to a low level (ta.crossover(upper, lower)), a consolidation phase begins. The strategy tracks the highest and lowest prices during this period, which become the channel boundaries. Minimum duration of 10+ bars is required to filter out brief volatility spikes. Channels are rendered as box objects with defined upper and lower boundaries, with colored zones indicating entry areas.
### Entry Signal Generation:
The strategy uses immediate touch-based entry logic. Entry zones are defined as a percentage from channel edges (default 20%):
- **Long Entry Zone**: Bottom 20% of channel (bottomBound + channelRange × 0.2)
- **Short Entry Zone**: Top 20% of channel (topBound - channelRange × 0.2)
Long signals trigger when candle low touches or enters the long entry zone. Short signals trigger when candle high touches or enters the short entry zone. This captures mean reversion opportunities as price reaches channel extremes.
### Cooldown Filter:
An optional cooldown period (measured in bars) prevents signal spam by enforcing minimum spacing between consecutive signals. If cooldown is set to 3 bars, no new long signal will fire until 3 bars after the previous long signal. Long and short cooldowns are tracked independently, allowing both directions to signal within the same period.
### ATR Volatility Filter:
The strategy includes a multi-timeframe ATR filter to avoid trading during low-volatility conditions. Using request.security(), it fetches ATR values from a specified timeframe (e.g., 1-minute ATR while trading on 5-minute charts). The filter compares current ATR to a user-defined minimum threshold:
- If ATR ≥ threshold: Trading enabled
- If ATR < threshold: No signals fire
This prevents entries during dead zones where mean reversion is unreliable due to insufficient price movement.
### Take Profit Calculation:
Two TP methods are available:
**Fixed Points Mode**:
- Long TP = Entry + (TP_Ticks × syminfo.mintick)
- Short TP = Entry - (TP_Ticks × syminfo.mintick)
**Channel Percentage Mode**:
- Long TP = Entry + (ChannelRange × TP_Percent)
- Short TP = Entry - (ChannelRange × TP_Percent)
Default 50% targets the channel midline, a natural mean reversion target. Larger percentages aim for opposite channel edge.
### Stop Loss Placement:
Stop losses are placed just outside the channel boundary by a user-defined tick offset:
- Long SL = ChannelBottom - (SL_Offset_Ticks × syminfo.mintick)
- Short SL = ChannelTop + (SL_Offset_Ticks × syminfo.mintick)
This logic assumes channel breaks invalidate the mean reversion thesis. If price breaks through, the range is no longer valid and position exits.
### Trade Execution Logic:
When entry conditions are met (price in zone, cooldown satisfied, ATR filter passed, no existing position):
1. Calculate entry price at zone boundary
2. Calculate TP and SL based on selected method
3. Execute strategy.entry() with calculated position size
4. Place strategy.exit() with TP limit and SL stop orders
5. Update info table with active trade details
The strategy enforces one position at a time by checking strategy.position_size == 0 before entry.
### Channel Breakout Management:
Channels are removed when price closes more than 10 ticks outside boundaries. This tolerance prevents premature channel deletion from minor breaks or wicks, allowing the mean reversion setup to persist through small boundary violations.
### Position Sizing System:
Three methods calculate position size:
**Fixed Contracts**:
- Uses exact contract quantity specified in settings
- Best for futures traders (e.g., "trade 2 NQ contracts")
**Percentage of Equity**:
- position_size = (strategy.equity × equity_pct / 100) / close
- Dynamically scales with account growth
**Cash Amount**:
- position_size = cash_amount / close
- Maintains consistent dollar exposure regardless of price
## INPUT PARAMETERS:
### Position Sizing:
- **Position Size Type**: Choose Fixed Contracts, % of Equity, or Cash Amount
- **Number of Contracts**: Fixed quantity per trade (1-1000)
- **% of Equity**: Percentage of account to allocate (1-100%)
- **Cash Amount**: Dollar value per position ($100+)
### Channel Settings:
- **Nested Channels**: Allow multiple overlapping channels vs single channel
- **Normalization Length**: Lookback for high/low calculation (1-500, default 100)
- **Box Detection Length**: Period for volatility detection (1-100, default 14)
### Scalping Settings:
- **Enable Long Scalps**: Toggle long entries on/off
- **Enable Short Scalps**: Toggle short entries on/off
- **Entry Zone % from Edge**: Size of entry zone (5-50%, default 20%)
- **SL Offset (Ticks)**: Distance beyond channel for stop (1+, default 5)
- **Cooldown Period (Bars)**: Minimum spacing between signals (0 = no cooldown)
### ATR Filter:
- **Enable ATR Filter**: Toggle volatility filter on/off
- **ATR Timeframe**: Source timeframe for ATR (1, 5, 15, 60 min, etc.)
- **ATR Length**: Smoothing period (1-100, default 14)
- **Min ATR Value**: Threshold for trade enablement (0.1+, default 10.0)
### Take Profit Settings:
- **TP Method**: Choose Fixed Points or % of Channel
- **TP Fixed (Ticks)**: Static distance in ticks (1+, default 30)
- **TP % of Channel**: Dynamic target as channel percentage (10-100%, default 50%)
### Appearance:
- **Show Entry Zones**: Toggle zone labels on channels
- **Show Info Table**: Display real-time strategy status
- **Table Position**: Corner placement (Top Left/Right, Bottom Left/Right)
- **Color Settings**: Customize long/short/TP/SL colors
## VISUAL INDICATORS:
- **Channel boxes** with semi-transparent fill showing consolidation zones
- **Colored entry zones** labeled "LONG ZONE ▲" and "SHORT ZONE ▼"
- **Entry signal arrows** below/above bars marking long/short entries
- **Active TP/SL lines** with emoji labels (⊕ Entry, 🎯 TP, 🛑 SL)
- **Info table** showing position status, channel state, last signal, entry/TP/SL prices, and ATR status
## HOW TO USE:
### For 1-3 Minute Scalping (NQ/ES):
- ATR Timeframe: "1" (1-minute)
- ATR Min Value: 10.0 (for NQ), adjust per instrument
- Entry Zone %: 20-25%
- TP Method: Fixed Points, 20-40 ticks
- SL Offset: 5-10 ticks
- Cooldown: 2-3 bars
- Position Size: 1-2 contracts
### For 5-15 Minute Day Trading:
- ATR Timeframe: "5" or match chart
- ATR Min Value: Adjust to instrument (test 8-15 for NQ)
- Entry Zone %: 20-30%
- TP Method: % of Channel, 40-60%
- SL Offset: 5-10 ticks
- Cooldown: 3-5 bars
- Position Size: Fixed contracts or 5-10% equity
### For 30-60 Minute Swing Scalping:
- ATR Timeframe: "15" or "30"
- ATR Min Value: Lower threshold for broader market
- Entry Zone %: 25-35%
- TP Method: % of Channel, 50-70%
- SL Offset: 10-15 ticks
- Cooldown: 5+ bars or disable
- Position Size: % of equity recommended
## BACKTEST CONSIDERATIONS:
- Strategy performs best in ranging, mean-reverting markets
- Strong trending markets produce more stop losses as price breaks channels
- ATR filter significantly reduces trade count but improves quality during low volatility
- Cooldown period trades signal quantity for signal quality
- Commission and slippage materially impact sub-5-minute timeframe performance
- Shorter timeframes require tighter entry zones (15-20%) to catch quick reversions
- % of Channel TP adapts better to varying channel sizes than fixed points
- Fixed contract sizing recommended for consistent risk per trade in futures
**Backtesting Parameters Used**: This strategy was developed and tested using realistic commission and slippage values to provide accurate performance expectations. Recommended settings: Commission of $1.40 per side (typical for NQ futures through discount brokers), slippage of 2 ticks to account for execution delays on fast-moving scalp entries. These values reflect real-world trading costs that active scalpers will encounter. Backtest results without proper cost simulation will significantly overstate profitability.
## COMPATIBLE MARKETS:
Works on any instrument with price data including stock indices (NQ, ES, YM, RTY), individual stocks, forex pairs (EUR/USD, GBP/USD), cryptocurrency (BTC, ETH), and commodities. Volume-based features require data feed with volume information but are optional for core functionality.
## KNOWN LIMITATIONS:
- Immediate touch entry can fire multiple times in choppy zones without adequate cooldown
- Channel deletion at 10-tick breaks may be too aggressive or lenient depending on instrument tick size
- ATR filter from lower timeframes requires higher-tier TradingView subscription (request.security limitation)
- Mean reversion logic fails in strong breakout scenarios leading to stop loss hits
- Position sizing via % of equity or cash amount calculates based on close price, may differ from actual fill price
- No partial closing capability - full position exits at TP or SL only
- Strategy does not account for gap openings or overnight holds
## RISK DISCLOSURE:
Trading involves substantial risk of loss. Past performance does not guarantee future results. This strategy is for educational purposes and backtesting only. Mean reversion strategies can experience extended drawdowns during trending markets. Stop losses may not fill at intended levels during extreme volatility or gaps. Thoroughly test on historical data and paper trade before risking real capital. Use appropriate position sizing and never risk more than you can afford to lose. Consider consulting a licensed financial advisor before making trading decisions. Automated trading systems can malfunction - monitor all live positions actively.
## ACKNOWLEDGMENT & CREDITS:
This strategy is built upon the channel detection methodology created by **AlgoAlpha** in the "Smart Money Breakout Channels" indicator. Full credit and appreciation to AlgoAlpha for pioneering the normalized volatility approach to identifying consolidation patterns. The core channel formation logic using normalized price standard deviation is AlgoAlpha's original contribution to the TradingView community.
Enhancements to the original concept include: mean reversion entry logic (vs breakout), immediate touch-based signals, multi-timeframe ATR volatility filtering, flexible position sizing (fixed/percentage/cash), cooldown period filtering, dual TP methods (fixed points vs channel percentage), automated strategy execution with exit management, and real-time position monitoring table.
Alain parfHammer signals only valid for longs above EMA200.
Inverted hammer signals only valid for shorts below EMA200.
EMA200 is plotted as an orange line.
Hammer & Inverted Hammer Strategyfor allan my friend hammer pattern and 200 ema long when hammer and above ema vice versa for short
Diamond-Triangle Strategy - Dynamic Trailing v3added more options of edits and lower high higher low exit logic, with .09 ema cloud rather then .1 sep for chop
KD The ScalperWe have to take the trade when all three EMAs are pointing in the same direction (no criss-cross, no up/down, sideways). All 3 EMAs should be cleanly separated from each other with strong spacing between them; they are not tangled, sideways, or messy. This is our first filter before entering the trade. Are the EMAs stacked neatly, and is the price outside of the 25 EMA? If price pulls back and closes near or below the 25 or 50 EMA and breaks the 100 EMA, we don't trade. Use the 100 EMA as a safety net and refrain from trading if the price touches or falls below the 100 EMA.
1. Confirm the trend- All 3 EMAs must align, and they must spread
2. Watch price pull back to the 25th or the 50 EMA
3. Wait for the price to bounce - And re-approach the 25 EMA
Why is this powerful?
Removes 80% of the low-probability Trades
It keeps you out of choppy markets
Avoids Reversal Traps
Anchors us to momentum
We take the entry when the price moves up again and touches the 25 EMA from below, and then when it breaks above the 25 EMA, or even better, when a lovely green bullish candle forms. A bullish candle indicates good momentum. When a bullish candle closes in green, it means the momentum has increased significantly. This is when we enter a long trade, with the stop-loss just below the 50 EMA and the profit target being 1.5 times the stop-loss.
The same rule applies to the bearish trade.
NQ Opening Range BreakoutOpening Range Breakout script with:
Customizable opening range timeframe selection.
Inputs for Risk to Reward ratio, EMAs, Vwap, and ATR sizing to avoid ranges that are too big or too small.
Features a toggle for reversal trades that when enabled will trade the other direction if the initial ORB gets stopped out.
Default it will use the entire opening range to determine stop loss and take profit and if neither the take profit or stop loss is hit it will end the trade at 16:00. There are toggles to use half the opening range as the stop loss and take profit will then be calculated as risk reward ratio * stop loss or you can select entry candle stop loss and risk reward ratio which places the stop loss at the entry candles opening price. There is also a take profit option that will only exit the trade when price closes below (for longs) or above (for shorts) a customizable ema length.
Note that if you have the opening range, for example, selected as 9:30 - 9:45 and are on a 5 minute chart it will enter on the first 5 min closure outside of that range and if you are on a 15 minute chart it will enter on the first 15 min closure outside of that range and so on.
You can automate the entries and exits by using a webhook service and using the strategy’s alerts.
BTC Momentum Strategy - RSI & Stoch RSI Entry and EMA ExitBTC Momentum Strategy: RSI & Stoch RSI Entry with EMA Exit
This strategy is designed to identify potentially strong entry points for Bitcoin (BTC) during periods of shifting momentum and then ride the trend until it shows signs of weakness. It's a straightforward, long-only strategy, meaning it only looks for opportunities to buy and then sell for a profit.
How It Works:
The strategy combines a few classic indicators to make its decisions. Think of it as a two-step confirmation system for buying, with a simple rule for selling.
1. The Buy Signal (Green Triangle)
To generate a buy signal, the strategy looks for two things to happen at the same time:
RSI Confirmation: It first waits for the Relative Strength Index (RSI) to show signs of bullish momentum. Specifically, it's looking for the RSI line to cross above its own moving average, suggesting that strength is starting to build from a lower level. This helps catch moves as they begin to turn positive.
Stochastic RSI Confirmation: As an extra layer of confirmation, it also checks the Stochastic RSI. This helps filter out weaker signals and confirm that momentum is truly shifting upwards from an oversold or "bottomed-out" condition.
When both of these conditions are met, a green "buy" triangle will appear below the candle, and the strategy will enter a long position.
2. The Sell Signal (Red Triangle)
The exit rule is simple and designed to let your winners run while protecting you when the trend reverses.
* EMA-Based Exit: The strategy plots an orange line on your chart, which is an Exponential Moving Average (EMA). The strategy will hold the position as long as the price stays above this line. If a candle closes *below* the orange EMA line, it's taken as a sign that the short-term trend is weakening, and the strategy will close the position to lock in profits or cut losses. A red "sell" triangle will appear above that candle.
Best Use:
This strategy was built with Bitcoin in mind and tends to perform best on higher timeframes like the Weekly charts. It aims to capture major swings rather than small, quick scalps.
You can adjust all the settings for the RSI, Stochastic RSI, and the Exit EMA to fine-tune the strategy to your own trading style.
MACD Aspray Hybrid Strategy The MACD Aspray Hybrid Strategy is a trend-following trading system based on a modified version of the MACD indicator.
MACD Aspray Hybrid Strategy The MACD Aspray Hybrid Strategy is a trend-following trading system based on a modified version of the MACD indicator.
Liquidity+FVG+OB Strategy (v6)How the strategy works (summary)
Entry Long when a Bullish FVG is detected (optionally requires a recent Bullish OB).
Entry Short when a Bearish FVG is detected (optionally requires a recent Bearish OB).
Stop Loss and Take Profit are placed using ATR multiples (configurable).
Position sizing is fixed contract/lot size (configurable).
You can require OB confirmation (within ob_confirm_window bars).
Alerts still exist and visuals are preserved.
EMA CROSS STRATEGY MAXTRA ENTRY LOGIC
Long Entry (Buy Signal):
Condition: Short EMA crosses above Long EMA (Golden Cross)
Interpretation: A potential upward trend is beginning
Short Entry (Sell Signal):
Condition: Short EMA crosses below Long EMA (Death Cross)
Interpretation: A potential downward trend is beginning
EXIT LOGIC
There are a few options depending on the style of strategy:
Option 1: Opposite Crossover
Exit Long: When Short EMA crosses below Long EMA
Exit Short: When Short EMA crosses above Long EMA
This method keeps you in the trade until the trend reverses.
Option 2: Fixed Stop Loss / Take Profit
Exit trade when a profit target or stop loss is hit
Example: 2% stop loss and 4% take profit
Note : In Properties, go to Initial Margin. Add one more zero to get the backtest results for futures trades. For spot, use it as it is.
Stochastic Divergence StrategyBackground bars:
Bearish
gradient from slightly bearish divergence to strong bearish divergence for red and a double bounce for pink
Bullish
gradient from slightly bearish divergence to strong bearish divergence for green and a double bounce for yellow
removable buy and sell signals in options
G. Santostasi Bitcoin Power Law StrategyG. Santostasi Bitcoin Power Law Strategy
Overview
The "G. Santostasi Bitcoin Power Law Strategy" is a TradingView strategy script built upon the foundational Bitcoin Power Law Theory by physicist Giovanni Santostasi.
Unlike the companion Monte Carlo indicator, this strategy focuses on generating actionable buy entry and exit signals for trading Bitcoin, leveraging the normalized "Daily Slopes" metric to detect deviations from the long-term power-law trend. It employs two moving windows to compute local means (mu) of the Daily Slopes—a short-term 3-day window for responsive signals and a longer 2-week (14-day) window for establishing baseline bands. By comparing the short-term mu against deviation bands derived from the longer window's parameters, the strategy identifies entry points during undervalued dips and exit points during overvalued peaks. This approach capitalizes on Bitcoin's scale-invariant behavior, where price follows a power law
P(t)= c t^n, with n~5.9.
since the Genesis Block, resulting in diminishing but predictable returns. Backtested over Bitcoin's full history, the strategy boasts a 77% winning rate and a profit factor of 3.2, making it a robust tool for trend-following with mean-reversion elements. It emphasizes Bitcoin's long-term stability while navigating short-term oscillations, treating cycles as temporary deviations from the core power-law "DNA.
"Core Concept: Daily Slopes
The strategy inherits the Daily Slopes metric from the power-law framework, which normalizes daily logarithmic returns to reveal a stable local slope that oscillates around the global value of ~5.9.Definition and Calculation:
Daily log returns: log(P2/P1)\, where P2 and P1 are consecutive closing prices.
Normalization: Divide by log((t+1)/t), where ( t ) is days since the Genesis Block, yielding:
Daily Slope=log(P2/P1)log((t+1)/t).
This produces a "local n" that remains stable over time, with no long-term drift observed in Bitcoin's 16+ years of data. The metric accounts for diminishing returns, showing constant relative volatility in recent years despite absolute price stabilization.
Distribution and Parameters:
Daily Slopes are fitted to a t-location scale distribution over moving windows, estimating:μ (mu): The location/mean, stable around 5.9 globally.
σ (sigma): Scale/volatility measure.
ν (nu): Degrees of freedom for tail heaviness.
For the strategy, focus is on mu and sigma from the windows, enabling deviation-based signals.
Strategy Logic: Dual Moving Window Mus and Deviation Bands
The strategy computes two mus via rolling fits to the t-distribution:
Short Window mu (3 days): A fast-moving average of Daily Slopes, sensitive to immediate price action for timely signals.
Long Window mu (2 weeks/14 days): A slower baseline, capturing medium-term trends and providing stability.
Deviation bands are derived from the long window's mu and sigma:
Upper Band: Long mu + Long sigma
Lower Band: Long mu - Long sigma
These bands represent 1-standard-deviation ranges around the longer-term mean, highlighting overbought and oversold conditions relative to the power-law trend. The short mu acts as a "signal line," crossing the bands to trigger trades.
Plotting:
Short mu: Responsive line for crossovers.
Long mu: Central baseline.
Bands: Upper (+σ) and lower (-σ) lines from the long window.
Additional elements: Raw Daily Slopes and strategy signals (arrows for entries/exits).
Entry and Exit Rules:
The strategy generates long-only signals (buy/sell) based on crossovers, assuming a single-position approach without leverage or shorting:
Buy Entry: Triggered when the short-window mu crosses above the lower band (long mu - long sigma). This detects potential local minima, signaling undervaluation and a reversion to the power-law mean.
Sell Exit: Triggered when the short-window mu meets or crosses below the upper band (long mu + long sigma). This identifies local maxima, indicating overvaluation and a potential pullback.
Trade Management:
No stop-loss or take-profit hardcoded; users can add via TradingView settings.
Positions close on exit signals, with re-entry on the next valid buy.
Filters for false signals: Optional confirmation from global slope (e.g., only trade if long mu > 5.0) to align with bullish regimes.
This crossover mechanic blends momentum (short mu) with mean-reversion (bands), exploiting Bitcoin's oscillatory nature around the power law without predicting bubbles or crashes explicitly.
Performance Metrics:
Backtested on BTCUSD daily data from the Genesis Block to present (assuming continuous updates):Winning Rate: 77% – A high hit rate due to the strategy's focus on statistically stable deviations.
Profit Factor: 3.2 – Gross profits are 3.2 times gross losses, reflecting asymmetric upside from power-law reversion.
Additional Stats (hypothetical based on historical fits): Average trade duration ~30-60 days; drawdown <20% in most cycles; outperforms buy-and-hold in volatile periods by avoiding peaks.
Caveats: Past performance is not indicative of future results. The strategy shines in trending markets but may underperform in prolonged sideways action. Transaction costs (e.g., fees, slippage) not included in base metrics.
Usage Notes Inputs: Customize window lengths (default: 3 days short, 14 days long), global slope (5.9), and signal thresholds. Enable alerts for entries/exits.
Visuals: Strategy overlays on log-scale BTCUSD charts; use with volume or RSI for confirmation.
Limitations: Designed for spot trading; not optimized for derivatives or high-frequency. Assumes power-law persistence—major regime shifts (e.g., adoption plateaus) could impact efficacy.
Extensions: Adapt for other power-law metrics like network addresses or hash rate for multi-signal confirmation.
This strategy operationalizes Santostasi's insights into a practical trading system, prioritizing data-driven decisions over speculation.
Diamond-Triangle Strategy - Dynamic Trailing v2This had an adaptive exit strategy added with diamond entries not working well
Dwaggy Scalping Trio (VWAP + EMA + RSI)First attempt at pine script this is a scalping indicator that combines VWAP, EMA, and RSI to signal entry/exit for scalping lower time frames
MTF Regime + Breakout-Pullback by HarshMTF BTC regime filter + trend filter, Donchian breakout after a pullback, ATR‑based stop, 2 profit targets, trailing runner, and pyramiding into 3 tranches.
Elite Momentum Scalper🎯 Perfect For
Scalpers Who Want:
Quick In-and-Out Trades: Designed for 1-15 minute timeframes but works very well on the higer timeframes. Especiall Designed for : Indices ie NAS100 SPX in the New York Session but does work in London session also.
High Win Rate: Multiple confirmations reduce false signals
Consistent Risk: Same risk per trade, every trade
Clean Charts: No indicator spaghetti, just clear signals
Best Markets: Indices ie NAS100 SPX New York Session
Forex Majors: EUR/USD, GBP/USD, USD/JPY
Precious Metals: XAU/USD (Gold), XAG/USD (Silver)
Crypto: BTC/USD, ETH/USD (works 24/7)
Indices: SPX, NAS, DAX during active sessions
Optimal Timeframes:
Primary: 5-minute, 15-minute charts
Works On: Any timeframe (auto-adjusts)
Session-Aware: Best during London/NY overlap
🚨 Built-in Alerts
Never miss a trade:
Entry Alerts: "LONG ENTRY at 1.2345 SL: 1.2300 TP: 1.2400"
Exact Levels: Includes entry, stop, and target prices
Mobile Friendly: Works with TradingView mobile alerts
💡 Pro Tips for Best Results
Setup Recommendations:
Start Conservative: Begin with 1% risk per trade
Respect Sessions: Best results during London/NY hours
Don't Override: Let the cooldown system work
Monitor Dashboard: Keep an eye on daily trade count
Backtest First: Test on historical data before live trading
Risk Management:
Never risk more than you can afford to lose
Use proper position sizing (built-in calculator)
Respect the stop losses (they're there for a reason)
Monitor during high-impact news events
🏆 Why The Elite One?
Based on Fabio Valentini's proven #1 scalper methodology, this isn't just another indicator—it's a complete trading system that:
✅ Eliminates Guesswork: Exact entry, stop, and target levels
✅ Manages Risk: Built-in position sizing and risk management
✅ Prevents Overtrading: Smart cooldown system
✅ Adapts to Markets: ATR-based levels adjust to volatility
✅ Saves Time: All information in one clean dashboard
✅ Works Anywhere: Any market, any timeframe
✅ Stays Clean: No chart clutter, just actionable signals
Join thousands of traders who've upgraded their scalping game with the world's #1 scalper's methodology, refined into institutional-grade precision with retail-friendly execution.
⚠️ Important Disclaimers
Past performance does not guarantee future results
Trading involves substantial risk of loss
Test thoroughly on demo accounts first
Consider broker spreads in your calculations
Not financial advice - trade at your own risk
📈 Ready to Transform Your Trading?
Add The Elite One to your chart and experience the difference that professional-grade trading tools based on proven scalping methodology can make.
Remember: The best traders don't just follow signals—they understand their tools. Take time to learn the system, backtest thoroughly, and always trade responsibly.
Happy Trading! 🚀
The Elite One - Based on Fabio Valentini's #1 Scalper Methodology ⚡️
Pivot SuperTrend Auto-Opt + WFO + MultiObj + Filter/Diag# Pivot SuperTrend (NetProfit Auto-Optimization) — Summary & Quick Start
## What this strategy is
A self-optimizing **SuperTrend-style** strategy for TradingView Pine v6 that:
- builds a **walk-forward, net-profit optimizer** directly on the chart,
- adapts its trailing stop/entry logic to **market regime** and **volatility**, and
- exposes a **filter/gate suite** so you can dial aggressiveness vs. noise without breaking auto-optimization.
Default tuning: **Bybit ETHUSDT Perpetual, 30m** (works elsewhere once tuned).
---
## Core logic (high level)
### 1) SuperTrend backbone (with Center/Pivots)
- **Center line**: smoothed running pivot from `ta.pivothigh/low`.
- **SuperTrend bands**: `Center ± Factor × ATR(length)` with a carry rule to reduce whipsaws.
- **Trend state**: `+1` above band, `-1` below band.
- **Flip**: trend change; can require **1-bar confirmation**.
### 2) Adaptive smoothing (AMA of ST)
- Performance-weighted **alpha** smooths the trailing stop.
- Alpha clamped to `alpha_min…alpha_max` using optimizer’s fitness.
### 3) On-chart net-profit optimizer (walk-forward)
- Grid of parameters:
- ATR Length `len` (min…max…step)
- ATR Factor `F` (min…max…step)
- Performance memory `A` (min…max…step)
- Each grid point is paper-traded **each bar** including fees/slippage → **fitness = net profit EMA**.
- Every `opt_interval` bars the **best** candidate is activated (with hysteresis).
- Optional: apply only **ATR margin** gate inside the optimizer for speed/stability.
### 4) Regime detection & anti-chop
- Custom **ADX** + **Center slope** to classify **trend** vs **range**.
- Adaptive thresholds in range regime (distance-to-center, ST-near-center block, etc.).
- Optional **ATR fast/slow ratio** gate.
- Other tools: **min bars since flip**, **hold bars after flip**, **distance to center**, **ST near center** block.
### 5) Entry logic
- **Immediate on flip** or **1-bar confirm**.
- Must pass the **Filter Suite** (toggleable gates):
- ATR-margin cross (hard cross or wick reject)
- Trend Regime (require trend)
- Hold-after-flip
- Distance-to-center
- ST-near-center block
- Volatility ratio (ATR fast/slow)
- Min bars since flip (flip cooldown)
- Daily trade cap & post-loss cooldown
- Trading session window
### 6) Starter preset (failsafe)
- Lenient defaults so trades start quickly to build warm-up data; then you can tighten gates.
### 7) Position management
- Strategy entries for “LONG” / “SHORT”.
- Optional **50% take-profit on Center** (“usecenter”).
- **Only-Long** mode supported with separate exit logic if regime turns bearish.
### 8) Risk controls
- **Max trades per day**, **cooldown bars after loss**, **session window**.
- Optional **bar coloring**, **trend shading**, **signal markers**.
- **Diagnostics** labels show which gate blocked an entry (letters `M T H D N V F C CD S`).
### 9) Alerts & Bybit webhook
- Use alert condition: **Any alert() function call**.
- Fires `"LONG_CONFIRMED"` / `"SHORT_CONFIRMED"`.
---
## Inputs overview
- **Pivot / Center**: pivot length; show pivots & center.
- **Visual**: line widths, bar colors, shading; warm-up bars.
- **Execution / Costs**: fee (bps), slippage (bps), “Only long”, 50% center-close.
- **Auto-Optimize**: grids for `len`, `F`, `A`, interval, memory, acceptance floor.
- **Signal Controls**: 1-bar confirm, ATR margin, min bars since flip.
- **Anti-Chop**: distance to center, hold bars, slope len, ST-near-center ATR, ATR slow len & ratio.
- **Trend Regime**: ADX len/threshold, center slope threshold, “require trend”.
- **Risk Gates**: max trades/day, loss cooldown bars.
- **Session**: optional 07:00–22:00 UTC filter.
- **Diagnostics**: show gate diagnostics labels.
- **Filter Suite**: toggle each gate; optional “apply margin to optimizer”.
- **Starter preset** selector.
---
## Plots & UI
- **Adaptive SuperTrend** (active candidate),
- **PP Center** (optional),
- **Trend shading** (price vs ST zone),
- **Entry/Exit markers** (triangles),
- **Diagnostics** text labels (optional).
---
## Webhook notes (Bybit v5)
If you use a direct Bybit webhook:
- **Symbol**: TradingView may emit `ETHUSDT.P`. Bybit wants `ETHUSDT`. Your relay should **strip `.P`**.
- **Side**: TV provides `buy/sell`. Bybit expects `Buy/Sell` → normalize casing in the relay.
- **Reduce-only**: mark exits and partial closes reduce-only to avoid reversals in Hedge mode.
- **Market orders**: pass `"orderType":"Market"`; ignore price or set to `"marketPrice"` if your relay requires it.
**Entry (Market)**
```json
{
"exchange": "BYBIT",
"category": "linear",
"symbol": "{{ticker}}",
"side": "{{strategy.order.action}}",
"orderType": "Market",
"qty": "{{strategy.order.contracts}}",
"reduceOnly": false,
"timestamp": "{{timenow}}",
"clientOrderId": "pst_{{strategy.order.id}}_{{timenow}}"
}






















