Trading bot gridsGuide: Price Lines – Arithmetic vs. Geometric
This script draws horizontal price lines (grids) between a start price and an end price.
You can choose whether the lines are distributed evenly (arithmetic) or by percentage (geometric).
🔧 Inputs
Start Price → Lower or upper boundary of the price range.
End Price → Opposite boundary of the price range.
Number of Lines → Total number of lines to be drawn between the start and end prices.
Distribution →
Arithmetic: Fixed USDT distance between each line.
Geometric: Fixed percentage distance between each line.
Grid Color → Color of the drawn lines.
📈 How it Works
The script calculates the lower (lo) and upper (hi) boundaries, regardless of which is entered first.
Arithmetic distribution: Each line is spaced by a fixed amount in USDT.
Geometric distribution: Each line is spaced by the same percentage difference from the previous one.
Lines are created only once at the first bar and remain on the chart.
All lines are extended across the entire visible chart.
💡 Tips
Useful for Grid Bot backtesting or visualizing price zones.
Works for both long and short price ranges.
In geometric mode, lines appear closer together near the lower price range and farther apart toward the upper range.
Fundamental Analysis
FVG + Bank Level Targeting w/ Alert TriggerDescription:
FVG + Bank Level Targeting w/ Alert Trigger is an intraday trading tool that combines Fair Value Gap (FVG) detection with dynamic institutional targeting using prior-day, weekly, and monthly high/low "Bank Levels." When a Fair Value Gap is detected, the script projects a logical target using the closest bank level in price's direction, and visually extends that level on your chart.
This tool is designed to help traders anticipate where price is most likely to move after an FVG appears — and alert them when price breaks through key target zones.
How It Works:
* Bank Level Calculation:
The indicator calculates Daily, Weekly, and Monthly high and low levels from the previous bar of each respective timeframe.
These are optionally plotted on the chart with a slight tick offset to avoid overlap with price.
* FVG Detection:
Bullish FVGs are defined by a gap between the low of the current candle and the high two candles prior, with a confirming middle candle.
Bearish FVGs follow the reverse pattern.
Once detected, the script finds the nearest unbroken institutional level (Bank Level) in the direction of the FVG and anchors a target line at that price level.
* Target Line Projection:
The script draws a persistent horizontal line (not just a plotted value) at the selected bank level.
These lines automatically extend a set number of bars into the future for clarity and trade planning.
* Breakout Detection:
When price crosses above a Bull Target or below a Bear Target, the script triggers a breakout condition.
These breakouts are useful for trade continuation or reversal setups.
* Alerts:
Built-in alert conditions notify you in real time when price crosses above or below a target.
These can be used to set TradingView alerts for your preferred Futures symbols or intraday pairs.
Parameters:
Tick Offset Multiplier: Adds distance between price and plotted levels.
Show Daily/Weekly/Monthly Levels: Toggle for each institutional level group.
FVG Extend Right (bars): Controls how far the target lines extend into the future.
Color Controls: Customize colors for FVG fill and target lines.
Use Case:
This indicator is designed for traders who want to:
Trade continuation or reversal moves around institutional price zones
Integrate Fair Value Gap concepts with more logical, historically anchored price targets
Trigger alerts when market structure evolves around key levels
It is especially useful for intraday Futures traders on the 15-minute chart or lower, but adapts well to any instrument with strong reactionary behavior at prior session highs/lows.
Line color best indices grouped by Artificial Intelligence
The script uses the best buy indicators, such as moving average crossovers, RSI, and others selected by AI. The idea is to determine whether the stock is classified as a strong buy (yellow line), a buy (green line), or a red (sell)
Swing Momentum Screener - stable v5 (2-6 wk)Playing with GPT5, i'm trying to see if it could make a swing trade indicator based on some conditions i have. I'm not expecting much. but i would like the communities input. have a look and thank you
Master Trend & Reversal Indicator [UTC-4 LEMAZZE]It looks like you've shared a Pine Script code for a comprehensive trading indicator called "Master Trend & Reversal Indicator ". This is a sophisticated indicator that combines multiple technical analysis tools and trading concepts. Let me break down what this script does:
Key Features:
Trading Session Hours:
Allows configuration of trading hours (UTC-4 timezone by default)
Includes killzones for Asian, London, and pre-market sessions
Technical Indicators:
VWAP (Volume Weighted Average Price) with standard deviation bands
RSI (Relative Strength Index) with divergence detection
ATR (Average True Range) for volatility filtering
Trading Signals:
Swing point detection (highs/lows)
Breakout signals with retest confirmation option
Divergence signals (bullish/bearish)
Visual Elements:
Plots VWAP and its bands
Marks divergence and breakout signals
Colors background for significant ATR movements
Shows pre-market levels
Statistics Table:
Displays current filter statuses
Shows daily PnL (Profit and Loss)
Tracks daily loss limit
Indicates trading session status
Risk Management:
Includes a daily loss limit feature
Multiple filter options (trend, volume, ATR)
Customization Options:
The script provides numerous user inputs to customize:
Trading hours
Indicator parameters (VWAP period, RSI settings, ATR values)
Which killzones to display
Various filter toggles
Breakout confirmation settings
Timezone Note:
The indicator is set up for UTC-4 timezone (as noted in the title), which is likely Eastern Time (ET) with daylight savings. The comments suggest it also accommodates UTC+2 timezone users.
This appears to be a professional-grade trading tool that combines multiple technical indicators with trading session awareness and risk management features. The creator (JM81) has designed it to work specifically during certain market hours and includes features to help identify significant moves and potential reversals.
5YPE fair Price5Y PE Fair Price — Multiply the five-year P/E by the current EPS to obtain a relative (P/E-based) fair price.
US Macro Cycle (Z-Score Model)US Macro Cycle (Z-Score Model)
This indicator tracks the US economic cycle in real time using a weighted composite of seven macro and market-based indicators, each converted into a rolling Z-score for comparability. The model identifies the current phase of the cycle — Expansion, Peak, Contraction, or Recovery — and suggests sector tilts based on historical performance in each phase.
Core Components:
Yield Curve (10y–2y): Positive & steepening = growth; inverted = slowdown risk.
Credit Spreads (HYG/LQD): Tightening = risk-on; widening = risk-off.
Sector Leadership (Cyclicals vs. Defensives): Measures market leadership regime.
Copper/Gold Ratio: Higher copper = growth signal; higher gold = defensive.
SPY vs. 200-day MA: Equity trend strength.
SPY/IEF Ratio: Stocks vs. bonds relative strength.
VIX (Inverted): Low/falling volatility = supportive; high/rising = risk-off.
Methodology:
Each series is transformed into a rolling Z-score over the selected lookback period (optionally using median/MAD for robustness and winsorization to clip outliers).
Z-scores are combined using user-defined weights and normalized.
The smoothed composite is compared against phase thresholds to classify the macro environment.
Features:
Customizable Weights: Emphasize the indicators most relevant to your strategy.
Adjustable Thresholds: Fine-tune cycle phase definitions.
Background Coloring: Visual cue for the current phase.
Summary Table: Displays composite Z, confidence %, and individual Z-scores.
Alerts: Trigger when the phase changes, with details on the composite score and recommended tilt.
Use Cases:
Align sector rotation or relative strength strategies with the macro backdrop.
Identify favorable or defensive phases for tactical allocation.
Monitor macro turning points to manage portfolio risk.
It's doesn't fill nan gaps so there is quite a bit of zeroes, non-repainting.
EMA Crossover with AlertsIndicator with Fast and Slow EMA Crossovers, includes alerts on such cross overs
4 EMA Multi-Length / Abbas4 EMA Multi Length indicator
in case you need to make 4 different EMA/s for your chart
for swinging you'll need 50/100/150/200
for scalping perhaps 9/20/50
this indicator allows you to combine up to 4 EMAS in one indicator instead of 4 separate ones.
相對相對PE估價法
使用5年平均PE乘以EPS 得到較為積極的估價方式
1. 首先查詢公司財年結算月份 (有的公司從6月結算 有的公司12月結算)
2.假設公司是12月結算,取12月的最後一個交易日的收盤價。
3. 此收盤價去除以該年EPS總和,即得到該年的PE
4.連續五年的PE平均值,稱作5年平均PE (取得2020,2021,2022,2023,2024的PE,取平均後就是2024年的5年平均PE)
5. 5年平均PE去乘上該年的EPS後,所得到的數值就是相對PE合理價。
相對PB估價法
與上述的方式相同
只有EPS更換為BVPS
以上兩種估價法
都必須要EPS或者是BVPS逐年穩定上升才適用
Relative P/E Valuation Method
Use the 5-year average P/E multiplied by EPS to produce a more aggressive valuation.
First, find the company’s fiscal year-end month (some companies end in June, others in December).
Assuming the company’s fiscal year ends in December, take the closing price on the last trading day of December.
Divide that closing price by the annual EPS for that fiscal year to get that year’s P/E.
Average the P/Es for five consecutive years to get the 5-year average P/E (take the P/Es for 2020, 2021, 2022, 2023, 2024 and average them — this produces the 5-year average P/E as of 2024).
Multiply the 5-year average P/E by the EPS of the target year — the result is the relative P/E fair value.
Relative P/B Valuation Method
Same procedure as above, but replace EPS with BVPS (book value per share).
Applicability
Both methods are appropriate only when EPS (for the P/E method) or BVPS (for the P/B method) have been steadily increasing year over year.
ASIAN UTC=2/UTC-4It looks like you're working on a Pine Script indicator to highlight the Asian trading session on your chart. Here's a breakdown of what your code does and some potential improvements:
Current functionality:
Creates customizable Asian session highlighting
Allows user to select their timezone (UTC+2 or UTC-4)
Shows session times in both local and UTC times
Draws a semi-transparent rectangle during the Asian session
EPS QoQ % ChangeThis indicator calculates and displays the quarter-over-quarter (QoQ) percentage change in earnings per share (EPS) directly on your chart, aligned with each earnings event.
It is designed to quickly highlight EPS growth or decline without the need to open an earnings report, providing traders and investors with instant, visual performance context.
Features :
- Automatic Earnings Detection: Identifies earnings bars and calculates QoQ % change.
- Color-Coded Text: Positive changes are shown in your chosen “up” color, declines in your “down” color, and flat results in a neutral color.
- Customizable Appearance: Choose text size and colors to match your chart style.
- Tooltip Support: Optional detailed tooltip showing reported EPS, previous EPS, and calculated QoQ change.
- Compact Layout: Displays in its own pane to avoid cluttering price action.
Use Cases :
- Quickly assess EPS growth trends over time.
- Spot significant earnings beats or misses without reading earnings transcripts.
- Use alongside other technical or fundamental tools for better decision-making.
IB LRS & CISD - LEMAZZEthe "IB LRS & CISD - LEMAZZE" TradingView indicator script. This is a comprehensive tool that combines three key technical analysis components:
Initial Balance (IB):
Tracks the high/low range during a user-defined session (default 9:30-10:30)
Offers customization for visualization (colors, labels, line styles)
Can display only current levels or all historical levels
Linear Regression Slope (LRS):
Plots a linear regression line based on user-defined length (default 14)
Shows slope direction with coloring
Includes optional alerts for zero-line crosses
Change in Supply/Demand (CISD):
Identifies trend changes using two methods (Classic or Liquidity Sweep)
Marks CISD events with labels and trend lines
Customizable colors and detection parameters
The script also includes an information table at the bottom right that displays:
Current Initial Balance levels
LRS slope direction (Bullish/Bearish/Neutral)
CISD trend state
Key features worth noting:
The Initial Balance can be extended left/right/both/none
Multiple style options for lines and labels
The CISD component has sophisticated logic for detecting trend changes
The script manages historical data efficiently with max_bars_back settings
The code is well-structured with clear sections for each component and uses Pine Script's newer features like typed variables (bin, swing) and object-oriented approaches for drawing tools.
Volume Analysis with Averages- LEMAZZEThis is a Pine Script indicator that analyzes trading volume with two moving averages. Here's what it does:
Features:
Plots raw volume as a histogram colored by price movement (green=up, red=down, gray=neutral)
Adds two Simple Moving Averages (SMA) of volume:
Blue line: 21-period SMA (default)
Orange line: 34-period SMA (default)
Creates alert conditions for:
High volume (when volume exceeds both MAs)
Low volume (when volume is below both MAs)
Displays the last values in a label on the right side of the chart
Customization Options:
Adjustable lengths for both moving averages (with reasonable min/max limits)
Transparency settings for the colors (currently at 70% opacity)
Usage:
The indicator helps identify periods of unusually high or low volume compared to recent averages, which can signal potential trend changes or confirm existing trends.
VRD-5: Volume Reversal Detector (5 Bars)Overview
This Pine Script indicator detects potential trend reversals based on volume patterns over a 5-bar period. It identifies accumulation (bullish) and distribution (bearish) patterns using volume analysis combined with price action.
Key Features
Volume Analysis:
Compares current volume to a 34-period SMA
Identifies strong/weak volume using configurable thresholds
Calculates volume "energy" as a 5-bar average ratio
Pattern Detection:
Bearish Signal: Looks for decreasing volume after a strong volume bar
Bullish Signal: Looks for increasing volume after weak volume bars
Visualization:
Colored volume histogram (bullish/bearish/neutral)
SMA volume line
Labels for detected signals
Customization Options:
Adjustable lookback period (3-10 bars)
Configurable thresholds for volume strength
Strict mode requiring confirming price action
Suggested Improvements
Performance Optimization:
Reduce the max_labels_count (currently 500) to improve performance
Consider using barstate.isconfirmed for more efficient calculations
Enhanced Visualization:
Add arrows on price chart for better visibility
Include a background color highlight for signal periods
Add option to display the energy level as a separate line
Additional Features:
Incorporate RSI or MACD for confirmation
Add multi-timeframe analysis capability
Include a strategy version for backtesting
Code Structure:
Separate the logic into distinct functions for better readability
Add more detailed comments for complex calculations
Consider using varip for real-time updates if needed
User Experience:
Add input options for label text size/position
Include sound options for alerts
Add a toggle for the information table
This indicator provides a solid foundation for volume-based reversal detection that could be further enhanced with these improvements while maintaining its core functionality.
Real-Time FTFC Dashboard (Styled)Full Time Frame Continuity dashboard that monitors real-time market direction across multiple timeframes for any stock, ETF, or index. Uses green, red, and pause emojis to visually indicate bullish, bearish, or inactive periods, helping traders quickly assess overall market alignment.
TRI - Smart Zones============================================================================
# TRI - SMART ZONES v2.0
## Professional Smart Money Concepts Indicator for Pine Script v6
============================================================================
## 📊 OVERVIEW
**TRI - Smart Zones** is a comprehensive Smart Money Concepts indicator that
combines multiple institutional trading concepts into a single, powerful tool.
Built with Pine Script v6 for optimal performance and reliability.
## 🎯 CORE FEATURES
### **Fair Value Gaps (FVG)**
- **Detection**: Automatic identification of price imbalances
- **Types**: Bullish and Bearish Fair Value Gaps
- **Threshold**: Customizable gap size requirements (0.1% default)
- **Extension**: Configurable zone projection length
- **Mitigation**: Real-time tracking of gap fills
### **Order Blocks (OB)**
- **Detection**: Volume-based institutional footprint identification
- **Types**: Bullish and Bearish Order Blocks
- **Method**: Pivot-based volume analysis with configurable lookback
- **Validation**: Market structure confirmation required
- **Extension**: Adjustable zone projection
### **BSL/SSL Liquidity Levels**
- **Multi-Timeframe**: Automatic higher timeframe reference
- **Dynamic**: Real-time level updates and extensions
- **Visual**: Clear line markings with timeframe labels
- **Smart**: Adaptive timeframe selection based on current chart
### **Fibonacci Extensions**
- **ZigZag Integration**: Advanced pivot point detection
- **Levels**: Customizable Fibonacci ratios (38.2%, 61.8%, 100%, 161.8%)
- **Projection**: Dynamic extension from swing points
- **Visual**: Subtle dashed lines with level/price labels
### **Smart Dashboard**
- **Zone Statistics**: Real-time FVG and OB counts
- **Success Rates**: Mitigation percentages for each zone type
- **Market Bias**: Intelligent bullish/bearish/neutral assessment
- **Positioning**: Customizable location and size
### **Zone Analysis Engine**
- **Technical Confluence**: RSI, ADX, ATR, Volume analysis
- **VWAP Integration**: Institutional price reference
- **Confidence Scoring**: High/Mid/Low signal classification
- **Signal Arrows**: Visual trade direction indicators
## 🔔 ALERT SYSTEM
### **Market Structure Alerts**
- `Market Bias Changed` - Shift in overall market sentiment
- `BSL Touched` - Buy Side Liquidity level reached
- `SSL Touched` - Sell Side Liquidity level reached
### **Zone Touch Alerts**
- `OB Touched` - Any Order Block interaction
- `Bullish OB Touched` - Bullish Order Block touch
- `Bearish OB Touched` - Bearish Order Block touch
- `FVG Touched` - Any Fair Value Gap interaction
- `Bullish FVG Touched` - Bullish FVG touch
- `Bearish FVG Touched` - Bearish FVG touch
- `Zone Touched` - Any Smart Zone interaction
- `Bullish Zone Touched` - Any bullish zone touch
- `Bearish Zone Touched` - Any bearish zone touch
## ⚙️ CONFIGURATION
### **Zone Detection**
- Enable/disable FVG and OB detection independently
- Maximum zones per type (3-15, default: 8)
- Zone-specific threshold and extension settings
### **Visual Customization**
- Individual color schemes for each zone type
- Adjustable transparency levels
- Configurable line styles and widths
- Dashboard positioning and sizing options
### **Technical Analysis**
- RSI, ADX, ATR period customization
- Volume threshold multipliers
- Confidence level color coding
- Signal display toggle
## 🚀 PINE SCRIPT v6 OPTIMIZATIONS
- **User-Defined Types**: Structured data for zones and statistics
- **Methods**: Type-specific operations for better code organization
- **Enhanced Arrays**: Optimized memory management
- **Switch Statements**: Improved performance for zone classification
- **Error Handling**: Robust input validation and edge case management
- **Performance**: Efficient algorithms for real-time analysis
## 📈 TRADING APPLICATIONS
### **Entry Strategies**
- Zone confluence for high-probability setups
- Multi-timeframe confirmation via BSL/SSL
- Fibonacci extension targets
- Signal arrows for directional bias
### **Risk Management**
- Zone mitigation for stop-loss placement
- Market bias for position sizing
- Dashboard statistics for strategy validation
### **Market Analysis**
- Institutional footprint identification
- Liquidity level mapping
- Market structure assessment
- Trend continuation vs reversal analysis
## 🔧 TECHNICAL SPECIFICATIONS
- **Version**: Pine Script v6
- **Overlay**: True (draws on price chart)
- **Max Objects**: 100 boxes, 100 lines, 50 labels
- **Performance**: Optimized for real-time analysis
- **Compatibility**: All TradingView chart types and timeframes
RSI + Stochastique FusionRSI + Stochastique Fusion Indicator Analysis
This indicator combines RSI and Stochastic oscillators into a single powerful tool for technical analysis. Here's what it offers:
Key Features
Dual Oscillator System:
Traditional RSI (14-period default)
Stochastic oscillator applied to the RSI values (rather than price)
Customizable Parameters:
Adjustable lengths for both RSI (14) and Stochastic (14)
Smoothing periods for %K (3) and %D (3) lines
Customizable overbought/oversold levels for both indicators
Visual Elements:
RSI line in purple (#7E57C2)
Stochastic %K in blue (#2962FF)
Stochastic %D in orange (#FF6D00)
Clear overbought/oversold zones for both indicators
Gradient fills for extreme RSI zones
Trading Signals:
Triangle markers for Stochastic crossovers
Green triangles for bullish %K crossing above %D
Red triangles for bearish %K crossing below %D
Built-in alert conditions for both crossover types
Interpretation
This unique fusion creates a "Stochastic RSI" that provides:
The mean-reversion properties of RSI
The momentum sensitivity of Stochastic
Earlier signals than traditional RSI alone
The indicator is particularly useful for identifying:
Overbought/oversold conditions
Potential trend reversals
Momentum shifts in ranging markets
The gradient fills provide visual emphasis on extreme conditions, while the crossover signals help identify potential entry/exit points.
Market Profile with Sessions - LEMAZZEThis script is a comprehensive TradingView indicator called " Market Profile with Sessions, POC, VWAP, EMA50 & HeatMap." It combines multiple advanced technical analysis tools into one powerful visualization. Here's a breakdown of its key features:
Market Profile Visualization:
Volume-based price levels (23 by default)
Color-coded bullish/bearish volume
Heatmap display option
Configurable placement (left/right)
Key Reference Lines:
Point of Control (POC) - highest volume level
VWAP (Volume Weighted Average Price)
EMA 50
Session Analysis:
Customizable session boxes (Asia, London, NY, Close, Day)
Initial Balance (IB) periods for each session
Extended session visualization options
Additional Indicators:
ATR/Volume statistics table
VIX/VVIX indicators
BTC reference price
Gold-BTC correlation study
Advanced Features:
Single print detection (daily/weekly/monthly/yearly)
Volume forecasting zones
Customizable colors and styles
The script provides traders with a complete market structure analysis tool, showing volume distribution, key reference levels, and session-based price action all in one view. The extensive customization options allow users to tailor the display to their specific trading style and preferences.
Note that this is a complex indicator that may require significant system resources, especially when viewing large timeframes or many bars of history. The script includes parameters to help manage performance by limiting the number of drawn elements.
Ai buy and sell fundamental the Gk fundamental is a precision built market analysis tool designed yto help traders identify high probability
it uses a combination of market structure analysis, volatility tracking, and multi time frame confirmation to highlight possible trade opportunities
HOW IT WORKS
analyses momentum shift and structure breaks on the 2h chart for clearer direction
confirms potential entries by filtering market noise and using volatility directional filters
HOW TO USE apply 2h chart for primary direction
when signal appears allow 1 candle to close for confirmation
drop to lower time frame to lower time frame to refine entry if desired
always use proper risk management - no tool guarantees results
Advanced Swing Labels Prohe "Advanced Swing Labels Pro" indicator is a comprehensive tool for identifying and visualizing swing highs and lows on your TradingView chart. Here's a breakdown of its features:
Key Features:
Swing Detection:
Detects swing highs and lows based on user-defined pivot bars (default 5 candles on each side)
Can highlight intermediate swings between major swings
Customization Options:
Color customization for both swing highs and lows
Choice of label styles (triangle, circle, or square)
Adjustable label sizes for intermediate swings
Line style options (solid, dashed, dotted)
Visualization Tools:
Option to connect swings with trend lines
Ability to extend lines to the right
Price display on swing points
Toggle for showing/hiding short-term swings
Advanced Logic:
Identifies higher highs and lower lows
Marks intermediate swings when price makes a lower high or higher low
Manages memory by limiting the number of stored swings
Usage Tips:
Increase the pivot bars setting for longer-term swings
Use different colors for intermediate swings to better visualize price structure
Enable lines to see the overall trend direction
The indicator works best on higher timeframes (1H+)
Technical Notes:
Maximum of 500 labels/lines allowed (adjustable in indicator settings)
Cleans up short-term swings automatically when disabled
Optimized for performance with array management
This indicator is particularly useful for traders who want to quickly identify market structure, potential reversal points, and trend directions. The intermediate swing highlighting helps visualize the development of trends and potential weakening of momentum.
Comparaison DXY, VIX, SPX, DJI, GVZPine Script indicator compares the normalized values of DXY, VIX, SPX, DJI, and GVZ indices on a single scale from 0 to 100. Here's a breakdown of what it does:
Data Requests: Gets closing prices for:
US Dollar Index (DXY)
VIX Volatility Index
S&P 500 (SPX)
Dow Jones Industrial Average (DJI)
Gold Volatility Index (GVZ)
Normalization: Each index is normalized using a 500-period lookback to scale values between 0-100, making them comparable despite different price scales.
Visualization:
Plots each normalized index with distinct colors
Adds a dotted midline at 50 for reference
Uses thicker linewidth (2) for better visibility
Timeframe Flexibility: Works on any chart timeframe since it uses timeframe.period
This is useful for:
Comparing relative strength/weakness between these key market indicators
Identifying divergences or convergences in their movements
Seeing how different asset classes (currencies, equities, volatility) relate
You could enhance this by:
Adding correlation calculations between pairs
Including options to adjust the normalization period
Adding alerts when instruments diverge beyond certain thresholds
Including volume or other metrics alongside price