Search in scripts for "entry"
Amazing Crossover SystemEntry Rules
BUY when the 5 EMA crosses above the 10 EMA from underneath and the RSI crosses above the 50.0 mark from the bottom.
SELL when the 5 EMA crosses below the 10 EMA from the top and the RSI crosses below the 50.0 mark from the top.
Make sure that the RSI did cross 50.0 from the top or bottom and not just ranging tightly around the level.
How to setup Alert:
1) Add the Amazing Crossover System to your chart via Indicators
2) Find your currency pair
3) Set the timeframe on the chart to 1 hour
4) Press 'Alt + A' (create alert shortcut)
5) Set the following criteria for the alert:
Condition = 'Amazing Crossover System', Plot, ' BUY Signal'
The rest of the alert can be customized to your preferences
5) Repeat steps 1 - 4, but set the Condition = 'Amazing Crossover System', Plot, ' SELL Signal'
Linear Regression Channel with Crossover SignalsLinear Regression Channel with Crossover Signals is an overlay indicator that plots a statistically derived **linear regression channel** around price and optionally generates **crossover / re-entry signals**, labels, alerts, and a small on-chart dashboard. It is designed to help visualize trend direction (via regression slope), typical price โcontainmentโ (via deviation bands), and potential breakout/mean-reversion events when price interacts with the channel.
---
## What this indicator shows
### 1) Linear Regression Midline (trend estimate)
The midline is the **linear regression value** of `close` over the selected *Regression Length*. It represents the โbest fitโ straight line through the last *N* bars, providing:
- **Trend direction** (via slope: rising/falling/flat)
- A dynamic reference level for midline cross signals (optional)
### 2) Upper / Lower Deviation Bands (channel)
A channel is built around the regression midline using the **standard deviation of price from the regression line**:
- Upper Band = midline + (stdDev ร Deviation Multiplier)
- Lower Band = midline โ (stdDev ร Deviation Multiplier)
This creates a volatility-scaled envelope that adapts to how tightly or loosely price has been tracking the regression line.
### 3) Optional visual aids
You can independently toggle:
- Channel lines (upper/lower)
- Midline
- Channel fill (shaded area between bands)
- Background coloring to reflect whether price is **above / inside / below** the channel
A dashboard (optional) displays live values and context such as band values, distance from bands, current position, and trend direction.
---
## How it works (calculation overview)
### Regression calculation (manual)
The script calculates slope and intercept using a least-squares approach across the last `lengthInput` bars:
- It iterates over the window, builds sums (X, Y, XY, Xยฒ), and computes:
- **Slope** and **Intercept** of the regression line
- The midline value plotted is the regression value at the most recent point in the window.
### Standard deviation from the regression line
Instead of using standard deviation of closes directly, it measures the **deviation of each close from the regression line** and computes:
- variance = average of squared deviations
- stdDev = sqrt(variance)
This is what makes the channel represent โhow far price typically strays from the trend lineโ over the lookback period.
---
## Signal logic (what triggers markers)
All signals are optional and controlled by the **Signal Types** toggles.
### A) Upper band cross signals (optional)
- **Upper Breakout (OB)**: price crosses **above** the Upper Band (`crossover(close, upperBand)`)
- **Upper Re-entry**: price crosses **back below** the Upper Band (`crossunder(close, upperBand)`)
These are often interpreted as โextension above channelโ and โreturn from extension,โ but interpretation depends on your style (breakout vs mean reversion).
### B) Lower band cross signals (optional)
- **Lower Breakdown (OS)**: price crosses **below** the Lower Band (`crossunder(close, lowerBand)`)
- **Lower Re-entry**: price crosses **back above** the Lower Band (`crossover(close, lowerBand)`)
### C) Midline cross signals (optional)
- **Mid Bullish**: price crosses above the regression midline
- **Mid Bearish**: price crosses below the regression midline
### D) Re-entry-to-channel signals (enabled by default)
The script tracks whether price was previously:
- **above** the channel (close > upperBand)
- **below** the channel (close < lowerBand)
- **inside** the channel
It then triggers โre-entryโ when price returns inside the channel:
- **Bullish Re-entry (Bounce Support)**: price was below and crosses back above the Lower Band
- **Bearish Re-entry (Rejection Resistance)**: price was above and crosses back below the Upper Band
These are intended to highlight potential mean-reversion acceptance back into the โnormalโ channel range.
---
## Plot markers and labels (what youโll see)
If enabled, the indicator can plot:
- Triangles and circles for band/midline crosses (with short text such as **OB**, **OS**, โฒ, โผ)
- Diamond markers for re-entry confirmations (โ / โ)
- Optional text labels describing the event (e.g., โOVERBOUGHT Breakoutโ, โREJECTION Resistanceโ, etc.)
Note: this script sets high label/line limits (`max_labels_count` / `max_lines_count`) to reduce the chance of hitting platform limits when many signals occur.
---
## Alerts (optional)
When โEnable Alertsโ is ON, the script can fire alerts for:
- Upper breakout / upper re-entry
- Lower breakdown / lower re-entry
- Re-entry bounce / re-entry rejection
- Midline bullish / bearish cross
Alerts are triggered **once per bar** when conditions occur. They are informational and should be validated within your trading plan.
---
## Inputs (how to tune it)
### Channel Settings
- **Regression Length**: larger = smoother and slower to react; smaller = more responsive but noisier
- **Deviation Multiplier**: larger = wider channel (fewer band touches); smaller = tighter channel (more touches)
- **Extend Forward**: present as an input, but this version does not draw forward-projected lines; it primarily affects nothing visually unless you add line objects later
### Signal Settings / Types
- Enable only the signal types you actually use to keep charts clean.
- Re-entry signals are ON by default because they depend on context (previously outside โ back inside), which many traders find more meaningful than a single cross alone.
### Visual Settings
- Show/hide channel, midline, fill, background coloring
- Customize colors for upper/lower/mid and fill for readability
---
## Limitations / notes (important for public descriptions)
- This is an **indicator**, not a strategy; it does not backtest performance.
- Linear regression channels are **context-dependent**: strong trends can โrideโ a band, and ranging markets can produce frequent crosses.
- Signals are based on **price crossing computed bands** and do not predict direction by themselves.
- Standard deviation bands reflect past dispersion around the regression line; volatility regime shifts can change behavior quickly.
- Always apply risk management and confirm with additional context (structure, volume, higher timeframe bias, session conditions, etc.).
Liquidity Void and Repair EngineLiquidity Void & Repair Engine
OVERVIEW
The Liquidity Void & Repair Engine is a high-fidelity institutional order flow tool designed to identify and track "Market Imbalances" or "Fair Value Gaps" (FVG). Unlike standard gap indicators that clutter the chart with every minor price jump, this engine uses Volatility-Adjusted Range Mapping to isolate high-conviction voids where price moved so rapidly that liquidity was left "unfilled."
The standout feature of this tool is its Active Repair Logic. The engine doesn't just draw static boxes; it monitors price action in real-time to determine when an imbalance has been "healed" by subsequent trading volume, providing a dynamic look at where the market has "unfinished business."
TECHNICAL LOGIC & ORIGINALITY
This script is published Open Source to contribute to the Pine Script communityโs understanding of dynamic object management and order flow visualization.
ATR-Relative Filtering: To ensure only significant voids are plotted, the script uses a user-defined ATR (Average True Range) multiplier. This filters out market noise and focuses on institutional "impulse" moves.
Dynamic Box Management: Utilizing the Pine Script box array system, the script manages memory efficiently by updating existing objects rather than creating redundant ones.
The "Repair" Algorithm: The script tracks the high and low of every active void. When price action fully traverses the coordinates of a void, the script "seals" the box, visually marking the moment of liquidity equilibrium.
HOW TO USE
1. Identifying the "Magnet" (The Void)
When price moves aggressively, it leaves a "hole" in the auction.
Bullish Voids (Green): These represent areas where price surged so fast that buyers may still have unfilled orders sitting below. These act as Magnets for pullbacks.
Bearish Voids (Red): These represent areas where price plummeted, leaving a vacuum of selling pressure. These act as Magnets for relief rallies.
2. Trading the "Repair" Process
The Engine tracks how the market "repairs" these holes:
Partial Fill: If price enters a box but doesn't cross it, the "Magnet" is still active.
Full Repair: When a box is "sealed" (stops extending right), it indicates the imbalance is gone. If price "Seals" a green box and then bounces, it confirms the zone as Valid Institutional Support.
3. Confluence with the Trend
Continuation: In a strong uptrend, look for price to drop into a Green Bullish Void and find support. This is often the "Golden Entry" for trend followers.
Reversal Confirmation: If price ignores a Red Bearish Void and blasts right through it (sealing it instantly), it signals a massive shift in market regime and extreme bullish conviction.
USER SETTINGS
Lookback Period: How far back the engine searches for un-repaired gaps.
Min Gap Size (ATR %): Increase this to see only the "Major" institutional gaps; decrease it for a more granular intraday look.
Visual Styles: Fully customizable colors and transparency to match any chart theme (Dark/Light).
NOTES & DISCLAIMER
This script is a visualization of historical price imbalances and is intended for educational purposes only. It does not provide trade signals, entry/exit points, or financial advice. All trading involves risk.
Relative Strength Table๐ RRG Quadrant Scanner - Options Trading Market Direction Tool
A powerful Relative Rotation Graph/Table (RRG) dashboard designed to help OPTIONS TRADERS identify market direction, select optimal strikes, and time entries with precision. Track up to 8 symbols against any benchmark to determine bullish/bearish bias and rotation momentum.
---
๐ฏ WHY OPTIONS TRADERS NEED THIS
Unlike stock traders who can hold losing positions indefinitely, options traders face:
โ Time decay (theta)
โ Directional risk (delta)
โ Volatility changes (vega)
โ Limited time to be right
This indicator solves these challenges by showing you:
โ
Which direction momentum is flowing (calls vs puts)
โ
Which symbols/sectors have strongest trends (high probability setups)
โ
When rotation is happening (timing entries/exits)
โ
Market breadth for directional confirmation
---
๐ฅ HOW RRG QUADRANTS GUIDE OPTIONS TRADING
๐ข LEADING QUADRANT (Top Right) - BULLISH BIAS
What it means:
โข Strong uptrend vs benchmark
โข Accelerating momentum
โข High relative strength
Options Strategies:
โ
BUY CALLS (ITM/ATM for safer, OTM for aggressive)
โ
SELL CASH-SECURED PUTS (collect premium on strong stocks)
โ
BULL CALL SPREADS (defined risk directional plays)
โ
LONG CALL DIAGONALS (capture continued uptrend)
Direction Signal: STRONG BULLISH
โข Multiple symbols in Leading = broad market strength
โข Index options: favor call side
โข Stock options: bullish strategies on individual leaders
---
๐ต IMPROVING QUADRANT (Top Left) - EARLY BULLISH
What it means:
โข Currently underperforming BUT gaining momentum
โข Early reversal signal
โข Rotation from weak to strong
Options Strategies:
โ
BUY CALLS with longer expiry (give time to develop)
โ
BULL PUT SPREADS (defined risk as support builds)
โ
SELL PUTS at support (premium collection on improving stocks)
โ
CALENDAR SPREADS (benefit from time and momentum shift)
Direction Signal: EMERGING BULLISH
โข Symbols moving Lagging โ Improving = early buy signal
โข Best for patient options traders
โข Use longer DTE (45-60 days) to allow rotation to complete
โข Watch for move into Leading quadrant for confirmation
---
๐ด LAGGING QUADRANT (Bottom Left) - BEARISH BIAS
What it means:
โข Weak relative strength
โข Declining momentum
โข Persistent underperformance
Options Strategies:
โ
BUY PUTS (directional bearish play)
โ
BEAR CALL SPREADS (defined risk on weakness)
โ
SELL COVERED CALLS (if stuck in position)
โ
PUT DEBIT SPREADS (cheaper than naked puts)
Direction Signal: STRONG BEARISH
โข Multiple symbols in Lagging = market weakness
โข Avoid bullish strategies entirely
โข Index options: favor put side
โข Exit existing long calls immediately
---
โซ WEAKENING QUADRANT (Bottom Right) - EARLY BEARISH
What it means:
โข Currently strong BUT losing momentum
โข Topping signal
โข Rotation from strong to weak
Options Strategies:
โ
SELL CALLS (initiate bearish bias)
โ
BEAR PUT SPREADS (cheaper than naked puts)
โ
CLOSE LONG CALLS (take profits before decay accelerates)
โ
PROTECTIVE PUTS (if holding stock positions)
โ
SHORT STRADDLES/STRANGLES (if expecting range-bound)
Direction Signal: EMERGING BEARISH
โข Symbols moving Leading โ Weakening = profit-taking signal
โข Close bullish positions EARLY
โข Initiate bearish strategies
โข Watch for move into Lagging for confirmation of downtrend
---
๐ฏ MARKET DIRECTION CONFIRMATION FOR INDEX OPTIONS
Trading NIFTY/BANKNIFTY/SPX Options? Use this way:
๐ Track These Symbols Against Benchmark:
โข Major sectors: Finance, IT, Energy, Auto, Pharma
โข Top stocks: RELIANCE, HDFCBANK, INFY, TCS, etc.
โข Benchmark: NIFTY or BANKNIFTY
๐ข BULLISH INDEX BIAS (Buy Calls/Sell Puts)
When you see:
โข 60%+ symbols in Leading + Improving quadrants
โข Financial sector in Leading (indicates BANKNIFTY strength)
โข IT sector in Leading (indicates NIFTY strength)
โข Few symbols in Lagging
Strategy: Aggressive call buying, put selling, bull spreads
๐ด BEARISH INDEX BIAS (Buy Puts/Sell Calls)
When you see:
โข 60%+ symbols in Lagging + Weakening quadrants
โข Key sectors rotating to Weakening
โข Broad-based weakness across watchlist
Strategy: Put buying, bear spreads, avoiding new longs
โ๏ธ NEUTRAL/ROTATION PHASE (Iron Condors/Strangles)
When you see:
โข Symbols evenly distributed across quadrants
โข No clear cluster in any one quadrant
โข Conflicting signals between sectors
Strategy: Range-bound strategies, avoid directional bets, reduce position size
---
๐ก OPTIONS TRADING USE CASES
๐ฏ Case 1: Earnings Play Setup
Before earnings, check if stock is in:
โข Leading = bullish bias, buy calls
โข Improving = emerging strength, cautious calls
โข Weakening = avoid or buy puts
โข Lagging = strong puts
๐ฏ Case 2: Weekly Options Direction
Monday morning setup:
โข Check sector quadrants vs benchmark
โข Leading sectors = focus call trades there
โข Weakening sectors = focus put trades
โข Adjust delta exposure based on quadrant distribution
๐ฏ Case 3: Spread Selection
For credit spreads:
โข Sell puts on Leading/Improving symbols (bullish)
โข Sell calls on Weakening/Lagging symbols (bearish)
โข Iron condors when symbols are scattered (no clear direction)
๐ฏ Case 4: Portfolio Hedging
If holding calls:
โข Watch symbols move Leading โ Weakening = add protective puts
โข If 50%+ watchlist enters Weakening = hedge entire portfolio
If holding puts:
โข Watch symbols move Lagging โ Improving = close puts early
โข If broad rotation to Improving = exit bearish positions
๐ฏ Case 5: Theta Decay Management
Leading quadrant = hold calls longer (trend supports you)
Weakening quadrant = close calls early (decay + downside risk)
Improving quadrant = be patient with calls (need time to develop)
Lagging quadrant = hold puts or exit quickly if rotation starts
---
๐ SECTOR ROTATION FOR OPTIONS STOCK SELECTION
Instead of trading index options, use quadrants to pick individual stocks:
Setup Example - NSE Options:
Symbols: RELIANCE, HDFCBANK, INFY, TCS, SBIN, ICICIBANK, TATAMOTORS, BAJFINANCE
Benchmark: NIFTY
Monday Strategy Session:
1. Check which stocks are in Leading quadrant
2. Focus call trades ONLY on Leading stocks
3. Check which stocks are in Weakening/Lagging
4. Focus put trades on those
5. Ignore stocks in unclear quadrants (save capital)
This approach:
โ
Increases win rate (trading with momentum)
โ
Reduces losses (avoiding weak stocks)
โ
Improves timing (catch early rotations)
---
๐ฅ REAL TRADING SCENARIOS FOR OPTIONS
๐ Scenario 1: Strong Bullish Market
Quadrant Status:
โข Leading: 5 symbols
โข Improving: 2 symbols
โข Weakening: 1 symbol
โข Lagging: 0 symbols
Options Action:
โ
Aggressive call buying on index
โ
Bull call spreads on leading stocks
โ
Sell puts on improving stocks
โ
Avoid bearish strategies
โ
Larger position sizes (conviction high)
---
๐ Scenario 2: Rotation/Choppy Market
Quadrant Status:
โข Leading: 2 symbols
โข Improving: 2 symbols
โข Weakening: 2 symbols
โข Lagging: 2 symbols
Options Action:
โ ๏ธ AVOID directional bets
โ
Iron condors/strangles (profit from range)
โ
Calendar spreads (volatility plays)
โ
Smaller position sizes
โ
Wait for clearer rotation signal
---
๐ Scenario 3: Bearish Reversal
Quadrant Status:
โข Leading: 1 symbol
โข Improving: 0 symbols
โข Weakening: 3 symbols
โข Lagging: 4 symbols
Options Action:
โ
Buy puts on index
โ
Bear call spreads on weakening stocks
โ
CLOSE all long calls immediately
โ
Sell covered calls if stuck in stocks
โ
Increase hedge positions
---
๐ Scenario 4: Early Recovery
Quadrant Status:
โข Leading: 1 symbol
โข Improving: 4 symbols (moving from Lagging)
โข Weakening: 1 symbol
โข Lagging: 2 symbols
Options Action:
โ
Buy calls with 45-60 DTE (give time to develop)
โ
Bull put spreads on improving stocks
โ
Small position sizes initially
โ
Scale in as symbols move to Leading
โ
Close remaining bearish positions
---
๐ฏ TIMING ENTRY/EXIT WITH QUADRANTS
๐ BEST CALL ENTRIES:
1. Symbol moves Improving โ Leading (momentum confirmed)
2. 70%+ watchlist in Leading/Improving (broad strength)
3. Key sector enters Leading (focused strength)
๐ BEST PUT ENTRIES:
1. Symbol moves Weakening โ Lagging (downtrend confirmed)
2. 70%+ watchlist in Weakening/Lagging (broad weakness)
3. Leading symbols suddenly drop to Weakening (reversal)
๐ EXIT SIGNALS:
Calls: Close when symbol enters Weakening
Puts: Close when symbol enters Improving
Both: Take profits at 50-70% max gain if rotation unclear
---
โ๏ธ SETUP FOR OPTIONS TRADERS
For NIFTY Options Traders:
โข Symbols: Top 8 NIFTY stocks (RELIANCE, HDFCBANK, INFY, etc.)
โข Benchmark: NIFTY
โข Window: 20 periods
โข Timeframe: Daily chart
โข Use: Gauge NIFTY direction
For BANKNIFTY Options Traders:
โข Symbols: Banking stocks (HDFCBANK, ICICIBANK, SBIN, KOTAKBANK, AXISBANK)
โข Benchmark: BANKNIFTY
โข Window: 20 periods
โข Use: Gauge BANKNIFTY direction
For Stock Options Traders:
โข Symbols: Your watchlist of optionable stocks
โข Benchmark: Relevant sector index
โข Window: 10-20 periods
โข Use: Pick strongest/weakest for directional trades
---
๐ OPTIONS TRADING RULES USING QUADRANTS
โ
Rule 1: Only buy calls on Leading/Improving stocks
โ
Rule 2: Only buy puts on Weakening/Lagging stocks
โ
Rule 3: Exit calls when stock enters Weakening
โ
Rule 4: Exit puts when stock enters Improving
โ
Rule 5: Use longer DTE when trading Improving/Weakening (rotation takes time)
โ
Rule 6: Use shorter DTE when trading Leading/Lagging (established trends)
โ
Rule 7: If 70%+ watchlist in one side = strong directional bias
โ
Rule 8: If symbols scattered = reduce position sizes, play neutral
---
๐ ADVANTAGES FOR OPTIONS TRADERS
โ
HIGHER WIN RATE
Trade only symbols with clear momentum direction
โ
BETTER TIMING
Catch rotations early = maximize profit potential
โ
REDUCED THETA DECAY LOSSES
Don't hold calls on weakening stocks (double loss)
โ
CLEARER MARKET BIAS
Know if market is bullish/bearish/neutral
โ
PORTFOLIO ALIGNMENT
Match your delta exposure to market direction
โ
EARLY WARNING SYSTEM
Spot rotations before price breaks down/up
โ
RISK MANAGEMENT
Exit positions before momentum shifts against you
---
๐ COMBINING WITH OTHER ANALYSIS
This indicator works best when combined with:
๐ Technical Analysis
โข Support/Resistance for strike selection
โข Chart patterns for entry timing
โข Volume for confirmation
๐ Volatility Analysis
โข IV Rank for premium selling decisions
โข VIX/India VIX for overall market risk
โฐ Time Analysis
โข Check quadrants before weekly expiry
โข Align DTE with expected rotation speed
๐ฐ Greeks Management
โข High delta on Leading symbols (directional confidence)
โข Low delta on Improving symbols (early, needs time)
โข Negative delta on Weakening/Lagging (bearish bias)
---
โ ๏ธ WHAT THIS INDICATOR DOESN'T DO
โ Doesn't predict exact option prices
โ Doesn't tell you which strike to buy
โ Doesn't replace risk management
โ Doesn't account for news/events
โ Doesn't consider implied volatility
โ Doesn't guarantee winning trades
It DOES give you:
โ
Market direction bias
โ
Symbol selection edge
โ
Rotation timing awareness
โ
Risk/reward framework
---
๐ฏ BOTTOM LINE FOR OPTIONS TRADERS
Stop fighting momentum. Stop buying calls on weakening stocks. Stop holding positions through rotations.
Instead:
โข Check quadrants BEFORE entering trades
โข Buy calls only on Leading/Improving
โข Buy puts only on Weakening/Lagging
โข Exit when rotation signals change
โข Adjust position size based on breadth
This simple framework can dramatically improve your options trading win rate and reduce catastrophic losses from holding through momentum reversals.
---
โญ START TRADING WITH THE TREND
Add this RRG Quadrant Scanner and align your options trades with market rotation - not against it!
CRR Micro Breakout Scalping / Swing//@version=6
strategy(
"CRR Micro Breakout Option-3 Strategy",
overlay = true,
initial_capital = 100000,
default_qty_type = strategy.percent_of_equity,
default_qty_value = 100,
commission_type = strategy.commission.percent,
commission_value = 0.02
)
// ยฉ CRR
//================ PARAMETERS =================
lookback = 4
maxBars = 100
flatPoints = 10
flatMinutes = 5
stATRlen = 10
stMult = 3.0
//================ RANGE ======================
rangeHigh = ta.highest(high, lookback)
rangeLow = ta.lowest(low, lookback)
//================ FILTERS ====================
ema59 = ta.ema(close, 59)
= ta.supertrend(stMult, stATRlen)
//================ SIDEWAYS BLOCK =============
emaSlope = math.abs(ema59 - ema59 )
priceNearEMA = math.abs(close - ema59) <= flatPoints
var int flatStartTime = na
if emaSlope < 0.15 and priceNearEMA
flatStartTime := na(flatStartTime) ? time : flatStartTime
else
flatStartTime := na
flatBlocked = not na(flatStartTime) and (time - flatStartTime >= flatMinutes * 60000)
//================ ENTRY CONDITIONS ===========
buyCond = close > rangeHigh and close > ema59 and stDir == 1 and not flatBlocked
sellCond = close < rangeLow and close < ema59 and stDir == -1 and not flatBlocked
//================ ENTRIES ====================
if buyCond and strategy.position_size <= 0
strategy.entry("BUY", strategy.long)
if sellCond and strategy.position_size >= 0
strategy.entry("SELL", strategy.short)
//================ TIME EXIT ==================
var int barsInTrade = 0
if strategy.position_size != 0
barsInTrade += 1
else
barsInTrade := 0
if barsInTrade >= maxBars
strategy.close_all()
barsInTrade := 0
LY IntraDay Crypto Pro CLEAN v6LY IntraDay Crypto Pro is a universal intraday indicator designed for cryptocurrency markets, including spot and perpetual futures (e.g. Bybit, Binance, OKX).
This indicator combines trend direction, momentum, and market participation to help traders identify high-probability intraday opportunities while filtering out low-quality signals.
๐ง Core Components
EMA Trend Structure (21 / 50 / 200)
Identifies short-, mid-, and long-term trend alignment.
VWAP (Session Based)
Provides institutional reference for intraday bias.
RSI Momentum Filter
Confirms bullish or bearish momentum strength.
ADX + DMI (DI+ / DIโ)
Measures trend strength and directional dominance.
Visual Trend Bias
Background color highlights bullish or bearish conditions.
Clear Entry Signals
Green โฒ for LONG opportunities
Red โผ for SHORT opportunities
๐ How to Use
Best suited for intraday trading on 5m, 15m, and 1h timeframes.
Works on all cryptocurrencies and all exchanges supported by TradingView.
Signals are generated only when trend, momentum, and strength conditions align.
โ ๏ธ Disclaimer
This indicator is not financial advice.
Always apply proper risk management and confirm signals with your own analysis.
Past performance does not guarantee future results.
EAB: RS Rating (Table) vs BenchmarkEAB: RS Rating (Table) vs Benchmark displays a compact table showing the Relative Strength (RS) Rating (1โ99) of the current symbol compared to a selected benchmark (default: S&P 500).
The RS Rating is calculated using a weighted multi-period performance model inspired by IBD-style relative strength methodology, helping to quickly assess a stockโs performance versus the broader market.
Features
โข Relative Strength Rating (1โ99) vs benchmark.
โข Comparison across multiple lookback periods (current, previous day, previous week and previous month).
โข Fully customizable table colors, borders and on-chart location.
โข Clean, table-based display designed for quick visual reference.
Notes
โข The RS Rating is an informational metric and does not provide entry or exit signals.
โข This indicator is intended for market analysis and relative performance comparison only.
F&O Auto Option Chain Pro๐ฏ Auto Option Chain - Live NSE F&O Dashboard
Transform your options trading experience with instant access to complete option chain data - right on your TradingView charts!
---
โจ WHAT YOU GET
See the complete option chain whenever you're viewing NSE options. No setup required - it just works!
๐ Live Data Display:
โข Last Traded Price (LTP) for all strikes
โข Trading Volume in lots
โข VWAP levels
โข Intraday price changes
โข Put-Call Ratio (PCR) analysis
โข ATM strike highlighting
๐ฏ Two Ways to Use:
AUTO MODE - Zero Setup
Simply view any NSE option like NIFTY or BANKNIFTY options, and the complete chain appears instantly around your selected strike.
MANUAL MODE - Universal Access
Use on any chart - equity, index, or options. Just select your underlying symbol, expiry date, and reference strike.
---
๐ผ SUPPORTED MARKETS
โ
NSE Index Options
โข NIFTY
โข BANKNIFTY
โข FINNIFTY
โข MIDCPNIFTY
โ
NSE Stock Options (200+ symbols)
โข RELIANCE, HDFCBANK, TCS, ICICIBANK
โข SBIN, INFY, ITC, BHARTIARTL
โข KOTAKBANK, HINDUNILVR, MARUTI
โข AXISBANK, BAJFINANCE, TATAMOTORS
โข WIPRO, LT, HCLTECH, SUNPHARMA
โข And 180+ more popular F&O stocks!
All symbols work seamlessly with correct strike intervals.
---
๐จ CUSTOMIZATION
Dashboard Position:
Choose from 9 screen positions to keep your charts clean and visible
Visual Style:
โข 4 font sizes for comfortable viewing
โข Custom colors for ATM strikes
โข Color-coded profit/loss indicators
โข Adjustable transparency
Data Range:
Control how many strikes you want to see (up to 8 strikes above and below ATM)
---
๐ฅ PERFECT FOR
โ Intraday Option Traders
See live premium changes and volume shifts in real-time
โ Spread Builders
Compare multiple strikes instantly for Iron Condors, Butterflies, and other strategies
โ Options Sellers
Track volume concentration and decay throughout the trading day
โ Market Analysts
Study option flow patterns and Put-Call Ratios for sentiment analysis
โ Swing Traders
Plan weekly positions with complete visibility of the option chain
โ Scalpers
Quick strike selection with live data updates
---
๐ก TRADING APPLICATIONS
๐ฏ Identify Key Levels
High volume strikes often act as support and resistance zones
๐ Sentiment Analysis
Put-Call Ratio shows whether traders are positioned bullish or bearish
โก Premium Tracking
Watch real-time option value changes during volatile market moves
๐ Spread Trading
Visual comparison makes it easy to select optimal strike combinations
๐ฐ Entry Point Selection
Compare multiple strikes before entering positions
๐ฆ Smart Money Tracking
VWAP reveals institutional trading levels
---
๐ฑ HOW TO USE
Getting Started - Auto Mode:
1. Open any NSE option chart
2. Add "Auto Option Chain" indicator
3. Complete chain displays automatically
4. Start trading with full visibility!
Alternative - Manual Mode:
1. Open any NSE chart (index, equity, or option)
2. Add the indicator
3. Switch to Manual mode
4. Enter your symbol (e.g., NIFTY)
5. Set expiry date in YYMMDD format (e.g., 251226 for Dec 26, 2025)
6. Set approximate ATM strike
7. Option chain appears instantly!
---
๐ KEY BENEFITS
โ
CONVENIENCE
No need to switch between TradingView and external option chain websites
โ
SPEED
Instant data updates with every price tick
โ
EFFICIENCY
All strikes visible at once - no scrolling through multiple pages
โ
ACCURACY
Real-time data synchronized with your chart timeframe
โ
SIMPLICITY
Works automatically on option charts, manually on others
โ
FLEXIBILITY
View option chains while analyzing spot/futures charts
โ
INSIGHT
PCR and volume data aid better trading decisions
---
โ ๏ธ IMPORTANT INFORMATION
โข Works exclusively with NSE options (Indian market)
โข Data quality depends on your TradingView subscription
โข Best performance on 1-minute to daily timeframes
โข Displays up to 8 strikes on each side of ATM
โข Requires active market hours for live data
---
๐ TIPS FOR SUCCESS
๐ก Start with Auto mode when trading specific options
๐ก Use Manual mode for pre-market planning
๐ก Adjust strike range based on market volatility
๐ก Position dashboard where it doesn't block price action
๐ก Monitor PCR for early sentiment shifts
๐ก Track volume spikes for potential breakout levels
๐ก Compare VWAP with LTP to gauge fair value
---
๐ WHAT MAKES THIS DIFFERENT
Unlike basic option indicators that show single strikes or delayed data:
โ
Shows complete chain around ATM
โ
Updates in real-time with your chart
โ
Works automatically when viewing options
โ
Also works manually on any chart type
โ
Pre-configured for 200+ popular stocks
โ
Includes advanced metrics (PCR, VWAP, Volume in lots)
โ
Clean, professional interface
---
๐ REAL TRADER BENEFITS
"See the whole picture before entering trades"
Complete chain visibility helps you select optimal strikes
"No more tab switching"
Everything you need is right on your chart
"Faster decisions"
Instant data comparison across multiple strikes
"Better risk management"
Understand where volume and open interest are concentrated
"Professional-grade analysis"
Tools previously available only on premium platforms
---
๐ฏ IDEAL FOR THESE STRATEGIES
โ Naked Call/Put selling
โ Covered Calls
โ Protective Puts
โ Bull/Bear Call Spreads
โ Bull/Bear Put Spreads
โ Iron Condors
โ Iron Butterflies
โ Straddles
โ Strangles
โ Calendar Spreads
โ Ratio Spreads
---
โญ YOUR SUCCESS IS MY GOAL
If you find this indicator valuable:
โข Leave a rating to help others discover it
โข Share feedback in the comments
โข Suggest improvements for future updates
โข Follow for new indicator releases
๐ฌ Need Help?
Drop a comment with your questions - I respond to all users!
๐ Stay Updated
Follow to get notified about improvements and new features
---
โ๏ธ DISCLAIMER
This indicator is provided for educational and informational purposes only. It displays market data but does NOT provide trading advice or recommendations.
Options trading involves substantial risk and is not suitable for all investors. You can lose more than your initial investment. Past performance does not guarantee future results.
Always:
โข Conduct your own research
โข Understand options risks fully
โข Consult a licensed financial advisor
โข Trade only with risk capital
โข Use proper position sizing
โข Implement stop losses
The creator is not responsible for any trading losses incurred while using this indicator. Use at your own risk.
---
๐ START TRADING SMARTER TODAY
Add "Auto Option Chain" to your charts and experience the difference professional-grade option data makes to your trading decisions!
Happy Trading! ๐๐ฐ
Beast Mode - Hull Suite ProBeast Mode โ Hull Suite Pro is a trend-following overlay indicator built around a dual โHull ribbonโ concept: a fast ribbon for swing/entry timing and an optional slow ribbon for higher-timeframe style trend context. It aims to make trend direction, trend changes, and lower-quality (choppy/ranging) conditions easy to see directly on price.
---
Core concept (what it does)
1) Fast Signal Ribbon (primary direction + flips)
The indicator computes a fast Hull-style moving average using your selected Hull variation and length. It then plots two lines:
- Fast Main = current fast Hull value
- Fast Lag = prior-bar fast Hull value
The space between them is filled to form a ribbon. When Fast Main is above Fast Lag, the ribbon is considered bullish and plotted green. When Fast Main is below Fast Lag, it is considered bearish and plotted red. This creates a simple, visual โslope/continuationโ read without needing extra panels.
2) Slow Trend Ribbon (optional trend filter / bias)
A second, slower Hull-style ribbon (default length is user-configurable) can be plotted as a trend context layer. Like the fast ribbon, it uses a main line and its prior-bar value to determine direction. When enabled, it provides a higher-level bias that can be used to filter signals from the fast ribbon.
3) Chop Filter (optional ranging-market filter)
The script includes an optional Choppiness Index filter. When enabled, it blocks buy/sell labels during choppy conditions where trend-following signals often degrade. โChoppyโ is defined as Choppiness Index above the user threshold.
4) Visual helpers (optional)
- Candle coloring can be enabled to match the fast ribbon direction.
- A compact dashboard table can be shown on the chart to summarize the current fast trend, slow trend, and whether filters are enabled.
---
How it works (calculation overview)
Hull variations
The indicator lets you choose one of three smoothing/response styles for both the fast ribbon and the slow ribbon:
- Hma: Hull Moving Average
- Ehma: EMA-based Hull variant
- Thma: Triangular/WMA-based Hull variant
A โLength Multiplierโ scales the fast length to quickly tune sensitivity without changing your base length.
Preset system
A preset selector automatically adjusts the fast length and Hull variation for common use-cases:
- Fast: shorter length, more responsive (more signals, more noise)
- Balanced: middle ground
- Trend: longer and smoother (fewer signals)
Selecting โCustomโ uses your manual inputs.
Fast ribbon direction state
- fastUp is true when the fast Hull value is higher than its previous value (Fast Main > Fast Lag).
- Color and candle coloring (if enabled) follow this state.
Slow ribbon direction state
- slowUp is true when the slow Hull value is higher than its previous value (Trend Main > Trend Lag).
- The slow ribbon is optional and can be hidden.
Choppiness Index
When enabled, the script computes the Choppiness Index over the chosen length and flags the market as choppy if it exceeds the threshold. Signals can be blocked during these flagged periods.
---
Signals (how buy/sell labels are generated)
Buy label (raw):
A Buy is triggered when the fast ribbon flips from bearish to bullish (fastUp becomes true after being false on the prior bar).
Sell label (raw):
A Sell is triggered when the fast ribbon flips from bullish to bearish (fastUp becomes false after being true on the prior bar).
Optional filters:
- Trend Filter (optional):
- If enabled, Buy labels only appear when the slow ribbon is bullish (slowUp = true).
- Sell labels only appear when the slow ribbon is bearish (slowUp = false).
- Chop Filter (optional):
- If enabled, both Buy and Sell labels are suppressed when the market is flagged as choppy (Choppiness Index > threshold).
These filters are designed to reduce low-quality flips in sideways markets and align signals with the broader trend context when desired.
---
How to use it (practical guidance)
1) Trend direction / bias
- Use the fast ribbon color and slope as your near-term trend read.
- If enabled, use the slow ribbon as a higher-level bias filter (e.g., focus on longs when the slow ribbon is green).
2) Entries and timing
- Buy/Sell labels are based on fast ribbon flips. Many traders treat flips as potential momentum shifts rather than guaranteed reversals. Consider confirming with your own market context (structure, levels, volume, session, etc.).
3) Avoiding chop (optional)
- If you trade trend continuation, enabling the Chop Filter can help avoid frequent flips during consolidation.
- Lower chop thresholds are stricter (fewer signals). Higher thresholds allow more signals through.
4) Parameter tuning
- Faster settings will react earlier but can whipsaw.
- Smoother settings reduce noise but can lag.
- The Length Multiplier is a quick way to adjust sensitivity without redesigning the setup.
---
Visual settings
- Show Buy/Sell Labels: toggles label plotting.
- Color Candles: colors bars based on the fast ribbon direction.
- Line Thickness / Fill Transparency: adjust readability.
- Dashboard: shows a small table with current states and filter status. Position is user-selectable.
---
Limitations / notes
- This indicator is not a strategy and does not provide backtest performance results.
- Like all moving-average-based tools, it is lagging by nature and can produce false flips in ranging conditions.
- The Chop Filter helps reduce ranging-market noise but will also filter out some early trend transitions.
- Signals are conditional visual markers and should be used with risk management and confirmation rules appropriate to your trading plan.
EAB: Distance (%) to EMAs/MAsRPL: Distance (%) to EMAs/MAs displays a compact table showing the percentage distance between the current price and selected moving averages, helping to quickly assess price extension relative to key technical references.
Features
โข Distance to EMA 10, EMA 20, MA 50 and MA 200 (individually toggleable).
โข Up to two custom moving averages , with selectable EMA or MA type and configurable period.
โข Customizable colors, opacity, text size and vertical offset to fit the table cleanly on the chart.
How to use
1. Enable or disable moving averages from the โShowโ section.
2. To add another average, enable โCustom Moving Average 1/2โ and define its type and period.
3. Adjust the visual style from the โTableโ section (colors, opacity, size and position).
Notes
โข Distance is calculated as: (Close โ Moving Average) / Moving Average ร 100 .
โข Informational indicator only; no entry or exit signals are provided .
FibLevel Size CalculatorThis skript calculates position sizes and new take profits for sizing into an long or short position with 3 entrys defined at custom fibonacci retracement levels.
TP: -0,272
Entry1: 0.382
Entry2: 0.618
Entry3: 0.83
SL: 1.05
Expected RR per trade is 0.2 with a High Win rate definitly profitable.
Search for an established trend on the higher timeframe, drop to the smaller ones and look for correction waves. Once they break to the trenddirection of the higher timeframe take the fib from lowest to highes point. Draw a fib level on the chart and use the Indicator to define these Levels above. The calculator gives you the Margin to use in each position, and will check that you will not get liquidated an that you have enough margin. It tells you the new TP for Limit2 and Limit3 if they get hit so you can get out of the trade full TP with a small bounce.
Inputs:
Account Balance, Risk Percentage, and Leverage: These inputs are used to calculate the position size and risk.
Entry 1, Entry 2, Entry 3, Take Profit (TP), and Stop Loss (SL): These prices are used for calculating position sizes, risk, and profit for up to three entry points.
Calculations:
Risk Amount: Calculated based on the account balance and risk percentage.
Position Sizes (Qty): For each entry point, the position size is determined. The second and third entries have a multiplier (3x for Entry 2, 5x for Entry 3) compared to the first.
Stop Loss and Profit Calculation: The script calculates the potential profit and adjusts the TP levels based on the average entries for Limit 2 and Limit 3.
Margin Calculation: Margin requirements for each position are calculated based on leverage.
Output:
Table Display: A table shows key values like entry prices, position sizes, TP levels, potential profit, and margin requirements for each limit.
Warnings: It includes a liquidation warning and a check for whether the account is at risk of liquidation based on leverage.
Position Type: It automatically detects if the trade is a long or short based on the relationship between TP and SL.
Visualization:
Lines: It draws horizontal lines on the chart to visually represent the entry, TP, and SL levels.
Overall, this script is designed to help traders manage risk and calculate position sizes for multi-level entries using leverage.
Pls drop feedback in the comments.
Nef33 Forex & Crypto Trading Signals PRO
1. Understanding the Indicator's Context
The indicator generates signals based on confluence (trend, volume, key zones, etc.), but it does not include predefined SL or TP levels. To establish them, we must:
Use dynamic or static support/resistance levels already present in the script.
Incorporate volatility (such as ATR) to adjust the levels based on market conditions.
Define a risk/reward ratio (e.g., 1:2).
2. Options for Determining SL and TP
Below, I provide several ideas based on the tools available in the script:
Stop Loss (SL)
The SL should protect you from adverse movements. You can base it on:
ATR (Volatility): Use the smoothed ATR (atr_smooth) multiplied by a factor (e.g., 1.5 or 2) to set a dynamic SL.
Buy: SL = Entry Price - (atr_smooth * atr_mult).
Sell: SL = Entry Price + (atr_smooth * atr_mult).
Key Zones: Place the SL below a support (for buys) or above a resistance (for sells), using Order Blocks, Fair Value Gaps, or Liquidity Zones.
Buy: SL below the nearest ob_lows or fvg_lows.
Sell: SL above the nearest ob_highs or fvg_highs.
VWAP: Use the daily VWAP (vwap_day) as a critical level.
Buy: SL below vwap_day.
Sell: SL above vwap_day.
Take Profit (TP)
The TP should maximize profits. You can base it on:
Risk/Reward Ratio: Multiply the SL distance by a factor (e.g., 2 or 3).
Buy: TP = Entry Price + (SL Distance * 2).
Sell: TP = Entry Price - (SL Distance * 2).
Key Zones: Target the next resistance (for buys) or support (for sells).
Buy: TP at the next ob_highs, fvg_highs, or liq_zone_high.
Sell: TP at the next ob_lows, fvg_lows, or liq_zone_low.
Ichimoku: Use the cloud levels (Senkou Span A/B) as targets.
Buy: TP at senkou_span_a or senkou_span_b (whichever is higher).
Sell: TP at senkou_span_a or senkou_span_b (whichever is lower).
3. Practical Implementation
Since the script does not automatically draw SL/TP, you can:
Calculate them manually: Observe the chart and use the levels mentioned.
Modify the code: Add SL/TP as labels (label.new) at the moment of the signal.
Hereโs an example of how to modify the code to display SL and TP based on ATR with a 1:2 risk/reward ratio:
Modified Code (Signals Section)
Find the lines where the signals (trade_buy and trade_sell) are generated and add the following:
pinescript
// Calculate SL and TP based on ATR
atr_sl_mult = 1.5 // Multiplier for SL
atr_tp_mult = 3.0 // Multiplier for TP (1:2 ratio)
sl_distance = atr_smooth * atr_sl_mult
tp_distance = atr_smooth * atr_tp_mult
if trade_buy
entry_price = close
sl_price = entry_price - sl_distance
tp_price = entry_price + tp_distance
label.new(bar_index, low, "Buy: " + str.tostring(math.round(bull_conditions, 1)), color=color.green, textcolor=color.white, style=label.style_label_up, size=size.tiny)
label.new(bar_index, sl_price, "SL: " + str.tostring(math.round(sl_price, 2)), color=color.red, textcolor=color.white, style=label.style_label_down, size=size.tiny)
label.new(bar_index, tp_price, "TP: " + str.tostring(math.round(tp_price, 2)), color=color.blue, textcolor=color.white, style=label.style_label_up, size=size.tiny)
if trade_sell
entry_price = close
sl_price = entry_price + sl_distance
tp_price = entry_price - tp_distance
label.new(bar_index, high, "Sell: " + str.tostring(math.round(bear_conditions, 1)), color=color.red, textcolor=color.white, style=label.style_label_down, size=size.tiny)
label.new(bar_index, sl_price, "SL: " + str.tostring(math.round(sl_price, 2)), color=color.red, textcolor=color.white, style=label.style_label_up, size=size.tiny)
label.new(bar_index, tp_price, "TP: " + str.tostring(math.round(tp_price, 2)), color=color.blue, textcolor=color.white, style=label.style_label_down, size=size.tiny)
Code Explanation
SL: Calculated by subtracting/adding sl_distance to the entry price (close) depending on whether itโs a buy or sell.
TP: Calculated with a double distance (tp_distance) for a 1:2 risk/reward ratio.
Visualization: Labels are added to the chart to display SL (red) and TP (blue).
4. Practical Strategy Without Modifying the Code
If you donโt want to modify the script, follow these steps manually:
Entry: Take the trade_buy or trade_sell signal.
SL: Check the smoothed ATR (atr_smooth) on the chart or calculate a fixed level (e.g., 1.5 times the ATR). Also, review nearby key zones (OB, FVG, VWAP).
TP: Define a target based on the next key zone or multiply the SL distance by 2 or 3.
Example:
Buy at 100, ATR = 2.
SL = 100 - (2 * 1.5) = 97.
TP = 100 + (2 * 3) = 106.
5. Recommendations
Test in Demo: Apply this logic in a demo account to adjust the multipliers (atr_sl_mult, atr_tp_mult) based on the market (forex or crypto).
Combine with Zones: If the ATR-based SL is too wide, use the nearest OB or FVG as a reference.
Risk/Reward Ratio: Adjust the TP based on your tolerance (1:1, 1:2, 1:3)
Risk & Position DashboardRisk & Position Dashboard
Overview
The Risk & Position Dashboard is a comprehensive trading tool designed to help traders calculate optimal position sizes, manage risk, and visualize potential profit/loss scenarios before entering trades. This indicator provides real-time calculations for position sizing based on account size, risk percentage, and stop-loss levels, while displaying multiple take-profit targets with customizable risk-reward ratios.
Key Features
Position Sizing & Risk Management:
Automatic position size calculation based on account size and risk percentage
Support for leveraged trading with maximum leverage limits
Fractional shares support for brokers that allow partial share trading
Real-time fee calculation including entry, stop-loss, and take-profit fees
Break-even price calculation including trading fees
Multi-Target Profit Management:
Support for up to 3 take-profit levels with individual portion allocations
Customizable risk-reward ratios for each take-profit target
Visual profit/loss zones displayed as colored boxes on the chart
Individual profit calculations for each take-profit level
Visual Dashboard:
Clean, customizable table display showing all key metrics
Configurable label positioning and styling options
Real-time tracking of whether stop-loss or take-profit levels have been reached
Color-coded visual zones for easy identification of risk and reward areas
Advanced Configuration:
Comprehensive input validation and error handling
Support for different chart timeframes and symbols
Customizable colors, fonts, and display options
Hide/show individual data fields for personalized dashboard views
How to Use
Set Account Parameters: Configure your account size, maximum risk percentage per trade, and trading fees in the "Account Settings" section.
Define Trade Setup: Use the "Entry" time picker to select your entry point on the chart, then input your entry price and stop-loss level.
Configure Take Profits: Set your desired risk-reward ratios and portion allocations for each take-profit level. The script supports 1-3 take-profit targets.
Analyze Results: The dashboard will automatically calculate and display position size, number of shares, potential profits/losses, fees, and break-even levels.
Visual Confirmation: Colored boxes on the chart show profit zones (green) and loss zones (red), with lines extending to current price levels.
Reset Entry and SL:
You can easily reset the entry and stop-loss by clicking the "Reset points..." button from the script's "More" menu.
This is useful if you want to quickly clear your current trade setup and start fresh without manually adjusting the points on the chart.
Calculations
The script performs sophisticated calculations including:
Position size based on risk amount and price difference between entry and stop-loss
Leverage requirements and position amount calculations
Fee-adjusted risk-reward ratios for realistic profit expectations
Break-even price including all trading costs
Individual profit calculations for partial position closures
Detailed Take-Profit Calculation Formula:
The take-profit prices are calculated using the following mathematical formula:
// Core variables:
// risk_amount = account_size * (risk_percentage / 100)
// total_risk_per_share = |entry_price - sl_price| + (entry_price * fee%) + (sl_price * fee%)
// shares = risk_amount / total_risk_per_share
// direction_factor = 1 for long positions, -1 for short positions
// Take-profit calculation:
net_win = total_risk_per_share * shares * RR_ratio
tp_price = (net_win + (direction_factor * entry_price * shares) + (entry_price * fee% * shares)) / (direction_factor * shares - fee% * shares)
Step-by-step example for a long position (based on screenshot):
Account Size: 2,000 USDT, Risk: 2% = 40 USDT
Entry: 102,062.9 USDT, Stop Loss: 102,178.4 USDT, Fee: 0.06%
Risk per share: |102,062.9 - 102,178.4| + (102,062.9 ร 0.0006) + (102,178.4 ร 0.0006) = 115.5 + 61.24 + 61.31 = 238.05 USDT
Shares: 40 รท 238.05 = 0.168 shares (rounded to 0.17 in display)
Position Size: 0.17 ร 102,062.9 = 17,350.69 USDT
Position Amount (with 9x leverage): 17,350.69 รท 9 = 1,927.85 USDT
For 2:1 RR: Net win = 238.05 ร 0.17 ร 2 = 80.94 USDT
TP1 price = (80.94 + (1 ร 102,062.9 ร 0.17) + (102,062.9 ร 0.0006 ร 0.17)) รท (1 ร 0.17 - 0.0006 ร 0.17) = 101,464.7 USDT
For 3:1 RR: TP2 price = 101,226.7 USDT (following same formula with RR=3)
This ensures that after accounting for all fees, the actual risk-reward ratio matches the specified target ratio.
Risk Management Features
Maximum Trade Amount: Optional setting to limit position size regardless of account size
Leverage Limits: Built-in maximum leverage protection
Fee Integration: All calculations include realistic trading fees for accurate expectations
Validation: Automatic checking that take-profit portions sum to 100%
Historical Tracking: Visual indication when stop-loss or take-profit levels are reached (within last 5000 bars)
Understanding Max Trade Amount - Multiple Simultaneous Trades:
The "Max Trade Amount" feature is designed for traders who want to open multiple positions simultaneously while maintaining proper risk management. Here's how it works:
Key Concept:
- Risk percentage (2%) always applies to your full Account Size
- Max Trade Amount limits the capital allocated per individual trade
- This allows multiple trades with full risk on each trade
Example from Screenshot:
Account Size: 2,000 USDT
Max Trade Amount: 500 USDT
Risk per Trade: 2% ร 2,000 = 40 USDT per trade
Stop Loss Distance: 0.11% from entry
Result: Position Size = 17,350.69 USDT with 35x leverage
Total Risk (including fees): 40.46 USDT
Multiple Trades Strategy:
With this setup, you can open:
Trade 1: 40 USDT risk, 495.73 USDT position amount (35x leverage)
Trade 2: 40 USDT risk, 495.73 USDT position amount (35x leverage)
Trade 3: 40 USDT risk, 495.73 USDT position amount (35x leverage)
Trade 4: 40 USDT risk, 495.73 USDT position amount (35x leverage)
Total Portfolio Exposure:
- 4 simultaneous trades = 4 ร 495.73 = 1,982.92 USDT position amount
- Total risk exposure = 4 ร 40 = 160 USDT (8% of account)
PivotBoss VWAP Bands (Auto TF) - FixedWhat this indicator shows (high level)
The indicator plots a VWAP line and three bands above (R1, R2, R3) and three bands below (S1, S2, S3).
Band spacing is computed from STD(abs(VWAP โ price), N) and multiplied by 1, 2 and 3 to form R1โR3 / S1โS3. The script is timeframe-aware: on 30m/1H charts it uses Weekly VWAP and weekly bands; on Daily charts it uses Monthly VWAP and monthly bands; otherwise it uses the session/chart VWAP.
VWAP = the marketโs volume-weighted average price (a measure of fair value). Bands = volatility-scaled zones around that fair value.
Trading idea โ concept summary
VWAP = fair value. Price above VWAP implies bullish bias; below VWAP implies bearish bias.
Bands = graded overbought/oversold zones. R1/S1 are near-term limits, R2/S2 are stronger, R3/S3 are extreme.
Use trend alignment + price action + volume to choose higher-probability trades. VWAP bands give location and magnitude; confirmations reduce false signals.
Entry rules (multiple strategies with examples)
A. Momentum breakout (trend-following) โ preferred on trending markets
Setup: Price consolidates near or below R1 and then closes above R1 with above-average volume. Chart: 30m/1H (Weekly VWAP) or Daily (Monthly VWAP) depending on your timeframe.
Entry: Enter long at the close of the breakout bar that closes above R1.
Stop-loss: Place initial stop below the higher of (VWAP or recent swing low). Example: if price broke R1 at โน1,200 and VWAP = โน1,150, set stop at โน1,145 (5 rupee buffer below VWAP) or below the last swing low if that is wider.
Target: Partial target at R2, full target at R3. Trail stop to VWAP or to R1 after price reaches R2.
Example numeric: Weekly VWAP = โน1,150, R1 = โน1,200, R2 = โน1,260. Buy at โน1,205 (close above R1), stop โน1,145, target1 โน1,260 (R2), target2 โน1,320 (R3).
B. Mean-reversion fade near bands โ for range-bound markets
Setup: Market is not trending (VWAP flatish). Price rallies up to R2 or R3 and shows rejection (pin bar, bearish engulfing) on increasing or neutral volume.
Entry: Enter short after a confirmed rejection candle that fails to sustain above R2 or R3 (prefer confirmation: close back below R1 or below the rejection candle low).
Stop-loss: Just above the recent high (e.g., 1โ2 ATR or a fixed buffer above R2/R3).
Target: First target VWAP, second target S1. Reduce size if taking R3 fade as itโs an extreme.
Example numeric: VWAP = โน950, R2 = โน1,020. Price spikes to โน1,025 and forms a bearish engulfing candle. Enter short at โน1,015 after the next close below โน1,020. Stop at โน1,035, target VWAP โน950.
C. Pullback entries in trending markets โ higher probability
Setup: Price is above VWAP and trending higher (higher highs and higher lows). Price pulls back toward VWAP or S1 with decreasing downside volume and a reversal candle forms.
Entry: Long when price forms a bullish reversal (hammer/inside-bar) with a close back above the pullback candle.
Stop-loss: Below the pullback low (or below S2 if a larger stop is justified).
Target: VWAP then R1; if momentum resumes, trail toward R2/R3.
Example numeric: Price trending above Weekly VWAP at โน1,400; pullback to S1 at โน1,360. Enter long at โน1,370 when a bullish candle closes; stop at โน1,350; first target VWAP โน1,400, second target R1 โน1,450.
Exit rules and money management
Basic exit hierarchy
Hard stop exit โ when price hits initial stop-loss. Always use.
Target exit โ take partial profits at R1/R2 (for longs) or S1/S2 (for shorts). Use trailing stops for the remainder.
VWAP invalidation โ if you entered long above VWAP and price returns and closes significantly below VWAP, consider exiting (condition depends on timeframe and trade size).
Price action exit โ reversal patterns (strong opposite candle, bearish/bullish engulfing) near targets or beyond signals to exit.
Trailing rules
After price reaches R2, move stop to breakeven + a small buffer or to VWAP.
After price reaches R3, trail by 1 ATR or lock a defined profit percentage.
Position sizing & risk
Risk per trade: commonly 0.5โ2% of account equity.
Determine position size by RiskAmount รท (EntryPrice โ StopPrice).
If the stop distance is large (e.g., trading R3 fades), reduce position size.
Filters & confirmation (to reduce false signals)
Volume filter: For breakouts, require volume above short-term average (e.g., >20-period average). Breakouts on low volume are suspect.
Trend filter: Only take breakouts in the direction of the higher-timeframe trend (for example, use Daily/Weekly trend when trading 30m/1H).
Candle confirmation: Prefer entries on close of the confirming candle (not intrabar noise).
Multiple confirmations: When R1 break happens but RSI/plotted momentum indicator does not confirm, treat signal as lower probability.
Special considerations for timeframe-aware logic
On 30m/1H the script uses Weekly VWAP/bands. That means band levels change only on weekly candles โ they are strong, structural levels. Treat R1/R2/R3 as significant and expect fewer, stronger signals.
On Daily, the script uses Monthly VWAP/bands. These are wider; trades should allow larger stops and smaller position sizes (or be used for swing trades).
On other intraday charts you get session VWAP (useful for intraday scalps).
Example: If you trade 1H and the Weekly R1 is at โน2,400 while session VWAP is โน2,350, a close above Weekly R1 represents a weekly-level breakout โ prefer that for swing entries rather than scalps.
Example trade walkthrough (step-by-step)
Context: 1H chart, auto-mapped โ Weekly VWAP used.
Weekly VWAP = โน3,000; R1 = โน3,080; R2 = โน3,150.
Price consolidates below R1. A large bullish candle closes at โน3,085 with volume 40% above the 20-bar average.
Entry: Buy at close โน3,085.
Stop: Place stop at โน2,995 (just under Weekly VWAP). Risk = โน90.
Position size: If risking โน900 per trade โ size = 900 รท 90 = 10 units.
Targets: Partial take-profit at R2 = โน3,150; rest trailed with stop moved to breakeven after R2 is hit.
If price reverses and closes below VWAP within two bars, exit immediately to limit drawdown.
When to avoid trading these signals
High-impact news (earnings, macro announcements) that can gap through bands unpredictably.
Thin markets with low volume โ VWAP loses significance when volumes are extremely low.
When weekly/monthly bands are flat but intraday price is volatile without clear structure โ prefer session VWAP on smaller timeframes.
Alerts & automation suggestions
Alert on close above R1 / below S1 (use the built-in alertcondition the script adds). For higher-confidence alerts, require volume filter in the alert condition.
Automated order rules (if you automate): use limit entry at breakout close plus a small slippage buffer, immediate stop order, and OCO for TP and SL.
AI Strat ATR Dinamico + ADX + Trend Adaptivo (No Repaint)Below is a fully self-contained, English-language description of every input, function, and logical block inside the โAI Strat ATR Dinamico + ADX + Trend Adaptivo (No Repaint)โ indicator. You can copy and paste this into TradingViewโs โDescriptionโ field when you publish, without exposing any Pine code.
---
## Indicator Name and Purpose
**Name (Short Title):**
AI Strat Adaptive v3 (NoRepaint)
**Overview:**
This indicator combines multiple technical toolsโRSI, EMA, ATR (with a dynamic multiplier), ADX/DI, and an โAIโstyleโ scoring mechanismโto generate trend-filtered and reversal signals. It also optionally confirms signals on a higher timeframe, dynamically adjusts its sensitivity based on volatility, and plots intrabar stopโloss (SL) and takeโprofit (TP) levels derived from ATR. Special care has been taken to ensure that no signals โrepaintโ (i.e., once drawn on a closed bar, they never disappear or shift).
---
## 1. Main Inputs
All of the inputs appear in the Settings dialog for the published indicator. Below is a detailed explanation of each input, grouped by logical category.
### A. RSI & EMA Base Parameters
1. **RSI Length (Base)**
* **Input type:** Integer (default 14)
* **Description:** Number of bars used to calculate the Relative Strength Index (RSI). A shorter RSI reacts more quickly to price changes; a longer RSI is smoother.
2. **RSI Overbought Threshold**
* **Input type:** Integer (default 60)
* **Description:** If the RSI value rises above this level, it contributes a โsellโ signal component. You can adjust this (e.g., 70) to make your system more conservative.
3. **RSI Oversold Threshold**
* **Input type:** Integer (default 40)
* **Description:** If the RSI falls below this level, it contributes a โbuyโ signal component. Raising this threshold (e.g., 50) makes the strategy more aggressive in seeking reversals.
4. **EMA Length (Base)**
* **Input type:** Integer (default 20)
* **Description:** Number of bars for the Exponential Moving Average (EMA). A shorter EMA will produce more frequent crossovers, a longer EMA is smoother.
### B. ATR & Volatility Filter Parameters
5. **ATR Length (Base)**
* **Input type:** Integer (default 14)
* **Description:** Number of bars to calculate Average True Range (ATR). The ATR is used both for measuring volatility and for dynamic SL/TP levels.
6. **ATR SMA Length**
* **Input type:** Integer (default 50)
* **Description:** Number of bars to compute a Simple Moving Average of the ATR itself. This gives a baseline of โnormalโ volatility. If ATR rises significantly above this SMA, the indicator treats the market as โhigh volatility.โ
7. **ATR Multiplier Base**
* **Input type:** Float (default 1.2, step 0.1)
* **Description:** Base multiplier for ATR when filtering for volatility. The actual threshold is computed as `ATR_SMA ร (ATR_Multiplier Base) ร sqrt(current_ATR / ATR_SMA)`. In other words, the multiplier becomes larger if volatility is rising, and smaller if volatility is falling.
8. **Disable Volatility Filter**
* **Input type:** Boolean (default false)
* **Description:** If enabled (true), the indicator will ignore any volatilityโbased filtering, using signals regardless of ATR behavior. If disabled (false), signals only fire when ATR > (ATR\_SMA ร dynamic multiplier).
### C. Price-Change & โAI Scoreโ Parameters
9. **Price Change Period (bars)**
* **Input type:** Integer (default 3)
* **Description:** The number of bars back to measure percentage price change. Used to ensure that a โtrendโ signal is accompanied by a sufficiently positive (for longs) or negative (for shorts) price movement over this many bars.
10. **Base AI Score Threshold**
* **Input type:** Float (default 0.1)
* **Description:** The indicator computes a composite โAI-styleโ score by combining the RSI signal (overbought/oversold) and an EMA crossover signal. Only if the absolute value of that composite score exceeds this threshold will a trend signal be eligible. Raising it makes signals rarer but (potentially) higher-conviction.
### D. SMA โICTโ Trend Filter Parameters
11. **ICT SMA Long Length (Base)**
* **Input type:** Integer (default 50)
* **Description:** Number of bars for the โlongโ Simple Moving Average (SMA) used in the internal trend filter. Typically, price must be above this SMA (and ADX must be strong) to confirm an uptrend, or below it (and ADX strong) to confirm a downtrend.
12. **ICT SMA Short1 Length (Base)**
* **Input type:** Integer (default 10)
* **Description:** Secondary โfastโ SMA used both for reversal logic (e.g., price crossing above it can count as a bullish reversal) and part of the internal trend confirmation.
13. **ICT SMA Short2 Length (Base)**
* **Input type:** Integer (default 20)
* **Description:** A second โmediumโ SMA used for reversal triggers (e.g., crossovers or crossunders alongside RSI conditions).
### E. ADX & DI Parameters
14. **Base ADX Length**
* **Input type:** Integer (default 14)
* **Description:** Number of bars for the ADX (Average Directional Index) moving averages, which measure trend strength. The same length is used for +DI and โDI smoothing.
15. **Base ADX Threshold**
* **Input type:** Float (default 25.0, step 0.5)
* **Description:** If ADX > this threshold and +DI > โDI, we consider an uptrend; if ADX > this threshold and โDI > +DI, we consider a downtrend. Raising this value demands stronger trends to qualify.
### F. Sensitivity & Cooldown
16. **Sensitivity (0โ1)**
* **Input type:** Float between 0.0 and 1.0 (default 0.5)
* **Description:** A general โmixtureโ parameter used internally to weight how aggressively the indicator leans into trend versus reversal. In practice, the code uses it to fine-tune exact thresholds for switching between trend and reversal conditions. You can leave it at 0.5 unless you want to bias more heavily toward either regime.
17. **Base Cooldown Bars Between Signals**
* **Input type:** Integer (default 5, min 0)
* **Description:** Once a long or short signal fires, the indicator will wait at least this many bars before allowing a new signal in the same direction. Prevents โsignal flippingโ on each bar. A higher number forces fewer, more spaced-out entries.
18. **Trend Confirmation Bars**
* **Input type:** Integer (default 3, min 1)
* **Description:** After the directional filters (+DI/โDI cross, price vs. SMA), the indicator still requires that price remains on the same side of the long SMA for at least this many consecutive bars before confirming โtrend upโ or โtrend down.โ Larger values smooth out false breakouts but may lag signals.
### G. Higher Timeframe Confirmation
19. **Use Higher Timeframe Confirmation**
* **Input type:** Boolean (default true)
* **Description:** If true, the indicator will request a block of values (SMA, +DI, โDI, ADX) from a higher timeframe (default 60 minutes) and require that the higher timeframe is also in agreement (strong uptrend or strong downtrend) before confirming your current-timeframe trend. This helps filter out lower-timeframe noise.
20. **Higher Timeframe (TF) for Confirmation**
* **Input type:** Timeframe (default โ60โ)
* **Description:** The chart timeframe (e.g., 5, 15, 60 minutes) whose trend conditions must also be true. Itโs sent through a `request.security(..., lookahead=barmerge.lookahead_off)` call so that it never โpaints ahead.โ
### H. Dynamic TP/SL Parameters
21. **TP as ATR Multiple**
* **Input type:** Float (default 2.0, step 0.1)
* **Description:** When a trade is open, the โtake-profitโ price is determined by looking at the highest high (for longs) or lowest low (for shorts) observed since entry, and then plotting a cross (โXโ) at that level when the trend finally flips. This is purely for display. However, separate from that, this parameter can be adapted if you want a strictly ATRยญโbased TP. In the โMinimalโ version, TP is โ (highest high) once trend inverts, but you could rewrite it to use `entry_price + ATRรTP_Multiplier`.
22. **SL as ATR Multiple**
* **Input type:** Float (default 1.0, step 0.1)
* **Description:** While in a trade, a trailing SL line is plotted each bar. Its value is always `entry_price ยฑ (ATR ร SL_Multiplier)`. When the trend inverts, the SL no longer updates, and you see it on the chart.
### I. Display and Mode Options
23. **Show Debug Lines**
* **Input type:** Boolean (default true)
* **Description:** When enabled, the indicator will plot all intermediate linesโATR SMA, ATR Threshold, +DI, โDI, ADX (current and HTF), HTF SMA, etc.โso that you can diagnose exactly whatโs happening. Turn this off to hide all debug information and only see entry/exit shapes.
24. **Enable Scalping Mode**
* **Input type:** Boolean (default false)
* **Description:** If true, many of the โbaseโ parameters are halved (e.g., RSI length becomes 7 instead of 14, ATR length becomes 7 instead of 14, ADX length becomes 7, etc.), and the ADX threshold is multiplied by 0.8. This makes all oscillators and moving averages more reactive, suited for very short-term (scalping) setups.
---
## 2. Core Calculation Blocks
Below is a high-level description of each logical block (in code order), translated from Pine into conceptual steps.
### A. Adjust Inputs if โScalping Modeโ Is On
If **Scalping Mode** = true, then:
* `RSI_Length` becomes `max(1, round(Base_RSI_Length / 2))`
* `EMA_Length` becomes `max(1, round(Base_EMA_Length / 2))`
* `ATR_Length` becomes `max(1, round(Base_ATR_Length / 2))`
* `Price_Change_Period` becomes `max(1, round(Base_Price_Change_Period / 2))`
* `SMA_Long_Length`, `SMA_Short1_Length`, and `SMA_Short2_Length` are each halved (minimum 1).
* `ADX_Length` = `max(1, round(Base_ADX_Length / 2))`
* `ADX_Threshold` = `Base_ADX_Threshold ร 0.8`
* `Cooldown_Bars` = `max(0, round(Base_Cooldown_Bars / 2))`
Otherwise, all adjusted lengths = their base values.
### B. RSI, EMA & โAI Scoreโ on Current Timeframe
1. **Compute RSI:**
* Uses the (possibly adjusted) `RSI_Length`.
* Denote this as `RSI_Value`.
2. **Compute ATR & Its SMA:**
* `ATR_Value` = `ta.atr(ATR_Length)`.
* `ATR_SMA` = `ta.sma(ATR_Value, ATR_SMA_Length)`.
* Then define `Volatility_Increase` = (`ATR_Value > ATR_SMA`).
* If the volatility has increased, the weighting of RSI vs. EMA changes.
3. **Compute Weights:**
* If `Volatility_Increase == true`, then:
* `RSI_Weight = 0.7`
* `EMA_Weight = 0.3`
* Otherwise:
* `RSI_Weight = 0.3`
* `EMA_Weight = 0.7`
4. **RSI Signal Component (`RSI_Sig`):**
* If `RSI_Value > RSI_Overbought`, then `RSI_Sig = โ1`.
* Else if `RSI_Value < RSI_Oversold`, then `RSI_Sig = +1`.
* Otherwise, `RSI_Sig = 0`.
5. **EMA Value & Signal Component (`EMA_Sig`):**
* `EMA_Value` = `ta.ema(close, EMA_Length)`.
* `EMA_Sig = +1` if the current close crosses **above** the EMA; `EMA_Sig = โ1` if the current close crosses **below** the EMA; else `0`.
6. **Compute Raw โAI Scoreโ:**
$$
Raw\_AI = (RSI\_Sig \times RSI\_Weight)\;+\;(EMA\_Sig \times EMA\_Weight)
$$
Then,
$$
AI\_Score = \frac{Raw\_AI}{(RSI\_Weight + EMA\_Weight)}
$$
(This normalization ensures the score always ranges between โ1 and +1 if both weights sum to 1.)
### C. Dynamic ATR Multiplier & Volatility Filter
1. **Volatility Factor:**
$$
Volatility\_Factor = \frac{ATR\_Value}{ATR\_SMA}
$$
2. **Dynamic ATR Multiplier:**
$$
ATR\_Multiplier = ATR\_Multiplier\_Base \times \sqrt{Volatility\_Factor}
$$
3. **High Volatility Condition (`High_Volatility`):**
* If `Disable_Volatility_Filter == true`, then treat `High_Volatility = true` always.
* Else, `High_Volatility = (ATR_Value > ATR_SMA ร ATR_Multiplier)`.
### D. Price Change Percentage
* **Compute Price Change:**
$$
Price\_Change = \frac{(Close - Close )}{Close } \times 100
$$
* This is the percent return from `Price_Change_Period` bars ago to now.
* For a valid longโtrend signal, we require `Price_Change > 0`; for a short trend, `Price_Change < 0`.
### E. Local SMAs for Trend/Reversal Filters
* `SMA_Close_Long` = `ta.sma(close, SMA_Long_Length)`.
* `SMA_Close_Short1` = `ta.sma(close, SMA_Short1_Length)`.
* `SMA_Close_Short2` = `ta.sma(close, SMA_Short2_Length)`.
These three SMAs help define the โlocal trendโ and reversal breakout points:
* **Primary Trend Filter:**
* Price must be above `SMA_Close_Long` for an uptrend filter, or below `SMA_Close_Long` for a downtrend filter.
* **Reversal Filter:**
* A bullish reversal is detected if **(RSI < Oversold AND close crosses above EMA)** OR **(RSI < Oversold AND close crosses above SMA\_Close\_Short1)**.
* A bearish reversal is detected if **(RSI > Overbought AND close crosses below EMA)** OR **(RSI > Overbought AND close crosses below SMA\_Close\_Short1)**.
### F. Manual +DI, โDI & ADX on Current Timeframe
Instead of relying on the built-in `ta.adx`, the script calculates DI and ADX manually. This makes it easier to replicate the exact logic on a higher timeframe via `request.security`. The steps are:
1. **Directional Movement (DM) Components:**
* `Up_Move` = `high โ high `
* `Down_Move` = `low โ low`
* `Plus_DM` = `Up_Move` if (`Up_Move > Down_Move` AND `Up_Move > 0`), else `0`
* `Minus_DM` = `Down_Move` if (`Down_Move > Up_Move` AND `Down_Move > 0`), else `0`
2. **True Range (TR) Components:**
* `TR1` = `high โ low`
* `TR2` = `abs(high โ close )`
* `TR3` = `abs(low โ close )`
* `True_Range` = `max(TR1, TR2, TR3)`
3. **Smoothed Averages (RMA):**
* `Sm_TR` = `ta.rma(True_Range, ADX_Length)`
* `Sm_Plus` = `ta.rma(Plus_DM, ADX_Length)`
* `Sm_Minus`= `ta.rma(Minus_DM, ADX_Length)`
4. **Compute DI%:**
$$
Plus\_DI = \frac{Sm\_Plus}{Sm\_TR} \times 100,\quad
Minus\_DI = \frac{Sm\_Minus}{Sm\_TR} \times 100
$$
5. **DX and ADX:**
$$
DX = \frac{|Plus\_DI - Minus\_DI|}{Plus\_DI + Minus\_DI} \times 100,\quad
ADX = ta.rma(DX, ADX_Length)
$$
These values are referred to as `(plus_di, minus_di, adx_val)` for the current timeframe.
---
## 3. Higher Timeframe (HTF) Confirmation Function
If **Use Higher Timeframe Confirmation** is enabled, the script calls a single helper (Pine) function `f_htf` with two parameters: the ADX length and the SMA length (both taken from the โbaseโ or โscaledโ values). Internally, `f_htf` simply reruns the manual DI/ADX logic (same as above) on the higher timeframeโs bar data, and also includes that timeframeโs closing price and its SMA for trend comparison.
* **Request.Security Call:**
```
= request.security(
syminfo.tickerid,
higher_tf,
f_htf(adx_length, sma_long_len),
lookahead=barmerge.lookahead_off
)
```
* `lookahead=barmerge.lookahead_off` ensures that no HTF value โpaintsโ early; you always see only confirmed HTF bars.
* The returned tuple provides:
1. `ht_close` = HTF closing price
2. `ht_sma` = HTF SMA of length `sma_long_len`
3. `ht_pdi` = HTF +DI percentage
4. `ht_mdi` = HTF โDI percentage
5. `ht_adx` = HTF ADX value
---
## 4. Trend & Reversal Filters (Current & HTF)
### A. Current-Timeframe Trend Filter
1. **Uptrend\_Basic (Current TF)**
$$
(plus\_di > minus\_di)\;\land\;(adx\_val > ADX\_Threshold)\;\land\;(close > SMA\_Close\_Long)
$$
2. **Downtrend\_Basic (Current TF)**
$$
(minus\_di > plus\_di)\;\land\;(adx\_val > ADX\_Threshold)\;\land\;(close < SMA\_Close\_Long)
$$
3. **Trend Confirmation by Bars:**
* `Bars_Since_Below` = number of bars since `close <= SMA_Close_Long`.
* `Bars_Since_Above` = number of bars since `close >= SMA_Close_Long`.
* If `Uptrend_Basic == true` AND `Bars_Since_Below โฅ Trend_Confirmation_Bars` โ mark `Uptrend_Confirm = true`.
* If `Downtrend_Basic == true` AND `Bars_Since_Above โฅ Trend_Confirmation_Bars` โ mark `Downtrend_Confirm = true`.
### B. Reversal Filters (Current TF)
1. **Bullish Reversal (`Rev_Bullish`):**
* If `(RSI < RSI_Oversold AND close crosses above EMA_Value)` OR
`(RSI < RSI_Oversold AND close crosses above SMA_Close_Short1)`
โ then `Rev_Bullish = true`.
2. **Bearish Reversal (`Rev_Bearish`):**
* If `(RSI > RSI_Overbought AND close crosses below EMA_Value)` OR
`(RSI > RSI_Overbought AND close crosses below SMA_Close_Short1)`
โ then `Rev_Bearish = true`.
### C. Higher-Timeframe Trend Filter (HTF)
1. **HTF Uptrend (`HT_Uptrend`):**
$$
(ht\_pdi > ht\_mdi)\;\land\;(ht\_adx > ADX\_Threshold)\;\land\;(ht\_close > ht\_sma)
$$
2. **HTF Downtrend (`HT_Downtrend`):**
$$
(ht\_mdi > ht\_pdi)\;\land\;(ht\_adx > ADX\_Threshold)\;\land\;(ht\_close < ht\_sma)
$$
3. **Combine Current & HTF:**
* If **Use\_HTF\_Confirmation == true**, then:
* `Uptrend_Confirm := Uptrend_Confirm AND HT_Uptrend`
* `Downtrend_Confirm := Downtrend_Confirm AND HT_Downtrend`
* Otherwise, just use the current timeframeโs `Uptrend_Confirm` and `Downtrend_Confirm`.
4. **Define `CurrentTrend` (Integer):**
* `CurrentTrend = +1` if `Uptrend_Confirm == true`.
* `CurrentTrend = โ1` if `Downtrend_Confirm == true`.
* Otherwise, `CurrentTrend = 0`.
5. **Reset โOne Trade Per Trendโ:**
* There is a persistent variable `LastTradeTrend`.
* Every time `CurrentTrend` flips (i.e., `CurrentTrend != CurrentTrend `), the code sets `LastTradeTrend := 0`.
* That allows one new entry once the detected trend has changed.
---
## 5. OneโTime โCooldownโ Logic
* **`LastSignalBar`**
* A persistent integer (initially undefined).
* After each confirmed long or short entry, `LastSignalBar` is set to the bar index where that signal fired.
* **`Bars_Since_Signal`**
* If `LastSignalBar` is undefined, treat as a very large number (so that initial signals are always allowed).
* Otherwise, `Bars_Since_Signal = bar_index โ LastSignalBar`.
* **Cooldown Check:**
* A new long (or short) can only be generated if `(Bars_Since_Signal > Signal_Cooldown)`.
* This prevents multiple signals in rapid succession.
---
## 6. Entry Conditions (No Repaint)
All of the conditions below are calculated โintrabar,โ but the script only actually registers a **signal** on **bar close** (`barstate.isconfirmed`) so that signals never repaint.
### A. TrendโBased โRawโ Conditions
1. **Trend\_Long\_Raw:**
$$
(AI\_Score > AI\_Score\_Threshold)\;\land\;Uptrend\_Confirm\;\land\;High\_Volatility\;\land\;(Price\_Change > 0)
$$
2. **Trend\_Short\_Raw:**
$$
(AI\_Score < -AI\_Score\_Threshold)\;\land\;Downtrend\_Confirm\;\land\;High\_Volatility\;\land\;(Price\_Change < 0)
$$
### B. Reversal โRawโ Conditions
1. **Rev\_Long\_Raw:**
$$
Rev\_Bullish\;\land\;(CurrentTrend \neq +1)
$$
2. **Rev\_Short\_Raw:**
$$
Rev\_Bearish\;\land\;(CurrentTrend \neq -1)
$$
### C. Combine Raw Signals
* `Raw_Long = Trend_Long_Raw OR Rev_Long_Raw`.
* `Raw_Short = Trend_Short_Raw OR Rev_Short_Raw`.
### D. Confirmed Long/Short Signal Flags
On each new bar **close** (`barstate.isconfirmed == true`):
* **Long\_Signal\_Confirmed** can fire if:
1. `Raw_Long == true`
2. `LastTradeTrend != +1` (we havenโt already taken a long in this same trend)
3. `Bars_Since_Signal > Signal_Cooldown`
If all three hold, then on this bar close the code sets:
* `Long_Signal = true`
* `LastTradeTrend := +1`
* `LastSignalBar := bar_index`
Otherwise, `Long_Signal := false` on this bar.
* **Short\_Signal\_Confirmed** works the same way but with `Raw_Short`, `LastTradeTrend != -1`, etc.
If triggered, it sets `Short_Signal = true`, `LastTradeTrend := -1`, and `LastSignalBar := bar_index`. Otherwise `Short_Signal := false`.
* **Important:** If the bar is still forming (`else` branch of `barstate.isconfirmed`), then both `Long_Signal` and `Short_Signal` are forced to `false`. This guarantees that no shape or alert appears until the bar actually closes.
---
## 7. Plotting Entry/Exit Shapes
1. **Trend Long Signal (Triangle Up)**
* Condition: `Long_Signal == true` **AND** `Trend_Long_Raw == true`.
* Appearance: A small, semi-transparent lime green triangle drawn **below** the bar.
2. **Trend Short Signal (Triangle Down)**
* Condition: `Short_Signal == true` **AND** `Trend_Short_Raw == true`.
* Appearance: A small, semi-transparent maroon triangle drawn **above** the bar.
3. **Reversal Long Signal (Circle)**
* Condition: `Long_Signal == true` **AND** `Rev_Long_Raw == true`.
* Appearance: A tiny, more transparent green circle drawn **below** the bar.
4. **Reversal Short Signal (Circle)**
* Condition: `Short_Signal == true` **AND** `Rev_Short_Raw == true`.
* Appearance: A tiny, more transparent red circle drawn **above** the bar.
Since `Long_Signal` and `Short_Signal` only ever become true at bar close, these shapes are never repainted or removed once drawn.
---
## 8. Unified Alert Message
* As soon as a new bar closes with either `Long_Signal` or `Short_Signal == true`, an alert message is sent:
* If `Long_Signal`, then `alert_msg = "action=BUY"`.
* If `Short_Signal`, then `alert_msg = "action=SELL"`.
* If neither, `alert_msg = ""` (no alert).
* The code calls `alert(alert_msg, freq=alert.freq_once_per_bar)` only if `barstate.isconfirmed` and `alert_msg` is nonโempty. This ensures exactly one alert per confirmed bar, no intrabar pops.
---
## 9. Dynamic TP/SL Logic (Minimal Implementation)
Once a long or short position is โopen,โ the script tracks these variables:
1. **Persistent Flags and Prices** (all persist between bars until reset):
* `InLong` (Boolean)
* `InShort` (Boolean)
* `Long_Max` (Float)
* `Short_Min` (Float)
* `Entry_Price` (Float)
2. **On Bar Close:**
* If `Long_Signal == true` โ
* Set `InLong := true`,
* `Entry_Price := close` of that bar,
* `Long_Max := high ` (last barโs high, so that weโre not using โfutureโ data).
* If `Short_Signal == true` โ
* Set `InShort := true`,
* `Entry_Price := close`,
* `Short_Min := low `.
3. **While `InLong == true`:**
* Continuously update `Long_Max = max(Long_Max, current high)` on each bar (intrabar, but finalized each close).
* Compute a dynamic SL:
$$
SL_{Long} = Entry\_Price - (ATR \times SL\_ATR\_Multiplier).
$$
* If **current trend** flips to non-uptrend (`CurrentTrend != +1`), mark `ExitLong = true`.
* Then the routine plots `TP_Long = Long_Max` as a cross (โXโ) at that level.
* Set `InLong := false` so that no further changes to `Long_Max` or `Entry_Price` happen on future bars.
4. **While `InShort == true`:**
* Continuously update `Short_Min = min(Short_Min, current low)`.
* Compute a dynamic SL:
$$
SL_{Short} = Entry\_Price + (ATR \times SL\_ATR\_Multiplier).
$$
* If trend flips to non-downtrend (`CurrentTrend != โ1`), mark `ExitShort = true`.
* Then the routine plots `TP_Short = Short_Min`.
* Set `InShort := false` to freeze those values.
5. **Plotting TP/SL if โShow Debugโ is On:**
* **TP Shapes:**
* When `ExitLong == true`, plot a solid lime โXโ at `TP_Long` (highest high).
* When `ExitShort == true`, plot a solid maroon โXโ at `TP_Short` (lowest low).
* **SL Lines:**
* If still `InLong`, draw a thin red line at `SL_Long` on each bar.
* If still `InShort`, draw a thin green line at `SL_Short`.
Thus, your charts visually show the highestโhigh take-profit cross for longs, the lowest-low take-profit cross for shorts, and a continuously updating trailing SL until the trend flips. Because all of this is triggered on confirmed bars, nothing โjumps aroundโ after the fact.
---
## 10. DebugโOnly Plot Lines (When Enabled)
When **Show Debug Lines** = true, the indicator will also plot:
1. **ATR SMA (Orange):**
* The simple moving average of ATR over `ATR_SMA_Length`.
2. **ATR Threshold (Yellow):**
* `ATR_SMA ร ATR_Multiplier` (the dynamically scaled threshold).
3. **+DI & โDI (Current TF):**
* +DI plotted as a green line, โDI plotted as a red line (opacity \~70%).
4. **ADX (Current TF, Blue):**
* A blue line for the present timeframeโs ADX.
5. **ADX Threshold (Gray):**
* A horizontal gray line showing `ADX_Threshold`.
6. **+DI & โDI (HTF, Darker Colors):**
* If HTF confirmation is on, โHTF +DIโ is a greener but more transparent line; โHTF โDIโ is a redder but more transparent line.
7. **ADX (HTF, Blue but Transparent):**
* HTF ADX plotted in blue (high transparency).
8. **HTF SMA (Orange, Transparent):**
* The higher timeframeโs SMA (same length as `SMA_Long_Length`), drawn in fainter orange.
9. **Volatility Zone Fill (Yellow Tinted Area):**
* Fills the area between `ATR_SMA` and `ATR_SMA ร ATR_Multiplier`.
* Indicates โnormalโ versus โhighโvolatilityโ regimes.
These debug lines are purely visual aids. Disable them if you want a cleaner chart.
---
## 11. Putting It All Together โ Step-By-Step Flow
1. **Read Inputs** (RSI lengths, EMA length, ATR settings, etc.).
2. **Optionally Halve All Lengths** if โScalping Modeโ is checked.
3. **Calculate Current TF Indicators:**
* RSI, ATR, ATR\_SMA, EMA, price change, various SMAs, DI/ADX.
4. **Compute โAI Scoreโ** (weighted sum of RSI and EMA signals).
5. **Compute Dynamic ATR Multiplier** and decide if โHigh Volatilityโ is true.
6. **Compute Raw Trend/Reversal Conditions** on the current timeframe (without triggering yet).
7. **Fetch HTF Values** in one `request.security` call (SMAs, DI/ADX).
8. **Combine Current & HTF Trend Filters** to confirm `Uptrend_Confirm` or `Downtrend_Confirm`.
9. **Check Reversal Conditions** (price crossing EMA or SMA short, in overbought/oversold zones).
10. **Enforce โOne Trade Per Trendโ** (clear `LastTradeTrend` whenever `CurrentTrend` flips).
11. **Enforce Cooldown** (must wait at least `Signal_Cooldown` bars since the prior signal).
12. **On Bar Close:**
* If `Raw_Long` AND not already in a long trend AND cooldown met, then fire `Long_Signal`.
* Else if `Raw_Short` AND not already in a short trend AND cooldown met, then fire `Short_Signal`.
* Otherwise, no new signal on this bar.
13. **Plot Long/Short Entry Shapes** according to whether it was a Trend signal or a Reversal signal.
14. **Send Alert** (โaction=BUYโ or โaction=SELLโ) exactly once per confirmed bar.
15. **If New Long/Short Signal, Set `InLong`/`InShort`, Record Entry Price, Initialize `Long_Max`/`Short_Min`.**
16. **While `InLong` is true:** Update `Long_Max = max(previous Long_Max, current high)`. Compute `SL_Long`. If the current trend flips (no longer uptrend), set `ExitLong = true`, plot a โTP X,โ and close the position logic.
17. **While `InShort` is true:** Similarly update `Short_Min`, compute `SL_Short`, and if trend flips, set `ExitShort = true`, plot a โTP X,โ and close the position logic.
18. **Optionally Display Debug Lines** (ATR SMA, ATR threshold, DI/ADX, HTF DI/ADX, etc.).
---
## 12. How to Use in TradingView Community
When you publish this indicator to the TradingView communityโchoosing โProtectedโ or โInvite-onlyโ visibilityโyou can paste the above description into the โDescriptionโ field. Users will see exactly what each input does, how signals are generated, and what the various plotted lines represent, **without ever seeing the script source**. In this way, the code itself remains hidden but the logic is fully documented.
1. **Go to โCreate New Indicatorโ** on TradingView.
2. **Paste Your Pine Code** (the full indicator script) in the Pine editor and save it.
3. **Set Visibility = Protected** (or Invite-only).
4. **In the โDescriptionโ Text Box, paste the entirety of this document** (steps 1โ11).
5. **Click โPublish Script.โ**
Users who view your indicator will see its name (โAI Strat Adaptive v3 (NoRepaint)โ), a list of all inputs (with default values), and the detailed English description above. They can then load it on any chart, adjust inputs, and see the plotted signals, TP/SL lines, and optional debug overlaysโwithout accessing the underlying Pine code.
---
### Summary of Key Points
* **RSI, EMA, ATR, DI/ADX, and โAI Scoreโ** work together to define โtrend vs. reversal.โ
* **Dynamic volatility filter** uses ATR and ATR\_SMA to adapt the weighting of RSI vs. EMA and decide whether โvolatility is high enoughโ to permit a trend trade.
* **One trade per detected trend** and a **cooldown period** prevent overโtrading.
* **Higher timeframe confirmation** (optional) further filters out noise.
* **No-repaint logic**:
* All signals only appear at bar close (`barstate.isconfirmed`).
* HTF values are fetched with `lookahead=barmerge.lookahead_off`.
* **Entry shapes** (triangles and circles) clearly mark trend vs. reversal entries.
* **Dynamic TP/SL**: highestโhigh (or lowestโlow) since entry is used as TP, ATRรmultiplier as SL.
* **Debug mode** (optional) shows every intermediate line for full transparency.
Use this description verbatim (or adapt it slightly for your personal style) when publishing. That way, your community sees exactly how each component worksโinputs, functions, filtersโwhile the Pine source code remains private.
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.
ORB Dashboard for the TFLX Strategy# ORB Range/ATR Dashboard - Technical Indicator Description
## Main Function
This indicator analyzes Opening Range Breakout (ORB) patterns by calculating a defined time period and its relation to historical volatility. The indicator combines multiple technical analysis methods and presents results in a configurable dashboard format.
**Purpose:** This indicator automates the manual calculation steps of the TFLX analysis methodology, providing real-time computation of volatility ratios, trend filters, and risk management parameters that would otherwise require manual calculation and monitoring.
## Requirements and Limitations
**Additional Indicator Required:** This dashboard indicator works in conjunction with a separate ORB range visualization indicator that displays the actual high/low range levels on the chart. The dashboard provides analysis and calculations, while the range indicator provides visual reference points.
**Important Notice:** This indicator serves as an analytical tool and calculation assistant for the TFLX methodology. It does not execute trades automatically but provides data analysis to support manual decision-making processes.
## TFLX Analysis Methodology Framework
### Core Analysis Rules (Discretionary Implementation)
**Primary Conditions:**
- Market position relative to neutral zones (BB analysis)
- Volatility range between 15-60% of ATR(3)
- News event screening (high-impact economic releases)
- Market session timing constraints (before calculated session end)
- US Bank Holiday considerations
**Exception Conditions:**
- High-impact news with rebreak patterns
- Reversal patterns during neutral market conditions
### Technical Specifications of the Methodology
**Range Definition:**
- Time Period: First 15 minutes after market open
- Measurement: High-Low range calculation
- Breakout Trigger: 5-minute close outside established range
**Volatility Analysis:**
- Formula: (Range Points / ATR(3) Previous Day) ร 100
- Threshold Ranges:
- <15%: Below minimum threshold
- 15-20%: Low volatility range
- 25-30%: Moderate volatility range
- 30-40%: Good volatility range
- 40-50%: High volatility range
- 50-60%: Very high volatility range
- >60%: Above maximum threshold
**News Event Categories:**
- Major Events: NFP, CPI, PPI, FOMC releases
- Minor Events: All significant economic releases during market hours
- Impact Assessment: Market reaction analysis framework
**Trend Analysis Framework (1H Bollinger Bands):**
- Base Calculation: EMA(200) with standard deviation bands
- Reference Points: Market Open, ORB Close, Trigger Bar
- Decision Logic: 2 out of 3 reference points determine bias
- Zone Classifications:
- Within 0.5 multiplier: Neutral zone
- Within 1.5 multiplier: Directional bias zone
- Outside 1.5 multiplier: Strong directional zone
**Timing Constraints:**
- Session Window: Market open to calculated session end (typically 4.5 hours)
- Retracement Analysis: Maximum adverse movement before breakeven or stop loss
**Manual Calculation Process (Automated by Indicator):**
1. Measure range in points using chart measurement tools
2. Switch to daily timeframe
3. Set ATR period to 3
4. Extract previous day's ATR value
5. Calculate: (Range Points รท ATR Value) ร 100
6. Apply percentage thresholds for analysis
## Core Components and Calculation Methods
### 1. Opening Range Calculation
**Data Source:** High/Low/Close prices of current timeframe
**Calculation:**
- Defines a configurable time period (default: 15 minutes)
- Collects during this period: `range_high = max(high)` and `range_low = min(low)`
- Calculates Range Size: `range_size = range_high - range_low`
- Stores the last close price of the period: `final_orb_close`
### 2. ATR (Average True Range) Integration
**Data Source:** Daily True Range values
**Calculation:**
```
daily_atr = ta.atr(length) // Default 3 periods
atr_yesterday = daily_atr // Previous trading day
```
**Available Methods:** RMA (default), SMA, EMA, WMA
### 3. Volatility Ratio Calculation
**Formula:**
```
ratio = (range_size / atr_yesterday) * 100
```
**Purpose:** Normalization of current range against historical volatility
**Configurable Parameters:** Min/Max thresholds (default: 15-60%)
### 4. Bollinger Bands Integration (1H Timeframe)
**Data Source:** 1-hour chart data via `request.security()`
**Calculation:**
```
bb_ema = ta.ema(close, 200) // 1H timeframe
bb_std = ta.stdev(close, 200) // 1H timeframe
bb_upper = bb_ema + (bb_std * multiplier)
bb_lower = bb_ema - (bb_std * multiplier)
```
**Configurable Multipliers:**
- Neutral Zone: 0.5x standard deviation
- Strong Zone: 1.5x standard deviation
### 5. Trend Filter System (2/3 Method)
**Components:**
1. **NY Open Signal:** Compares 1H open price with BB levels
2. **ORB Close Signal:** Compares final ORB close with BB levels
3. **Trigger Signal:** Compares breakout price with BB levels
**Logic:**
```
if (bullish_signals >= 2) โ "BULLISH"
if (bearish_signals >= 2) โ "BEARISH"
else โ "MIXED" or "NO TREND"
```
## Component Interaction
### Trade Signal Generation
**Algorithm:**
```
trade_allowed = (orb_ratio >= min_threshold AND orb_ratio <= max_threshold)
AND (bb_signal != "NEUTRAL")
AND (trend_filter_result contains "BULLISH" OR "BEARISH")
```
### Risk Management Calculation
**Entry Points:**
- Long Entry: `range_high`
- Short Entry: `range_low`
**Stop Loss Calculation:**
```
sl_level = range_low + (range_size * sl_position_percent / 100)
```
**Take Profit Calculation:**
```
tp_distance = range_size * tp_factor_percent / 100
long_tp = long_entry + tp_distance
short_tp = short_entry - tp_distance
```
**Position Sizing (CFD-optimized):**
```
risk_per_contract = avg_risk_points * contract_value * lot_size
max_contracts = max_risk_amount / risk_per_contract
```
**Margin Calculation (CFDs):**
```
position_value = total_units * entry_price
margin_required = position_value / leverage
```
## Dashboard Elements
### 1. Volatility Filter Section
- **ORB Range:** Current range in points
- **ATR Previous:** Yesterday's ATR values
- **ORB Ratio:** Calculated ratio with color coding
### 2. Trend Filter Section
- **NY Open vs BB:** Position of 1H open relative to BB
- **ORB Close vs BB:** Position of ORB close relative to BB
- **Trigger Bar vs BB:** Position of breakout price relative to BB
- **Trend Result:** Summary of 2/3 filter
### 3. Risk Management Section (optional)
- **R/R Ratio:** Calculated from TP/SL distances
- **Risk per Lot:** Based on instrument type
- **Max Lot Packages:** Automatic position sizing calculation
- **Margin Required:** For CFD instruments
### 4. Journal Section (optional)
- **Breakout Timing:** Categorization by bars (1-3, 4-6, 7-9, 10-12, 13+)
- **Direction Tracking:** Bullish/Bearish breakout direction
- **Position Analysis:** Distance of breakout to ORB range
## Automatic Instrument Detection
**CFD/Index Treatment:**
```
if (syminfo.type == "cfd" OR syminfo.type == "index")
contract_value = 1.0 * cfd_lot_size
```
**Forex Treatment:**
```
if (syminfo.type == "forex")
contract_value = syminfo.pointvalue * cfd_lot_size
```
**Futures/Stocks:**
```
contract_value = syminfo.pointvalue
```
## Timezone Handling
- All time calculations based on configurable timezone
- Session End Time: ORB Start + 4.5 hours
- Automatic overflow handling for 24h format
## Alert System
**ORB Formation Alert:**
- Triggered upon completion of ORB period
- Includes: Range size, high/low values
**Breakout Alert:**
- Triggered on close price outside ORB range
- Includes: Direction, trade status based on filters
## Configuration Options
- **ORB Period:** Start/end time in hours/minutes
- **ATR Parameters:** Period and calculation method
- **Volatility Thresholds:** Min/max percentage limits
- **BB Parameters:** Period and multipliers
- **Risk Management:** Risk amount, SL/TP positions
- **Dashboard Layout:** Position, size, colors, visibility
## Data Integrity
- State variables with `var` declaration for persistence
- Daily reset of all relevant variables
- Lookahead bias prevention through `barmerge.lookahead_off`
- Multi-timeframe safety through `request.security()` functions
This technical implementation provides a comprehensive analysis framework for Opening Range Breakout patterns with integrated volatility, trend, and risk management components.
coinbot_ICT_Unicorn(AUTOTRADE)1. ๐ฏ ํต์ฌ ๊ธฐ๋ฅ: ์๋๋งค๋งค ์ ํธ ์ ์ก (Webhook)
์ด ์คํฌ๋ฆฝํธ๋ ๋งค๋งค ์ ํธ๊ฐ ๋ฐ์ํ ๋๋ง๋ค, ์ฌ์ฉ์๊ฐ '์๋๋งค๋งค ์ค์ (Autotrade Settings)'์ ์
๋ ฅํ ๊ฐ๋ค์ ์กฐํฉํ์ฌ ๊ตฌ์ฒด์ ์ธ JSON ๋ฉ์์ง๋ฅผ ์์ฑํ๊ณ alert() ํจ์๋ฅผ ํตํด ์นํ
์ผ๋ก ์ ์กํฉ๋๋ค.
์
๋ ฅ ์ค์ : user_id, exchange(๊ฑฐ๋์), leverage(๋ ๋ฒ๋ฆฌ์ง), capital_percent(ํฌ์
์๋ %), sl_percent(์์ %), ๊ทธ๋ฆฌ๊ณ 3๋จ๊ณ ๋ถํ ์ต์ (tp1_price_percent, tp1_qty_percent ๋ฑ) ์ค์ ์ ์
๋ ฅ๋ฐ์ต๋๋ค.
์ ํธ ์ข
๋ฅ:
ENTRY (์ง์
): ๋งค์(buy) ๋๋ ๋งค๋(sell) ์ ํธ๊ฐ ๋ฐ์ํ๋ฉด, ์ ๋ชจ๋ ์ค์ ๊ฐ์ ํฌํจํ ์ง์
๋ช
๋ น์ ๋ณด๋
๋๋ค.
CLOSE (์์ ): ์ ๋ต์ ๋ด๋ถ ๋ก์ง์ ์ํด ์์ ๊ฐ์ ๋๋ฌํ๋ฉด(slAlertTick), ํฌ์ง์
์ ์ข
๋ฃํ๋ผ๋ ์ ํธ๋ฅผ ๋ณด๋
๋๋ค.
TAKE_PROFIT (์ต์ ): ๋ชฉํ๊ฐ์ ๋๋ฌํ๋ฉด(tpAlertTick), ์ค์ ๋ ๋ฌผ๋๋งํผ ์ต์ ํ๋ผ๋ ์ ํธ๋ฅผ ๋ณด๋
๋๋ค.
2. ๐ ์๋ ์๋ฆฌ: "ICT ์ ๋์ฝ" ๋งค๋งค ์ ๋ต
์ด ์คํฌ๋ฆฝํธ์ ์ง์
๋ก์ง์ ICT(Inner Circle Trader) ๊ฐ๋
์ค ํ๋์ธ **'์ ๋์ฝ ๋ชจ๋ธ'**์ ๋ฐ๋ฆ
๋๋ค.
๊ตฌ์ฑ ์์ ์๋ณ:
Breaker Block (BB): '๋ธ๋ ์ด์ปค ๋ธ๋ก'์ ์๋ณํฉ๋๋ค. ์ด๋ ํน์ ๊ณ ์ /์ ์ ์ ๋ง๋ ํ ๊ทธ ๋ฐฉํฅ์ผ๋ก ๊ฐ์ง ๋ชปํ๊ณ ๋ฐ๋ ๋ฐฉํฅ์ผ๋ก ๋ํ(Break)๋ ์ค๋ ๋ธ๋ก(Order Block)์
๋๋ค.
Fair Value Gap (FVG): '๊ณต์ ๊ฐ์น ๊ฐญ' (๊ฐ๊ฒฉ ๋ถ๊ท ํ ์์ญ)์ ์๋ณํฉ๋๋ค.
ํต์ฌ ์ง์
์ ํธ (Unicorn): ์ด ์ ๋ต์ ํต์ฌ ์ง์
์กฐ๊ฑด์ **Breaker Block(BB)๊ณผ Fair Value Gap(FVG)์ด ์ค์ฒฉ(Overlap)**๋๋, ์์ '์ ๋์ฝ'์ด๋ผ ๋ถ๋ฆฌ๋ ๊ฐ๋ ฅํ ์ง์ง/์ ํญ ์์ญ์ด ๋ฐ์ํ๋ ๊ฒ์
๋๋ค.
Long (๋งค์) ์ง์
:
๊ฐ๊ฒฉ์ด ํ๋ฝํ๋ฉฐ **'ํ๋ฝํ ๋ธ๋ ์ด์ปค ๋ธ๋ก(Bearish Breaker Block)'**์ ๋ง๋ญ๋๋ค.
์ดํ ๊ฐ๊ฒฉ์ด ์์น ๋ํํ๋ฉฐ ์ด ๋ธ๋ ์ด์ปค ๋ธ๋ก ์์ญ๊ณผ ์ค์ฒฉ๋๋ **'์์นํ FVG(Bullish FVG)'**๋ฅผ ์์ฑํฉ๋๋ค.
์ด ์ค์ฒฉ ์์ญ(FVG-BB Overlap)์ด ๋ฐ๋ก ๋งค์ ์ง์
์ ๊ทผ๊ฑฐ๊ฐ ๋ฉ๋๋ค. (์ฝ๋๊ฐ dbgRequireRetracement ์ค์ ์ ๋ฐ๋ผ FVG๋ก์ ๋๋๋ฆผ์ ๊ธฐ๋ค๋ฆฌ๊ฑฐ๋ ์ฆ์ ์ง์
์ ํธ๋ฅผ ๋ณด๋
๋๋ค.)
Short (๋งค๋) ์ง์
:
๊ฐ๊ฒฉ์ด ์์นํ๋ฉฐ **'์์นํ ๋ธ๋ ์ด์ปค ๋ธ๋ก(Bullish Breaker Block)'**์ ๋ง๋ญ๋๋ค.
์ดํ ๊ฐ๊ฒฉ์ด ํ๋ฝ ๋ํํ๋ฉฐ ์ด ๋ธ๋ ์ด์ปค ๋ธ๋ก ์์ญ๊ณผ ์ค์ฒฉ๋๋ **'ํ๋ฝํ FVG(Bearish FVG)'**๋ฅผ ์์ฑํฉ๋๋ค.
์ด ์ค์ฒฉ ์์ญ์ด ๋งค๋ ์ง์
์ ๊ทผ๊ฑฐ๊ฐ ๋ฉ๋๋ค.
3. ๐ ๋ถ๊ฐ ๊ธฐ๋ฅ
์๊ฐํ: ์ฐจํธ ์์ FVG ์์ญ๊ณผ Breaker Block ์์ญ์ ๋ฐ์ค๋ก ๊ทธ๋ ค์ฃผ์ด(์ค์ ์ ๋ฐ๋ผ ํ์/์จ๊น ๊ฐ๋ฅ) ๋งค๋งค ๊ทผ๊ฑฐ๋ฅผ ์๊ฐ์ ์ผ๋ก ํ์ธํ ์ ์๊ฒ ํฉ๋๋ค.
๋ฐฑํ
์คํ
๋์๋ณด๋: ์ฐจํธ ์ฐ์ธก ์๋จ(๊ธฐ๋ณธ๊ฐ)์ ์ด ์ ๋ต์ ๋์ ์ฑ๊ณผ(์ด ์ง์
ํ์, ์น/ํจ, ์น๋ฅ , ์ด์์ต๋ฅ )๋ฅผ ๋ณด์ฌ์ฃผ๋ ๋์๋ณด๋๋ฅผ ํ์ํฉ๋๋ค.
์์ฝ
์ด ์คํฌ๋ฆฝํธ๋ **"Breaker Block๊ณผ FVG์ ์ค์ฒฉ(์ ๋์ฝ ๋ชจ๋ธ)"**์ ์ ์ผํ ์ง์
์กฐ๊ฑด์ผ๋ก ์ฌ์ฉํ๋ ๋งค์ฐ ๊ตฌ์ฒด์ ์ธ ICT ์ ๋ต์
๋๋ค. ์ด ์กฐ๊ฑด์ด ์ถฉ์กฑ๋๋ฉด, ์ฌ์ฉ์๊ฐ ๋ฏธ๋ฆฌ ์ค์ ํ ์์ธํ ๋ฆฌ์คํฌ ๊ด๋ฆฌ ๊ฐ๋ค์ ๋ด์ ์๋๋งค๋งค ๋ด์ผ๋ก ์ฆ์ ์คํ ๊ฐ๋ฅํ ์ฃผ๋ฌธ ์ ํธ๋ฅผ ์ ์กํ๋ '์ฌ์ธ์(All-in-One)' ์ ๋ต ์คํฌ๋ฆฝํธ์
๋๋ค.
์์ฒญํ์ ๋๋ก, ํด๋น ์งํ ์์ฝ๋ณธ์ ์์ด๋ก ๋ฒ์ญํ์ฌ ์ ๊ณตํฉ๋๋ค.
This script is an automated trading (Autotrade) strategy signal generator based on the ICT "Unicorn" trading model.
As the "AUTOTRADE" in its name implies, the core purpose of this indicator is to detect specific conditions on the chart and send JSON-formatted order signals (webhooks) to an external automated trading bot.
Here are the core mechanics and features of this script:
1. ๐ฏ Core Feature: Automated Signal Transmission (Webhook)
Whenever a trade signal occurs, this script generates a specific JSON message by combining the values entered by the user in the "Autotrade Settings" and sends it via webhook using the alert() function.
Input Settings: It takes inputs for user_id, exchange, leverage, capital_percent (equity %), sl_percent (stop loss %), and settings for 3-stage split take-profits (e.g., tp1_price_percent, tp1_qty_percent).
Signal Types:
ENTRY: When a "buy" or "sell" signal occurs, it sends an entry command including all the settings above.
CLOSE (Stop-Loss): If the price hits the stop loss according to the strategy's internal logic (slAlertTick), it sends a signal to close the position.
TAKE_PROFIT: When a profit target is reached (tpAlertTick), it sends a signal to take profit on the specified quantity.
2. ๐ How It Works: The "ICT Unicorn" Strategy
The script's entry logic follows the "Unicorn Model," one of the concepts from ICT (Inner Circle Trader).
Identifying Components:
Breaker Block (BB): It identifies a "Breaker Block." This is an Order Block that, after creating a specific high/low, fails to continue in that direction and is instead broken through in the opposite direction.
Fair Value Gap (FVG): It identifies a "Fair Value Gap" (a price imbalance area).
Core Entry Signal (The Unicorn): The core entry condition for this strategy is the overlap of a Breaker Block (BB) and a Fair Value Gap (FVG), which creates a powerful support/resistance zone known as the "Unicorn."
Long Entry:
Price moves down, creating a "Bearish Breaker Block."
Subsequently, price breaks upward, creating a "Bullish FVG" that overlaps with this Breaker Block area.
This overlapping area (FVG-BB Overlap) becomes the basis for the long entry. (Depending on the dbgRequireRetracement setting, the code either waits for a retracement to the FVG or sends an immediate entry signal.)
Short Entry:
Price moves up, creating a "Bullish Breaker Block."
Subsequently, price breaks downward, creating a "Bearish FVG" that overlaps with this Breaker Block area.
This overlapping area becomes the basis for the short entry.
3. ๐ Additional Features
Visualization: It draws the FVG and Breaker Block zones as boxes on the chart (can be toggled in settings), allowing for visual confirmation of the trade setup.
Backtesting Dashboard: It displays a dashboard in the top-right corner (by default) showing the strategy's cumulative performance (total entries, wins/losses, win rate, total profit).
Summary
This script is a highly specific ICT strategy that uses the "overlap of a Breaker Block and an FVG (the Unicorn Model)" as its sole entry condition. When this condition is met, it transmits an immediately executable order signal to an automated trading bot, complete with all the detailed risk management values preset by the user. It is an "all-in-one" strategy script.
Katz Exploding PowerBand FilterUnderstanding the Katz Exploding PowerBand Filter (EPBF) v2.4
1. Indicator Overview
The Katz Exploding PowerBand Filter (EPBF) is an advanced technical indicator designed to identify moments of expanding bullish or bearish momentum, often referred to as "power." It operates as a standalone oscillator in a separate pane below the main price chart.
Its primary goal is to measure underlying market strength by calculating custom "Bull" and "Bear" power components. These components are then filtered through a versatile moving average and a dual signal line system to generate clear entry and exit signals. This indicator is not a simple momentum oscillator; it uses a unique calculation based on exponential envelopes of both price and squared price to derive its values.
2. On-Chart Lines and Components
The indicator pane consists of five main lines:
Bullish Component (Thick Green/Blue/Yellow/Gray Line): This is the core of the indicator. It represents the calculated bullish "power" or momentum in the market.
Bright Green: Indicates a strong, active long signal condition.
Blue: Shows the bull component is above the MA filter, but the filter itself is still pointing downโa potential sign of a reversal or weakening downtrend.
Yellow: A warning sign that bullish power is weakening and has fallen below the primary signal lines.
Gray: Represents neutral or insignificant bullish power.
Bearish Component (Thick Red/Purple/Yellow/Gray Line): This line represents the calculated bearish "power" or downward momentum.
Bright Red: Indicates a strong, active short signal condition.
Purple: Shows the bear component is above the MA filter, but the filter itself is still pointing downโa sign of potential trend continuation.
Yellow: A warning sign that bearish power is weakening.
Gray: Represents neutral or insignificant bearish power.
MA Filter (Purple Line): This is the main filter, calculated using the moving average type and length you select in the settings (e.g., HullMA, EMA). The Bull and Bear components are compared against this line to determine the underlying trend bias.
Signal Line 1 (Orange Line): A fast Exponential Moving Average (EMA) of the stronger power component. It acts as the first level of dynamic support or resistance for the power lines.
Signal Line 2 (Lime/Gray Line): A slower EMA that acts as a confirmation filter.
Lime Green: The line turns lime when it is rising and the faster Signal Line 1 is above it, indicating a confirmed bullish trend in momentum.
Gray: Indicates a neutral or bearish momentum trend.
3. On-Chart Symbols and Their Meanings
Various characters are plotted at the bottom of the indicator pane to provide clear, actionable signals.
L (Pre-Long Signal): The first sign of a potential long entry. It appears when the Bullish Component rises and crosses above both signal lines for the first time.
S (Pre-Short Signal): The first sign of a potential short entry. It appears when the Bearish Component rises and crosses above both signal lines for the first time.
โฒ (Post-Long Signal): A stronger confirmation for a long entry. It appears with the 'L' signal only if the momentum trend is also confirmed bullish (i.e., the slower Signal Line 2 is lime green).
โผ (Post-Short Signal): A stronger confirmation for a short entry. It appears with the 'S' signal only if the momentum trend is confirmed bullish.
Exit / Take-Profit Symbols:
These symbols appear when a power component crosses below a line, suggesting that momentum is fading and it may be time to take profit.
โ ๏ธ (Exit Signal 1): The Bull/Bear component has crossed below the main MA Filter. This is the first and most sensitive take-profit signal.
โฃ๏ธ (Exit Signal 2): The Bull/Bear component has crossed below the faster Signal Line 1. This is a moderate take-profit signal.
๐ผ (Exit Signal 3): The Bull/Bear component has crossed below the slower Signal Line 2. This is the slowest take-profit signal, suggesting the trend is more definitively exhausted.
4. Trading Strategy and Rules
Long Entry Rules:
Initial Signal: Wait for an L to appear at the bottom of the indicator. This confirms that bullish power is expanding.
Confirmation (Recommended): For a higher-probability trade, wait for a green โฒ symbol to appear. This confirms the underlying momentum trend aligns with the signal.
Entry: Enter a long (buy) position on the opening of the next candle after the signal appears.
Short Entry Rules:
Initial Signal: Wait for an S to appear at the bottom of the indicator. This confirms that bearish power is expanding.
Confirmation (Recommended): For a higher-probability trade, wait for a maroon โผ symbol to appear. This confirms the underlying momentum trend aligns with the signal.
Entry: Enter a short (sell) position on the opening of the next candle after the signal appears.
Take Profit (TP) Rules:
The indicator provides three levels of take-profit signals. You can choose to exit your entire position or scale out at each level.
For a long trade, exit when you see โ ๏ธ, โฃ๏ธ, or ๐ผ appear below the Bullish Component.
For a short trade, exit when you see โ ๏ธ, โฃ๏ธ, or ๐ผ appear below the Bearish Component.
Stop Loss (SL) Rules:
The indicator does not provide an explicit stop loss. You must use your own risk management rules. Common methods include:
Swing High/Low: For a long position, place your stop loss below the most recent significant swing low on the price chart. For a short position, place it above the most recent swing high.
ATR-Based: Use an Average True Range (ATR) indicator to set a volatility-based stop loss.
Fixed Percentage: Risk a fixed percentage (e.g., 1-2%) of your account on the trade.
5. Disclaimer
This indicator is a tool for technical analysis and should not be considered financial advice. All trading involves significant risk, and past performance is not indicative of future results. The signals generated by this indicator are probabilistic and can result in losing trades. Always use proper risk management, such as setting a stop loss, and never risk more than you are willing to lose. It is recommended to backtest this indicator and use it in conjunction with other forms of analysis before trading with real capital. The indicator should only be used for educational purposes.
EAOBS by MIGVersion 1
1. Strategy Overview Objective: Capitalize on breakout movements in Ethereum (ETH) price after the Asian open pre-market session (7:00 PMโ7:59 PM EST) by identifying high and low prices during the session and trading breakouts above the high or below the low.
Timeframe: Any (script is timeframe-agnostic, but align with session timing).
Session: Pre-market session (7:00 PMโ7:59 PM EST, adjustable for other time zones, e.g., 12:00 AMโ12:59 AM GMT).
Risk-Reward Ratios (R:R): Targets range from 1.2:1 to 5.2:1, with a fixed stop loss.
Instrument: Ethereum (ETH/USD or ETH-based pairs).
2. Market Setup Session Monitoring: Monitor ETH price action during the pre-market session (7:00 PMโ7:59 PM EST), which aligns with the Asian market open (e.g., 9:00 AMโ9:59 AM JST).
The script tracks the highest high and lowest low during this session.
Breakout Triggers: Buy Signal: Price breaks above the sessionโs high after the session ends (7:59 PM EST).
Sell Signal: Price breaks below the sessionโs low after the session ends.
Visualization: The session is highlighted on the chart with a white background.
Horizontal lines are drawn at the sessionโs high and low, extended for 30 bars, along with take-profit (TP) and stop-loss (SL) levels.
3. Entry Rules Long (Buy) Entry: Enter a long position when the price breaks above the sessionโs high price after 7:59 PM EST.
Entry price: Just above the session high (e.g., add a small buffer, like 0.1โ0.5%, to avoid false breakouts, depending on volatility).
Short (Sell) Entry: Enter a short position when the price breaks below the sessionโs low price after 7:59 PM EST.
Entry price: Just below the session low (e.g., subtract a small buffer, like 0.1โ0.5%).
Confirmation: Use a candlestick close above/below the breakout level to confirm the entry.
Optionally, add volume confirmation or a momentum indicator (e.g., RSI or MACD) to filter out weak breakouts.
Position Size: Calculate position size based on risk tolerance (e.g., 1โ2% of account per trade).
Risk is determined by the stop-loss distance (10 points, as defined in the script).
4. Exit Rules Take-Profit Levels (in points, based on script inputs):TP1: 12 points (1.2:1 R:R).
TP2: 22 points (2.2:1 R:R).
TP3: 32 points (3.2:1 R:R).
TP4: 42 points (4.2:1 R:R).
TP5: 52 points (5.2:1 R:R).
Example for Long: If session high is 3000, TP levels are 3012, 3022, 3032, 3042, 3052.
Example for Short: If session low is 2950, TP levels are 2938, 2928, 2918, 2908, 2898.
Strategy: Scale out of the position (e.g., close 20% at TP1, 20% at TP2, etc.) or take full profit at a preferred TP level based on market conditions.
Stop-Loss: Fixed at 10 points from the entry.
Long SL: Session high - 10 points (e.g., entry at 3000, SL at 2990).
Short SL: Session low + 10 points (e.g., entry at 2950, SL at 2960).
Trailing Stop (Optional):After reaching TP2 or TP3, consider trailing the stop to lock in profits (e.g., trail by 10โ15 points below the current price).
5. Risk Management per Trade: Limit risk to 1โ2% of your trading account per trade.
Calculate position size: Account Size ร Risk % รท (Stop-Loss Distance ร ETH Price per Point).
Example: $10,000 account, 1% risk = $100. If SL = 10 points and 1 point = $1, position size = $100 รท 10 = 0.1 ETH.
Daily Risk Limit: Cap daily losses at 3โ5% of the account to avoid overtrading.
Maximum Exposure: Avoid taking both long and short positions simultaneously unless using separate accounts or strategies.
Volatility Consideration: Adjust position size during high-volatility periods (e.g., major news events like Ethereum upgrades or macroeconomic announcements).
6. Trade Management Monitoring :Watch for breakouts after 7:59 PM EST.
Monitor price action near TP and SL levels using alerts or manual checks.
Trade Duration: Breakout lines extend for 30 bars (script parameter). Close trades if no TP or SL is hit within this period, or reassess based on market conditions.
Adjustments: If the market shows strong momentum, consider holding beyond TP5 with a trailing stop.
If the breakout fails (e.g., price reverses before TP1), exit early to minimize losses.
7. Additional Considerations Market Conditions: The 7:00 PMโ7:59 PM EST session aligns with the Asian market open (e.g., Tokyo Stock Exchange open at 9:00 AM JST), which may introduce higher volatility due to Asian trading activity.
Avoid trading during low-liquidity periods or extreme volatility (e.g., major crypto news).
Check for upcoming events (e.g., Ethereum network upgrades, ETF decisions) that could impact price.
Backtesting: Test the strategy on historical ETH data using the session high/low breakouts for the 7:00 PMโ7:59 PM EST window to validate performance.
Adjust TP/SL levels based on backtest results if needed.
Broker and Fees: Use a low-fee crypto exchange (e.g., Binance, Kraken, Coinbase Pro) to maximize R:R.
Account for trading fees and slippage in your position sizing.
Time zone Adjustment: Adjust session time input for your time zone (e.g., "0000-0059" for GMT).
Ensure your trading platformโs clock aligns with the scriptโs time zone (default: America/New_York).
8. Example Trade Scenario: Session (7:00 PMโ7:59 PM EST) records a high of 3050 and a low of 3000.
Long Trade: Entry: Price breaks above 3050 (e.g., enter at 3051).
TP Levels: 3063 (TP1), 3073 (TP2), 3083 (TP3), 3093 (TP4), 3103 (TP5).
SL: 3040 (3050 - 10).
Position Size: For a $10,000 account, 1% risk = $100. SL = 11 points ($11). Size = $100 รท 11 = ~0.09 ETH.
Short Trade: Entry: Price breaks below 3000 (e.g., enter at 2999).
TP Levels: 2987 (TP1), 2977 (TP2), 2967 (TP3), 2957 (TP4), 2947 (TP5).
SL: 3010 (3000 + 10).
Position Size: Same as above, ~0.09 ETH.
Execution: Set alerts for breakouts, enter with limit orders, and monitor TPs/SL.
9. Tools and Setup Platform: Use TradingView to implement the Pine Script and visualize breakout levels.
Alerts: Set price alerts for breakouts above the session high or below the session low after 7:59 PM EST.
Set alerts for TP and SL levels.
Chart Settings: Use a 1-minute or 5-minute chart for precise session tracking.
Overlay the script to see high/low lines, TP levels, and SL levels.
Optional Indicators: Add RSI (e.g., avoid overbought/oversold breakouts) or volume to confirm breakouts.
10. Risk Warnings Crypto Volatility: ETH is highly volatile; unexpected news can cause rapid price swings.
False Breakouts: Breakouts may fail, especially in low-volume sessions. Use confirmation signals.
Leverage: Avoid high leverage (e.g., >5x) to prevent liquidation during volatile moves.
Session Accuracy: Ensure correct session timing for your time zone to avoid misaligned entries.
11. Performance Tracking Journaling :Record each tradeโs entry, exit, R:R, and outcome.
Note market conditions (e.g., trending, ranging, news-driven).
Review: Weekly: Assess win rate, average R:R, and adherence to the plan.
Monthly: Adjust TP/SL or session timing based on performance.
ai quant oculusAI QUANT OCULUS
Version 1.0 | Pine Script v6
Purpose & Innovation
AI QUANT OCULUS integrates four distinct technical conceptsโexponential trend filtering, adaptive smoothing, momentum oscillation, and Gaussian smoothingโinto a single, cohesive system that delivers clear, objective buy and sell signals along with automatically plotted stop-loss and three profit-target levels. This mash-up goes beyond a simple EMA crossover or standalone TRIX oscillator by requiring confluence across trend, adaptive moving averages, momentum direction, and smoothed price action, reducing false triggers and focusing on highโprobability turning points.
How It Works & Why Its Components Matter
Trend Filter: EMA vs. Adaptive MA
EMA (20) measures the prevailing trend with fixed sensitivity.
Adaptive MA (also EMA-based, length 10) approximates a faster-responding moving average, standing in for a KAMA-style filter.
Bullish bias requires AMA > EMA; bearish bias requires AMA < EMA. This ensures signals align with both the underlying trend and a more nimble view of recent price action.
Momentum Confirmation: TRIX
Calculates a triple-smoothed EMA of price over TRIX Length (15), then converts it to a percentage rate-of-change oscillator.
Positive TRIX reinforces bullish entries; negative TRIX reinforces bearish entries. Using TRIX helps filter whipsaws by focusing on sustained momentum shifts.
Gaussian Price Smoother
Applies two back-to-back 5-period EMAs to the price (โgaussianโ smoothing) to remove short-term noise.
Price above the smoothed line confirms strength for longs; below confirms weakness for shorts. This layer avoids entries on erratic spikes.
Confluence Signals
Buy Signal (isBull) fires only when:
AMA > EMA (trend alignment)
TRIX > 0 (momentum support)
Close > Gaussian (price strength)
Sell Signal (isBear) fires under the inverse conditions.
Requiring all three conditions simultaneously sharply reduces false triggers common to single-indicator systems.
Automatic Risk & Reward Plotting
On each new buy or sell signal (edge detection via not isBull or not isBear ), the script:
Stores entryPrice at the signal barโs close.
Draws a stop-loss line at entry minus ATR(14) ร Stop Multiplier (1.5) by default.
Plots three profit-target lines at entry plus ATR ร Target Multiplier (1ร, 1.5ร, and 2ร).
All previous labels and lines are deleted on each new signal, keeping the chart uncluttered and focusing only on the current trade.
Inputs & Customization
Input Description Default
EMA Length Period for the main trend EMA 20
Adaptive MA Length Period for the faster adaptive EM A substitute 10
TRIX Length Period for the triple-smoothed momentum oscillator 15
Dominant Cycle Length (Reserved) 40
Stop Multiplier ATR multiple for stop-loss distance 1.5
Target Multiplier ATR multiple for first profit target 1.5
Show Buy/Sell Signals Toggle on-chart labels for entry signals On
How to Use
Apply to Chart: Best on 15 mโ1 h timeframes for swing entries or 5 m for agile scalps.
Wait for Full Confluence:
Look for the AMA to cross above/below the EMA and verify TRIX and Gaussian conditions on the same bar.
A bright โLONGโ or โSHORTโ label marks your entry.
Manage the Trade:
Place your stop where the red or green SL line appears.
Scale or exit at the three yellow TP1/TP2/TP3 lines, automatically drawn by volatility.
Repeat Cleanly: Each new signal clears prior annotations, ensuring you only track the active setup.
Why This Script Stands Out
Multi-Layer Confluence: Trend, momentum, and noise-reduction must all align, addressing the weaknesses of single-indicator strategies.
Automated Trade Management: No manual plottingโstop and target lines appear seamlessly with each signal.
Transparent & Customizable: All logic is open, adjustable, and clearly documented, allowing traders to tweak lengths and multipliers to suit different instruments.
Disclaimer
No indicator guarantees profit. Always backtest AI QUANT OCULUS extensively, combine its signals with your own analysis and risk controls, and practice sound money management before trading live.





















