BMM AUTO BUY AND SELL + TP/SL UPDATED VERSION This is the most accurate BMM SCANNER to ever have in our system
Analisis Trend
VSLRT with DivergencesOverview
This indicator combines Volume-Synchronized Linear Regression Trend (VSLRT) analysis with multi-indicator divergence detection to provide comprehensive market momentum and reversal signals. It displays volume-weighted price trends in both short-term and long-term timeframes, while simultaneously detecting divergences across 10 different technical indicators.
Key Features
VSLRT (Volume-Synchronized Linear Regression Trend):
Short-term and long-term trend analysis using linear regression
Volume-weighted calculations that account for buying vs selling pressure
Color-coded histogram showing trend strength and direction
Forecast projection showing anticipated trend continuation
Divergence-adjusted forecasting for enhanced prediction accuracy
Multi-Indicator Divergence Detection:
The indicator simultaneously monitors divergences across:
MACD (Moving Average Convergence Divergence)
MACD Histogram
RSI (Relative Strength Index)
Stochastic Oscillator
CCI (Commodity Channel Index)
Momentum
OBV (On-Balance Volume)
Volume-Weighted MACD
Chaikin Money Flow
Money Flow Index
Divergence Types:
Regular Bullish Divergence (potential reversal to upside)
Regular Bearish Divergence (potential reversal to downside)
Hidden Bullish Divergence (trend continuation upward)
Hidden Bearish Divergence (trend continuation downward)
How It Works
VSLRT Calculations:
The indicator calculates linear regression slopes for both price and volume, separating buying volume from selling volume. The histogram displays:
Green columns: Bullish price movement with strong buying volume
Red columns: Bearish price movement with strong selling volume
Shaded columns: Weaker conviction in the current trend
Thick line: Long-term trend direction
Divergence Detection:
The script automatically scans for divergences by comparing:
Price action (higher highs/lower lows)
Indicator values at pivot points
When price and indicators move in opposite directions, a divergence is detected
Divergences are displayed as labels on the histogram showing:
Which indicators are diverging
Number of simultaneous divergences (stronger signal when multiple indicators agree)
Color-coded by divergence type
Customizable Settings
VSLRT Settings:
Short-term length (default: 20)
Long-term length (default: 50)
Forecast bars (1-50, default: 10)
Divergence forecast adjustment factor
Custom colors for all trend states
Divergence Settings:
Pivot period for divergence detection
Source (Close or High/Low)
Divergence type (Regular, Hidden, or Both)
Minimum number of divergences to display
Maximum pivot points and bars to check
Toggle individual indicators on/off
Custom colors for each divergence type
Label display options (Full names, First letter, or Don't show)
Show divergence count option
Trading Applications
Trend Following:
Use VSLRT histogram to identify trend direction and strength
Enter trades when short-term and long-term trends align
Monitor forecast bars for potential trend continuation
Reversal Trading:
Watch for multiple regular divergences (3+ indicators)
Confirm with VSLRT color changes
Higher divergence count = stronger reversal signal
Trend Continuation:
Hidden divergences suggest trend will continue
Use during pullbacks in strong trends
Combine with VSLRT forecast for entry timing
Risk Management:
Divergence alerts can signal potential exits
VSLRT color changes can indicate stop-loss levels
Forecast helps anticipate trend exhaustion
Alert Conditions
Built-in alert conditions for:
Positive Regular Divergence Detected
Negative Regular Divergence Detected
Positive Hidden Divergence Detected
Negative Hidden Divergence Detected
Any Positive Divergence
Any Negative Divergence
Tips for Best Results
Multiple Timeframe Analysis: Check divergences on higher timeframes for more reliable signals
Confirmation: Wait for bar close (enabled by default) to avoid false signals
Volume Context: Stronger VSLRT signals occur during high volume periods
Divergence Count: More simultaneous divergences = higher probability signal
Trend Alignment: Best results when divergences align with overall trend direction
[AutoZone_mrkim]Title:
AutoZone_mrkim — Multi-Timeframe Order Block Auto Zone
Description:
This indicator automatically identifies and draws Order Block zones for every timeframe.
It helps traders visualize potential supply and demand areas more clearly and react faster to market structure changes.
Main Features:
Automatically detects bullish and bearish Order Block zones
Multi-timeframe zone generation (supports all chart timeframes)
Auto-color change when a zone is broken
Clean visualization for trend continuation and reversal setups
Useful for scalpers, intraday traders, and swing traders
Adjustable display options for zone size and transparency
How to Use:
Use the newest zone for short-term intraday signals
Confirm zone strength using structure breaks
Combine with trend analysis for higher accuracy
Disclaimer:
This indicator is a tool to assist decision making, not a guaranteed trading system.
Use responsibly.
LHS TechniqueLHS Technique Indicator
Overview
The LHS (Left-Hand-Side) Technique is a simple yet powerful tool for analyzing market context in crypto trading, inspired by the Zero Complexity Trading Systems philosophy. This indicator helps traders quickly assess price behavior by focusing on the "left-hand side" of the chart—past price action—to understand how the market arrived at its current state. It differentiates between macro (4-8 hours) and micro (1-10 minutes) environments, enabling you to filter high-quality setups and avoid low-probability trades.
Designed primarily for the 1-minute timeframe in volatile markets like crypto, it visualizes key insights such as trend direction, volatility levels, and volume trends. Without proper market context, even the best strategies can fail—this indicator provides that edge in under 20 seconds.
Key Features
Macro and Micro Modes: Switch between analyzing broader market structure (last 4-8 hours) or immediate price action (last 1-10 minutes) before a key level.
Trend Analysis: Classifies the range as "Bullish" (> customizable % change), "Bearish" (< customizable % change), or "Choppy" (neutral).
Volatility State: Measures range expansion as "High" (> customizable threshold), "Medium", or "Low" to gauge market heat.
Volume Behavior: Tracks volume trends over the lookback period as "Increasing" (momentum building), "Decreasing" (exhaustion), or "Flat" using linear regression slope.
Visual Elements:
Background highlight for the analyzed range.
Optional vertical boundary lines (customizable style, color, width).
Horizontal lines for high/low structure (toggleable).
Info label displaying mode, time, trend, volatility, and volume (color-coded by trend).
Arrows marking the range start/end.
Customizable Thresholds: Adjust percentages for trend, volatility, and volume slope to fit your trading style.
Alerts: Built-in conditions for period starts, trend changes, and volume shifts.
How to Use
Add the indicator to your 1-minute chart (e.g., BTCUSDT or other crypto pairs).
Select "Macro" for overall context (e.g., chopping vs. trending) or "Micro" for precise entry timing.
Customize lookback periods, thresholds, and visuals via the inputs.
Interpret the label:
Trend: Trade with the trend in strong environments; avoid or reverse in choppy ones.
Volatility: High vol favors breakouts; low vol suggests reversals.
Volume: Increasing confirms continuation; decreasing signals potential turns.
Use with the LHS framework: Align macro/micro for confluence—e.g., steady macro trend + increasing micro volume = high-quality momentum setup.
Example
In Macro mode (8 hours), if the label shows "Bullish" with "High" volatility and "Increasing" volume, it indicates strong upward momentum—ideal for breakout trades. Zoom out to the LHS to confirm no prior chopping.
Disclaimer
This indicator is crafted for trading the 1-minute timeframe in crypto. Do not use on higher timeframes without testing first. Past performance is not indicative of future results—always combine with your own analysis and risk management.
For more on the underlying LHS Technique, refer to the Zero Complexity Trading Systems guide.
Designed with ❤️ by Alej4ndroj, built by AI – Feedback welcome!
X: @alej4ndroj x.com
powell's key openskey open levels that powell teaches and uses
6 pm, 12 am and 10 am EST opening pricing
LE LevelsGENERAL OVERVIEW:
The LE Levels indicator plots yesterday’s high/low and today’s pre-market high/low directly on your chart, then layers signal logic around those levels and a set of EMA waves. You can choose “Inside” setups, “Outside” setups, or both. You can also pick entries that trigger at levels, entries that trigger off the EMA wave, or both.
This indicator was developed by Flux Charts in collaboration with Ellis Dillinger (Ellydtrades).
What is the purpose of the indicator?:
The purpose of the LE Levels indicator is to give traders a clear view of how price is behaving around key session levels and EMA structure. It follows the same model EllyD teaches by showing where price is relative to the Previous Day High and Low and the Pre-Market High and Low, then printing signals when specific reactions occur around those levels.
What is the theory behind the indicator?:
The theory behind the LE Levels indicator is based on the concept of inside and outside days. An inside day occurs when price trades within the previous day’s high and low, signaling compression and potential breakout conditions. An outside day occurs when price moves beyond those boundaries, confirming expansion and directional bias. When price trades above the PDH or PMH, it reflects bullish control and potential continuation if supported by volume and momentum. When price trades below the PDL or PML, it shows bearish control and possible downside continuation. The idea is to combine this logic with tickers that have catalysts or news, since these events often bring higher-than-normal volume.
LE SCANNER FEATURES:
Key Levels
Signals
EMA Waves
Key Levels:
The LE Levels indicator automatically plots four key levels each day:
Previous Day High (PDH)
Previous Day Low (PDL)
Pre-Market High (PMH)
Pre-Market Low (PML)
🔹How are Key Levels used in the indicator?:
The key levels are a crucial factor in determining if the trend is bullish, bearish, or neutral trend bias. The indicator uses the key levels as a condition for identifying inside or outside setups (explained below). After determining a trend bias and setup type, the indicator prints long and short entry signals based on how price interacts with the key levels and 8 EMA Wave. (explained below).
These levels define where price previously reacted or reversed, helping traders visualize how current price action relates to prior session structure. They update automatically each day and pre-market session, allowing traders to see if price is trading inside, above, or below prior key ranges without manually drawing them.
Please Note: Pre-market times are based on U.S. market hours (Eastern Standard Time) and may vary for non-U.S. tickers or exchanges.
🔹Previous Day High (PDH):
The PDH marks the highest price reached during the previous regular trading session. It shows where buyers pushed price to its highest point before the market closed. This value is automatically pulled from the daily chart and projected forward onto intraday timeframes.
🔹Previous Day Low (PDL):
The PDL marks the lowest price reached during the previous regular trading session. It shows where selling pressure reached its lowest point before buyers stepped in. Like the PDH, this level is retrieved from the prior day’s data and extended into the current session.
🔹Pre-Market High (PMH):
The PMH is the highest price reached between 4:00 AM and 9:29 AM EST, before the regular market open. It shows how far buyers managed to push price up during the pre-market session.
🔹Pre-Market Low (PML):
The PML is the lowest price reached between 4:00 AM and 9:29 AM EST, before the regular market open. It shows how far sellers were able to drive price down during the pre-market session.
🔹Customization Options:
Extend Levels:
Extends each plotted line a user-defined number of bars into the future, keeping them visible even as new candles print. This helps maintain a clear visual reference as the session progresses.
Extend PDH/L Left & Extend PMH/L Left:
These settings let you extend the Previous Day and Pre-Market levels back to their origin point, so you can see exactly where each level was formed on the prior trading day. This makes it easy to understand the context of each level and how it developed. When this option is disabled, the lines begin at the regular session open instead of extending backward into the previous day’s data.
Show Name / Show Price:
Enabling Show Name displays labels (PDH, PDL, PMH, PML) beside each line, while Show Price adds the exact price value. You can choose to show just the name, just the price, or both for a complete label format.
Line Color and Style:
Each level can be fully customized. You can change the line color and select between solid, dashed, or dotted styles to visually distinguish each level type.
At the bottom of the indicator settings, under the ‘Miscellaneous’ section, two additional options allow further control over how levels are displayed:
Hide Previous Day Highs/Lows:
When enabled, the previous day’s high and low levels aren’t shown. When disabled, users can view previous day levels without using replay mode. By default, this setting is enabled.
Disabled:
Enabled:
Hide Previous Pre-Market Highs/Lows:
When enabled, the previous pre-market high and low levels aren’t shown. When disabled, users can view previous pre-market levels without using replay mode. By default, this setting is enabled.
Disabled:
Enabled:
Signals:
The LE Levels indicator automatically prints long and short entry signals based on how price interacts with its key levels (PDH, PDL, PMH, PML) and the EMA Waves. It identifies moments when price either breaks out beyond prior ranges or retests those levels in alignment with momentum shown by the EMA Waves.
There are two types of setups (Inside and Outside) and two entry types ((L)evels and (E)MAs). Together, these settings allow traders to customize the type of structure the indicator recognizes and how signals are generated.
🔹What is an Inside Setup?
An Inside Setup occurs when the current trading session forms entirely within the previous day’s range, meaning price has not yet broken above the Previous Day High (PDH) or below the Previous Day Low (PDL). In the LE Levels indicator, inside setups are recognized when price trades within the previous day’s boundaries while also considering the pre-market range (Pre-Market High and Pre-Market Low).
Inside Setups have two main conditions, depending on directional bias:
Bullish Inside Setup:
Price trades above the Pre-Market High (PMH) and above the Previous Day Low (PDL), while still below the Previous Day High (PDH).
Bearish Inside Setup:
Price trades below the Pre-Market Low (PML) and below the Previous Day High (PDH), while still above the Previous Day Low (PDL).
🔹What is an Outside Setup?
An Outside Setup occurs when the current trading session extends beyond the previous day’s range, meaning price has broken above the Previous Day High (PDH) or below the Previous Day Low (PDL). This structure reflects expansion and directional control, showing that either buyers or sellers have taken price into new territory beyond the prior session’s boundaries.
In the indicator, an Outside Setup forms once price closes beyond both the previous day and pre-market boundaries, showing bias in one direction.
Bullish Outside Setup:
Price closes above both the PDH and the PMH, confirming buyers have pushed through every key resistance from the prior session and the pre-market.
Bearish Outside Setup:
Price closes below both the PDL and the PML, showing sellers have pushed price beneath all key support levels from the previous session and the pre-market.
🔹Entry Types: (L)evels and (E)MAs
Once a setup type (Inside or Outside) has been established, the LE Levels indicator generates trade signals using one of two entry confirmation methods: (L) for Key Level based Entries and (E) for EMA Wave based Entries. These determine how the signal prints and what triggers it within.
🔹(L)evels Entry:
The (L)evels entry type is built around how price reacts to the key levels (PDH, PDL, PMH, PML). It prints when price retests those levels during an active setup. The logic focuses on retests, where price returns to confirm a previous breakout or breakdown before continuing in the same direction.
Bullish Outside (L)evels Setup:
A Bullish Outside Setup forms when price breaks above both the PDH and PMH. Once this breakout occurs, the indicator waits for a pullback to one of those levels. For a signal to print, the 8 EMA Wave must also be near that level, showing momentum is supporting the structure. A small buffer is applied between price and the level so that even if price only comes close, without fully touching, the retest still counts. When price holds above the PDH or PMH with the 8 EMA nearby, the indicator prints an (L) ▲ entry.
Bearish Outside (L)evels Setup:
A Bearish Outside Setup forms when price breaks below both the PDL and PML. Once this breakdown occurs, the indicator waits for a pullback to one of those levels. For a signal to print, the 8 EMA Wave must also be near that area, confirming momentum is aligned with the move. A small buffer is included so that even if price comes close but doesn’t fully touch the level, the retest still qualifies. When price holds below the PDL or PML with the 8 EMA nearby, the indicator prints an (L) ▼ entry.
Bullish Inside (L)evels Setup:
A Bullish Inside Setup forms when price trades above the PMH but stays below the PDH and above the PDL. Once this condition is met, the indicator waits for a pullback to the PMH. For a signal to print, the 8 EMA Wave must also be near that level. A small buffer is applied so that even if price only comes close to the level, the retest still counts. When price holds above the PMH with the 8 EMA nearby, the indicator prints an (L) ▲ entry.
Bearish Inside (L)evels Setup:
A Bearish Inside Setup forms when price trades below the PML but stays above the PDL and below the PDH. Once this condition is met, the indicator waits for a pullback to the PML. For a signal to print, the 8 EMA Wave must also be near that level. A small buffer is applied so that even if price only comes close, the retest still counts. When price holds below the PML with the 8 EMA nearby, the indicator prints an (L) ▼ entry.
🔹(E)MAs Entry:
The (E)MA Entry type focuses on how price reacts to the 8 EMA Wave. It identifies when price first interacts with the EMAs, then confirms continuation once momentum resumes in the setup’s direction. The first candle that touches the EMA prints an (E) marker, and the confirmation signal triggers only after price breaks above or below that candle, depending on the bias.
Bullish Outside (E)MA Setup:
A Bullish Outside Setup forms when price is trading above both the PDH and PMH. Once this breakout occurs, the indicator waits for price to pull back and touch the 8 EMA Wave, which prints the initial (E) label. If price then breaks above that candle’s high, the continuation setup is confirmed.
Bearish Outside (E)MA Setup:
A Bearish Outside Setup forms when price is trading below both the PDL and PML. After the breakdown, the indicator waits for price to pull back to the 8 EMA Wave, marking the candle that touches it with an (E) label. If price then breaks below that candle’s low, the continuation setup is confirmed.
Bullish Inside (E)MA Setup:
A Bullish Inside Setup forms when price trades above the PMH but remains below the PDH and above the PDL. The indicator waits for price to retrace and touch the 8 EMA Wave, which prints the initial (E) label. If price then breaks above that candle’s high, the continuation setup is confirmed.
Bearish Inside (E)MA Setup:
A Bearish Inside Setup forms when price trades below the PML but remains above the PDL and below the PDH. Once price touches the 8 EMA Wave, the indicator prints an (E) marker. If price then breaks below that candle’s low, the continuation setup is confirmed.
🔹Signal Settings:
At the bottom of the indicator settings panel, three core controls define how signals are displayed and which setups the indicator actively scans for. These settings allow you to refine signal generation based on your trading approach and chart preference.
Setup Type:
This setting determines which structural conditions the indicator tracks.
Inside Setups: Signals only appear when price is trading within the previous day’s range (between PDH and PDL).
Outside Setups: Signals only appear when price breaks outside the previous day’s range (above PDH/PMH or below PDL/PML).
Both: Enables signals for both Inside and Outside setups.
Entry Type:
Controls how the indicator confirms entries.
(E)MAs: Prints signals based on price interacting with the 8 EMA Wave.
(L)evels: Prints signals based on price retesting key levels such as PDH, PDL, PMH, or PML.
Both: Allows both EMA and Level-based signals to appear on the same chart.
Signal Filters (Long, Short, and Re-Entry):
These toggles let you control which trade directions are active.
Long: Displays only bullish entries and ignores all short setups.
Short: Displays only bearish entries and ignores long setups.
Re-Entry: Enables or disables repeated signals in the same direction after the first valid setup has printed. When off, only the initial signal is shown until conditions reset.
EMA Waves:
The EMA Waves help identify potential entries and show directional bias. They’re made of grouped EMAs that form shaded areas to create a “wave” look. The color-coding on the waves allows users to view when price is consolidating, in a bullish trend, or in a bearish trend. The wave updates in real time as new candles form and does not repaint historical data.
🔹8 EMA Wave
The 8 EMA Wave is used directly in the indicator’s signal logic described earlier. It reacts fastest to price compared to the other EAM Waves and determines when (L) and (E) signals can trigger.
How It Works:
The wave is made from the 8, 9, and 10 EMAs and fills the space between them to create a “wave” look. The 8 EMA Wave continuously updates its color based on where price trades relative to the key levels (PDH, PDL, PMH, PML). The color changes are conditional and based solely on price position relative to key levels.
Price is above both PDH and PMH: The wave is bright green, and the top half is purple.
Price is between PDH and PMH: The wave is dark green, and the top half is purple.
Price is below both PDL and PML: The wave is bright red, and the bottom half is purple.
Price is between PDL and PML: The wave is dark red, and the bottom half is purple.
Price is between all four levels: The wave is gray to represent consolidation or neutral bias.
🔹8 EMA Wave Signal Function:
For (L)evels entries, the 8 EMA must be close to the key level being retested, with a small buffer that allows near touches to qualify.
For (E)MA entries, the first candle that touches the wave prints an (E), and the confirmation signal appears when price breaks that candle’s high or low.
🔹8 EMA Wave Customization:
Users can customize all colors for bullish, bearish, and neutral conditions directly in the settings. The purple overlay color cannot be changed, as it is hard-coded into the indicator. The 8 EMA Wave can also be toggled on or off. Turning it off only removes the visual display from the chart and does not affect signals.
🔹20 EMA Wave
The 20 EMA Wave measures medium-term momentum and helps visualize larger pullbacks. It reacts more slowly than the 8 EMA Wave, giving a smoother wave look. No signals are generated from it. It’s purely a visual guide for spotting potential pullback areas for continuation setups.
How It Works:
The wave is made from the 19, 20, and 21 EMAs and fills the space between them to create a shaded “wave.” The color updates continuously based on where price trades relative to the key levels (PDH, PDL, PMH, PML). The color changes are conditional and based only on price position relative to these levels.
Price is above both PDH and PMH: The wave is bright green, and the top half is blue.
Price is between PDH and PMH: The wave is dark green, and the top half is blue.
Price is below both PDL and PML: The wave is bright red, and the bottom half is blue.
Price is between PDL and PML: The wave is dark red, and the bottom half is blue.
Price is between all four levels: The wave is gray to represent consolidation or neutral bias.
🔹20 EMA Wave Use Case:
After 12:00 PM EST, the 20 EMA Wave is used to spot larger pullbacks that form later in the session. No signals are generated from it; it only serves as a visual guide for identifying potential continuation areas.
Bullish Continuation Pullback:
Bearish Continuation Pullback:
🔹20 EMA Wave Customization:
Users can customize all colors for bullish, bearish, and neutral conditions directly in the settings. The blue overlay color cannot be changed, as it is hard-coded into the indicator. The 20 EMA Wave can also be toggled on or off.
🔹200 EMA Wave
The 200 EMA Wave is used to determine long-term trend bias. When price is above it, the bias is bullish; when price is below it, the bias is bearish. It updates automatically in real time and is used to define the broader directional bias for the day.
How it Works:
The 200 EMA Wave is created using the 190, 199, and 200 EMAs, with the area between them shaded to form a “wave.”
🔹200 EMA Wave Use Case:
When price is above the 200 EMA Wave and both the 8 and 20 EMA Waves are stacked above it, the overall trend is bullish.
When price is below the 200 EMA Wave and both shorter-term waves are also below it, the overall trend is bearish.
🔹200 EMA Wave Customization:
Users can customize both colors that form the 200 EMA Wave. The entire wave can also be toggled on or off in the settings.
Uniqueness:
The LE Levels indicator is unique because it combines signal logic with a clear visual structure. It automatically detects inside and outside setups, printing (L) and (E) entries based on how price reacts to key levels and the EMA Waves. Each signal follows strict conditions tied to the 8 EMA and key levels. The color-coded EMA Waves make it simple to understand where price is in relation to the key levels and getting a quick trend bias overview.
𝑷ortfolio𝑴𝑨𝑺𝑻𝑬𝑹 [BitAura]𝑷ortfolio𝑴𝑨𝑺𝑻𝑬𝑹
This Pine Script® indicator is meant to be used to manage a Barbell Portfolio composed of BitAura's various strategies in order to create a risk-reward balance for the investor's needs. The Portfolio is divided in two main parts, one being a lower-risk Bitcoin-only strategy while the other being the higher-risk, higher-reward 𝐑otation𝑺𝑼𝑰𝑻𝑬 V3 system. The user can choose the percentage splits between these two systems and then also configure them based on their risk profile.
Logic and Core Concepts
The 𝑷ortfolio𝑴𝑨𝑺𝑻𝑬𝑹 System uses the Barbell Portfolio theory to create a portfolio taylored for the final user and automatically calculates dollar allocation based on inputted settings.
Features
𝐑otation𝑺𝑼𝑰𝑻𝑬 : our advanced Strategy which allocates to the strongest asset amongst a pool of 4 Major Crypto Tokens, or de-risk to USD when these lack momentum.
BItcoin-only Strategy : This is theoretically a lower-risk system compared to 𝐑otation𝑺𝑼𝑰𝑻𝑬 and is made out of Universal Trend Following strategies. There are two variants, one being a Long-Term strategy (𝐂ycle𝑽𝑰𝑺𝑰𝑶𝑵) while the other one being of Medium-Term speed (𝐒wing𝑽𝑰𝑺𝑰𝑶𝑵).
Customizable Inputs : Allows users to adjust table settings, backtest date ranges, portfolio splits and portfolio dollar allocations.
Visual Outputs :
Allocation Table : Displays calculated allocation to each system based on user settings.
Equity Plots : Plots the Barbell Portfolio performance along with the two individual systems equities and allow comparisons between them and to Bitcoin Buy & Hold.
Color Presets : Offers five color themes (e.g., Arctic Blast, Fire vs. Ice) or custom color options for long/cash signals.
Pine Script v6 : Leverages matrices, tables, and gradient coloring for enhanced usability.
How to Use
Add to Chart : Apply the indicator to any chart on the 1D timeframe. The ticker doesn't matter as it doesn't affect the calculations, just make sure the ticker start date is earlier than the Backtest Start date applied in the script settings.
Input Portfolio size : Adjust the Dollar Portfolio size in the script settings in order to obtain accurate Portfolio Allocations in the respective table. Note that BitAura can't and won't be able to access your portfolio size.
Choose Barbell Split : Adjust based on your risk-profile how much to allocate to your preferred Bitcoin Strategy (default 70%) and how much to allocate to 𝐑otation𝑺𝑼𝑰𝑻𝑬 (default 30%).
Configure Systems : Select your preferred allocation type for 𝐑otation𝑺𝑼𝑰𝑻𝑬. Aggressive allocates 100% to the dominant asset, Moderate allocates 80% to the dominant asset and 20% to the second strongest one while Conservative does a 60/40 split between the first two assets.
Configure Settings : Adjust backtest start date (default: 31 Oct 2024) to properly track the Portfolio's performance.
Select Color Theme : Choose a preset color mode (e.g., Arctic Blast) or enable custom colors in the Colors group.
Monitor Outputs : Check the Table for Allocations and system signals, and view the equity curves to view the portfolio's performance.
Notes
The script is closed-source.
The script avoids lookahead bias by using barmerge.lookahead_off in request.security() calls.
The BitAura watermark can be toggled in the Script Settings .
Disclaimer : This script is for educational and analytical purposes only and does not constitute financial advice. Investing involves significant risk, and past performance is not indicative of future results. Always conduct your own research and apply proper risk management.
3:55 S&D + CE 📊 High Probability S&D Trading System (90%+ Win Rate)Transform your trading with institutional-grade Supply & Demand zones built from the critical 3:55 PM EST candle - the last key reference point of the regular trading session where smart money positions for the next day.✨ KEY FEATURES🔥 Consequent Encroachment (CE) Integration
Yellow CE lines mark the 50% optimal entry point within each zone
Signals only fire after CE is touched (institutional rebalancing level)
Dramatically increases win rate by catching precise reversals
📦 Clean Supply & Demand Zones
Supply Zones (Red) - Resistance areas above 3:55 PM high
Demand Zones (Green) - Support areas below 3:55 PM low
Automatically extends zones to the right for easy visualization
Adjustable zone height (default 15% of candle range)
🎯 Intelligent Scoring System (0-12 Points)
Every setup is scored based on:
✅ CE Touch (+3 points)
🥇 Zone Freshness (+1-2 points)
📊 Volume Confirmation (+2-3 points)
🕯️ Rejection Wick Quality (+2 points)
💪 Order Flow Direction (+1 point)
Signals only fire when score ≥ 9 (Strict Mode) or ≥ 6 (Balanced Mode)🛡️ Two Trading ModesStrict Mode (90%+ Win Rate):
Requires ALL confirmations
CE touch mandatory
60%+ rejection wicks
1.5x volume minimum
1-3 perfect setups per week
Balanced Mode (80%+ Win Rate):
More flexible requirements
6+ point minimum
2-5 setups per week
📅 Extended Historical View
View up to 50 days of supply & demand zones
Perfect for swing traders and position traders
Automatically removes exhausted zones (3+ touches)
Reversal Point Dynamics - Machine Learning⇋ Reversal Point Dynamics - Machine Learning
RPD Machine Learning: Self-Adaptive Multi-Armed Bandit Trading System
RPD Machine Learning is an advanced algorithmic trading system that implements genuine machine learning through contextual multi-armed bandits, reinforcement learning, and online adaptation. Unlike traditional indicators that use fixed rules, RPD learns from every trade outcome , automatically discovers which strategies work in current market conditions, and continuously adapts without manual intervention .
Core Innovation: The system deploys six distinct trading policies (ranging from aggressive trend-following to conservative range-bound strategies) and uses LinUCB contextual bandit algorithms with Random Fourier Features to learn which policy performs best in each market regime. After the initial learning phase (50-100 trades), the system achieves autonomous adaptation , automatically shifting between policies as market conditions evolve.
Target Users: Quantitative traders, algorithmic trading developers, systematic traders, and data-driven investors who want a system that adapts over time . Suitable for stocks, futures, forex, and cryptocurrency on any liquid instrument with >100k daily volume.
The Problem This System Solves
Traditional Technical Analysis Limitations
Most trading systems suffer from three fundamental challenges :
Fixed Parameters: Static settings (like "buy when RSI < 30") work well in backtests but may struggle when markets change character. What worked in low-volatility environments may not work in high-volatility regimes.
Strategy Degradation: Manual optimization (curve-fitting) produces systems that perform well on historical data but may underperform in live trading. The system never adapts to new market conditions.
Cognitive Overload: Running multiple strategies simultaneously forces traders to manually decide which one to trust. This leads to hesitation, late entries, and inconsistent execution.
How RPD Machine Learning Addresses These Challenges
Automated Strategy Selection: Instead of requiring you to choose between trend-following and mean-reversion strategies, RPD runs all six policies simultaneously and uses machine learning to automatically select the best one for current conditions. The decision happens algorithmically, removing human hesitation.
Continuous Learning: After every trade, the system updates its understanding of which policies are working. If the market shifts from trending to ranging, RPD automatically detects this through changing performance patterns and adjusts selection accordingly.
Context-Aware Decisions: Unlike simple voting systems that treat all conditions equally, RPD analyzes market context (ADX regime, entropy levels, volatility state, volume patterns, time of day, historical performance) and learns which combinations of context features correlate with policy success.
Machine Learning Architecture: What Makes This "Real" ML
Component 1: Contextual Multi-Armed Bandits (LinUCB)
What Is a Multi-Armed Bandit Problem?
Imagine facing six slot machines, each with unknown payout rates. The exploration-exploitation dilemma asks: Should you keep pulling the machine that's worked well (exploitation) or try others that might be better (exploration)? RPD solves this for trading policies.
Academic Foundation:
RPD implements Linear Upper Confidence Bound (LinUCB) from the research paper "A Contextual-Bandit Approach to Personalized News Article Recommendation" (Li et al., 2010, WWW Conference). This algorithm is used in content recommendation and ad placement systems.
How It Works:
Each policy (AggressiveTrend, ConservativeRange, VolatilityBreakout, etc.) is treated as an "arm." The system maintains:
Reward History: Tracks wins/losses for each policy
Contextual Features: Current market state (8-10 features including ADX, entropy, volatility, volume)
Uncertainty Estimates: Confidence in each policy's performance
UCB Formula: predicted_reward + α × uncertainty
The system selects the policy with highest UCB score , balancing proven performance (predicted_reward) with potential for discovery (uncertainty bonus). Initially, all policies have high uncertainty, so the system explores broadly. After 50-100 trades, uncertainty decreases, and the system focuses on known-performing policies.
Why This Matters:
Traditional systems pick strategies based on historical backtests or user preference. RPD learns from actual outcomes in your specific market, on your timeframe, with your execution characteristics.
Component 2: Random Fourier Features (RFF)
The Non-Linearity Challenge:
Market relationships are often non-linear. High ADX may indicate favorable conditions when volatility is normal, but unfavorable when volatility spikes. Simple linear models struggle to capture these interactions.
Academic Foundation:
RPD implements Random Fourier Features from "Random Features for Large-Scale Kernel Machines" (Rahimi & Recht, 2007, NIPS). This technique approximates kernel methods (like Support Vector Machines) while maintaining computational efficiency for real-time trading.
How It Works:
The system transforms base features (ADX, entropy, volatility, etc.) into a higher-dimensional space using random projections and cosine transformations:
Input: 8 base features
Projection: Through random Gaussian weights
Transformation: cos(W×features + b)
Output: 16 RFF dimensions
This allows the bandit to learn non-linear relationships between market context and policy success. For example: "AggressiveTrend performs well when ADX >25 AND entropy <0.6 AND hour >9" becomes naturally encoded in the RFF space.
Why This Matters:
Without RFF, the system could only learn "this policy has X% historical performance." With RFF, it learns "this policy performs differently in these specific contexts" - enabling more nuanced selection.
Component 3: Reinforcement Learning Stack
Beyond bandits, RPD implements a complete RL framework :
Q-Learning: Value-based RL that learns state-action values. Maps 54 discrete market states (trend×volatility×RSI×volume combinations) to 5 actions (4 policies + no-trade). Updates via Bellman equation after each trade. Converges toward optimal policy after 100-200 trades.
TD(λ) with Eligibility Traces: Extension of Q-Learning that propagates credit backwards through time . When a trade produces an outcome, TD(λ) updates not just the final state-action but all states visited during the trade, weighted by eligibility decay (λ=0.90). This accelerates learning from multi-bar trades.
Policy Gradient (REINFORCE): Learns a stochastic policy directly from 12 continuous market features without discretization. Uses gradient ascent to increase probability of actions that led to positive outcomes. Includes baseline (average reward) for variance reduction.
Meta-Learning: The system learns how to learn by adapting its own learning rates based on feature stability and correlation with outcomes. If a feature (like volume ratio) consistently correlates with success, its learning rate increases. If unstable, rate decreases.
Why This Matters:
Q-Learning provides fast discrete decisions. Policy Gradient handles continuous features. TD(λ) accelerates learning. Meta-learning optimizes the optimization. Together, they create a robust, multi-approach learning system that adapts more quickly than any single algorithm.
Component 4: Policy Momentum Tracking (v2 Feature)
The Recency Challenge:
Standard bandits treat all historical data equally. If a policy performed well historically but struggles in current conditions due to regime shift, the system may be slow to adapt because historical success outweighs recent underperformance.
RPD's Solution:
Each policy maintains a ring buffer of the last 10 outcomes. The system calculates:
Momentum: recent_win_rate - global_win_rate (range: -1 to +1)
Confidence: consistency of recent results (1 - variance)
Policies with positive momentum (recent outperformance) get an exploration bonus. Policies with negative momentum and high confidence (consistent recent underperformance) receive a selection penalty.
Effect: When markets shift, the system detects the shift more quickly through momentum tracking, enabling faster adaptation than standard bandits.
Signal Generation: The Core Algorithm
Multi-Timeframe Fractal Detection
RPD identifies reversal points using three complementary methods :
1. Quantum State Analysis:
Divides price range into discrete states (default: 6 levels)
Peak signals require price in top states (≥ state 5)
Valley signals require price in bottom states (≤ state 1)
Prevents mid-range signals that may struggle in strong trends
2. Fractal Geometry:
Identifies swing highs/lows using configurable fractal strength
Confirms local extremum with neighboring bars
Validates reversal only if price crosses prior extreme
3. Multi-Timeframe Confirmation:
Analyzes higher timeframe (4× default) for alignment
MTF confirmation adds probability bonus
Designed to reduce false signals while preserving valid setups
Probability Scoring System
Each signal receives a dynamic probability score (40-99%) based on:
Base Components:
Trend Strength: EMA(velocity) / ATR × 30 points
Entropy Quality: (1 - entropy) × 10 points
Starting baseline: 40 points
Enhancement Bonuses:
Divergence Detection: +20 points (price/momentum divergence)
RSI Extremes: +8 points (RSI >65 for peaks, <40 for valleys)
Volume Confirmation: +5 points (volume >1.2× average)
Adaptive Momentum: +10 points (strong directional velocity)
MTF Alignment: +12 points (higher timeframe confirms)
Range Factor: (high-low)/ATR × 3 - 1.5 points (volatility adjustment)
Regime Bonus: +8 points (trending ADX >25 with directional agreement)
Penalties:
High Entropy: -5 points (entropy >0.85, chaotic price action)
Consolidation Regime: -10 points (ADX <20, no directional conviction)
Final Score: Clamped to 40-99% range, classified as ELITE (>85%), STRONG (75-85%), GOOD (65-75%), or FAIR (<65%)
Entropy-Based Quality Filter
What Is Entropy?
Entropy measures randomness in price changes . Low entropy indicates orderly, directional moves. High entropy indicates chaotic, unpredictable conditions.
Calculation:
Count up/down price changes over adaptive period
Calculate probability: p = ups / total_changes
Shannon entropy: -p×log(p) - (1-p)×log(1-p)
Normalized to 0-1 range
Application:
Entropy <0.5: Highly ordered (ELITE signals possible)
Entropy 0.5-0.75: Mixed (GOOD signals)
Entropy >0.85: Chaotic (signals blocked or heavily penalized)
Why This Matters:
Prevents trading during choppy, news-driven conditions where technical patterns may be less reliable. Automatically raises quality bar when market is unpredictable.
Regime Detection & Market Microstructure - ADX-Based Regime Classification
RPD uses Wilder's Average Directional Index to classify markets:
Bull Trend: ADX >25, +DI > -DI (directional conviction bullish)
Bear Trend: ADX >25, +DI < -DI (directional conviction bearish)
Consolidation: ADX <20 (no directional conviction)
Transitional: ADX 20-25 (forming direction, ambiguous)
Filter Logic:
Blocks all signals during Transitional regime (avoids trading during uncertain conditions)
Blocks Consolidation signals unless ADX ≥ Min Trend Strength
Adds probability bonus during strong trends (ADX >30)
Effect: Designed to reduce signal frequency while focusing on higher-quality setups.
Divergence Detection
Bearish Divergence:
Price makes higher high
Velocity (price momentum) makes lower high
Indicates weakening upward pressure → SHORT signal quality boost
Bullish Divergence:
Price makes lower low
Velocity makes higher low
Indicates weakening downward pressure → LONG signal quality boost
Bonus: Adds probability points and additional acceleration factor. Divergence signals have historically shown higher success rates in testing.
Hierarchical Policy System - The Six Trading Policies
1. AggressiveTrend (Policy 0):
Probability Threshold: 60% (trades more frequently)
Entropy Threshold: 0.70 (tolerates moderate chaos)
Stop Multiplier: 2.5× ATR (wider stops for trends)
Target Multiplier: 5.0R (larger targets)
Entry Mode: Pyramid (scales into winners)
Best For: Strong trending markets, breakouts, momentum continuation
2. ConservativeRange (Policy 1):
Probability Threshold: 75% (more selective)
Entropy Threshold: 0.60 (requires order)
Stop Multiplier: 1.8× ATR (tighter stops)
Target Multiplier: 3.0R (modest targets)
Entry Mode: Single (one-shot entries)
Best For: Range-bound markets, low volatility, mean reversion
3. VolatilityBreakout (Policy 2):
Probability Threshold: 65% (moderate)
Entropy Threshold: 0.80 (accepts high entropy)
Stop Multiplier: 3.0× ATR (wider stops)
Target Multiplier: 6.0R (larger targets)
Entry Mode: Tiered (splits entry)
Best For: Compression breakouts, post-consolidation moves, gap opens
4. EntropyScalp (Policy 3):
Probability Threshold: 80% (very selective)
Entropy Threshold: 0.40 (requires extreme order)
Stop Multiplier: 1.5× ATR (tightest stops)
Target Multiplier: 2.5R (quick targets)
Entry Mode: Single
Best For: Low-volatility grinding moves, tight ranges, highly predictable patterns
5. DivergenceHunter (Policy 4):
Probability Threshold: 70% (quality-focused)
Entropy Threshold: 0.65 (balanced)
Stop Multiplier: 2.2× ATR (moderate stops)
Target Multiplier: 4.5R (balanced targets)
Entry Mode: Tiered
Best For: Divergence-confirmed reversals, exhaustion moves, trend climax
6. AdaptiveBlend (Policy 5):
Probability Threshold: 68% (balanced)
Entropy Threshold: 0.75 (balanced)
Stop Multiplier: 2.0× ATR (standard)
Target Multiplier: 4.0R (standard)
Entry Mode: Single
Best For: Mixed conditions, general trading, fallback when no clear regime
Policy Clustering (Advanced/Extreme Modes)
Policies are grouped into three clusters based on regime affinity:
Cluster 1 (Trending): AggressiveTrend, DivergenceHunter
High regime affinity (0.8): Performs well when ADX >25
Moderate vol affinity (0.6): Works in various volatility
Cluster 2 (Ranging): ConservativeRange, AdaptiveBlend
Low regime affinity (0.3): Better suited for ADX <20
Low vol affinity (0.4): Optimized for calm markets
Cluster 3 (Breakout): VolatilityBreakout
Moderate regime affinity (0.6): Works in multiple regimes
High vol affinity (0.9): Requires high volatility for optimal characteristics
Hierarchical Selection Process:
Calculate cluster scores based on current regime and volatility
Select best-matching cluster
Run UCB selection within chosen cluster
Apply momentum boost/penalty
This two-stage process reduces learning time - instead of choosing among 6 policies from scratch, system first narrows to 1-2 policies per cluster, then optimizes within cluster.
Risk Management & Position Sizing
Dynamic Kelly Criterion Sizing (Optional)
Traditional Fixed Sizing Challenge:
Using the same position size for all signal probabilities may be suboptimal. Higher-probability signals could justify larger positions, lower-probability signals smaller positions.
Kelly Formula:
f = (p × b - q) / b
Where:
p = win probability (from signal score)
q = loss probability (1 - p)
b = win/loss ratio (average_win / average_loss)
f = fraction of capital to risk
RPD Implementation:
Uses Fractional Kelly (1/4 Kelly default) for safety. Full Kelly is theoretically optimal but can recommend large position sizes. Fractional Kelly reduces volatility while maintaining adaptive sizing benefits.
Enhancements:
Probability Bonus: Normalize(prob, 65, 95) × 0.5 multiplier
Divergence Bonus: Additional sizing on divergence signals
Regime Bonus: Additional sizing during strong trends (ADX >30)
Momentum Adjustment: Hot policies receive sizing boost, cold policies receive reduction
Safety Rails:
Minimum: 1 contract (floor)
Maximum: User-defined cap (default 10 contracts)
Portfolio Heat: Max total risk across all positions (default 4% equity)
Multi-Mode Stop Loss System
ATR Mode (Default):
Stop = entry ± (ATR × base_mult × policy_mult)
Consistent risk sizing
Ignores market structure
Best for: Futures, forex, algorithmic trading
Structural Mode:
Finds swing low (long) or high (short) over last 20 bars
Identifies fractal pivots within lookback
Places stop below/above structure + buffer (0.1× ATR)
Best for: Stocks, instruments that respect structure
Hybrid Mode (Intelligent):
Attempts structural stop first
Falls back to ATR if:
Structural level is invalid (beyond entry)
Structural stop >2× ATR away (too wide)
Best for: Mixed instruments, adaptability
Dynamic Adjustments:
Breakeven: Move stop to entry + 1 tick after 1.0R profit
Trailing: Trail stop 0.8R behind price after 1.5R profit
Timeout: Force close after 30 bars (optional)
Tiered Entry System
Challenge: Equal sizing on all signals may not optimize capital allocation relative to signal quality.
Solution:
Tier 1 (40% of size): Enters immediately on all signals
Tier 2 (60% of size): Enters only if probability ≥ Tier 2 trigger (default 75%)
Example:
Calculated optimal size: 10 contracts
Signal probability: 72%
Tier 2 trigger: 75%
Result: Enter 4 contracts only (Tier 1)
Same signal at 80% probability
Result: Enter 10 contracts (4 Tier 1 + 6 Tier 2)
Effect: Automatically scales size to signal quality, optimizing capital allocation.
Performance Optimization & Learning Curve
Warmup Phase (First 50 Trades)
Purpose: Ensure all policies get tested before system focuses on preferred strategies.
Modifications During Warmup:
Probability thresholds reduced 20% (65% becomes 52%)
Entropy thresholds increased 20% (more permissive)
Exploration rate stays high (30%)
Confidence width (α) doubled (more exploration)
Why This Matters:
Without warmup, system might commit to early-performing policy without testing alternatives. Warmup forces thorough exploration before focusing on best-performing strategies.
Curriculum Learning
Phase 1 (Trades 1-50): Exploration
Warmup active
All policies tested
High exploration (30%)
Learning fundamental patterns
Phase 2 (Trades 50-100): Refinement
Warmup ended, thresholds normalize
Exploration decaying (30% → 15%)
Policy preferences emerging
Meta-learning optimizing
Phase 3 (Trades 100-200): Specialization
Exploration low (15% → 8%)
Clear policy preferences established
Momentum tracking fully active
System focusing on learned patterns
Phase 4 (Trades 200+): Maturity
Exploration minimal (8% → 5%)
Regime-policy relationships learned
Auto-adaptation to market shifts
Stable performance expected
Convergence Indicators
System is learning well when:
Policy switch rate decreasing over time (initially ~50%, should drop to <20%)
Exploration rate decaying smoothly (30% → 5%)
One or two policies emerge with >50% selection frequency
Performance metrics stabilizing over time
Consistent behavior in similar market conditions
System may need adjustment when:
Policy switch rate >40% after 100 trades (excessive exploration)
Exploration rate not decaying (parameter issue)
All policies showing similar selection (not differentiating)
Performance declining despite relaxed thresholds (underlying signal issue)
Highly erratic behavior after learning phase
Advanced Features
Attention Mechanism (Extreme Mode)
Challenge: Not all features are equally important. Trading hour might matter more than price-volume correlation, but standard approaches treat them equally.
Solution:
Each RFF dimension has an importance weight . After each trade:
Calculate correlation: sign(feature - 0.5) × sign(reward)
Update importance: importance += correlation × 0.01
Clamp to range
Effect: Important features get amplified in RFF transformation, less important features get suppressed. System learns which features correlate with successful outcomes.
Temporal Context (Extreme Mode)
Challenge: Current market state alone may be incomplete. Historical context (was volatility rising or falling?) provides additional information.
Solution:
Includes 3-period historical context with exponential decay (0.85):
Current features (weight 1.0)
1 bar ago (weight 0.85)
2 bars ago (weight 0.72)
Effect: Captures momentum and acceleration of market features. System learns patterns like "rising volatility with falling entropy" that may precede significant moves.
Transfer Learning via Episodic Memory
Short-Term Memory (STM):
Last 20 trades
Fast adaptation to immediate regime
High learning rate
Long-Term Memory (LTM):
Condensed historical patterns
Preserved knowledge from past regimes
Low learning rate
Transfer Mechanism:
When STM fills (20 trades), patterns consolidated into LTM . When similar regime recurs later, LTM provides faster adaptation than starting from scratch.
Practical Implementation Guide - Recommended Settings by Instrument
Futures (ES, NQ, CL):
Adaptive Period: 20-25
ML Mode: Advanced
RFF Dimensions: 16
Policies: 6
Base Risk: 1.5%
Stop Mode: ATR or Hybrid
Timeframe: 5-15 min
Forex Majors (EURUSD, GBPUSD):
Adaptive Period: 25-30
ML Mode: Advanced
RFF Dimensions: 16
Policies: 6
Base Risk: 1.0-1.5%
Stop Mode: ATR
Timeframe: 5-30 min
Cryptocurrency (BTC, ETH):
Adaptive Period: 20-25
ML Mode: Extreme (handles non-stationarity)
RFF Dimensions: 32 (captures complexity)
Policies: 6
Base Risk: 1.0% (volatility consideration)
Stop Mode: Hybrid
Timeframe: 15 min - 4 hr
Stocks (Large Cap):
Adaptive Period: 25-30
ML Mode: Advanced
RFF Dimensions: 16
Policies: 5-6
Base Risk: 1.5-2.0%
Stop Mode: Structural or Hybrid
Timeframe: 15 min - Daily
Scaling Strategy
Phase 1 (Testing - First 50 Trades):
Max Contracts: 1-2
Goal: Validate system on your instrument
Monitor: Performance stabilization, learning progress
Phase 2 (Validation - Trades 50-100):
Max Contracts: 2-3
Goal: Confirm learning convergence
Monitor: Policy stability, exploration decay
Phase 3 (Scaling - Trades 100-200):
Max Contracts: 3-5
Enable: Kelly sizing (1/4 Kelly)
Goal: Optimize capital efficiency
Monitor: Risk-adjusted returns
Phase 4 (Full Deployment - Trades 200+):
Max Contracts: 5-10
Enable: Full momentum tracking
Goal: Sustained consistent performance
Monitor: Ongoing adaptation quality
Limitations & Disclaimers
Statistical Limitations
Learning Sample Size: System requires minimum 50-100 trades for basic convergence, 200+ trades for robust learning. Early performance (first 50 trades) may not reflect mature system behavior.
Non-Stationarity Risk: Markets change over time. A system trained on one market regime may need time to adapt when conditions shift (typically 30-50 trades for adjustment).
Overfitting Possibility: With 16-32 RFF dimensions and 6 policies, system has substantial parameter space. Small sample sizes (<200 trades) increase overfitting risk. Mitigated by regularization (λ) and fractional Kelly sizing.
Technical Limitations
Computational Complexity: Extreme mode with 32 RFF dimensions, 6 policies, and full RL stack requires significant computation. May perform slowly on lower-end systems or with many other indicators loaded.
Pine Script Constraints:
No true matrix inversion (uses diagonal approximation for LinUCB)
No cryptographic RNG (uses market data as entropy)
No proper random number generation for RFF (uses deterministic pseudo-random)
These approximations reduce mathematical precision compared to academic implementations but remain functional for trading applications.
Data Requirements: Needs clean OHLCV data. Missing bars, gaps, or low liquidity (<100k daily volume) can degrade signal quality.
Forward-Looking Bias Disclaimer
Reward Calculation Uses Future Data: The RL system evaluates trades using an 8-bar forward-looking window. This means when a position enters at bar 100, the reward calculation considers price movement through bar 108.
Why This is Disclosed:
Entry signals do NOT look ahead - decisions use only data up to entry bar
Forward data used for learning only, not signal generation
In live trading, system learns identically as bars unfold in real-time
Simulates natural learning process (outcomes are only known after trades complete)
Implication: Backtested metrics reflect this 8-bar evaluation window. Live performance may vary if:
- Positions held longer than 8 bars
- Slippage/commissions differ from backtest settings
- Market microstructure changes (wider spreads, different execution quality)
Risk Warnings
No Guarantee of Profit: All trading involves substantial risk of loss. Machine learning systems can fail if market structure fundamentally changes or during unprecedented events.
Maximum Drawdown: With 1.5% base risk and 4% max total risk, expect potential drawdowns. Historical drawdowns do not predict future drawdowns. Extreme market conditions can exceed expectations.
Black Swan Events: System has not been tested under: flash crashes, trading halts, circuit breakers, major geopolitical shocks, or other extreme events. Such events can exceed stop losses and cause significant losses.
Leverage Risk: Futures and forex involve leverage. Adverse moves combined with leverage can result in losses exceeding initial investment. Use appropriate position sizing for your risk tolerance.
System Failures: Code bugs, broker API failures, internet outages, or exchange issues can prevent proper execution. Always monitor automated systems and maintain appropriate safeguards.
Appropriate Use
This System Is:
✅ A machine learning framework for adaptive strategy selection
✅ A signal generation system with probabilistic scoring
✅ A risk management system with dynamic sizing
✅ A learning system designed to adapt over time
This System Is NOT:
❌ A price prediction system (does not forecast exact prices)
❌ A guarantee of profits (can and will experience losses)
❌ A replacement for due diligence (requires monitoring and understanding)
❌ Suitable for complete beginners (requires understanding of ML concepts, risk management, and trading fundamentals)
Recommended Use:
Paper trade for 100 signals before risking capital
Start with minimal position sizing (1-2 contracts) regardless of calculated size
Monitor learning progress via dashboard
Scale gradually over several months only after consistent results
Combine with fundamental analysis and broader market context
Set account-level risk limits (e.g., maximum drawdown threshold)
Never risk more than you can afford to lose
What Makes This System Different
RPD implements academically-derived machine learning algorithms rather than simple mathematical calculations or optimization:
✅ LinUCB Contextual Bandits - Algorithm from WWW 2010 conference (Li et al.)
✅ Random Fourier Features - Kernel approximation from NIPS 2007 (Rahimi & Recht)
✅ Q-Learning, TD(λ), REINFORCE - Standard RL algorithms from Sutton & Barto textbook
✅ Meta-Learning - Learning rate adaptation based on feature correlation
✅ Online Learning - Real-time updates from streaming data
✅ Hierarchical Policies - Two-stage selection with clustering
✅ Momentum Tracking - Recent performance analysis for faster adaptation
✅ Attention Mechanism - Feature importance weighting
✅ Transfer Learning - Episodic memory consolidation
Key Differentiators:
Actually learns from trade outcomes (not just parameter optimization)
Updates model parameters in real-time (true online learning)
Adapts to changing market regimes (not static rules)
Improves over time through reinforcement learning
Implements published ML algorithms with proper citations
Conclusion
RPD Machine Learning represents a different approach from traditional technical analysis to adaptive, self-learning systems . Instead of manually optimizing parameters (which can overfit to historical data), RPD learns behavior patterns from actual trading outcomes in your specific market.
The combination of contextual bandits, reinforcement learning, random fourier features, hierarchical policy selection, and momentum tracking creates a multi-algorithm learning system designed to handle non-stationary markets better than static approaches.
After the initial learning phase (50-100 trades), the system achieves autonomous adaptation - automatically discovering which strategies work in current conditions and shifting allocation without human intervention. This represents an approach where systems adapt over time rather than remaining static.
Use responsibly. Paper trade extensively. Scale gradually. Understand that past performance does not guarantee future results and all trading involves risk of loss.
Taking you to school. — Dskyz, Trade with insight. Trade with anticipation.
ORB + INMERELO ADR + ATRThis indicator provides **two completely different but complementary lines of information** for intraday traders:
# **1. The ORB Line (ADR-Based Context Line)**
The ORB portion of the script focuses on **range expansion** relative to typical daily behavior.
### **What it measures**
* **20-day ADR (Average Daily Range)**
* **Today’s range as a % of ADR**
* **How much of the average range has been “used”** by the time you’re considering an Opening Range Breakout
### **Why it matters for ORB trading**
Successful ORBs thrive when:
* **ADR used% is low** (green) → plenty of fuel left for expansion
* **ADR used% is moderate** (orange) → breakout still possible but less explosive
* **ADR used% is high** (red) → breakout attempts often fail or reverse
### **What the indicator gives you**
A clean, color-coded readout of:
* ADR
* Today’s range
* Used%
* A simple green/orange/red evaluation of ORB quality
This allows a trader to quickly judge whether **conditions favor ORB continuation or mean-reversion reversal**—without manually calculating ranges or switching charts.
---
# **2. The INMERELO Line (ATR Stretch + MA Interaction)**
The INMERELO portion of the script is built around **mean-reversion mechanics**:
the market tends to revert back toward the **first daily MA it crosses under**.
### **How it determines the active MA**
At the start of each session, the script waits for price to cross under:
* **EMA10**
* **EMA21**
* **SMA50**
Whichever MA is crossed first becomes the **active MA** for the day.
If no cross has occurred yet, the indicator shows the **nearest MA**, so traders know exactly what the likely “INMERELO magnet” will be.
### **What it measures**
* **Stretch from the active MA (in ATR units)**
* **20-day ATR regime direction (expanding or contracting)**
* **Daily MA context: E10, E21, or S50**
### **Why it matters for INMERELOs**
This provides:
* The **target MA**
* The **distance to that MA in ATRs**
* A color-coded stretch score:
* **0.6–1.2 ATR** → prime INMERELO zone (Green)
* Moderately stretched → Orange
* Overstretched or dead zone → Red
An up/down arrow shows whether **volatility is expanding or compressing**, which affects expected retrace behavior.
### **What the indicator gives you**
All INMERELO data is displayed in a second compact line:
* Stretch to MA
* Active MA label (E10/E21/S50)
* ATR regime arrow
This allows fast identification of high-probability **mean-reversion trades back to the MA**.
---
# **Summary**
This indicator shows:
### **Line 1 → ORB Context (ADR)**
* Is the stock setup for a powerful breakout?
* How much ADR is left?
* Are you early (good) or late (risky)?
### **Line 2 → INMERELO Context (ATR + MA Stretch)**
* Which MA is in control today (EMA10, EMA21, or SMA50)?
* How many ATRs away from that MA are we?
* Is volatility expanding or contracting?
* Is this a clean INMERELO setup or not?
Together, these two lines give traders the **two most important intraday lenses**:
**range expansion (ORB)** and **mean reversion (INMERELO)**—updated every bar, without clutter.
ADX + RSI Screener FlagsThis indicator screens for ADX under a certain threshold and RSI under a certain threshold. By default set to 13 and 40, respectively, which are key levels indicating a potential bullish reversal.
Qullamagi EMA Breakout Autotrade (Crypto Futures L+S)Title: Qullamagi EMA Breakout – Crypto Autotrade
Overview
A crypto-focused, Qullamagi-style EMA breakout strategy built for autotrading on futures and perpetual swaps.
It combines a 5-MA trend stack (EMA 10/20, SMA 50/100/200), volatility contraction boxes, volume spikes and an optional higher-timeframe 200-MA filter. The script supports both long and short trades, partial take profit, trailing MA exits and percent-of-equity position sizing for automated crypto futures trading.
Key Features (Crypto)
Qullamagi MA Breakout Engine – trades only when price is aligned with a strong EMA/SMA trend and breaks out of a tight consolidation range. Longs use: Close > EMA10 > EMA20 > SMA50 > SMA100 > SMA200. Shorts are the mirror condition with all MAs sloping in the trend direction.
Strict vs Loose Modes – Strict (Daily) is designed for cleaner swing trades on 1H–4H (full MA stack, box+ATR and volume filters, optional HTF filter). Loose (Intraday) focuses on 10/20/50 alignment with relaxed filters for more frequent 15m–30m signals.
Volatility & Volume Filters for Crypto – ATR-based box height limit to detect volatility contraction, wide-candle filter to avoid chasing exhausted breakouts, and a volume spike condition requiring current volume to exceed an SMA of volume.
Higher-Timeframe Trend Filter (Optional) – uses a 200-period SMA on a higher timeframe (default: 1D). Longs only when HTF close is above the HTF 200-SMA, shorts only when it is below, helping avoid trading against dominant crypto trends.
Autotrade-Oriented Trade Management – position size as % of equity, initial stop anchored to a chosen MA (EMA10 / EMA20 / SMA50) with optional buffer, partial take profit at a configurable R-multiple, trailing MA exit for the remainder, and an optional cooldown after a full exit.
Markets & Timeframes
Best suited for BTC, ETH and major altcoin futures/perpetuals (Binance, Bybit, OKX, etc.).
Strict preset: 1H–4H charts for classic Qullamagi-style trend structure and fewer fake breakouts.
Loose preset: 15m–30m charts for higher trade frequency and more active intraday trading.
Always retune ATR length, box length, volume multiplier and position size for each symbol and exchange.
Strategy Logic (Quick Summary)
Long (Strict): MA stack in bullish alignment with all MAs sloping up → tight volatility box (ATR-based) → volume spike above SMA(volume) × multiplier → breakout above box high (close or intrabar) → optional HTF close above 200-SMA.
Short: Mirror logic: bearish MA stack, tight box, volume spike and breakdown below box low with optional HTF downtrend.
Best Practices for Crypto
Backtest on each symbol and timeframe you plan to autotrade, including commissions and slippage.
Start on higher timeframes (1H/4H) to learn the behavior, then move to 15m–30m if you want more signals.
Use the higher-timeframe filter when markets are strongly trending to reduce counter-trend trades.
Keep position-size percentage conservative until you fully understand the drawdowns.
Forward-test / paper trade before connecting to live futures accounts.
Webhook / Autotrade Integration
Designed to work with TradingView webhooks and external crypto trading bots.
Alert messages include structured fields such as: EVENT=ENTRY / SCALE_OUT / EXIT, SIDE=LONG / SHORT, STRATEGY=Qullamagi_MA.
Map each EVENT + SIDE combination to your bot logic (open long/short, partial close, full close, etc.) on your preferred exchange.
Important Notes & Disclaimer
Crypto markets are highly volatile and can change regime quickly. Backtest and forward-test thoroughly before using real capital. Higher timeframes generally produce cleaner MA structures and fewer fake breakouts.
This strategy is for educational and informational purposes only and does not constitute financial advice. Trading leveraged crypto products involves substantial risk of loss. Always do your own research, manage risk carefully, and never trade with money you cannot afford to lose.
A2Z Session First Candle High/LowThis indicator plots the High and Low of the 1st 1 minute candle of any underlying.
Session H/L + Mid + Quarters — Live EvolvingSession High and Low with quarter lines for stop progressions with lines projected back X days
ICT - Liquidity & Sessions (Modular)ICT - Liquidity & Sessions (Modular)
A modular indicator for Inner Circle Trader (ICT) concepts, displaying liquidity zones, session levels, and key price levels.
Features:
Daily Levels:
Previous Day High/Low (PDH/PDL)
Previous Day Open/Close (PDO/PDC)
True Day Open (TDO) — NY 00:00
Current Day Open
Higher Timeframe Levels:
Previous Weekly High/Low
Previous Monthly High/Low
Session Analysis:
Session boxes: Asia, London, New York, Sydney, NY Lunch
Previous session High/Low for liquidity identification
Session open vertical lines
Session midlines (50% of session range)
Customization:
Toggle any level on/off
Customize colors, line styles, and widths
Adjustable session times (NY timezone)
Session box opacity control
Light mode option
Alerts:
Price crosses PDH/PDL
Price crosses Weekly/Monthly levels
Session open notifications
Performance:
Auto-cleanup of old lines/labels
Efficient drawing to prevent chart clutter
Modular design for easy customization
How to Use:
Add the indicator to your chart
Configure session times in the "Session Times (NY)" group
Enable/disable levels in the settings
Customize colors and styles to match your preference
Set up alerts for key level breaks
Perfect for:
ICT traders identifying liquidity zones
Session-based trading strategies
Multi-timeframe analysis
Identifying key support/resistance levels
Note: This indicator uses NY timezone for session calculations. Adjust session times in the settings to match your trading hours.
💀 Death Cross - Crypto Bros💀 Death Cross – Crypto Bros
Identify the most important crossover of CRYPTO:BTCUSD and visualize attention zones before and after the event.
What This Indicator Does
The Death Cross – Crypto Bros indicator monitors the structural relationship between the 50-period and 200-period moving averages, using a selectable timeframe (default: 1D).
It provides three core features:
1. Death Cross Detection
The Death Cross occurs when the MA50 crosses below the MA200.
The indicator automatically displays:
- a 💀 callout below the candle
- a highlighted background
- optional alerts
2. Attention Zone (Before and After the Cross)
The indicator highlights bars where structural weakness is developing.
Before the Death Cross:
- MA50 above MA200
- MA50 pointing downward
- Distance between MAs ≤ 4% (configurable)
After the Death Cross:
- MA50 below MA200
- MA50 still pointing downward
- Distance between MAs ≤ 4%
This creates a clear visual map of structural weakness around the cross.
3. MA Projections
Dotted projection lines show the current slope and momentum of MA50 and MA200.
When to Use It
This indicator is designed for traders who want to:
- spot early macro weakness
- manage exposure near trend shifts
- avoid premature long entries
- track Bitcoin's macro structure
- combine it with other confluence tools
Key Settings
- Timeframe for MAs – default 1D
- Type of Moving Average – SMA (default) or EMA
- Attention Zone – background color + maximum MA distance (%)
- Projections – enable/disable dotted forward MAs
Alerts Available
You can enable:
- Death Cross Alert
Triggers when MA50 crosses downward through MA200.
- Attention Zone Start
Triggers when the Attention Zone becomes active for the first time.
Create one or both depending on your strategy.
How to Interpret the Visuals
- 💀 Highlighted Candle + Skull Icon
→ The Death Cross has occurred.
- 🟡 Attention Zone Before the Cross
→ MA50 is turning downward and approaching MA200.
- 🟠 Attention Zone After the Cross
→ Post-cross weakness remains elevated.
- 🔮 MA Projections
→ Show the directional momentum of MA50 and MA200.
Suggested Confluence Tools
For better accuracy, combine with:
- RSI
- OBV
- Market Structure (BOS/CHoCH)
- Volume
- Macro sentiment
About This Indicator
Created for the Crypto Bros community to deliver:
- clean macro trend visualization
- early warning signals
- smart exposure and risk management
Feedback & Improvements
If you’d like more features or enhancements, feel free to reach out!
Трендовые линии с продвинутыми стопами - ИндикаторUse trendline support and resistance levels. Work on all timeframes. It is necessary to select settings for each asset and timeframe. Give you sl and tp.
Trend FilterTrend Filter – Premium Trend & Range Detection Tool
Trend Filter is a premium trend-classification indicator designed to identify whether a ticker is trending Up, trending Down, or Ranging, along with a real-time Trend Confidence %.
This tool analyzes price behavior using well-known market structure and volatility concepts such as EMA expansion, relative trend slope, higher-high / higher-low analysis, and ATR-based volatility conditions.
Trend Filter presents all results in a clean table so traders can quickly understand the current market environment without monitoring multiple indicators.
Features
Detects Up, Down, or Ranging conditions
🟩 Uptrend
🟥 Downtrend
🟨 Ranging
Calculates a unified Trend Confidence %
Alerts for trend changes (Up, Down, or Ranging)
“Auto Mode” that automatically adjusts logic to match the chart timeframe
Built for intraday, swing, and multi-market use
How It Works
Trend Filter blends a combination of well-known market assessment concepts, including:
EMA spacing and expansion
Trend slope behavior
Higher-high / higher-low and lower-high / lower-low structure
Volatility and range evaluation (ATR concepts)
Momentum confirmation techniques
Alerts
Trend Filter includes the following alert conditions:
Trend turns Up
Trend turns Down
Market becomes Ranging
These alerts trigger automatically when the trend classification changes
Ideal for traders looking to:
Differentiate between trending and ranging environments
Avoid choppy or low-directional markets
Filter entries based on market structure
Gain quick clarity without complex chart setups
Disclaimer
This indicator is provided for educational purposes only and is not financial advice.
All trading involves risk. Past performance does not guarantee future results.
Users are solely responsible for their own investment decisions and for complying with all applicable laws and regulations.
ADX Below 13 ScreenerSimple indicator made for use in Pine Screener that sets value to "1" if ADX has gone below 13 in the last 5 trading bars.
Algorithm Predator - ProAlgorithm Predator - Pro: Advanced Multi-Agent Reinforcement Learning Trading System
Algorithm Predator - Pro combines four specialized market microstructure agents with a state-of-the-art reinforcement learning framework . Unlike traditional indicator mashups, this system implements genuine machine learning to automatically discover which detection strategies work best in current market conditions and adapts continuously without manual intervention.
Core Innovation: Rather than forcing traders to interpret conflicting signals, this system uses 15 different multi-armed bandit algorithms and a full reinforcement learning stack (Q-Learning, TD(λ) with eligibility traces, and Policy Gradient with REINFORCE) to learn optimal agent selection policies. The result is a self-improving system that gets smarter with every trade.
Target Users: Swing traders, day traders, and algorithmic traders seeking systematic signal generation with mathematical rigor. Suitable for stocks, forex, crypto, and futures on liquid instruments (>100k daily volume).
Why These Components Are Combined
The Fundamental Problem
No single indicator works consistently across all market regimes. What works in trending markets fails in ranging conditions. Traditional solutions force traders to manually switch indicators (slow, error-prone) or interpret all signals simultaneously (cognitive overload).
This system solves the problem through automated meta-learning: Deploy multiple specialized agents designed for specific market microstructure conditions, then use reinforcement learning to discover which agent (or combination) performs best in real-time.
Why These Specific Four Agents?
The four agents provide orthogonal failure mode coverage —each agent's weakness is another's strength:
Spoofing Detector - Optimal in consolidation/manipulation; fails in trending markets (hedged by Exhaustion Detector)
Exhaustion Detector - Optimal at trend climax; fails in range-bound markets (hedged by Liquidity Void)
Liquidity Void - Optimal pre-breakout compression; fails in established trends (hedged by Mean Reversion)
Mean Reversion - Optimal in low volatility; fails in strong trends (hedged by Spoofing Detector)
This creates complete market state coverage where at least one agent should perform well in any condition. The bandit system identifies which one without human intervention.
Why Reinforcement Learning vs. Simple Voting?
Traditional consensus systems have fatal flaws: equal weighting assumes all agents are equally reliable (false), static thresholds don't adapt, and no learning means past mistakes repeat indefinitely.
Reinforcement learning solves this through the exploration-exploitation tradeoff: Continuously test underused agents (exploration) while primarily relying on proven winners (exploitation). Over time, the system builds a probability distribution over agent quality reflecting actual market performance.
Mathematical Foundation: Multi-armed bandit problem from probability theory, where each agent is an "arm" with unknown reward distribution. The goal is to maximize cumulative reward while efficiently learning each arm's true quality.
The Four Trading Agents: Technical Explanation
Agent 1: 🎭 Spoofing Detector (Institutional Manipulation Detection)
Theoretical Basis: Market microstructure theory on order flow toxicity and information asymmetry. Based on research by Easley, López de Prado, and O'Hara on high-frequency trading manipulation.
What It Detects:
1. Iceberg Orders (Hidden Liquidity Absorption)
Method: Monitors volume spikes (>2.5× 20-period average) with minimal price movement (<0.3× ATR)
Formula: score += (close > open ? -2.5 : 2.5) when volume > vol_avg × 2.5 AND abs(close - open) / ATR < 0.3
Interpretation: Large volume without price movement indicates institutional absorption (buying) or distribution (selling) using hidden orders
Signal Logic: Contrarian—fade false breakouts caused by institutional manipulation
2. Spoofing Patterns (Fake Liquidity via Layering)
Method: Analyzes candlestick wick-to-body ratios during volume spikes
Formula: if upper_wick > body × 2 AND volume_spike: score += 2.0
Mechanism: Spoofing creates large wicks (orders pulled before execution) with volume evidence
Signal Logic: Wick direction indicates trapped participants; trade against the failed move
3. Post-Manipulation Reversals
Method: Tracks volume decay after manipulation events
Formula: if volume > vol_avg × 3 AND volume / volume < 0.3: score += (close > open ? -1.5 : 1.5)
Interpretation: Sharp volume drop after manipulation indicates exhaustion of manipulative orders
Why It Works: Institutional manipulation creates detectable microstructure anomalies. While retail traders see "mysterious reversals," this agent quantifies the order flow patterns causing them.
Parameter: i_spoof (sensitivity 0.5-2.0) - Controls detection threshold
Best Markets: Consolidations before breakouts, London/NY overlap windows, stocks with institutional ownership >70%
Agent 2: ⚡ Exhaustion Detector (Momentum Failure Analysis)
Theoretical Basis: Technical analysis divergence theory combined with VPIN reversals from market microstructure literature.
What It Detects:
1. Price-RSI Divergence (Momentum Deceleration)
Method: Compares 5-bar price ROC against RSI change
Formula: if price_roc > 5% AND rsi_current < rsi : score += 1.8
Mathematics: Second derivative detecting inflection points
Signal Logic: When price makes higher highs but momentum makes lower highs, expect mean reversion
2. Volume Exhaustion (Buying/Selling Climax)
Method: Identifies strong price moves (>5% ROC) with declining volume (<-20% volume ROC)
Formula: if price_roc > 5 AND vol_roc < -20: score += 2.5
Interpretation: Price extension without volume support indicates retail chasing while institutions exit
3. Momentum Deceleration (Acceleration Analysis)
Method: Compares recent 3-bar momentum to prior 3-bar momentum
Formula: deceleration = abs(mom1) < abs(mom2) × 0.5 where momentum significant (> ATR)
Signal Logic: When rate of price change decelerates significantly, anticipate directional shift
Why It Works: Momentum is lagging, but momentum divergence is leading. By comparing momentum's rate of change to price, this agent detects "weakening conviction" before reversals become obvious.
Parameter: i_momentum (sensitivity 0.5-2.0)
Best Markets: Strong trends reaching climax, parabolic moves, instruments with high retail participation
Agent 3: 💧 Liquidity Void Detector (Breakout Anticipation)
Theoretical Basis: Market liquidity theory and order book dynamics. Based on research into "liquidity holes" and volatility compression preceding expansion.
What It Detects:
1. Bollinger Band Squeeze (Volatility Compression)
Method: Monitors Bollinger Band width relative to 50-period average
Formula: bb_width = (upper_band - lower_band) / middle_band; triggers when < 0.6× average
Mathematical Foundation: Regression to the mean—low volatility precedes high volatility
Signal Logic: When volatility compresses AND cumulative delta shows directional bias, anticipate breakout
2. Volume Profile Gaps (Thin Liquidity Zones)
Method: Identifies sharp volume transitions indicating few limit orders
Formula: if volume < vol_avg × 0.5 AND volume < vol_avg × 0.5 AND volume > vol_avg × 1.5
Interpretation: Sudden volume drop after spike indicates price moved through order book to low-opposition area
Signal Logic: Price accelerates through low-liquidity zones
3. Stop Hunts (Liquidity Grabs Before Reversals)
Method: Detects new 20-bar highs/lows with immediate reversal and rejection wick
Formula: if new_high AND close < high - (high - low) × 0.6: score += 3.0
Mechanism: Market makers push price to trigger stop-loss clusters, then reverse
Signal Logic: Enter reversal after stop-hunt completes
Why It Works: Order book theory shows price moves fastest through zones with minimal liquidity. By identifying these zones before major moves, this agent provides early entry for high-reward breakouts.
Parameter: i_liquidity (sensitivity 0.5-2.0)
Best Markets: Range-bound pre-breakout setups, volatility compression zones, instruments prone to gap moves
Agent 4: 📊 Mean Reversion (Statistical Arbitrage Engine)
Theoretical Basis: Statistical arbitrage theory, Ornstein-Uhlenbeck mean-reverting processes, and pairs trading methodology applied to single instruments.
What It Detects:
1. Z-Score Extremes (Standard Deviation Analysis)
Method: Calculates price distance from 20-period and 50-period SMAs in standard deviation units
Formula: zscore_20 = (close - SMA20) / StdDev(50)
Statistical Interpretation: Z-score >2.0 means price is 2 standard deviations above mean (97.5th percentile)
Trigger Logic: if abs(zscore_20) > 2.0: score += zscore_20 > 0 ? -1.5 : 1.5 (fade extremes)
2. Ornstein-Uhlenbeck Process (Mean-Reverting Stochastic Model)
Method: Models price as mean-reverting stochastic process: dx = θ(μ - x)dt + σdW
Implementation: Calculates spread = close - SMA20, then z-score of spread vs. spread distribution
Formula: ou_signal = (spread - spread_mean) / spread_std
Interpretation: Measures "tension" pulling price back to equilibrium
3. Correlation Breakdown (Regime Change Detection)
Method: Compares 50-period price-volume correlation to 10-period correlation
Formula: corr_breakdown = abs(typical_corr - recent_corr) > 0.5
Enhancement: if corr_breakdown AND abs(zscore_20) > 1.0: score += zscore_20 > 0 ? -1.2 : 1.2
Why It Works: Mean reversion is the oldest quantitative strategy (1970s pairs trading at Morgan Stanley). While simple, it remains effective because markets exhibit periodic equilibrium-seeking behavior. This agent applies rigorous statistical testing to identify when mean reversion probability is highest.
Parameter: i_statarb (sensitivity 0.5-2.0)
Best Markets: Range-bound instruments, low-volatility periods (VIX <15), algo-dominated markets (forex majors, index futures)
Multi-Armed Bandit System: 15 Algorithms Explained
What Is a Multi-Armed Bandit Problem?
Origin: Named after slot machines ("one-armed bandits"). Imagine facing multiple slot machines, each with unknown payout rates. How do you maximize winnings?
Formal Definition: K arms (agents), each with unknown reward distribution with mean μᵢ. Goal: Maximize cumulative reward over T trials. Challenge: Balance exploration (trying uncertain arms to learn quality) vs. exploitation (using known-best arm for immediate reward).
Trading Application: Each agent is an "arm." After each trade, receive reward (P&L). Must decide which agent to trust for next signal.
Algorithm Categories
Bayesian Approaches (probabilistic, optimal for stationary environments):
Thompson Sampling
Bootstrapped Thompson Sampling
Discounted Thompson Sampling
Frequentist Approaches (confidence intervals, deterministic):
UCB1
UCB1-Tuned
KL-UCB
SW-UCB (Sliding Window)
D-UCB (Discounted)
Adversarial Approaches (robust to non-stationary environments):
EXP3-IX
Hedge
FPL-Gumbel
Reinforcement Learning Approaches (leverage learned state-action values):
Q-Values (from Q-Learning)
Policy Network (from Policy Gradient)
Simple Baseline:
Epsilon-Greedy
Softmax
Key Algorithm Details
Thompson Sampling (DEFAULT - RECOMMENDED)
Theoretical Foundation: Bayesian decision theory with conjugate priors. Published by Thompson (1933), rediscovered for bandits by Chapelle & Li (2011).
How It Works:
Model each agent's reward distribution as Beta(α, β) where α = wins, β = losses
Each step, sample from each agent's beta distribution: θᵢ ~ Beta(αᵢ, βᵢ)
Select agent with highest sample: argmaxᵢ θᵢ
Update winner's distribution after observing outcome
Mathematical Properties:
Optimality: Achieves logarithmic regret O(K log T) (proven optimal)
Bayesian: Maintains probability distribution over true arm means
Automatic Balance: High uncertainty → more exploration; high certainty → exploitation
⚠️ CRITICAL APPROXIMATION: This is a pseudo-random approximation of true Thompson Sampling. True implementation requires random number generation from beta distributions, which Pine Script doesn't provide. This version uses Box-Muller transform with market data (price/volume decimal digits) as entropy source. While not mathematically pure, it maintains core exploration-exploitation balance and learns agent preferences effectively.
When To Use: Best all-around choice. Handles non-stationary markets reasonably well, balances exploration naturally, highly sample-efficient.
UCB1 (Upper Confidence Bound)
Formula: UCB_i = reward_mean_i + sqrt(2 × ln(total_pulls) / pulls_i)
Interpretation: First term (exploitation) + second term (exploration bonus for less-tested arms)
Mathematical Properties:
Deterministic : Always selects same arm given same state
Regret Bound: O(K log T) — same optimality as Thompson Sampling
Interpretable: Can visualize confidence intervals
When To Use: Prefer deterministic behavior, want to visualize uncertainty, stable markets
EXP3-IX (Exponential Weights - Adversarial)
Theoretical Foundation: Adversarial bandit algorithm. Assumes environment may be actively hostile (worst-case analysis).
How It Works:
Maintain exponential weights: w_i = exp(η × cumulative_reward_i)
Select agent with probability proportional to weights: p_i = (1-γ)w_i/Σw_j + γ/K
After outcome, update with importance weighting: estimated_reward = observed_reward / p_i
Mathematical Properties:
Adversarial Regret: O(sqrt(TK log K)) even if environment is adversarial
No Assumptions: Doesn't assume stationary or stochastic reward distributions
Robust: Works even when optimal arm changes continuously
When To Use: Extreme non-stationarity, don't trust reward distribution assumptions, want robustness over efficiency
KL-UCB (Kullback-Leibler Upper Confidence Bound)
Theoretical Foundation: Uses KL-divergence instead of Hoeffding bounds. Tighter confidence intervals.
Formula (conceptual): Find largest q such that: n × KL(p||q) ≤ ln(t) + 3×ln(ln(t))
Mathematical Properties:
Tighter Bounds: KL-divergence adapts to reward distribution shape
Asymptotically Optimal: Better constant factors than UCB1
Computationally Intensive: Requires iterative binary search (15 iterations)
When To Use: Maximum sample efficiency needed, willing to pay computational cost, long-term trading (>500 bars)
Q-Values & Policy Network (RL-Based Selection)
Unique Feature: Instead of treating agents as black boxes with scalar rewards, these algorithms leverage the full RL state representation .
Q-Values Selection:
Uses learned Q-values: Q(state, agent_i) from Q-Learning
Selects agent via softmax over Q-values for current market state
Advantage: Selects based on state-conditional quality (which agent works best in THIS market state)
Policy Network Selection:
Uses neural network policy: π(agent | state, θ) from Policy Gradient
Direct policy over agents given market features
Advantage: Can learn non-linear relationships between market features and agent quality
When To Use: After 200+ RL updates (Q-Values) or 500+ updates (Policy Network) when models converged
Machine Learning & Reinforcement Learning Stack
Why Both Bandits AND Reinforcement Learning?
Critical Distinction:
Bandits treat agents as contextless black boxes: "Agent 2 has 60% win rate"
Reinforcement Learning adds state context: "Agent 2 has 60% win rate WHEN trend_score > 2 and RSI < 40"
Power of Combination: Bandits provide fast initial learning with minimal assumptions. RL provides state-dependent policies for superior long-term performance.
Component 1: Q-Learning (Value-Based RL)
Algorithm: Temporal Difference Learning with Bellman equation.
State Space: 54 discrete states formed from:
trend_state = {0: bearish, 1: neutral, 2: bullish} (3 values)
volatility_state = {0: low, 1: normal, 2: high} (3 values)
RSI_state = {0: oversold, 1: neutral, 2: overbought} (3 values)
volume_state = {0: low, 1: high} (2 values)
Total states: 3 × 3 × 3 × 2 = 54 states
Action Space: 5 actions (No trade, Agent 1, Agent 2, Agent 3, Agent 4)
Total state-action pairs: 54 × 5 = 270 Q-values
Bellman Equation:
Q(s,a) ← Q(s,a) + α ×
Parameters:
α (learning rate): 0.01-0.50, default 0.10 - Controls step size for updates
γ (discount factor): 0.80-0.99, default 0.95 - Values future rewards
ε (exploration): 0.01-0.30, default 0.10 - Probability of random action
Update Mechanism:
Position opens with state s, action a (selected agent)
Every bar position is open: Calculate floating P&L → scale to reward
Perform online TD update
When position closes: Perform terminal update with final reward
Gradient Clipping: TD errors clipped to ; Q-values clipped to for stability.
Why It Works: Q-Learning learns "quality" of each agent in each market state through trial and error. Over time, builds complete state-action value function enabling optimal state-dependent agent selection.
Component 2: TD(λ) Learning (Temporal Difference with Eligibility Traces)
Enhancement Over Basic Q-Learning: Credit assignment across multiple time steps.
The Problem TD(λ) Solves:
Position opens at t=0
Market moves favorably at t=3
Position closes at t=8
Question: Which earlier decisions contributed to success?
Basic Q-Learning: Only updates Q(s₈, a₈) ← reward
TD(λ): Updates ALL visited state-action pairs with decayed credit
Eligibility Trace Formula:
e(s,a) ← γ × λ × e(s,a) for all s,a (decay all traces)
e(s_current, a_current) ← 1 (reset current trace)
Q(s,a) ← Q(s,a) + α × TD_error × e(s,a) (update all with trace weight)
Lambda Parameter (λ): 0.5-0.99, default 0.90
λ=0: Pure 1-step TD (only immediate next state)
λ=1: Full Monte Carlo (entire episode)
λ=0.9: Balance (recommended)
Why Superior: Dramatically faster learning for multi-step tasks. Q-Learning requires many episodes to propagate rewards backwards; TD(λ) does it in one.
Component 3: Policy Gradient (REINFORCE with Baseline)
Paradigm Shift: Instead of learning value function Q(s,a), directly learn policy π(a|s).
Policy Network Architecture:
Input: 12 market features
Hidden: None (linear policy)
Output: 5 actions (softmax distribution)
Total parameters: 12 features × 5 actions + 5 biases = 65 parameters
Feature Set (12 Features):
Price Z-score (close - SMA20) / ATR
Volume ratio (volume / vol_avg - 1)
RSI deviation (RSI - 50) / 50
Bollinger width ratio
Trend score / 4 (normalized)
VWAP deviation
5-bar price ROC
5-bar volume ROC
Range/ATR ratio - 1
Price-volume correlation (20-period)
Volatility ratio (ATR / ATR_avg - 1)
EMA50 deviation
REINFORCE Update Rule:
θ ← θ + α × ∇log π(a|s) × advantage
where advantage = reward - baseline (variance reduction)
Why Baseline? Raw rewards have high variance. Subtracting baseline (running average) centers rewards around zero, reducing gradient variance by 50-70%.
Learning Rate: 0.001-0.100, default 0.010 (much lower than Q-Learning because policy gradients have high variance)
Why Policy Gradient?
Handles 12 continuous features directly (Q-Learning requires discretization)
Naturally maintains exploration through probability distribution
Can converge to stochastic optimal policy
Component 4: Ensemble Meta-Learner (Stacking)
Architecture: Level-1 meta-learner combines Level-0 base learners (Q-Learning, TD(λ), Policy Gradient).
Three Meta-Learning Algorithms:
1. Simple Average (Baseline)
Final_prediction = (Q_prediction + TD_prediction + Policy_prediction) / 3
2. Weighted Vote (Reward-Based)
weight_i ← 0.95 × weight_i + 0.05 × (reward_i + 1)
3. Adaptive Weighting (Gradient-Based) — RECOMMENDED
Loss Function: L = (y_true - ŷ_ensemble)²
Gradient: ∂L/∂weight_i = -2 × (y_true - ŷ_ensemble) × agent_contribution_i
Updates weights via gradient descent with clipping and normalization
Why It Works: Unlike simple averaging, meta-learner discovers which base learner is most reliable in current regime. If Policy Gradient excels in trending markets while Q-Learning excels in ranging, meta-learner learns these patterns and weights accordingly.
Feature Importance Tracking
Purpose: Identify which of 12 features contribute most to successful predictions.
Update Rule: importance_i ← 0.95 × importance_i + 0.05 × |feature_i × reward|
Use Cases:
Feature selection: Drop low-importance features
Market regime detection: Importance shifts reveal regime changes
Agent tuning: If VWAP deviation has high importance, consider boosting agents using VWAP
RL Position Tracking System
Critical Innovation: Proper reinforcement learning requires tracking which decisions led to outcomes.
State Tracking (When Signal Validates):
active_rl_state ← current_market_state (0-53)
active_rl_action ← selected_agent (1-4)
active_rl_entry ← entry_price
active_rl_direction ← 1 (long) or -1 (short)
active_rl_bar ← current_bar_index
Online Updates (Every Bar Position Open):
floating_pnl = (close - entry) / entry × direction
reward = floating_pnl × 10 (scale to meaningful range)
reward = clip(reward, -5.0, 5.0)
Update Q-Learning, TD(λ), and Policy Gradient
Terminal Update (Position Close):
Final Q-Learning update (no next Q-value, terminal state)
Update meta-learner with final result
Update agent memory
Clear position tracking
Exit Conditions:
Time-based: ≥3 bars held (minimum hold period)
Stop-loss: 1.5% adverse move
Take-profit: 2.0% favorable move
Market Microstructure Filters
Why Microstructure Matters
Traditional technical analysis assumes fair, efficient markets. Reality: Markets have friction, manipulation, and information asymmetry. Microstructure filters detect when market structure indicates adverse conditions.
Filter 1: VPIN (Volume-Synchronized Probability of Informed Trading)
Theoretical Foundation: Easley, López de Prado, & O'Hara (2012). "Flow Toxicity and Liquidity in a High-Frequency World."
What It Measures: Probability that current order flow is "toxic" (informed traders with private information).
Calculation:
Classify volume as buy or sell (close > close = buy volume)
Calculate imbalance over 20 bars: VPIN = |Σ buy_volume - Σ sell_volume| / Σ total_volume
Compare to moving average: toxic = VPIN > VPIN_MA(20) × sensitivity
Interpretation:
VPIN < 0.3: Normal flow (uninformed retail)
VPIN 0.3-0.4: Elevated (smart money active)
VPIN > 0.4: Toxic flow (informed institutions dominant)
Filter Logic:
Block LONG when: VPIN toxic AND price rising (don't buy into institutional distribution)
Block SHORT when: VPIN toxic AND price falling (don't sell into institutional accumulation)
Adaptive Threshold: If VPIN toxic frequently, relax threshold; if rarely toxic, tighten threshold. Bounded .
Filter 2: Toxicity (Kyle's Lambda Approximation)
Theoretical Foundation: Kyle (1985). "Continuous Auctions and Insider Trading."
What It Measures: Price impact per unit volume — market depth and informed trading.
Calculation:
price_impact = (close - close ) / sqrt(Σ volume over 10 bars)
impact_zscore = (price_impact - impact_mean) / impact_std
toxicity = abs(impact_zscore)
Interpretation:
Low toxicity (<1.0): Deep liquid market, large orders absorbed easily
High toxicity (>2.0): Thin market or informed trading
Filter Logic: Block ALL SIGNALS when toxicity > threshold. Most dangerous when price breaks from VWAP with high toxicity.
Filter 3: Regime Filter (Counter-Trend Protection)
Purpose: Prevent counter-trend trades during strong trends.
Trend Scoring:
trend_score = 0
trend_score += close > EMA8 ? +1 : -1
trend_score += EMA8 > EMA21 ? +1 : -1
trend_score += EMA21 > EMA50 ? +1 : -1
trend_score += close > EMA200 ? +1 : -1
Range:
Regime Classification:
Strong Bull: trend_score ≥ +3 → Block all SHORT signals
Strong Bear: trend_score ≤ -3 → Block all LONG signals
Neutral: -2 ≤ trend_score ≤ +2 → Allow both directions
Filter 4: Liquidity Boost (Signal Enhancer)
Unique: Unlike other filters (which block), this amplifies signals during low liquidity.
Logic: if volume < vol_avg × 0.7: agent_scores × 1.2
Why It Works: Low liquidity often precedes explosive moves (breakouts). By increasing agent sensitivity during compression, system catches pre-breakout signals earlier.
Technical Implementation & Approximations
⚠️ Critical Approximations Required by Pine Script
1. Thompson Sampling: Pseudo-Random Beta Distribution
Academic Standard: True random sampling from beta distributions using cryptographic RNG
This Implementation: Box-Muller transform for normal distribution using market data (price/volume decimal digits) as entropy source, then scale to beta distribution mean/variance
Impact: Not cryptographically random, may have subtle biases in specific price ranges, but maintains correct mean and approximate variance. Sufficient for bandit agent selection.
2. VPIN: Simplified Volume Classification
Academic Standard: Lee-Ready algorithm or exchange-provided aggressor flags with tick-by-tick data
This Implementation: Bar-based classification: if close > close : buy_volume += volume
Impact: 10-15% precision loss. Works well in directional markets, misclassifies in choppy conditions. Still captures order flow imbalance signal.
3. Policy Gradient: Simplified Per-Action Updates
Academic Standard: Full softmax gradient updating all actions (selected action UP, others DOWN proportionally)
This Implementation: Only updates selected action's weights
Impact: Valid approximation for small action spaces (5 actions). Slower convergence than full softmax but still learns optimal policy.
4. Kyle's Lambda: Simplified Price Impact
Academic Standard: Regression over multiple time scales with signed order flow
This Implementation: price_impact = Δprice_10 / sqrt(Σvolume_10); z_score calculation
Impact: 15-20% precision loss. No proper signed order flow. Still detects informed trading signals at extremes (>2σ).
5. Other Simplifications:
Hawkes Process: Fixed exponential decay (0.9) not MLE-optimized
Entropy: Ratio approximation not true Shannon entropy H(X) = -Σ p(x)·log₂(p(x))
Feature Engineering: 12 features vs. potential 100+ with polynomial interactions
RL Hybrid Updates: Both online and terminal (non-standard but empirically effective)
Overall Precision Loss Estimate: 10-15% compared to academic implementations with institutional data feeds.
Practical Trade-off: For retail trading with OHLCV data, these approximations provide 90%+ of the edge while maintaining full transparency, zero latency, no external dependencies, and runs on any TradingView plan.
How to Use: Practical Guide
Initial Setup (5 Minutes)
Select Trading Mode: Start with "Balanced" for most users
Enable ML/RL System: Toggle to TRUE, select "Full Stack" ML Mode
Bandit Configuration: Algorithm: "Thompson Sampling", Mode: "Switch" or "Blend"
Microstructure Filters: Enable all four filters, enable "Adaptive Microstructure Thresholds"
Visual Settings: Enable dashboard (Top Right), enable all chart visuals
Learning Phase (First 50-100 Signals)
What To Monitor:
Agent Performance Table: Watch win rates develop (target >55%)
Bandit Weights: Should diverge from uniform (0.25 each) after 20-30 signals
RL Core Metrics: "RL Updates" should increase when position open
Filter Status: "Blocked" count indicates filter activity
Optimization Tips:
Too few signals: Lower min_confidence to 0.25, increase agent sensitivities to 1.1-1.2
Too many signals: Raise min_confidence to 0.35-0.40, decrease agent sensitivities to 0.8-0.9
One agent dominates (>70%): Consider "Lock Agent" feature
Signal Interpretation
Dashboard Signal Status:
⚪ WAITING FOR SIGNAL: No agent signaling
⏳ ANALYZING...: Agent signaling but not confirmed
🟡 CONFIRMING 2/3: Building confirmation (2 of 3 bars)
🟢 LONG ACTIVE : Validated long entry
🔴 SHORT ACTIVE : Validated short entry
Kill Zone Boxes: Entry price (triangle marker), Take Profit (Entry + 2.5× ATR), Stop Loss (Entry - 1.5× ATR). Risk:Reward = 1:1.67
Risk Management
Position Sizing:
Risk per trade = 1-2% of capital
Position size = (Capital × Risk%) / (Entry - StopLoss)
Stop-Loss Placement:
Initial: Entry ± 1.5× ATR (shown in kill zone)
Trailing: After 1:1 R:R achieved, move stop to breakeven
Take-Profit Strategy:
TP1 (2.5× ATR): Take 50% off
TP2 (Runner): Trail stop at 1× ATR or use opposite signal as exit
Memory Persistence
Why Save Memory: Every chart reload resets the system. Saving learned parameters preserves weeks of learning.
When To Save: After 200+ signals when agent weights stabilize
What To Save: From Memory Export panel, copy all alpha/beta/weight values and adaptive thresholds
How To Restore: Enable "Restore From Saved State", input all values into corresponding fields
What Makes This Original
Innovation 1: Genuine Multi-Armed Bandit Framework
This implements 15 mathematically rigorous bandit algorithms from academic literature (Thompson Sampling from Chapelle & Li 2011, UCB family from Auer et al. 2002, EXP3 from Auer et al. 2002, KL-UCB from Garivier & Cappé 2011). Each algorithm maintains proper state, updates according to proven theory, and converges to optimal behavior. This is real learning, not superficial parameter changes.
Innovation 2: Full Reinforcement Learning Stack
Beyond bandits learning which agent works best globally, RL learns which agent works best in each market state. After 500+ positions, system builds 54-state × 5-action value function (270 learned parameters) capturing context-dependent agent quality.
Innovation 3: Market Microstructure Integration
Combines retail technical analysis with institutional-grade microstructure metrics: VPIN from Easley, López de Prado, O'Hara (2012), Kyle's Lambda from Kyle (1985), Hawkes Processes from Hawkes (1971). These detect informed trading, manipulation, and liquidity dynamics invisible to technical analysis.
Innovation 4: Adaptive Threshold System
Dynamic quantile-based thresholds: Maintains histogram of each agent's score distribution (24 bins, exponentially decayed), calculates 80th percentile threshold from histogram. Agent triggers only when score exceeds its own learned quantile. Proper non-parametric density estimation automatically adapts to instrument volatility, agent behavior shifts, and market regime changes.
Innovation 5: Episodic Memory with Transfer Learning
Dual-layer architecture: Short-term memory (last 20 trades, fast adaptation) + Long-term memory (condensed episodes, historical patterns). Transfer mechanism consolidates knowledge when STM reaches threshold. Mimics hippocampus → neocortex consolidation in human memory.
Limitations & Disclaimers
General Limitations
No Predictive Guarantee: Pattern recognition ≠ prediction. Past performance ≠ future results.
Learning Period Required: Minimum 50-100 bars for reliable statistics. Initial performance may be suboptimal.
Overfitting Risk: System learns patterns in historical data. May not generalize to unprecedented conditions.
Approximation Limitations: See technical implementation section (10-15% precision loss vs. academic standards)
Single-Instrument Limitation: No multi-asset correlation, sector context, or VIX integration.
Forward-Looking Bias Disclaimer
CRITICAL TRANSPARENCY: The RL system uses an 8-bar forward-looking window for reward calculation.
What This Means: System learns from rewards incorporating future price information (bars 101-108 relative to entry at bar 100).
Why Acceptable:
✅ Signals do NOT look ahead: Entry decisions use only data ≤ entry bar
✅ Learning only: Forward data used for optimization, not signal generation
✅ Real-time mirrors backtest: In live trading, system learns identically
⚠️ Implication: Dashboard "Agent Win%" reflects this 8-bar evaluation. Real-time performance may differ slightly if positions held longer, slippage/fees not captured, or market microstructure changes.
Risk Warnings
No Guarantee of Profit: All trading involves risk of loss
System Failures: Bugs possible despite extensive testing
Market Conditions: Optimized for liquid markets (>100k daily volume). Performance degrades in illiquid instruments, major news events, flash crashes
Broker-Specific Issues: Execution slippage, commission/fees, overnight financing costs
Appropriate Use
This Indicator Is:
✅ Entry trigger system
✅ Risk management framework (stop/target)
✅ Adaptive agent selection engine
✅ Learning system that improves over time
This Indicator Is NOT:
❌ Complete trading strategy (requires position sizing, portfolio management)
❌ Replacement for fundamental analysis
❌ Guaranteed profit generator
❌ Suitable for complete beginners without training
Recommended Complementary Analysis: Market context (support/resistance), volume profile, fundamental catalysts, correlation with related instruments, broader market regime
Recommended Settings by Instrument
Stocks (Large Cap, >$1B):
Mode: Balanced | ML/RL: Enabled, Full Stack | Bandit: Thompson Sampling, Switch
Agent Sensitivity: Spoofing 1.0-1.2, Exhaustion 0.9-1.1, Liquidity 0.8-1.0, StatArb 1.1-1.3
Microstructure: All enabled, VPIN 1.2, Toxicity 1.5 | Timeframe: 15min-1H
Forex Majors (EURUSD, GBPUSD):
Mode: Balanced to Conservative | ML/RL: Enabled, Full Stack | Bandit: Thompson Sampling, Blend
Agent Sensitivity: Spoofing 0.8-1.0, Exhaustion 0.9-1.1, Liquidity 0.7-0.9, StatArb 1.2-1.5
Microstructure: All enabled, VPIN 1.0-1.1, Toxicity 1.3-1.5 | Timeframe: 5min-30min
Crypto (BTC, ETH):
Mode: Aggressive to Balanced | ML/RL: Enabled, Full Stack | Bandit: Thompson Sampling OR EXP3-IX
Agent Sensitivity: Spoofing 1.2-1.5, Exhaustion 1.1-1.3, Liquidity 1.2-1.5, StatArb 0.7-0.9
Microstructure: All enabled, VPIN 1.4-1.6, Toxicity 1.8-2.2 | Timeframe: 15min-4H
Futures (ES, NQ, CL):
Mode: Balanced | ML/RL: Enabled, Full Stack | Bandit: UCB1 or Thompson Sampling
Agent Sensitivity: All 1.0-1.2 (balanced)
Microstructure: All enabled, VPIN 1.1-1.3, Toxicity 1.4-1.6 | Timeframe: 5min-30min
Conclusion
Algorithm Predator - Pro synthesizes academic research from market microstructure theory, reinforcement learning, and multi-armed bandit algorithms. Unlike typical indicator mashups, this system implements 15 mathematically rigorous bandit algorithms, deploys a complete RL stack (Q-Learning, TD(λ), Policy Gradient), integrates institutional microstructure metrics (VPIN, Kyle's Lambda), adapts continuously through dual-layer memory and meta-learning, and provides full transparency on approximations and limitations.
The system is designed for serious algorithmic traders who understand that no indicator is perfect, but through proper machine learning, we can build systems that improve over time and adapt to changing markets without manual intervention.
Use responsibly. Risk disclosure applies. Past performance ≠ future results.
Taking you to school. — Dskyz, Trade with insight. Trade with anticipation.
Трендовые линии с продвинутыми стопамиtrend analysis strategy can work in every trend on the market.
Multi-Confluence Signal System📊 OPTIMIZED MULTI-CONFLUENCE SIGNAL SYSTEM
A professional-grade trading indicator that combines multiple technical analysis methods to generate high-probability buy and sell signals. Designed for daily timeframe Bitcoin/crypto trading with optimized parameters based on real market backtesting.
🎯 KEY FEATURES:
- Multi-Confluence Scoring (8 components) - Each signal shows strength rating
- Smart Top & Bottom Detection - Catches reversals using price action patterns
- Ichimoku Cloud Integration - Dynamic support/resistance visualization
- Dual EMA System (20/50) - Clear trend identification
- RSI + MACD + Volume Confirmation - Multi-indicator validation
- Signal Alternation - Only shows directional changes (no repeated signals)
- Minimal Bar Spacing - Prevents signal clustering and overtrading
✅ OPTIMIZED FOR:
- Catching parabolic tops with rejection wicks
- Identifying capitulation bottoms in downtrends
- Avoiding false signals during consolidation
- 4-8 quality signals per 4-month period on daily charts
- Works in both trending and volatile markets
🔧 TECHNICAL COMPONENTS:
- EMA 20/50 trend system
- RSI (14) with adjusted overbought/oversold levels (68/32)
- MACD for momentum confirmation
- Ichimoku Cloud for trend context
- Volume analysis (1.3x threshold)
- Candlestick pattern recognition (engulfing, hammers, shooting stars)
- Capitulation detection for extreme moves
- Price extension filters (±5-10% from EMAs)
⚠️ BEST PRACTICES:
- Optimized for Daily timeframe
- Combine with your own risk management
- Higher scores = higher probability trades
- Wait for signal confirmation on candle close
- Use in conjunction with key support/resistance levels
💡 SIGNAL LOGIC:
BUY signals trigger on: Capitulation candles, extreme oversold + reversal patterns, MACD turnarounds in downtrends, or high confluence scores with bullish patterns
SELL signals trigger on: Rejection wicks at tops, bearish engulfings with overbought RSI, parabolic extensions, MACD reversals, or high confluence scores with bearish patterns
📈 Created through iterative backtesting and optimization on Bitcoin price action from 2024-2025.
⭐ Free to use • Leave feedback • Happy trading!
Buy Sell Entry Filter SYS (SMC IDM LIT)BUY SELL Entry FILTER
An advanced market analysis tool. It provides visual Buy/Sell signals in the form of triangles (▲▼), as well as analytical elements such as Entry/Stop Loss lines, a delta table, overbought and oversold zones, structural market elements with breakouts, displays information from higher time frames, and most importantly, liquidity blocks that trigger reactions. The indicator has a number of built-in filters that help remove unnecessary Buy/Sell signals from the chart. This allows you to create several profitable strategies. You don't need to sit in front of the charts; the alert system (ALERTS) will tell you when to pay attention to the chart and quickly enter a trade.
There are many signals, and the ▲▼ lines themselves are not an entry point. You need to filter them using other tools, such as liquidity blocks (LB and HTF LB), trend, OS/OB, Delta, and Pullback breakout.
If the ▲▼ appears in the right place, for example, in the liquidity block with the correct trend and the correct delta, then you can enter a trade!
Ideally, take short trades of 1/3 – 1/5 RR on a 1-minute timeframe and be sure to set a stop loss.
Remember! You are solely responsible for your deposit!
Buy/Sell, Entry/SL, OS/OB, Filter, EMA, Delta
This main group of settings is responsible for generating buy and sell signals, setting filters, and displaying moving averages.
1. Buy/Sell Main: Enables/disables the display of the main Buy/Sell signal as a ▲▼. This is a specific pattern that identifies potential trend reversals or continuations.
Buy/Sell Simple: Toggles the display of a simplified Buy/Sell signal in the ▲▼ pattern.
This pattern is less powerful than the main one, but works well in certain contexts.
2. Trend Delta Table: Displays a table on the chart showing the cumulative volume delta for the current trend, as well as the percentage. Useful for assessing the strength of a trend.
3. Entry/SL: When enabled, draws horizontal lines on the chart for Entry and Stop Loss.
4. Filters (Delta, Trend, OS/OB, HTF OS/OB):
These filters help filter out false signals. A Buy/Sell signal is displayed only if it passes all enabled filters:
Delta Filter: A signal is generated if the volume percentage delta (set by the user) matches the signal direction (positive for Buy, negative for Sell).
Trend Filter (EMA): A signal is generated if it matches the trend direction.
OS/OB Filter (RSI): A signal is generated if the price where the signal formed is in the desired zone (below Oversold for Buy, above Overbought for Sell).
HTF OS/OB Filter (RSI): Same as OS/OB, but uses the RSI on a higher timeframe (HTF).
EMA 1 & EMA 2: Displays two exponential moving averages on the chart (default 50 and 100). The line color changes (e.g., green if EMA1 is above EMA2).
Overbought/oversold zone
This group configures overbought/oversold levels and zones, both on the current and higher timeframes.
1. OS/OB zone: Enables/disables the display of dynamic overbought (Oversold) and oversold (Overbought) levels. These levels "float," adapting to the current price. 2. Period: Period for calculating zones (default 50)
OS: Level below which the Oversold zone is defined (default 40).
OB: Level above which the Overbought zone is defined (default 60).
Labels: Toggles the display of text labels (--- OB, --- OS) next to the corresponding levels.
Mid: Toggles the display of the center level and its color.
HTF Zones & Labels: Same as for OS/OB, but for levels on a higher timeframe (HTF).
Smooth: Enables smoothing for calculated price levels of zones, making the lines less sharp.
Structure / Breakout line
This setting adds structural analysis elements and breakout lines to the chart. 1. BO Lines (Breakout Lines): Displays horizontal lines on the chart when the price breaks through the external pullback against the trend, thus showing ChoCh.
2. HH/LL: Displays markers (HH - LL - HL - LH) on the chart to indicate key market structural points.________________________________________
Pullbacks EXT/INT
This setting is responsible for the visualization of pullback lines (Pullback) at external (EXT) and internal (INT) levels.
1. Ext (External): Displays lines connecting external extremes (Pullback), showing potential pullback levels.
2. Int (Internal): Displays lines connecting internal extremes (Pullback).
3. Pending Ext/Int: Displays potential pullback lines that may form if the price reaches the next extreme.
Liquidity blocks
Adds visual rectangles (blocks) to the chart, representing potential liquidity zones (where large orders were placed).
1. LB tune: Parameter determining how many candles are used to determine the pattern for a block.
2. High zone: Color of the line inside the block, indicating the strongest part of the block.
3. Show deleted: Shows deleted (broken) blocks in a different color.
4. Volume LB: Enables/disables the display of the volume value in the block.
Quick liquidity blocks
Similar to main blocks, but creates quick blocks. If a quick block is confirmed, it becomes the main LB; if not, it disappears.
1. Quick LB: Enables/disables quick blocks.
2. QLB tune: Pattern length parameter for quick blocks.
HTF liquidity blocks
Displays LB from a higher timeframe (HTF), using the same principles as main blocks. 1. HTF: Enable/disable HTF blocks.
2. Select a timeframe for calculation.
Alerts
A system for alerting you to important indicator actions. Alerts are triggered by certain events.
1. Bull PB Breakout / Bear PB Breakout: Alert when the external pullback is broken and a ChoCh is formed.
2. Trend Change: Alert when a trend changes.
3. New Block: Alert when a new main liquidity block is formed.
4. New HTF Block: Alert when a new HTF liquidity block is formed.
5. Touch Block: Alert when the price of the main liquidity block is touched.
6. Touch HTF Block: Alert when the price of the HTF liquidity block is touched.
7. Touch mode / Touch mode HTF: Select the alert frequency (before or after the bar closes).
This indicator provides a powerful and flexible tool for market analysis, combining several approaches in a single interface.






















