Position Avg Line + P/L Table - SightLine LabsPosition Avg – SLL is a lightweight position-tracking indicator designed to display a persistent average price level on the chart along with a real-time position summary table.
This script is non-trading and does not generate signals, entries, or exits. It is intended strictly for position awareness and visual reference.
What this indicator does:
Plots a persistent horizontal average price line (dashed by default)
Displays a live position statistics table showing:
Shares owned
Average price
Current price
Unrealized profit/loss in dollars
Unrealized profit/loss in percent
Updates automatically as price changes
Works across all timeframes
Does not depend on broker integration or strategy logic
Key features:
Average Price Line:
User-defined average price input
Persistent across the entire chart
Adjustable color and width
Visibility toggle
Position Table:
Six selectable table positions:
Top Left, Top Center, Top Right, Bottom Left, Bottom Center, Bottom Right
Adjustable text size (Tiny through Huge)
Optional table background fill
Optional inner grid lines
Optional outer frame border
Independent color control for:
Header background
Header text
Value text
Positive and negative P/L values
Chart Overlay Options:
Optional chart background tint
Does not modify the global chart theme
Inputs overview:
Position Settings:
Shares Owned
Average Price
Visual Settings:
Show or hide average price line
Line color and width
Table Settings:
Table position
Table text size
Color Settings:
Header background and text colors
Value text color
Positive and negative P/L colors
Optional table background, grid, and frame colors
How to use:
Add the indicator to a chart
Open the settings panel
Enter the number of shares and the average price
Adjust table position, size, and colors as desired
Use the average price line and table as a visual reference for trade and risk management
Notes and limitations:
This indicator does not place trades
It does not connect to any broker
All values are manually entered
Unrealized P/L is calculated using the chart’s current price
Commissions, fees, and slippage are not included
Disclaimer:
This script is provided for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or trade signals. All trading decisions are the sole responsibility of the user.
Developed by SightLine Labs.
지표 및 전략
Jack Dunn (Mean Reversion, Z-score + Vol Filter + Trend Filter))based on mean reversion and z score
FOR 1M XAUUSD or 5M USDJPY
Option Price SR (csgnanam)## ⚖️ Disclaimer
This script is provided for **educational and analytical purposes only**.
It does not constitute financial advice.
Use proper risk management and trade responsibly.
---
## 📌 Indicator Concept & Trading Logic
This is a rule-based reference indicator designed to interpret **option price behavior** using **previous-day derived equilibrium levels**.
The indicator helps traders classify the market into **range-bound, breakout, or invalid trade zones** by observing how **ATM Call (CE) and Put (PE)** prices react around these levels.
All levels are **fixed for the trading day** and recalculated only on the next session.
---
## 📊 Core Levels Explained
The indicator plots the following **daily-anchored reference levels**:
* **PDH / PDL** – Previous Day High / Low of the option
* **PDC** – Previous Day Close
* **100% AVG (Breakout Zone)**
Average of previous-day CE and PE prices for the same strike
* **75% AVG (Midzone)**
Balance / decision zone
* **50% AVG (Support Zone)**
Lower acceptance / decay boundary
These levels act as **reaction zones**, not prediction lines.
---
## 🧠 Market Interpretation Logic
### 1️⃣ Range-Bound Market Condition
* When **both ATM CE and ATM PE** are **trading within the 100% AVG (Breakout) level**,
the market has a **high probability of remaining range-bound**.
* Premium expansion is limited on both sides.
* Ideal environment for **non-directional strategies**.
---
### 2️⃣ Breakout Validation
* A **true directional move** requires **asymmetry** between CE and PE.
* If **one side moves into breakout**, the **opposite side must stay suppressed**.
**Example:**
* If **CE breaks down below Midzone**,
then **PE must be above Breakout or at least above Midzone**.
* The same logic applies inversely for PE breakdowns.
This confirms **capital rotation**, not random premium decay.
---
### 3️⃣ Midzone (75%) – Reversal Watch Area
* The **Midzone** is a **high-probability reaction area**.
* Many intraday reversals initiate from this level.
* Price acceptance or rejection here defines:
* Continuation
* Mean reversion
* Failed breakout
This zone should be **closely monitored for structure and volume behavior**.
---
### 4️⃣ Support Zone (50%) – Trade Invalidation
* When an option price trades **below the Support (50%) level**:
* That option side becomes **non-tradable**
* Premium strength is lost
* Risk increases significantly
Trades **below support** are considered **low probability** and should be avoided.
---
## ⚠️ Important Usage Notes
* This indicator is **not a buy/sell signal generator**
* It is a **context and decision-filter tool**
* Best used in combination with:
* Price action
* Structure
* Spot/index behavior
* Time-of-day context
All levels are **session-anchored** and do **not repaint intraday**.
---
## 🎯 Intended Use Case
* Intraday option traders
* ATM / near-ATM focus
* Range vs directional market identification
* Premium behavior analysis
* Trade filtering and risk control
---
Trend Stress Quant [MarkitTick]💡This indicator combines a liquidity-based stress model with a dynamic linear regression channel to identify potential market exhaustion points and assess trend quality. By merging volume impact analysis with statistical deviation, this tool aims to highlight moments where price action may be overextended relative to the underlying liquidity conditions.
● Originality and Utility
Standard volatility indicators often rely solely on price range (like Bollinger Bands). This script introduces a Stress Engine that normalizes the relationship between Price Range (True Range) and Volume. This helps distinguish between healthy price movements and liquidity-stress events (illiquidity). Furthermore, instead of using a fixed-length channel, this tool offers a Dynamic Mode that anchors the regression channel to recent pivot points, ensuring the statistical analysis aligns with the current market structure rather than an arbitrary timeframe.
● Methodology
The script operates on two distinct mathematical models:
• Illiquidity Stress Engine
The core formula calculates a raw illiquidity metric based on the log-normal distribution of the ratio between True Range and Volume. A Z-Score (standard score) is then derived from this data over a specific lookback period. High Z-Scores indicate that price is moving disproportionately fast relative to the available volume, often a signature of panic selling or euphoric buying (exhaustion).
• Linear Regression Channel
The script calculates an Ordinary Least Squares (OLS) regression line (the line of best fit) to determine the mean price trend.
Standard Deviation Bands are plotted parallel to this mean.
Pearson Correlation Coefficient (R) is calculated to quantify the strength of the linear trend. Values closer to 1 or -1 indicate a strong trend, while values near 0 indicate a chaotic or ranging market.
📑 How to Use
Traders can utilize the visual outputs for mean reversion or trend continuation context:
• Exhaustion Signals (SE / BE Labels)
SE (Seller Exhaustion): Appears when the market is in a downtrend, but the Stress Engine detects a statistical anomaly (High Z-Score) on a down candle. This suggests panic selling may be peaking.
BE (Buyer Exhaustion): Appears when the market is in an uptrend, but the Stress Engine detects high stress on an up candle, suggesting a potential blow-off top.
• Regression Channel
The dashed middle line represents the fair value (mean) of the current trend.
The outer bands represent statistical extremes. Price interacting with the outer bands (default 2 Standard Deviations) while coincident with an Exhaustion Signal provides a high-confluence area of interest.
• Metrics Dashboard
A dashboard displays the current Trend Regime, Exhaustion Status, and Channel Width (volatility percentage).
● Settings
• Exhaustion Model
Trend Filter Length: Sets the baseline EMA to determine if the market is bullish or bearish.
Stress Threshold (Sigma): The Z-Score required to trigger an exhaustion signal (default is 2.0).
• Channel Configuration
Dynamic Pivot Mode: If enabled, automatically calculates the channel length based on recent pivots. If disabled, uses the Fixed Length.
Standard Deviations: Controls the width of the inner and outer channel bands.
📖This guide explains how to interpret and utilize signals for trading:
The script is designed primarily for Mean Reversion and Exhaustion trading strategies.
● The Core Strategy: Volatility Exhaustion
The script uses a "Stress Engine" to identify when price movement is statistically overextended relative to the available liquidity (Volume).
• Setup A: The "Seller Exhaustion" (Bullish Bounce)
Look for this setup during a downtrend to catch a temporary bottom or a reversal.
Trend Condition: The dashboard shows Bearish (Price is below the trend filter).
Trigger: The label SE (Seller Exhaustion) appears below a candle.
Why? This indicates that selling pressure was intense but likely panic-driven (High Z-Score/Stress) and may be drying up.
Confluence: Ideally, this signal appears when the price is touching or piercing the Lower Channel Band (dotted or solid lines).
Action: Traders often use this as a signal to close Short positions or enter a speculative Long (counter-trend) targeting the middle line.
• Setup B: The "Buyer Exhaustion" (Bearish Pullback)
Look for this setup during an uptrend to catch a local top.
Trend Condition: The dashboard shows Bullish .
Trigger: The label BE (Buyer Exhaustion) appears above a candle.
Why? This indicates euphoric buying on low liquidity or extreme volatility that is statistically unsustainable.
Confluence: Look for price rejection at the Upper Channel Band.
Action: Traders often use this to close Long positions or enter a Short targeting the mean.
● The Filter: Trend & Correlation
The script includes a Linear Regression Channel that quantifies the quality of the trend.
• Channel Slope
If the channel is angling steeply up or down, the trend is strong.
• Pearson R (Correlation)
The script calculates the Pearson R coefficient.
Weak Correlation: If the channel turns Gray/Neutral (or the fill becomes weak), it means the correlation is below the threshold (default 0.5).
Trading Rule: Avoid trading exhaustion signals when the channel is Gray/Neutral, as the market is likely chopping sideways with no clear direction.
● Risk Management & Targets
• Stop Loss
Since this is a volatility tool, a common technique is to place stops just outside the Outer Deviation Band (the widest line). If price expands beyond the outer band with no exhaustion signal, the trend may be entering a "runaway" phase.
• Take Profit
Target 1: The Middle Regression Line (The dashed center line). Prices tend to revert to this mean after an exhaustion event.
Target 2: The opposite channel band (e.g., if you bought at the bottom, hold until the top).
● Summary of Dashboard Metrics
The table on your chart provides a quick snapshot:
Trend Regime: Tells you if you should fundamentally look for Shorts (Bearish) or Longs (Bullish).
Seller/Buyer Status: Alerts you if the current bar is EXHAUSTED or Normal .
Channel Width %: Indicates volatility. If the width is very low (percentage is small), a breakout might be imminent (squeezing). If high, be careful of chop.
⚙️ Indicator settings
• Signal Parameters
Exhaustion & Stress Model: Controls signal sensitivity.
Trend Filter: Decides if the market is Bullish or Bearish.
Stress Threshold (Sigma): Higher values (e.g., 2.5) make the script stricter, showing fewer but potentially stronger signals.
• Channel Configuration
Dynamic Pivot Mode: If ON, the channel length auto-adjusts to recent market pivots. If OFF, it uses the Fixed Length you set.
Channel Bands: Adjusts the channel width.
Outer Deviation: The boundary for "extreme" moves. Price hitting this often signals a reversal.
• Quality Filter
Filter Weak Correlations: If enabled, the channel turns gray during choppy/sideways markets to warn you not to trust trend signals.
• Visuals
Display Options: Toggles the "Stats" dashboard and adjusts volatility coloring.
● Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
MarketSurge-style Fundamentals Table (Readable, Fixed)Displays a compact panel with FY EPS history (most recent years), a TTM snapshot with 52-week high/low, and a summary block (Price, EPS TTM, P/E TTM, Market Cap, Shares Outstanding, Revenue YoY, EPS YoY, Avg Volume). Designed for dark mode with white text, zebra rows, and visible borders. Uses TradingView’s built-in fundamentals (request.financial) and daily price/volume series; does not include proprietary IBD/MarketSurge ratings.
Left table (Year / EPS / High / Low)
Year: Fiscal year (or TTM = trailing 12 months).
EPS: Earnings per share (diluted), FY for each fiscal year and TTM for the latest 12 months.
High / Low: Price high/low for that fiscal year; for TTM, it displays 52-week high/low.
Right table (Metric / Value)
Price: Latest close price.
EPS (TTM): Earnings per share over the last 12 months.
P/E (TTM): Price divided by EPS (TTM).
Mkt Cap: Market capitalization = Shares Outstanding × Price.
Shares Out: Total shares outstanding (latest available).
Rev YoY (FQ): Revenue year-over-year growth for the most recent fiscal quarter (vs. same quarter last year).
EPS YoY (FQ): EPS year-over-year growth for the most recent fiscal quarter (vs. same quarter last year).
Avg Vol (50D): 50-day average daily trading volume
直近数年の 年度(FY)EPS 推移に加え、TTM(直近12か月)EPS と 52週高値/安値 のスナップショット、さらに Price / EPS(TTM) / P/E(TTM) / 時価総額 / 発行株式数 / 売上YoY / EPS YoY / 平均出来高 などの主要指標を右側にまとめて表示します。**ダークモード前提(白文字・濃い背景・枠線・交互行)**で視認性を重視しています。データは TradingView の request.financial と価格・出来高系列に基づくため、IBD/MarketSurge の独自レーティング(Composite/EPS/SMR 等)は含みません。
左側(Year / EPS / High / Low)
Year: 決算年度(または TTM = 直近12か月)。
EPS: 1株当たり利益(希薄化後)。年度別(FY)と直近12か月(TTM)を表示。
High / Low: その年度の高値/安値。TTM 行では 52週高値/安値 を表示。
右側(Metric / Value)
Price: 最新の終値。
EPS (TTM): 直近12か月のEPS。
P/E (TTM): 株価 ÷ EPS(TTM)。
Mkt Cap: 時価総額 = 発行株式数 × 株価。
Shares Out: 発行済株式数(最新値)。
Rev YoY (FQ): 直近四半期の売上の前年同期比(同四半期前年差)。
EPS YoY (FQ): 直近四半期のEPSの前年同期比。
Avg Vol (50D): 50日平均出来高(1日あたり)。
Return from 7 April 2025 Low (Table)Return from 7 April 2025 Low (Table)
✅ What this script does
Detects April 7, 2025 candle
Stores that day’s LOW
Calculates % return from that low
Creates screenable conditions (e.g. >20%, >50%, etc.)
RSI + WVF Confluence [Multi-Stage]Overview
The RSI + WVF Confluence is a sophisticated reversal indicator that merges momentum analysis with market volatility. By combining a "hooking" Relative Strength Index (RSI) with a synthetic Williams VIX Fix (WVF), this tool identifies high-probability turning points where market "panic" meets a recovery in price action.
Unlike standard RSI indicators that fire signals based on a single threshold, this script uses a Multi-Stage Exhaustion System to categorize the depth of a reversal, helping traders distinguish between a minor bounce and a major market bottom.
How It Works
The indicator looks for a specific "Dual-Confirmation" setup:
Volatility Peak (The WVF): The script detects when price has dropped significantly relative to recent highs, creating a "Fear Peak" (indicated by the gray background).
Momentum Pivot (The RSI): It then waits for the RSI to "pivot" or curl upward, confirming that the downward pressure has exhausted and buyers are stepping back in.
The Multi-Stage Signal System
Signals are color-coded based on the severity of the oversold condition at the time of the pivot:
🟣 Magenta (Extreme): RSI below 15. A rare, high-conviction "blow-off" bottom.
🔴 Red (High): RSI between 15–20. Deep exhaustion usually seen in major corrections.
🟠 Orange (Moderate): RSI between 20–25. A strong, reliable reversal zone.
🟡 Gold (Standard): RSI between 25–30. The classic oversold bounce.
💎 Cyan (Early Warning): A tactical signal that fires during high-volatility spikes even if the RSI hasn't touched 30. Perfect for catching "V-Bottoms" and sharp pullbacks in strong uptrends.
Key Features
Volatility Memory: Includes a "WVF Memory" lookback, ensuring signals are captured even if the momentum shift happens a few bars after the peak of market fear.
ATR-Adjusted Labels: Arrows are mathematically positioned below the candles using Average True Range (ATR) to ensure a clean, overlap-free chart regardless of the asset's price.
Modern Pine Script v6: Optimized for performance and high-speed calculation on any timeframe.
Trading Instructions
For Bottom Fishing: Look for Magenta or Red arrows. These indicate the market is severely overextended.
For Trend Following: Use the Cyan (Early Warning) arrows to buy the dip during a bull market when the RSI stays relatively high but volatility spikes briefly.
Confluence: The gray background indicates "Peak Fear." The best signals often occur when an arrow appears while the background is active or immediately after it fades.
Multi-Level RSI Pivot ArrowsRSI Multi-Level Pivot Arrows
This indicator identifies high-probability long entries by detecting RSI "Hooks" at four distinct stages of exhaustion. Unlike standard RSI signals that trigger simply for being low, this script confirms a momentum pivot—firing only when the RSI has bottomed out and begun to tick upward.
How it Works
The script monitors the Relative Strength Index (RSI) for a specific "pivot" pattern: the previous bar must be oversold, and the current bar must show rising momentum. To help you gauge the severity of the oversold condition, the arrows are color-coded by intensity:
🟡 Gold (RSI 30): Standard oversold bounce.
🟠 Orange (RSI 25): Strong exhaustion.
🔴 Red (RSI 20): Extreme exhaustion.
🟣 Magenta (RSI 15): Maximum intensity/Rare "blow-off" bottom.
Key Features
Momentum Confirmation: Avoids "catching a falling knife" by waiting for the RSI to curl upward.
ATR-Based Positioning: Arrows automatically adjust their distance from the candle based on market volatility, keeping your chart clean and readable.
Modern Pine Script v6: Optimized for the latest TradingView engine for high performance and accuracy.
How to Trade
Look for Color Clusters: A Magenta arrow followed by a Gold arrow often confirms a strong base is forming.
Trend Alignment: This indicator works best in ranging markets or as a tool to catch deep pullbacks in an overall uptrend.
Risk Management: Use the deeper levels (Red/Magenta) to identify high-consequence reversal zones.
GemScope Signals## 📊 GemScope Signals – Strategy Summary
This is an **automated trading strategy (Pine Script v5)** designed to trade market trends using a **custom GemScope oscillator**, **EMA trend filter**, **risk control**, and **multi-level take profit system**.
---
### 🔹 Trading Modes
* **Long Only**
* **Short Only**
* **Both Long & Short**
---
### 🔹 Entry Logic
**Long Trades**
* No active long position
* Entry allowed (not in cool-down after stop loss)
* GemScope shows **bullish trend (bull > bear)**
* If EMA filter is enabled: **price must be above EMA 200**
**Short Trades**
* No active short position
* Entry allowed
* GemScope gives **bearish signal (bull < bear)**
---
### 🔹 Exit Logic
* Positions close on **opposite GemScope signals**
* Short positions also close when:
* EMA filter is enabled
* Price moves above EMA
* Trend turns bullish
---
### 🔹 Stop Loss System
* **Percentage-based stop loss** for both long and short trades
* After a stop loss:
* New entries are blocked
* Trading resumes only after a fixed number of candles (cool-down)
---
### 🔹 Take Profit System (Partial Exits)
* Up to **three take-profit levels (TP1, TP2, TP3)**
* Each TP has:
* Independent price distance (%)
* Independent position size to close (%)
* Helps lock profits gradually while keeping runners open
---
### 🔹 Trend & Visuals
* Candles turn **green in bullish trend** and **red in bearish trend**
* **EMA 200** is plotted for trend confirmation
* Chart signals:
* **“G”** → Long signal
* **“S”** → Short signal
---
### 🔹 Risk & Money Management
* Uses **100% of account equity per trade**
* **No pyramiding** (one trade at a time)
* Built-in protection against over-trading after losses
---
### 🔹 Overall Purpose
The strategy aims to:
* Trade only in **confirmed trends**
* Reduce false entries using EMA filtering
* Protect capital with stop loss and cool-down
* Maximize profits using **structured partial exits**
DDDDD : EMA Pack (Matched Colors + MTF)📌 DDDDD : EMA Pack (Matched Colors + MTF)
🔹 Concept
DDDDD : EMA Pack is a clean and minimal Exponential Moving Average (EMA) overlay designed for trend structure analysis and multi-timeframe context.
This indicator focuses on visual clarity, consistent color mapping, and optional MTF EMA projection, allowing traders to read market structure without clutter or signal noise.
It is not an entry or signal generator, but a trend and regime visualization tool.
🔹 Logic
The script plots a fixed set of EMAs commonly used to define short-term momentum, intermediate trend, and long-term bias:
EMA 5
EMA 10
EMA 25
EMA 50
EMA 75
EMA 200
Each EMA is calculated using the standard exponential moving average formula.
If a higher timeframe is selected, the EMA is calculated on that timeframe and projected onto the current chart using request.security().
🔹 Methodology
Users may select:
Source price (default: close)
EMA timeframe
Empty = current chart timeframe
Any higher timeframe = true MTF EMA projection
All EMA colors are manually matched and fixed to maintain visual consistency across markets and timeframes.
Line thickness is kept uniform to avoid visual hierarchy bias.
This design ensures the indicator remains purely structural, without repainting logic, smoothing tricks, or adaptive parameters.
🔹 How to Use
Use EMA alignment and spacing to assess:
Trend direction
Trend strength
Compression vs expansion
Higher-timeframe EMA projection can be used as:
Dynamic support/resistance
Trend filter
Regime context for lower-timeframe execution
This indicator works best when combined with:
Price action
Market structure
Separate entry/exit logic of your own system
⚠️ This indicator does not provide buy/sell signals and should not be used alone for trade execution.
🔹 Notes
No repainting beyond standard MTF behavior
No performance or profitability claims
Designed for discretionary and systematic traders
Suitable for stocks, crypto, forex, and indices
Elite Net Cash by Mashrab🚀 Elite Net Cash Dashboard code by Mashrab
Stop switching tabs. Get the full fundamental picture instantly.
This dual-panel dashboard puts institutional-grade data right on your chart. It splits the "heavy math" from the "market context," giving you a clean, professional view of a company's true value and trading personality.
🔥 Why You’ll Love It
Two Smart Tables:
Financials: See the health check immediately—Net Cash, Cash Backed %, Free Cash Flow, and Revenue Growth.
Profile: Know who you are trading—Market Cap (with auto-class like "Mega" or "Small"), Volatility (ADR), and Sector.
Auto-ETF Mapping: It automatically tags the sector with its matching ETF (e.g., Technology (XLK)). Perfect for quickly checking relative strength!
Volatility Alerts: The ADR (Average Daily Range) turns Yellow if the stock moves more than 5% a day. Know the risk before you size your position.
Minimalist Mode: Want a clean chart? Uncheck the "Borders" box in settings for a sleek, text-only floating display.
🎯 How to Trade It
Check the Green: Look at the Financials table. Green numbers mean the company is cash-rich and growing.
Check the Moves: Look at the Profile table. High ADR means expect wild swings; Mega Cap means steady stability.
Check the Sector: Use the ETF tag to see if the whole industry is moving or just this stock.
⚙️ Make It Yours
Split the View: Put Financials top-right and Profile bottom-right (or anywhere else).
Style It: Toggle borders on/off and pick your colors.
Sector Rotation ULTIMATE: 7 Narrativas IndependientesSector Rotation ULTIMATE: Crypto Narrative Rotation (7 Independent Sectors)
Advanced indicator displaying the relative strength of major crypto sectors through 7 independently normalized lines (0-100):
• Layer1 (ETH, SOL, BNB, TON, etc.) - Pink
• Enterprise (XRP, HBAR, XLM, QNT, VET) - Yellow
• DeFi (UNI, AAVE, MKR, LDO, CRV, etc.) - Cyan
• Memecoins (SHIB, DOGE, PEPE, WIF, FLOKI, BONK) - Green
• AI (TAO, FET, ICP, GRT, etc.) - Orange
• L2 / Scalability (ARB, OP, MATIC, STRK) - Purple
• RWA + Infra (ONDO, LINK) - Brown
Each sector sums the dominance of its top coins (40 total) and is normalized independently so the lines cross constantly, revealing real capital rotations.
- Colored fills to visually highlight the leading sector
- Works perfectly on any timeframe (clean daily data, no intraday noise)
- Ideal for spotting altseason, sector rotations, and entry timing
Use on CRYPTOCAP:TOTAL. The definitive narrative oscillator for 2026!
#Crypto #Altcoins #SectorRotation #DeFi #Memecoins #AI #RWA
debugginmsLibrary: debugginms
A utility library for Pine Script focused on time formatting, candle logic, and liquidity analysis.
Time & Session
oneBar(): Returns bar duration in milliseconds.
TF(t, timeOnly): Formats timestamp t into a readable string.
inSession(range): Checks if the current bar is within a specific time session.
enforceTimeLimit(limits): Validates time against a newline-separated list of restricted times.
getDuration(s, e): Calculates the difference between two timestamps.
formatTimeframe(): Returns the current chart timeframe as a formatted string.
Candle & Price Logic
isUp(i) / isDown(i): Returns true if the candle at index i is bullish or bearish.
barClose(price, up, strict): Checks if a candle closed above/below a level (includes "strict" equality toggle).
avg(a, b): Returns the average of two float values.
Liquidity & Sweeps
processSweep(L, price, up, leftB): Counts liquidity sweeps within an array based on price and direction.
nearestSwing(startTime, bullish, max_tp, min_p): Locates the closest swing point within defined price bounds.
UDT liquidity: Custom type storing price, time, original price/time, and sweep counts.
Formatting & Conversions
S(val): Overloaded function to convert float, int, or bool to a string.
S2(val): Alternative string formatting for float data.
lineStyleTextToVal(val): Converts string input to Pine line.style constants.
devToArray / getDev: Utilities for handling and calculating deviation levels.
Crypto Flow Index (CFI) - RS vs BTC/ETH ---
Crypto Flow Index, CFI
Crypto Flow Index, CFI, measures relative strength between an asset and Bitcoin or Ethereum.
You use CFI to judge whether capital favors your asset or the benchmark.
CFI does not give entry or exit signals.
You use CFI as a bias and context tool.
---
What CFI measures
Relative strength money flow on the BASE/BTC or BASE/ETH pair.
Volume weighted pressure, not price alone.
Momentum blended into flow to smooth rotations.
Optional USD trend filter using fast and slow EMAs.
---
How to read CFI
Above 50 means relative strength favors the asset.
Below 50 means relative strength favors BTC or ETH.
Rising CFI shows strengthening relative demand.
Falling CFI shows weakening relative demand.
---
Histogram
Green bars show positive relative flow.
Red bars show negative relative flow.
Larger bars signal stronger pressure.
---
Bias ribbon
Green ribbon shows bullish relative bias.
Red ribbon shows bearish relative bias.
Gray ribbon shows transition or balance.
---
How to use CFI
Favor long trades when CFI stays above 50.
Avoid longs when price rises but CFI falls.
Spot rotations before price reacts.
Combine with structure, entries, and risk rules.
---
Important limits
CFI compares assets only to BTC or ETH.
CFI does not represent the entire crypto market.
USD price and relative strength often diverge.
---
Core question CFI answers
Is your asset gaining or losing strength versus Bitcoin or Ethereum.
---
Relative Strength vs S&P 500 (SPX/ES) Relative Strength vs S&P 500
This indicator measures the relative performance of an asset compared to the S&P 500, helping traders and investors identify whether an asset is outperforming or underperforming the broader market.
The calculation is based on a price ratio between the selected asset and the S&P 500, optionally normalized to a base value (100) for easier interpretation.
How to read it:
Above the baseline (100) → the asset is outperforming the S&P 500
Below the baseline (100) → the asset is underperforming the S&P 500
Rising line → strengthening relative performance
Falling line → weakening relative performance
Why it’s useful:
Helps focus on market leaders, not just assets that “look cheap”
Filters trades and investments in the direction of relative strength
Useful for swing trading, long-term investing, and portfolio allocation
Widely used in institutional and professional asset management
This indicator is best used as a trend and selection filter, in combination with technical setups (support/resistance, VWAP, structure).
Market time opens @NeoNztime opens marked out new york session , london session, asia session and highs and lows of each one
Strategy-Based Breakout Backtest by AlturoiThis educational strategy is designed to help active traders learn how to turn trading ideas into data-driven decisions by testing strategies against historical price action before risking real capital.
The script walks through the step-by-step backtesting workflow on TradingView, showing how strategy logic, entries, exits, and risk rules translate into measurable performance metrics such as win rate, drawdown, and expectancy.
What this script helps you learn:
How to backtest on TradingView using Pine Script strategies
How the Strategy Tester calculates performance results
How to interpret win rate, drawdowns, and consistency
How to validate breakout and support/resistance concepts
How to identify structural edge — or flaws — before going live
This is not a signal service or financial advice. It is an educational framework meant to help traders understand proper backtesting techniques and avoid common mistakes when evaluating trading strategies.
Use this script as a learning template to experiment, modify logic, and improve your understanding of how professional backtesting on TradingView works.
SETUP XANDAO ETFEste setap é usado para operar nos futuros, usamos essas métricas para poder achar entradas






















