Nifty-50 Futures trading ideas with RSI and ADX FilterNifty Futures @15M is a trend-following strategy derived from the Savitzky Flow Bands methodology by ChartPrime , adapted into a complete strategy with structured trade execution and risk controls.
The strategy identifies directional bias using a Savitzky-smoothed price structure and executes trades based on trend changes or continuation, depending on the selected entry mode.
Configurable Entry Modes are : 1. Change Only (trend reversal based) 2.Continuation Allowed (trend follow-through).
Optional ADX + DI and RSI filters help validate trend strength and avoid unfavorable market conditions.
Risk management features include configurable Stop-Loss and Take-Profit, ATR-based exits, trailing stop, and separate maximum loss per trade (₹) for long and short positions.
Date and session filters are provided for controlled backtesting.
This script is published for educational and analytical purposes only and is intended for research and backtesting, not as a trading signal or investment recommendation.
Credits:
Original indicator concept: Savitzky Flow Bands by ChartPrime
Strategy conversion & enhancements: @Alpha_Trinity
Jalur dan Saluran
Victor aimstar future strategyThis script "The Next Pivot" uses various similarity measures to compare historical price sequences to the current price sequence!
Features
Find the most similar price sequence up to 100 bars from the current bar
Forecast price path up to 250 bars
Forecast ZigZag up to 250 bars
Spearmen
Pearson
Absolute Difference
Cosine Similarity
Mean Squared Error
Kendall
Forecasted linear regression channel
Victor aimstar future strategyThis script "The Next Pivot" uses various similarity measures to compare historical price sequences to the current price sequence!
Features
Find the most similar price sequence up to 100 bars from the current bar
Forecast price path up to 250 bars
Forecast ZigZag up to 250 bars
Spearmen
Pearson
Absolute Difference
Cosine Similarity
Mean Squared Error
Kendall
Forecasted linear regression channel
Victor aimstar Present strategyHere we have created an envelope indicator based on Kernel Smoothing with integrated alerts from crosses between the price and envelope extremities. Unlike the Nadaraya-Watson estimator, this indicator follows a contrarian methodology.
Please note that by default this indicator can be subject to repainting. Users can use a non-repainting smoothing method available from the settings. The triangle labels are designed so that the indicator remains useful in real-time applications.
Auto Trend [theUltimator5]The Auto Trend indicator was designed to be a unique pattern detection indicator without the use of standard pivot point logic or high/low lines. It is a study in pattern detection by using iterative best-fit logic.
The indicator automatically identifies and draws trend channels by analyzing price action across configurable lookback periods. It finds optimal high and low trendlines that contain price movement, with a middle line marking the trend's center.
Key Features:
Automatic Pattern Detection - Intelligently searches for the best lookback period where price stays within the channel boundaries
Dual Pattern Modes - Choose between Short (20-66 bars) for quick patterns or Long (50-500 bars) for extended trends. Note - the long pattern is fully configurable and can be set anywhere up to 5000 bars.
Smart Caching - Optimized performance that only recalculates when necessary
Customizable Starting Point - Click directly on the chart to set where the trend channel begins
Flexible Lookback Range - Set minimum and maximum lookback periods to match your trading style
Visual Debugging - Optional label displays the active lookback period and violation count
How It Works:
The indicator divides the lookback period into thirds, finds the highest and lowest closes in the first and last thirds, then draws trendlines connecting these points. It can automatically search through different lookback periods to find the one with the fewest price violations (closes outside the channel).
Settings:
Use Auto Lookback - Enable automatic optimal lookback detection
Pattern Length - Short (faster, 1-bar increments) or Long (broader, 5-bar increments)
Min/Max Lookback - Define the search range for the Long pattern
Manual Lookback - Override auto-detection with a fixed period
Custom Colors - Personalize the high, low, and middle line colors
Starting Point - Select where the trend analysis begins
Use Cases:
Identify dominant trend channels across different timeframes
Spot potential support and resistance levels
Determine trend strength and consistency
Time entries and exits based on channel position
The indicator supports up to 5000 bars of historical data for comprehensive trend analysis.
$$\text{Entry and Exit Signals (RSI, MACD, Stochastic)}$$بالتأكيد. إليك شرح كامل للكود البرمجي (Pine Script) الذي يمثل استراتيجية مؤشر الزخم الثلاثي (RSI, MACD, Stochastic) باللغة الإنجليزية، مع توضيح منطق كل شرط:
-----
## 🇺🇸 Multi-Indicator Momentum Confirmation Strategy (Pine Script Explanation)
This custom indicator is designed to generate highly confirmed **Entry (Buy)** and **Exit (Sell/Short)** signals by ensuring that three key momentum and oscillator indicators—**RSI, MACD, and Stochastic**—are all aligned in the same direction.
### 📜 Indicator Code Structure
```pinescript
//@version=5
indicator("إشارات الدخول والخروج (RSI, MACD, Stochastic)", overlay=true)
// --- 1. Indicator Settings (Inputs) ---
rsiLength = input.int(14, title="RSI Length")
rsiLevel = input.float(50, title="Positive RSI Level")
// ... MACD and Stochastic inputs
// --- 2. Calculation of Indicators ---
rsiValue = ta.rsi(close, rsiLength)
= ta.macd(close, fastLength, slowLength, signalLength)
stochK = ta.stoch(close, high, low, stochKLength)
// --- 3. Entry (Bullish) and Exit (Bearish) Conditions ---
//
// --- 4. Final Signal Determination ---
finalEntrySignal = rsiCondition_Bullish and macdCondition_Bullish and stochCondition_Bullish
finalExitSignal = rsiCondition_Bearish and macdCondition_Bearish and stochCondition_Bearish
// --- 5. Plotting the Signals ---
plotshape(
finalEntrySignal ? low : na,
style=shape.labelup,
location=location.belowbar,
text="دخول", // 'Entry'
// ... color and size settings
)
plotshape(
finalExitSignal ? high : na,
style=shape.labeldown,
location=location.abovebar,
text="خروج", // 'Exit'
// ... color and size settings
)
```
### 🧠 Logic Behind the Entry Signal ("دخول" - Buy)
A **"Entry" (Buy)** signal is generated when **ALL THREE** of the following bullish conditions are met on the same candlestick:
| Indicator | Bullish Condition (The Logic) | Why this ensures strong momentum? |
| :--- | :--- | :--- |
| **Relative Strength Index (RSI)** | **Positive AND Increasing:** (`rsiValue > 50`) AND (`rsiValue > rsiValue `) | The asset is not only gaining strength (above the 50 centerline) but its strength is actively **accelerating** (current value is higher than the previous one). |
| **Moving Average Convergence Divergence (MACD)** | **Bullish Crossover:** `macdLine > signalLine` | This indicates that the shorter-term momentum (MACD Line) has crossed above the longer-term momentum average (Signal Line), confirming a potential shift to bullish momentum. |
| **Stochastic Oscillator** | **Positive:** `stochK > 50` | The closing price is in the upper half of the recent price range, suggesting that buying pressure is dominating the current trend cycle. |
**The `finalEntrySignal` is triggered only when `RSI_Bullish AND MACD_Bullish AND Stochastic_Bullish` are true.**
-----
### 📉 Logic Behind the Exit Signal ("خروج" - Sell/Short)
A **"Exit" (Sell/Short)** signal is generated when **ALL THREE** of the following bearish conditions are met on the same candlestick:
| Indicator | Bearish Condition (The Logic) | Why this ensures strong momentum loss? |
| :--- | :--- | :--- |
| **Relative Strength Index (RSI)** | **Negative AND Decreasing:** (`rsiValue < 50`) AND (`rsiValue < rsiValue `) | The asset is losing strength (below the 50 centerline) and its weakness is actively **accelerating** (current value is lower than the previous one). |
| **Moving Average Convergence Divergence (MACD)** | **Bearish Crossover:** `macdLine < signalLine` | The shorter-term momentum has crossed below the Signal Line, confirming a potential shift to bearish momentum. |
| **Stochastic Oscillator** | **Negative:** `stochK < 50` | The closing price is in the lower half of the recent price range, suggesting that selling pressure is dominating the current trend cycle. |
**The `finalExitSignal` is triggered only when `RSI_Bearish AND MACD_Bearish AND Stochastic_Bearish` are true.**
### 💡 Visual Output
* **Entry Signal:** Plotted as a green label with the text "دخول" (**Entry**) **below the bar** (`location.belowbar`).
* **Exit Signal:** Plotted as a red label with the text "خروج" (**Exit**) **above the bar** (`location.abovebar`).
This strategy aims to filter out weak signals by requiring a high level of consensus across multiple technical dimensions.
BTC SCALPING 2-3 SET UP A DAY (ANOTHER CHRISTMAS PRESENT) Philosophy
1. Philosophy: High-Frequency Crypto Momentum. Designed for aggressive, high-frequency trading on the 15-minute BTC timeframe.
The primary goal is to capture quick, decisive price movements, aiming for two to three setups per day.
It utilizes a fast-tuned Ichimoku Tenkan and Kijun to identify short-term trend and key support/resistance levels.
The system operates under the principle that the highest probability short-term profits occur during periods of strong momentum or immediate rejection of a key moving average (Kijun).
Risk is managed strictly using dynamic ATR-based and structural stop levels, with profit taking achieved through a high Risk-to-Reward (R:R) target or a protective trailing stop.
2. Trading Rules (15m Timeframe)
Entry Conditions (One of Three Signals Required)
1. Cross Signal (Trend Break):
A Long entry occurs when Tenkan crosses over Kijun, confirmed by a strong momentum bar, OR when a prior bar had a cross and the current bar shows immediate follow-through (closing above the prior high).
A Short entry occurs when Tenkan crosses under Kijun, confirmed by a strong momentum bar, OR when a prior bar had a cross and the current bar shows immediate follow-through (closing below the prior low).
2. Bounce Signal (Kijun Rejection):
A Long entry occurs when the price touches Kijun but closes above it, showing a strong rejection from the low.
A Short entry occurs when the price touches Kijun but closes below it, showing a strong rejection from the high.
3. Momentum Signal (Breakout Continuation):
A Long entry occurs when the close is greater than the prior bar's high, the price is above both Tenkan and Kijun, and the price has been rising for at least two bars, confirmed by a strong bar.
A Short entry occurs when the close is less than the prior bar's low, the price is below both Tenkan and Kijun, and the price has been falling for at least two bars, confirmed by a strong bar.
Cooldown Filter: An entry is blocked if the trade is being triggered within one bar of the last executed entry.
Exit and Risk Management
Stop Loss (SL) Calculation: The stop is placed at the recent structural Swing High (for shorts) or Swing Low (for longs), plus or minus an ATR buffer of 1.3.
A hard maximum stop loss is enforced at 4.0 times the ATR distance from the entry price.
Take Profit (TP) Target: The target is set for a fixed 3:1 Risk to Reward ratio.
Trailing Stop: A trailing stop is used to lock in profits, trailing the price by an offset of 2.0 times the ATR value.
The trade is closed immediately upon hitting the Stop Loss, the Take Profit limit, or the Trailing Stop level.
Abyss Protocol OneAbyss Protocol One — Momentum Exhaustion Trading System
Overview
Abyss Protocol One is a momentum exhaustion indicator designed to identify high-probability reversal points by detecting when price momentum has reached extreme levels. It combines Chande Momentum Oscillator (CMO) threshold signals with dynamic volatility-adjusted bands and multiple protective filters to generate buy and sell signals.
Core Concept
The indicator operates on the principle that extreme momentum readings (CMO reaching ±80) often precede mean reversion. Rather than chasing trends, Abyss Protocol waits for momentum exhaustion before signaling entries and exits.
Key Components
1. Dynamic Bands (Money Line ± ATR)
Center line uses linear regression (Money Line) for smooth trend representation
Bands expand and contract based on Bollinger Band Width Percentile (BBWP)
Low volatility (BBWP < 30): Tighter bands using lower multiplier
High volatility (BBWP > 70): Wider bands using higher multiplier
Bands visually adapt to current market conditions
2. CMO Exhaustion Signals
BUY Signal: CMO drops below -80 (oversold/momentum exhaustion to downside)
SELL Signal: CMO rises above +80 (overbought/momentum exhaustion to upside)
Thresholds are configurable for different assets and timeframes
3. ADX Filter
Signals only fire when ADX exceeds minimum threshold (default: 22)
Ensures there's enough directional movement to trade
Prevents signals during choppy, directionless markets
4. Band Contraction Filter
Calculates band width percentile rank over configurable lookback
When bands are contracted (below 18th percentile), ALL signals are blocked
Prevents trading during low-volatility squeeze periods where breakout direction is uncertain
5. Consecutive Buy Limit
Maximum of 3 consecutive buys allowed before a sell is required
Prevents overexposure during extended downtrends
Counter resets when a sell signal fires
6. Underwater Protection
Tracks rolling average of recent entry prices (last 10 entries within 7 days)
Blocks sell signals if current price is below average entry price
Prevents locking in losses during drawdowns
7. Signal Cooldown
Minimum 5-bar cooldown between signals
Prevents rapid-fire signals during volatile swings
8. Extreme Move Detection
Detects when price penetrates beyond bands by more than 0.6 × ATR
Extreme signals can bypass normal cooldown period
Fire intra-bar for faster response to capitulation/blow-off moves
Still respects max consecutive buys and underwater protection
Visual Features
Trend State Detection
The indicator classifies market conditions into six states based on EMA stack, price position, and directional indicators:
STRONG UP: Full bullish alignment (EMA stack + price above trend + bullish DI + ADX > threshold)
UP: Moderate bullish conditions
NEUTRAL: No clear directional bias
DOWN: Moderate bearish conditions
STRONG DOWN: Full bearish alignment
CONTRACTED: Bands squeezed, volatility low
ADX Trend Bar
Colored dots at chart bottom provide instant trend state visibility:
Lime = Strong Uptrend
Blue = Uptrend
Orange = Neutral
Red = Downtrend
Maroon = Strong Downtrend
White = Contracted
Volume Spike Highlighting
Purple background highlights candles where volume exceeds 2x the 20-bar average, helping identify institutional activity or significant market events.
Signal Labels
Buy labels show consecutive buy count (e.g., "BUY 2/3"), price, and CMO value
Sell labels show consecutive sell count, price, and CMO value
Extreme signals display in distinct colors (cyan for buys, fuchsia for sells)
Signal candles turn bright blue for easy identification
Info Panel
Real-time dashboard displaying:
Current trend state
CMO value with threshold status
CMO thresholds (buy/sell levels)
ADX with directional indicator (▲/▼) and signal eligibility
BBWP percentage
Buy/Sell counters
Average entry price (with underwater shield indicator 🛡 when protected)
Price position relative to Money Line
Band width percentile rank
Extreme move status
Signals status (OPEN/BLOCKED)
Recommended Use
Timeframe: 5-15 minute charts (parameters tuned for this range)
Best suited for: Assets with regular oscillations between overbought/oversold extremes
Trading style: Mean reversion, momentum exhaustion, scaled entries
Parameters Summary
Money Line Length: 12 — Smoothing for center line
ATR Length: 10 — Volatility measurement
Band Multiplier (Low/High Vol): 1.5 / 2.5 — Dynamic band width
CMO Length: 9 — Momentum calculation period
CMO Buy/Sell Threshold: -80 / +80 — Signal trigger levels
ADX Min for Signals: 22 — Minimum trend strength
Signal Cooldown: 5 bars — Minimum bars between signals
Max Consecutive Buys: 3 — Position scaling limit
Band Contraction Threshold: 18th %ile — Low volatility filter
Band Contraction Lookback: 188 bars — Percentile calculation period
Extreme Penetration: 0.6 × ATR — Threshold for extreme signals
AJ Super Blast SignalsPrice action trading script suited for all TF, it will work on all instruments NIFTY/ BANK NIFTY/COMMODITY/SENSEX/ MIDCAP NIIFTY AND CRYPTOCURRENCY....IT HELPS TO AVOID SIDEWAYS MARKET SIGNALS WHICH PREVIOUS SCRIPTS DOESNT DO
Estrategia_XAU_1m_NYEstrategia para el par XAU/USD temporalidad 1 minuto, de 9:30 a 10:00 am New York. Solo media hora al dia.
Strategy for the XAU/USD pair, 1-minute timeframe, from 9:30 to 10:00 am New York. Only half an hour per day.
Smart Money Liquidity Structure AlgoSmart Money Liquidity Structure Algo is a rule-based trading strategy designed to analyze market structure, liquidity zones, and volatility conditions.
The script combines structure breakout logic, volatility filtering, order-block style price gaps, and Supertrend direction to generate systematic long and short signals.
This strategy is intended for educational and research purposes, helping traders study how liquidity, structure, and trend alignment can be combined into a single framework.
All signals are generated objectively using predefined conditions without repainting after bar close.
The strategy includes built-in risk management logic using ATR-based stop-loss and trailing exit mechanisms.
⚙️ Core Logic Overview
Market structure based on pivot-derived support and resistance
Volatility normalization filter to avoid low-activity periods
Price gap detection inspired by order-block concepts
Supertrend-based directional confirmation
Time-based holding logic before exits are allowed
✨ Features
Rule-based long and short entries
Liquidity & structure breakout detection
Volatility-filtered signal generation
Optional Supertrend trend filter
ATR-based stop-loss and trailing exits
Non-repainting logic after candle close
🧪 How to Use
Apply on liquid markets such as crypto, indices, or forex
Works best on intraday to higher timeframes
Adjust volatility filter and ATR multiplier based on the instrument
Always forward-test and paper-trade before live use
⚠️ Disclaimer
This script is not financial advice.
Trading involves risk, and past performance does not guarantee future results.
Use this strategy for analysis, testing, and educational purposes only.
Fibonacci Fibonacci automatic drawing - Last 144 barFibonacci automatic drawing:
It automatically plots Fibonacci based on the last 144 bars.
According to the drawing rules, it calculates itself from bottom to top and from top to bottom.
This will answer the most challenging questions about drawing the right thing.
If 144 bar is not reached, it draws using manual input.
This will be a useful and practical perspective.
This is for those who want to see the most valuable Fibonacci values on a chart.
O.R.B. New York (Opening Range)- Creates open range at New York Open (9:30am - 9:45am)
- Only shows most recent opening range for New York session (prevents clutter)
- Asset Classes: Micro Gold, Micro Silver, Micro ES, Micro NQ.
Smart Chart Patterns: Breakout Boxes## Abstract
This script is an algorithmic pattern recognition tool designed to identify, validate, and trade classical reversal structures (Double/Triple Tops and Bottoms). Unlike subjective drawing tools, this indicator employs a quantitative approach to geometry. It utilizes Volatility Normalization to ensure that angle detection works consistently across all asset classes—from high-priced assets like Bitcoin to low-volatility Forex pairs—without requiring manual recalibration.
## Methodology & Features
1. Pivot Chaining & Integrity Checks The algorithm identifies Swing Highs and Swing Lows (Pivots). It then "chains" them together to form resistance or support barriers.
Integrity Check: The script strictly enforces that price action between pivots must not violate the connecting line. If price cuts through the line, the pattern is invalidated immediately.
2. Angled vs. Horizontal Structures
Angled Mode: Allows for "channel-like" tops and bottoms (e.g., Rising Wedges or Descending Channels) up to a user-defined volatility-adjusted angle.
Horizontal Mode: If angled lines are disabled, the script applies a strict 1-degree tolerance filter, identifying only classical "Flat" Double/Triple patterns.
3. Trend Filtering To reduce false positives in ranging markets, the script includes a directional filter:
Double Tops are only validated if preceded by a quantitative Uptrend.
Double Bottoms are only validated if preceded by a quantitative Downtrend.
Trend Strength is measured by the net price displacement relative to ATR over a lookback period.
4. Automated Risk Management Upon pattern confirmation (breakout), the script automatically projects:
Target (Green): Projected based on the vertical height of the pattern (Pivot to Neckline).
Stop Loss (Red): Calculated dynamically using the Neckline ± (1.5 * ATR), adapting to current market volatility.
## Settings Guide
Min Touches: Set to 2 for Double patterns, 3 for Triple patterns.
Trend Filter: Enable to ensure the pattern is reversing an existing trend.
Angle Control: Adjusts the maximum allowed slope. Because this is normalized, 15.0 is a robust default for almost all assets.
Targets & Stops: Toggles the automated SL/TP lines and adjusts their multipliers.
Kairos QX Indicator [v1.7]What’s New in v1.7?
Streak Analytics (Dashboard Expansion):
The dashboard now tracks Winning and Losing Streaks.
Max Consec. (TP / SL): Displays the highest number of wins and losses that occurred in a row (e.g., 5 / 3).
Avg Consec. (TP / SL): Calculates the average length of your winning and losing streaks (e.g., 2.4 / 1.8).
Updated Default "settings" for MNQ 5 MIN Candles
Full Script Description
This script is a professional-grade Mean Reversion & Trend Following Engine designed for automated execution. It acts as a bridge between discretionary chart analysis and algorithmic trading, allowing you to backtest complex ideas visually and then automate them via alerts without writing code.
1. Core Logic: The "Flip Switch" Strategy
Standard Mode (Mean Reversion):
The script identifies "exhaustion" points where price pierces the Bollinger Bands.
It bets on a reversal (e.g., Price > Upper Band = Short).
Inverse Mode (Trend Following - Default):
With the "Inverse Trades" box checked, the logic flips.
It identifies "breakout" points where price pierces the bands.
It bets on continuation (e.g., Price > Upper Band = Long).
2. Advanced Automation & Safety Features
This system is built to drive trading bots (like TradersPost or 3Commas) safely:
State-Aware Execution: It tracks its own trades (in_trade state). It will never fire a duplicate "Open" signal if a trade is already active, preventing accidental pyramiding.
No Trade Zone (Force Close): You can define a specific time window (default 15:10–17:00). If a trade is open when this time hits, the script immediately triggers a Close Alert, preventing overnight holds.
Signal Cooldown: Configurable "Signals to Skip" allows you to force a cooldown period after a trade closes to avoid over-trading in choppy conditions.
3. Real-Time Analytics Dashboard
The on-chart table provides a transparent, real-time backtest of your settings:
Equity Calculator: You can set a dollar value per point (e.g., $2 for MNQ). The dashboard calculates your estimated Net Profit/Loss based on the total points gained.
Streak Analysis: Shows both the Maximum and Average number of consecutive wins and losses, helping you understand the psychological difficulty of trading the strategy.
Data Integrity: It automatically detects "N/A" trades (candles that hit both SL and TP) and excludes them from the Win Rate calculation to ensure realistic statistics.
4. Modular "Recipe" Building
The strategy is highly customizable via the settings menu (no coding required). You can filter the Bollinger Band trigger with 10 different indicators:
Supported Filters: RSI, Stochastic, CCI, Williams %R, MFI, CMO, Fisher Transform, Ultimate Oscillator, and ROC.
Logic: All selected filters must agree with the main trigger for a trade to fire.
5. Visual Projection Engine
Glowing Outcomes: The script draws exact TP (Green) and SL (Red) boxes for past trades. These boxes glow to indicate the result, allowing for rapid visual verification of the strategy's performance.
Force Close Markers: Special gray markers appear on the chart where a trade was forced to close due to the "No Trade Zone" time limit.
Weekend Asia High/Low Dots + Trading Window (UTC+1)**Weekend Asia High/Low Dots & Trading Window** is a lightweight TradingView indicator designed to **mark the exact Asia session extremes on weekends (Saturday & Sunday)** and highlight predefined **trading time windows** with maximum clarity and minimal chart clutter.
The indicator focuses on **precision, simplicity, and manual trading workflows**.
---
### 🔍 Key Features
#### 🟢 Asia Session High & Low (Weekend Only)
* Tracks the **Asia session on Saturday and Sunday**
* Marks **exactly two points per session**:
* One dot at the **true wick high**
* One dot at the **true wick low**
* Dots are plotted **only once**, at the **end of the Asia session**
* **No lines, no boxes, no extensions** – just clean reference points
* Ideal for traders who prefer to **draw their own ranges manually**
#### 🟩 Trading Window Highlight
* Customizable **trading time windows** for Saturday and Sunday
* Displayed as a **clean outline box** (no background fill)
* Helps visually separate **range formation** from **active trading hours**
---
### ⏰ Time Handling
* All session times are defined in **UTC+1**
* Uses a **fixed UTC+1 timezone** (`Etc/GMT-1`) for consistent behavior
* Easily adjustable to other timezones if needed
---
### ⚙️ Customizable Inputs
* Asia session times (Saturday & Sunday)
* Trading session times (Saturday & Sunday)
* Optional trading window labels
* Easy point size adjustment directly in the code
---
### 🎯 Use Cases
* Weekend trading (Crypto, Indices, Synthetic markets)
* Asia range analysis
* Manual range drawing & breakout planning
* Clean, distraction-free chart layouts
---
### 🧠 Who Is This Indicator For?
* Price action traders
* Range & session-based traders
* Traders who prefer **manual chart markup**
* Anyone trading **weekends with structured time windows**
---
### 🛠 Technical Details
* Pine Script® **Version 6**
* Overlay indicator
* Optimized for clarity and performance
---
If you want, I can also provide:
* a **short description** (1–2 lines for the TradingView header)
* **tags & keywords** for better discoverability
* or a **version with user-adjustable dot size via Inputs**
HPDR Bands AdvancedCalculates the historical median of the given range and draws the percentile bands.
Kairos QX Indicator [v1.6]This script, Kairos QX , is a sophisticated, highly customizable trading engine designed for automated execution. It serves as a bridge between discretionary charting and algorithmic trading, allowing you to visually backtest complex ideas and then automate them via alerts.
Its core logic is built on Mean Reversion, but it features a powerful "Inverse Mode" that instantly transforms it into a Trend Following system.
1. The Core Strategy: Mean Reversion (Default)
By default, the script operates on the principle that price eventually returns to an average value after an extreme move.
Logic: It fades the move.
Short Signal: Price pierces the Upper Bollinger Band (overbought) + optional confluence filters (e.g., RSI > 70). The bet is that price will revert down.
Long Signal: Price pierces the Lower Bollinger Band (oversold) + optional confluence filters. The bet is that price will revert up.
2. The "Inverse Mode": Trend Following (Flip Switch)
The script includes a unique Inverse Trades checkbox that flips the entire logic engine. This allows you to adapt to market conditions where price isn't reverting but is instead "running" hard.
Logic: It rides the breakout.
Short Signal becomes Long: When price pierces the Upper Bollinger Band, instead of shorting (expecting a drop), the script enters Long (expecting the trend to blast through and continue higher).
Long Signal becomes Short: When price pierces the Lower Bollinger Band, the script enters Short, betting on a trend continuation downward.
Why this matters: If your backtest shows a failing Mean Reversion strategy (e.g., a "F" grade), flipping this switch can instantly invert those losses into wins by aligning with the trend instead of fighting it.
3. Built for Automation & Safety
The script is engineered to safely drive third-party auto-trading bots (like TradersPost, 3Commas, or PineConnector) without manual intervention.
State-Aware Execution: The script tracks its own trade state. It will never fire a duplicate "Open" signal if a trade is already active, preventing accidental double-entries.
No Trade Zone (Force Close): You can set a specific time window (e.g., 15:55 PM) where the script automatically triggers a Close Alert for any open position. This protects you from holding day trades overnight or through major news events.
Signal Cooldown: To prevent over-trading in choppy markets, you can set the script to ignore the next 1-5 signals after a trade finishes, forcing it to wait for a fresh setup.
4. Modular "Recipe" Building
You don't need to know code to change the strategy. The settings menu allows you to mix and match 10 different indicators as confluence filters.
Example Recipe: "Only take a Mean Reversion Long if: Price is below the Bollinger Band AND RSI is < 30 AND MFI is < 20."
If you check the boxes, the script enforces the rules. If you uncheck them, they are ignored.
5. Visual Projection Dashboard
The script doesn't just print arrows; it performs a real-time visual backtest on the chart.
Glowing Projections: It draws the exact Take Profit (Green) and Stop Loss (Red) boxes for historical trades. These boxes glow to indicate if the trade won or lost.
Data Integrity: It automatically detects and isolates "N/A" trades—candles so volatile that they hit both your SL and TP in the same bar—excluding them from your win rate to keep your data realistic.
Live Grading: A dashboard in the corner grades your current settings (A-F) based on their performance over the last 1,000 to 40,000 bars.
Double/Triple Tops & Bottoms & Rectangle BoxesThis indicator is an algorithmic pattern recognition tool designed to automatically identify, validate, and track significant reversal structures—specifically Double/Triple Tops and Bottoms. Unlike subjective drawing tools, this script uses a strict set of quantitative rules based on swing pivots and volatility (ATR) to define market structure.
The Logical Methodology The script operates on a three-stage "scientific" detection process:
Pivot Chaining (Level Detection): The algorithm scans for significant swing highs and lows using a user-defined lookback period. It stores these pivot levels and monitors subsequent price action. If price returns to a previous pivot level within a specific volatility threshold (normalized by ATR), it registers a "touch."
Pattern Construction (Neckline Identification): Once a level has been touched the required number of times (e.g., 2 for Double patterns, 3 for Triple patterns), the script calculates the "Neckline."
For Tops: It identifies the lowest trough between the peaks.
For Bottoms: It identifies the highest peak between the valleys. This creates a valid trading range, visualized as a blue box connecting the pivot level to the neckline.
Signal Validation (Breakout vs. Failure): The pattern remains in a "pending" state until a breakout occurs.
Confirmation: A signal is generated only when a candle closes beyond the neckline (below for Tops, above for Bottoms).
Invalidation: If price breaks the pivot level itself (e.g., makes a higher high on a Double Top) before breaking the neckline, the pattern is immediately marked invalid to prevent false signals.
Key Features
ATR-Based Sensitivity: Uses Average True Range to dynamically adjust how "precise" a re-test must be, adapting to changing market volatility.
Dual-Scanning: Can independently scan for Triple Tops (Bearish) and Double Bottoms (Bullish) simultaneously with separate settings.
Time & Width Constraints: Filters out "noise" by enforcing a minimum pattern width (in bars), ensuring only structurally significant patterns are displayed.
Settings Guide
Min Top/Bottom Touches: Set to 2 for Double patterns or 3 for Triple patterns.
Pivot Lookback: The number of bars used to define a swing point (higher = larger, more significant patterns).
Touch Sensitivity: Adjusts how strictly the price must match the previous level.
Min Pattern Width: Prevents the detection of micro-patterns that are too narrow to be reliable.
Recovery Adaptive Strategy [Starbots]🔁 Recovery Adaptive Strategy
Recovery Adaptive Strategy is an advanced, single-position trading strategy designed for professional traders who require adaptive exposure control, dynamic profit targeting, and rule-based recovery mechanics in high-volatility market environments.
The strategy applies a structured loss-streak framework where position sizing and take-profit objectives evolve systematically based on prior trade outcomes, while maintaining strict one-position execution at all times.
🧠 Strategic Framework
This strategy is built around a controlled adaptive execution model:
Only one position is active at any time
Each closed trade directly influences the parameters of the next entry
After a losing trade:
Position size scales according to a defined factor
Take-profit expands proportionally using a configurable multiplier
After a winning trade:
All parameters reset to their base configuration
Scaling progression is capped via a configurable maximum step limit
The methodology is designed to efficiently capitalize on expansion phases, volatility impulses, and directional inefficiencies, making it particularly suitable for high-volatility instruments and regimes.
⚙️ Adaptive Position Management
Position Sizing Modes
Percentage of Equity
Fixed Base Currency Amount (USDT / USD / EUR, etc.)
Each subsequent step applies a configurable size multiplier, enabling precise control over exposure progression across loss streaks.
🎯Dynamic Take-Profit Scaling
Take-profit levels increase automatically with each scaling step
A dedicated TP multiplier allows fine-tuning of profit expansion behavior
All targets are recalculated and updated dynamically while positions are open
Execution Control
Single-position logic (no grid, no concurrent hedging)
Optional forced exit and full reset upon reaching the maximum scaling step
Bar-confirmed execution to avoid signal repainting
📈 Signal Generation & Market Filters
The strategy supports multiple professional-grade entry models, selectable via settings:
MACD (12,26,9)
DMI (14)
RSI (70 / 30)
Stochastic (14,3,3)
Bollinger Bands + RSI
Market Structure (BOS / CHoCH)
Additional execution layers include:
Higher-timeframe signal evaluation
Volatility-based trade filtering
EMA trend alignment
Flat-market detection (optional)
The strategy is optimized for active, volatile markets, where price expansion and follow-through are frequent.
📊 Institutional-Style Analytics & Visualization
Integrated analytics provide full transparency into strategy behavior:
Adaptive Scaling Table
Position size per step
Take-profit expansion per step
Loss-streak hit distribution
On-Chart Execution Labels
Equity Usage Overview
Monthly & Yearly Performance Calendar
Backtest vs. Leverage Projection Dashboard
All dashboards and visual components are optional and configurable.
🧩 Intended Use
This strategy is designed for:
Advanced discretionary traders
Systematic traders
Quantitative research and optimization
High-volatility instruments and environments
It emphasizes structure, adaptability, and execution discipline, rather than static position sizing or fixed targets.
S50 Complete Hedge & Trade SystemTFEX:S501!
คู่มือการเทรด CALENDAR SPREAD
1. กลยุทธ์หลัก: MEAN REVERSION SPREAD TRADING
หลักการ:
- Spread ระหว่าง series จะมีค่าเฉลี่ย (Mean) และแกว่งไปมารอบๆ ค่าเฉลี่ยนี้
- เมื่อ Spread เบี่ยงเบนไปจาก Mean มากเกินไป จะกลับมาหาค่าเฉลี่ย (Mean Reversion)
2. INDICATORS ที่ใช้
A. Z-Score
Z-Score = (Spread ปัจจุบัน - Spread เฉลี่ย) / Standard Deviation
การตีความ:
- Z > +2.0 → Spread แพงเกินไป → SHORT spread
- Z < -2.0 → Spread ถูกเกินไป → LONG spread
- Z ≈ 0 → Spread อยู่ที่ค่าเฉลี่ย → EXIT
B. Correlation
Correlation > 0.9 = ดีมาก (เคลื่อนไหวพร้อมกัน 90%+)
Correlation > 0.7 = ดี (ใช้ได้)
Correlation < 0.7 = ไม่แนะนำ (Hedge ไม่มีประสิทธิภาพ)
C. Beta & Hedge Ratio
Beta = Cov(S1, S2) / Var(S2)→ บอกว่า S1 เคลื่อนไหวเท่าไหร่เมื่อ S2 เคลื่อนไหว 1 หน่วย
Hedge Ratio = Beta→ ใช้คำนวณจำนวน contract ที่ต้อง hedge
3. วิธีการเทรด SPREAD (ทีละขั้นตอน)
STEP 1: หาโอกาส
เงื่อนไข Entry:
1. |Z-Score| >= 2.0
2. Correlation > 0.7
3. Signal = "SHORT SPREAD" หรือ "LONG SPREAD"
STEP 2: คำนวณ Position Size
ตัวอย่าง:
- Account Size = 1,000,000 บาท
- Risk Per Trade = 2% = 20,000 บาท
- Spread Std Dev = 15 จุด
- Stop Loss = 1.0x Std Dev = 15 จุด
- S50 มูลค่า = 5 บาท/จุด
Position Size = Risk Amount / (SL Distance × Point Value)
= 20,000 / (15 × 5)
= 20,000 / 75
= 266 contracts (ปัดเป็น 26 สัญญา)
STEP 3: คำนวณ Hedge Ratio
สมมติ: Beta (S1:S2) = 1.05
ถ้าเทรด SHORT S2-S1 spread:
- Sell S2: 26 contracts
- Buy S1: 26 × 1.05 = 27.3 → ปัดเป็น 27 contracts
Portfolio Delta ≈ 0 (Market Neutral)
4. ตัวอย่างการเทรดจริง
SCENARIO A: SHORT SPREAD (Z-Score = +2.5)
สถานการณ์:
- S2-S1 Spread = 50 จุด
- Spread MA = 35 จุด
- Spread Std Dev = 6 จุด
- Z-Score = (50-35)/6 = +2.5 ⚠️ แพงเกินไป
- Correlation = 0.92 ✅
- Beta = 1.05
TRADE PLAN:
1. SELL S2: 10 contracts @ 1,200
2. BUY S1: 10 × 1.05 = 10.5 → 11 contracts @ 1,150
Initial Spread = 50 จุด
Take Profit (TP):
- Target Spread = MA = 35 จุด
- TP Distance = 50 - 35 = 15 จุด
- Profit = 15 × 5 = 75 บาท/spread
- Total Profit = 75 × 10 = 750 บาท
Stop Loss (SL):
- SL Spread = MA + (1.5 × Std Dev) = 35 + 9 = 44 จุด
- SL Distance = 50 - 44 = 6 จุด (ผิดพลาด - ควรเป็น 50 + 6 = 56)
- Loss = 6 × 5 × 10 = 300 บาท
Risk:Reward = 300:750 = 1:2.5
SCENARIO B: LONG SPREAD (Z-Score = -2.3)
สถานการณ์:
- S3-S2 Spread = 20 จุด
- Spread MA = 35 จุด
- Spread Std Dev = 6.5 จุด
- Z-Score = (20-35)/6.5 = -2.3 ⚠️ ถูกเกินไป
- Correlation = 0.88 ✅
- Beta = 1.03
TRADE PLAN:
1. BUY S3: 10 contracts @ 1,230
2. SELL S2: 10 × 1.03 = 10.3 → 10 contracts @ 1,210
Initial Spread = 20 จุด
Take Profit:
- Target Spread = 35 จุด
- Profit = (35-20) × 5 × 10 = 750 บาท
Stop Loss:
- SL Spread = MA - (1.5 × Std Dev) = 35 - 9.75 = 25.25 จุด
- SL = 20 - (20-25.25) = 14 จุด
- Loss = 6 × 5 × 10 = 300 บาท
5. RISK MANAGEMENT
A. Position Sizing Rules
1. อย่าเสี่ยงเกิน 2-3% ต่อการเทรด
2. ใช้ Beta Hedge Ratio เสมอ
3. ตรวจสอบ Margin requirement
B. Stop Loss Strategy
วิธีที่ 1: Fixed Std Dev
- SL = Entry ± (1.0-1.5x Std Dev)
วิธีที่ 2: ATR-based
- SL = Entry ± (1.5x ATR)
วิธีที่ 3: Time-based
- ปิดภายใน 3-5 วัน ถ้าไม่ได้กำไร
C. Take Profit Strategy
วิธีที่ 1: Target MA
- TP เมื่อ Spread กลับมาที่ MA
วิธีที่ 2: Partial Profit
- ปิด 50% เมื่อได้ 1x Std Dev
- ปิดอีก 50% เมื่อ Z-Score = 0
วิธีที่ 3: Trailing Stop
- Trailing SL = 0.5x Std Dev
6. สูตรคำนวณสำคัญ
1. Position Size
position_size = (account_size × risk_pct) / (sl_distance × point_value)
2. Hedge Contracts
hedge_contracts = position_size × beta
3. Profit/Loss Calculation
pnl = (exit_spread - entry_spread) × contracts × point_value
4. Risk:Reward Ratio
risk = sl_distance × contracts × point_value
reward = tp_distance × contracts × point_value
rr_ratio = reward / risk // ควร >= 2:1
5. Spread Value
spread_value = price_far - price_near
7. CHECKLIST ก่อนเทรด
☐ Z-Score >= ±2.0
☐ Correlation > 0.7
☐ Beta Hedge Ratio คำนวณแล้ว
☐ Position Size ไม่เกิน 2-3% risk
☐ TP/SL กำหนดชัดเจน
☐ Risk:Reward >= 2:1
☐ Margin เพียงพอ
☐ ตรวจสอบ Expiry Date ทั้ง 2 series
8. เทคนิคขั้นสูง
A. Calendar Roll Strategy
เมื่อ Near series ใกล้หมดอายุ:
1. ปิด Near leg
2. เปิด Next series leg ใหม่
3. รักษา Spread position ต่อไป
B. Butterfly Spread
ใช้ 3 series พร้อมกัน:
- Buy S1
- Sell 2×S2
- Buy S3
เหมาะกับตลาดไซด์เวย์
C. Dynamic Hedging
ปรับ Hedge Ratio ตาม:
- Beta ที่เปลี่ยนแปลง
- Volatility
- Time to Expiry
GHOST SNIPERGHOST SNIPER™ – BB Reversal Engine + Smart Entry / Exit Structure Core
MNQ / MES / Stocks / ETFs / Crypto / FX
BB Reversals · Breakouts · PD Structure · Liquidity Sweeps · Displacement · Smart Targets · Quick SL & TP Logic
________________________________________
Summary
Ghost Sniper™ is a high-precision reversal and breakout engine designed for intraday scalping on MNQ/MES, while remaining highly effective across equities, ETFs, crypto, and FX.
It blends a custom Bollinger Reversal Framework (BB Bottom / BB Top Sniper) with an internal ICT-style structure core to filter noise and isolate only high-quality turning points.
The system reads stretch and failure conditions, detects band breakouts, and identifies Bollinger Band failures to anticipate sharp reversals. It includes a Quick TP (QTP) and Quick SL (SL-Q) module for micro-scalps, along with full ICT-style structural targets (TP1, TP2, TP3) for extended runs.
All TP levels and SL placement are derived from smart structural logic, designed to reduce premature stop-outs and improve fill reliability during volatility.
Real-time intrabar logic ensures entries trigger the moment structure confirms — no repainting.
________________________________________
BUY / SELL Signal Activation & Checklist HUD
Ghost Sniper™ uses a rule-based BUY / SELL triggering system driven by real-time structural confirmation — not delayed indicators or hindsight logic.
Entries only activate when a multi-condition internal checklist aligns, combining:
• Bollinger stretch, failure, or breakout behavior
• Liquidity sweep or rejection context
• Micro structure confirmation (BOS / displacement)
• Premium / Discount positioning
• Momentum and reversal candle confirmation
A built-in Checklist Activation HUD visually displays when conditions are forming, aligning, or fully confirmed, allowing traders to see why a signal is valid — not just that it fired.
BUY / SELL signals trigger only when checklist confirmation is reached, filtering low-probability setups and maintaining clean, high-quality entries.
All logic operates intrabar and in real time, with no repainting.
________________________________________
Market Structure & Context Awareness
Ghost Sniper™ incorporates a streamlined ICT-inspired framework, including:
• Liquidity sweep awareness (stop-runs and grabs)
• Micro BOS confirmation
• Premium / Discount context
• Impulse and displacement reads
• Reversal candle assist
• Optional PD / HTF alignment gates
To support institutional-grade context without visual clutter, Ghost Sniper™ also includes a comprehensive set of fully optional, user-selectable tools, allowing traders to tailor the chart to their workflow:
• VWAP
• Up to 5 configurable moving averages
• Bollinger Bands
• Automatic liquidity sweep level detection
• Opening Range Breakout (ORB)
• Midnight Open
• 9:30 AM New York Open
• Previous Day High / Low (PDH / PDL)
• Previous Week High / Low (PWH / PWL)
• Current Week High / Low (CWH / CWL)
• Monthly High / Low
• Previous Month High / Low (PMH / PML)
• Global session tracking, including:
o Asia Session
o London Session
o New York Session
All levels and context tools are individually selectable, designed to provide structure and bias awareness while keeping charts clean and focused.
________________________________________
Execution & Risk Logic
Ghost Sniper™ automatically prints clean, minimal BUY / SELL signals, intelligent stop placement, and progressive target logic:
QTP → TP1 → TP2 → TP3
A built-in Break-Even engine, structural invalidation logic, and one-trade-at-a-time control help maintain disciplined execution and consistent risk management.
Designed for traders who want a fast, decisive, and high-probability entry engine without visual noise or unnecessary complexity.
________________________________________
Disclaimer
This tool is for educational and research purposes only and is not financial advice.
Always test thoroughly in replay or paper trading before using in live markets.
Bollinger Bands with Price Labels============================================================================
BOLLINGER BANDS PRO - ENHANCED TRADING INDICATOR
============================================================================
HEADLINE: Professional Bollinger Bands with Dynamic Price Labels & Smart Alerts
DESCRIPTION:
// This advanced Bollinger Bands indicator goes beyond the basic implementation
// by providing real-time price tracking, customizable visual themes, and
// intelligent alert system for better trading decisions.
// KEY FEATURES:
• Dynamic Price Labels - Auto-formatting for readability (M/B/T for large numbers)
• Smart Alerts - Get notified on key price crossovers and band touches
• Dual Color Themes - Dark and Light modes for any chart background
• Custom Label Styling - Full control over size, shape, position, and colors
• Visual Clarity - Dotted lines connecting bands to labels
• Separate Color Zones - Different fills above/below basis for instant analysis
• Real-time Updates - Labels update dynamically with live price action
// BENEFITS OVER STANDARD BOLLINGER BANDS:
✓ No need to hover over lines to see exact prices
✓ Instant recognition of overbought/oversold zones with color coding
✓ Professional appearance with customizable branding
✓ Automated alerts eliminate constant chart monitoring
✓ Better readability for high-value assets (crypto, stocks)
✓ Cleaner charts with organized label placement
✓ Theme compatibility for day/night trading sessions
// PERFECT FOR:
- Day traders needing quick price reference
- Swing traders monitoring multiple timeframes
- Crypto traders dealing with large price numbers
- Professional chartists wanting clean, branded setups
// ========================================






















