Logistic Regression ICT FVG🚀 OVERVIEW
Welcome to the Logistic Regression Fair Value Gap (FVG) System — a next-gen trading tool that blends precision gap detection with machine learning intelligence.
Unlike traditional FVG indicators, this one evolves with each bar of price action, scoring and filtering gaps based on real market behavior.
🔧 CORE FEATURES
✨ Smart Gap Detection
Automatically identifies bullish and bearish Fair Value Gaps using volatility-aware candle logic.
📊 Probability-Based Filtering
Uses logistic regression to assign each gap a confidence score (0 to 1), showing only high-probability setups.
🔁 Real-Time Retest Tracking
Continuously watches how price interacts with each gap to determine if it deserves respect.
📈 Multi-Factor Assessment
Evaluates RSI, MACD, and body size at gap formation to build a full context snapshot.
🧠 Self-Learning Engine
The logistic regression model updates on each bar using gradient descent, refining its predictions over time.
📢 Built-In Alerts
Get instant alerts when a gap forms, gets retested, or breaks.
🎨 Custom Display Options
Control the color of bullish/bearish zones, and toggle on/off probability labels for cleaner charts.
🚩 WHAT MAKES IT DIFFERENT
This isn’t just another box-drawing indicator.
While others mark every imbalance, this system thinks before it draws — using statistical modeling to filter out noise and prioritize high-impact zones.
By learning from how price behaves around gaps (not just how they form), it helps you trade only what matters — not what clutters.
⚙️ HOW IT WORKS
1️⃣ Detection
FVGs are identified using ATR-based thresholds and sharp wick imbalances.
2️⃣ Behavior Monitoring
Every gap is tracked — and if respected enough times, it becomes part of the elite training set.
3️⃣ Context Capture
Each new FVG logs RSI, MACD, and body size to provide a feature-rich context for prediction.
4️⃣ Prediction (Logistic Regression)
The model predicts how likely the gap is to be respected and assigns it a probability score.
5️⃣ Classification & Alerts
Gaps above the threshold are plotted with score labels, and alerts trigger for entry/respect/break.
⚙️ CONFIGURATION PANEL
🔧 System Inputs
• Max Retests – How many times a gap must be respected to train the model
• Prediction Threshold – Minimum score to show a gap on the chart
• Learning Rate – Controls how fast the model adapts (default: 0.009)
• Max FVG Lifetime – Expiration duration for unused gaps
• Show Historic Gaps – Show/hide expired or invalidated gaps
🎨 Visual Options
• Bullish/Bearish Colors – Set gap colors to fit your chart style
• Confidence Labels – Show probability scores next to FVGs
• Alert Toggles – Enable alerts for:
– New FVG detected
– FVG respected (entry)
– FVG invalidated (break)
💡 WHY LOGISTIC REGRESSION?
Traditional FVG tools rely on candle shapes.
This system relies on probability — by training on RSI, MACD, and price behavior, it predicts whether a gap will act as a true liquidity zone.
Logistic regression lets the system continuously adapt using new data, making it more accurate the longer it runs.
That means smarter signals, fewer false positives, and a clearer view of where real opportunities lie.
指標和策略
NASDAQ Smart Momentum Strategy v4.1 BoostedTry to trade Nasdaq with it in 15 min time frame just build today. GL
FULLY FUNCTIONAL INDICATOR TESTER🎯 Purpose:
A comprehensive strategy testing framework designed to evaluate custom indicators and trading signals with professional-grade risk management and signal detection capabilities.
✨ Key Features:
Multiple Signal Detection Methods - Value changes, crossovers, threshold-based triggers
Advanced Confluence Filtering - Multi-source confirmation system with lookback periods
Professional Risk Management - Static TP/SL, break-even functionality, position sizing
Custom Exit Signals - Independent exit logic for refined strategy testing
Visual Feedback System - Clear signal plots and real-time status monitoring
Flexible Input Sources - Connect any custom indicator or built-in study
🔧 How to Use:
Connect your indicator outputs to the Entry/Exit source inputs
Select appropriate signal detection method for your indicator type
Configure risk parameters (TP/SL/Break-even)
Enable confluence filters if needed for additional confirmation
Backtest and analyze results with built-in performance metrics
📈 Signal Detection Options:
Value Change: Detects when indicator values change
Crossover Above/Below: Traditional crossover signals
Threshold Triggers: Value-based entry/exit levels
⚙️ Technical Specifications:
Compatible with Pine Script v6
Overlay strategy with position tracking
Real-time performance monitoring table
Configurable margin requirements
Full backtesting compatibility
⚠️ Important Notes:
This is a testing framework - not financial advice
Always validate signals in demo environment first
Past performance does not guarantee future results
Use proper risk management in live trading
🔄 Updates:
Enhanced signal detection algorithms
Improved confluence logic
Added break-even functionality
Visual debugging tools
Perfect for traders and developers looking to systematically tes
Stochastic Money Flow IndexThe Stochastic Money Flow Index (or Stochastic MFI ), is a variation of the classic Stochastic RSI that uses the Money Flow Index (MFI) rather than the Relative Strength Index (RSI) in its calculation.
While the RSI focuses solely on price momentum, the MFI is a volume-weighted indicator, meaning it incorporates both price and volume data.
The Stochastic MFI is intended to provide a more precise and sensitive reading of the MFI by measuring the level of the MFI relative to its range over a specific period.
Settings
Stochastic Settings
%K Length : The number of periods used to calculate the Stochastic. (Default: 14)
%K Smoothing : The SMA length used to 'smooth' the %K line. (Default: 3)
%D Smoothing : The SMA length used to 'smooth' the %D line. (Default: 1)
Money Flow Index Settings
MFI Length : The number of periods used to calculate the Money Flow Index. (Default: 14)
MFI Source : The source used to calculate the Money Flow Index. (Default: close)
Additional Settings
Show Overbought/Oversold Gradients? : Toggle the display of overbought/oversold gradients. (Default: true)
Random Coin Toss Strategy📌 Overview
This strategy is a probability-based trading simulation that randomly decides trade direction using a coin-toss mechanism and executes trades with a customizable risk-reward ratio. It's designed primarily for testing entry frequency and risk dynamics, not predictive accuracy.
🎯 Core Concept
Every N bars (configurable), the strategy performs a pseudo-random coin toss.
Based on the result:
If heads → Buy
If tails → Sell
Once a position is opened, it sets a Stop-Loss (SL) and Take-Profit (TP) based on a multiple of the current ATR (Average True Range) value.
⚙️ Configurable Inputs
ATR Length Period for ATR calculation, determines volatility basis.
SL Multiplier SL distance = ATR × multiplier (e.g., 1.0 means 1x ATR) .
TP Multiplier TP distance = ATR × multiplier (e.g., 2.0 = 2x ATR) .
Entry Frequency Bars to wait between each new coin toss decision.
Show TP/SL Zones Toggle on/off for drawing visual TP and SL zones.
Box Size Number of bars used to define the width of the TP/SL boxes.
🔁 Entry & Exit Logic
Entry:
Happens only when no current position exists and it's the correct bar interval.
Entry direction is randomly decided.
Exit:
Positions exit at either:
Take-Profit (TP) level
Stop-Loss (SL) level
Both are calculated using the configured ATR-based distances.
🖼️ Visual Features
TP and SL zones:
Rendered as shaded rectangles (boxes) only once per trade.
Green box for TP zone, red box for SL zone.
Automatically deleted and redrawn for each new trade to avoid chart clutter.
ATR Display Table:
A minimal info table at the top-right shows the current ATR value.
Updates every few bars for performance.
🧪 Use Cases
Ideal for risk-reward modeling, strategy prototyping, and understanding how volatility-based SL/TP behavior affects results.
Great for backtesting frequency, RR tweaks (e.g., 2:5 or 3:1), and execution structure in random conditions.
⚠️ Disclaimer
Since the trade direction is random, this script is not meant for predictive trading but serves as a powerful experiment framework for studying how SL, TP, and volatility interact with random chance in a controlled, repeatable system.
VDN2 - SuperTrend + ADX + Stochastic StrategySuperTrend + ADX + Stochastic
Overview:
A trend-following and momentum-confirmation strategy using SuperTrend, ADX (>20 filter), and Stochastic oscillator. Optimized for Gold (XAUUSD) on the 10-minute chart.
Backtest Highlights (Last 1 Week):
Win Rate: 83.3% (5 out of 6 trades)
Net Profit: +56.35 USD (1 contract size)
Avg Trade Duration: ~58 bars (~9.6 hours)
Max Drawdown: 16.65 USD
Avg Win: 9.24 USD, Avg Loss: 0.82 USD
Largest Single Profit: 23.28 USD
Profit Factor: ~11.27
Core Logic:
Enter Long when:
* SuperTrend is bullish
* ADX > 20
* Stochastic %K > %D and %K < 80
Enter Short when:
* SuperTrend is bearish
* ADX > 20
* Stochastic %K < %D and %K > 20
No fixed TP/SL. Positions closed on signal reversal.
Altcoin Liquidity Flow Score - Big Moves Only//@version=6
indicator("Altcoin Liquidity Flow Score - Big Moves Only", overlay=false)
// Pull weekly macro data
walcl = request.security("FRED:WALCL", "W", close)
rrp = request.security("FRED:RRPONTSYD", "W", close)
tga = request.security("FRED:WDTGAL", "W", close)
hyg = request.security("AMEX:HYG", "W", close)
total3 = request.security("CRYPTOCAP:TOTAL3", "W", close)
usdt_d = request.security("CRYPTOCAP:USDT.D", "W", close)
// Calculate week-over-week change
delta_liquidity = ta.change(walcl + rrp - tga)
delta_rrp = ta.change(rrp)
delta_hyg = ta.change(hyg)
delta_total3 = ta.change(total3)
delta_usdt_d = ta.change(usdt_d)
// Compute raw score
raw_score = delta_liquidity - delta_rrp + delta_hyg + delta_total3 - delta_usdt_d
// Apply 3-week smoothing
score = ta.ema(raw_score, 3)
// Define threshold for major liquidity shift
threshold = 2.0
// Plot score + background for only strong signals
plot(score, title="Liquidity Flow Score (Smoothed)", color=color.teal, linewidth=2)
hline(0, "Zero Line", color=color.gray)
bgcolor(score > threshold ? color.new(color.green, 85) : score < -threshold ? color.new(color.red, 85) : na)
Custom MTF DBoardSimple MTF Dboard to use with other indicators as a confluence.
Uses LuxAlgo's SMC concepts to show PA's trend direction- the idea is , if the trends dont align fully, dont take the trade. Or if one of the timeframes are different, maybe its time to get out of a trade cus its gonna reverse into your face?
Try it Lemme know lol
AV BTC Investor ToolThe Investor Tool
Created by Philip Swift . Intended to be used by long term investors . The tool uses two simple moving averages of price as the basis for under/overvalued conditions: the 2-year MA (green) and a 5x multiple of the 2-year MA (red).
Price below the 2-year average: often means good profits and a bear market bottom .
Price above the 5x average: usually shows a bull market top , so investors may want to be cautious.
Range Bar Gaps DetectorRange Bar Gaps Detector
Overview
The Range Bar Gaps Detector identifies price gaps across multiple range bar sizes (12, 24, 60, and 120) on any trading instrument, helping traders spot potential support/resistance zones or breakout opportunities. Designed for Pine Script v6, this indicator detects gaps on range bars and exports data for use in companion scripts like Range Bar Gaps Overlap, making it ideal for multi-timeframe gap analysis.
Key Features
Multi-Range Gap Detection: Identifies gaps on 12, 24, 60, and 120-range bars, capturing both bullish (gap up) and bearish (gap down) price movements.
Customizable Sensitivity: Includes a user-defined minimum deviation (default: 10% of 14-period SMA) for 12-range gaps to filter out noise.
7-Day Lookback: Automatically prunes gaps older than 7 days to focus on recent, relevant price levels.
Data Export: Serializes up to 10 gaps per range (tops, bottoms, start bars, highest/lowest prices, and age) for seamless integration with overlap analysis scripts.
Debugging Support: Plots gap counts and aggregation data in the Data Window for easy verification of detected gaps.
How It Works
The indicator aggregates price movements to simulate higher range bars (24, 60, 120) from a base range bar chart. It detects gaps when the price jumps significantly between bars, ensuring gaps meet the minimum deviation threshold for 12-range bars. Gaps are stored in arrays, serialized for external use, and pruned after 7 days to maintain efficiency.
Usage
Add to your range bar chart (e.g., 12-range) to detect gaps across multiple ranges.
Use alongside the Range Bar Gaps Overlap indicator to visualize gaps and their overlaps as boxes on the chart.
Check the Data Window to confirm gap counts and sizes for each range (12, 24, 60, 120).
Adjust the "Minimal Deviation (%) for 12-Range" input to control gap detection sensitivity.
Settings
Minimal Deviation (%) for 12-Range: Set the minimum gap size for 12-range bars (default: 10% of 14-period SMA).
Range Sizes: Fixed at 24, 60, and 120 for higher range bar aggregation.
Notes
Ensure the script is published under your TradingView username (e.g., GreenArrow2005) for use with companion scripts.
Best used on range bar charts to maintain consistent gap detection.
For advanced overlap analysis, pair with the Range Bar Gaps Overlap indicator to highlight zones where gaps from different ranges align.
Ideal For
Traders seeking to identify key price levels for support/resistance or breakout strategies.
Multi-timeframe analysts combining gap data across various range bar sizes.
Developers building custom indicators that leverage gap data for advanced charting.
Fear and Greed Index [DunesIsland]The Fear and Greed Index is a sentiment indicator designed to measure the emotions driving the stock market, specifically investor fear and greed. Fear represents pessimism and caution, while greed reflects optimism and risk-taking. This indicator aggregates multiple market metrics to provide a comprehensive view of market sentiment, helping traders and investors gauge whether the market is overly fearful or excessively greedy.How It WorksThe Fear and Greed Index is calculated using four key market indicators, each capturing a different aspect of market sentiment:
Market Momentum (30% weight)
Measures how the S&P 500 (SPX) is performing relative to its 125-day simple moving average (SMA).
A higher value indicates that the market is trading well above its moving average, signaling greed.
Stock Price Strength (20% weight)
Calculates the net number of stocks hitting 52-week highs minus those hitting 52-week lows on the NYSE.
A greater number of net highs suggests strong market breadth and greed.
Put/Call Options (30% weight)
Uses the 5-day average of the put/call ratio.
A lower ratio (more call options being bought) indicates greed, as investors are betting on rising prices.
Market Volatility (20% weight)
Utilizes the VIX index, which measures market volatility.
Lower volatility is associated with greed, as investors are less fearful of large market swings.
Each component is normalized using a z-score over a 252-day lookback period (approximately one trading year) and scaled to a range of 0 to 100. The final Fear and Greed Index is a weighted average of these four components, with the weights specified above.Key FeaturesIndex Range: The index value ranges from 0 to 100:
0–25: Extreme Fear (red)
25–50: Fear (orange)
50–75: Neutral (yellow)
75–100: Greed (green)
Dynamic Plot Color: The plot line changes color based on the index value, visually indicating the current sentiment zone.
Reference Lines: Horizontal lines are plotted at 0, 25, 50, 75, and 100 to represent the different sentiment levels: Extreme Fear, Fear, Neutral, Greed, and Extreme Greed.
How to Interpret
Low Values (0–25): Indicate extreme fear, which may suggest that the market is oversold and could be due for a rebound.
High Values (75–100): Indicate greed, which may signal that the market is overbought and could be at risk of a correction.
Neutral Range (25–75): Suggests a balanced market sentiment, neither overly fearful nor greedy.
This indicator is a valuable tool for contrarian investors, as extreme readings often precede market reversals. However, it should be used in conjunction with other technical and fundamental analysis tools for a well-rounded view of the market.
Intermarket Analysis ProIntermarket Analysis Pro Indicator
Overview
The Intermarket Analysis Pro is a sophisticated trading indicator designed for forex traders, integrating technical analysis with comprehensive macroeconomic insights. This tool features Exponential Moving Averages (EMA 10/20) for trend detection, a consolidated table combining timeframe biases, trading signals, and intermarket data, delivering a holistic view to optimize decision-making in volatile markets.
Usage Instructions
Installation: Access TradingView, navigate to the Pine Editor, paste the script, and save it as "Intermarket_Analysis_Pro". Apply it to your desired forex chart (e.g., EURUSD on a 5-minute timeframe).
Configuration:
EMA Settings: Select EMA Source as "close" for precise alignment with candle closes, adjust EMA 10 Period (default 10) and EMA 20 Period (default 20) to suit your strategy, and toggle Show EMA Value Labels or Show (B)/(S) Signal Labels for enhanced visibility.
Table Settings: Enable Show Combined Table, select Combined Table Position (e.g., "Bottom Right"), and choose Text Size (e.g., "Small") for optimal display.
Intermarket Parameters: Fine-tune Bias Threshold (default 0.3) and Score Change Threshold (default 10) to refine intermarket bias sensitivity.
Display Options: Switch between "Light" or "Dark" themes to match your chart environment.
Signal Interpretation:
EMA Indicators: A crossover of EMA 10 (orange) above EMA 20 (blue) signals a potential BUY, while a crossunder indicates a SELL. Confirm with "(B)" or "(S)" labels on the chart.
Combined Table: Analyze timeframe biases (e.g., "BULLISH" on 1m), logic signals (e.g., "BUY" on 5m), and intermarket trends (e.g., "EUR Rise (+30)") to align with market conditions.
Strategic Application: Utilize on lower timeframes (1m, 5m) for scalping or higher timeframes (1h, 4h) for swing trading. Ensure smooth scrolling to verify EMA and table synchronization with candles.
Alert Setup: Configure alerts for "Buy Signal" or "Sell Signal" on your preferred timeframe to receive real-time notifications.
Key Features
EMA 10/20: Provides customizable short-term trend analysis with optional value labels.
Unified Table: Merges SimpleBias (timeframe trends), Logic (trading signals), and Intermarket (global currency, index, and bond movements) into a single, scrollable interface.
Intermarket Insights: Evaluates 18 assets (e.g., DXY, SPX500, EUR, XAUUSD) for macroeconomic sentiment, updated hourly with color-coded change indicators.
Customization: Offers adjustable positions, sizes, and thresholds to adapt to individual trading preferences.
Market Context: Reflects current sentiment, such as a bullish EURUSD trend supported by weak NFP data and hawkish ECB policies (as of July 2025).
Best Practices
Timeframe Alignment: Match the chart timeframe with your analysis to ensure accurate EMA and table data representation.
Optimal Trading Hours: Maximize effectiveness during the NY session (08:00-17:00 EST) when intermarket activity is most pronounced.
Troubleshooting: If EMA lags during scrolling, disable labels or reduce additional indicators. Report discrepancies (e.g., "EMA 10 at 1.08840, candle at 1.08850") for further optimization.
Additional Notes
The Intermarket Analysis Pro is tailored for traders seeking to integrate global sentiment with technical signals. Test thoroughly on a demo account and adjust settings to align with your trading strategy. As of July 5, 2025, 04:04 AM WIB, the market indicates a bullish EURUSD outlook, with intermarket data reinforcing BUY opportunities on lower timeframes.
CCI Trading SystemCCI Trading System with Signal Bar Coloring
Overview
This indicator combines the classic Commodity Channel Index (CCI) oscillator with visual signal detection and bar coloring to help traders identify potential momentum shifts and trading opportunities.
Features
CCI Oscillator Display: Shows CCI values in a separate pane with customizable period length
Adjustable Thresholds: User-defined buy and sell levels (default: -100 buy, +100 sell)
Visual Signal Detection: Triangle markers indicate crossover points
Bar Coloring: Highlights only the bars where actual buy/sell signals occur
Zone Highlighting: Background colors show overbought/oversold conditions
Real-time Information Table: Displays current CCI value, thresholds, and signal status
Built-in Alerts: Notification system for signal generation
How It Works
The indicator generates signals based on CCI threshold crossovers:
Buy Signal: Triggered when CCI crosses above the buy threshold (lime bar coloring)
Sell Signal: Triggered when CCI crosses below the sell threshold (red bar coloring)
Input Parameters
CCI Length: Period for CCI calculation (default: 20)
Buy Threshold: Level for buy signal generation (default: -100)
Sell Threshold: Level for sell signal generation (default: +100)
Enable Bar Coloring: Toggle for chart bar coloring
Show Signals: Toggle for signal markers
Usage Guidelines
Adjust thresholds based on your trading timeframe and volatility preferences
Use in conjunction with other technical analysis tools for confirmation
Consider market context and trend direction when interpreting signals
The -200/+200 levels serve as additional reference points for extreme conditions
Educational Purpose
This indicator is designed for educational and analysis purposes. It demonstrates how CCI can be used to identify potential momentum shifts in price action. The visual elements help traders understand the relationship between CCI values and price movements.
Risk Disclaimer
This indicator is a technical analysis tool and does not guarantee profitable trades. Past performance does not indicate future results. Always conduct your own analysis and consider risk management principles. Trading involves substantial risk of loss and is not suitable for all investors.
Technical Notes
Uses Pine Script v5
Plots CCI with standard deviation-based calculation
Includes crossover/crossunder functions for signal generation
Features conditional bar coloring for signal visualization
Incorporates alert conditions for automated notifications
This script is open source and available for modification and educational use.
Momentum SNR VIP [3 TP + Max 50 Pip SL]//@version=6
indicator("Momentum SNR VIP ", overlay=true)
// === Settings ===
pip = input.float(0.0001, "Pip Size", step=0.0001)
sl_pip = 50 * pip
tp1_pip = 40 * pip
tp2_pip = 70 * pip
tp3_pip = 100 * pip
lookback = input.int(20, "Lookback for S/R", minval=5)
// === SNR ===
pivotHigh = ta.pivothigh(high, lookback, lookback)
pivotLow = ta.pivotlow(low, lookback, lookback)
supportZone = not na(pivotLow)
resistanceZone = not na(pivotHigh)
plotshape(supportZone, title="Support", location=location.belowbar, color=color.blue, style=shape.triangleup, size=size.tiny)
plotshape(resistanceZone, title="Resistance", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.tiny)
// === Price Action ===
bullishEngulfing = close < open and close > open and close > open and open <= close
bearishEngulfing = close > open and close < open and close < open and open >= close
bullishPinBar = close < open and (low - math.min(open, close)) > 1.5 * math.abs(close - open)
bearishPinBar = close > open and (high - math.max(open, close)) > 1.5 * math.abs(close - open)
buySignal = supportZone and (bullishEngulfing or bullishPinBar)
sellSignal = resistanceZone and (bearishEngulfing or bearishPinBar)
// === SL & TP ===
rawBuySL = low - 10 * pip
buySL = math.max(close - sl_pip, rawBuySL)
buyTP1 = close + tp1_pip
buyTP2 = close + tp2_pip
buyTP3 = close + tp3_pip
rawSellSL = high + 10 * pip
sellSL = math.min(close + sl_pip, rawSellSL)
sellTP1 = close - tp1_pip
sellTP2 = close - tp2_pip
sellTP3 = close - tp3_pip
// === Plot Lines ===
plot(buySignal ? buySL : na, title="Buy SL", color=color.red, style=plot.style_line, linewidth=1)
plot(buySignal ? buyTP1 : na, title="Buy TP1", color=color.green, style=plot.style_line, linewidth=1)
plot(buySignal ? buyTP2 : na, title="Buy TP2", color=color.green, style=plot.style_line, linewidth=1)
plot(buySignal ? buyTP3 : na, title="Buy TP3", color=color.green, style=plot.style_line, linewidth=1)
plot(sellSignal ? sellSL : na, title="Sell SL", color=color.red, style=plot.style_line, linewidth=1)
plot(sellSignal ? sellTP1 : na, title="Sell TP1", color=color.green, style=plot.style_line, linewidth=1)
plot(sellSignal ? sellTP2 : na, title="Sell TP2", color=color.green, style=plot.style_line, linewidth=1)
plot(sellSignal ? sellTP3 : na, title="Sell TP3", color=color.green, style=plot.style_line, linewidth=1)
// === Floating Labels on Right Side ===
if buySignal
label.new(x=bar_index + 50, y=buySL, text="SL", style=label.style_label_right, color=color.red, textcolor=color.white)
label.new(x=bar_index + 50, y=buyTP1, text="TP1", style=label.style_label_right, color=color.green, textcolor=color.white)
label.new(x=bar_index + 50, y=buyTP2, text="TP2", style=label.style_label_right, color=color.green, textcolor=color.white)
label.new(x=bar_index + 50, y=buyTP3, text="TP3", style=label.style_label_right, color=color.green, textcolor=color.white)
if sellSignal
label.new(x=bar_index + 50, y=sellSL, text="SL", style=label.style_label_right, color=color.red, textcolor=color.white)
label.new(x=bar_index + 50, y=sellTP1, text="TP1", style=label.style_label_right, color=color.green, textcolor=color.white)
label.new(x=bar_index + 50, y=sellTP2, text="TP2", style=label.style_label_right, color=color.green, textcolor=color.white)
label.new(x=bar_index + 50, y=sellTP3, text="TP3", style=label.style_label_right, color=color.green, textcolor=color.white)
// === Signal Markers ===
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// === Alerts ===
alertcondition(buySignal, title="Buy Alert", message="🟢 BUY at Support Zone + Price Action")
alertcondition(sellSignal, title="Sell Alert", message="🟡 SELL at Resistance Zone + Price Action")
Bollinger Bands ±2σ & ±3σBollinger Band 2 & 3 standard deviation, clubbed together, so that you can take trade on BKP & BKT.
// This Pine Script plots Bollinger Bands with both ±2σ and ±3σ levels for enhanced volatility analysis.
// Users can customize the moving average type, length, and standard deviation multipliers directly in the settings.
// The indicator overlays a shaded ±2σ region and semi-transparent ±3σ bands to highlight extreme price movements.
SuperTrend + ADX + Stochastic Stratejisi SuperTrend + ADX + Stochastic
Overview:
A trend-following and momentum-confirmation strategy using SuperTrend, ADX (>20 filter), and Stochastic oscillator. Optimized for Gold (XAUUSD) on the 10-minute chart.
Backtest Highlights (Last 1 Week):
Win Rate: 83.3% (5 out of 6 trades)
Net Profit: +56.35 USD (1 contract size)
Avg Trade Duration: ~58 bars (~9.6 hours)
Max Drawdown: 16.65 USD
Avg Win: 9.24 USD, Avg Loss: 0.82 USD
Largest Single Profit: 23.28 USD
Profit Factor: ~11.27
Core Logic:
Enter Long when:
* SuperTrend is bullish
* ADX > 20
* Stochastic %K > %D and %K < 80
Enter Short when:
* SuperTrend is bearish
* ADX > 20
* Stochastic %K < %D and %K > 20
No fixed TP/SL.
Positions closed on signal reversal.
Weekly Volume USDT## Description
This Pine Script indicator displays the trading volume for each day of the current week (Monday through Sunday) in a clean table format on your TradingView chart. The volume is calculated in USDT equivalent and displayed in the top-right corner of the chart.
## Features
- **Weekly Volume Breakdown**: Shows individual daily volumes from Monday to Sunday
- **USDT Conversion**: Automatically converts volume to USDT using the average price (open + close / 2)
- **Smart Formatting**:
- Large numbers are formatted with K (thousands) and M (millions) suffixes
- Example: 1,234,567 → 1.23M USDT
- **Clean Table Display**: Fixed position table in the top-right corner
- **Current Week Focus**: Displays volumes for the current week only
- **Future Days Handling**: Days that haven't occurred yet in the current week show as "-"
## How It Works
1. The indicator calculates the average price for each day using (Open + Close) / 2
2. Multiplies the daily volume by the average price to get USDT-equivalent volume
3. Displays the results in an easy-to-read table format
## Use Cases
- **Volume Analysis**: Quickly identify which days of the week have the highest trading activity
- **Pattern Recognition**: Spot weekly volume patterns and trends
- **Trading Decisions**: Use volume information to inform your trading strategies
- **Market Activity Monitoring**: Keep track of market participation throughout the week
## Installation
Simply add this indicator to your TradingView chart and it will automatically display the weekly volume table in the top-right corner.
## Tags
#volume #weekly #USDT #table #analysis #trading #cryptocurrency
ArraysAssorted🟩 OVERVIEW
This library provides utility methods for working with arrays in Pine Script. The first method finds extreme values (highest/lowest) within a rolling lookback window and returns both the value and its position. I might extend the library for other ad-hoc methods I use to work with arrays.
🟩 HOW TO USE
Pine Script libraries contain reusable code for importing into indicators. You do not need to copy any code out of here. Just import the library and call the method you want.
For example, for version 1 of this library, import it like this:
import SimpleCryptoLife/ArraysAssorted/1
See the EXAMPLE USAGE sections within the library for examples of calling the methods.
You do not need permission to use Pine libraries in your open-source scripts.
However, you do need explicit permission to reuse code from a Pine Script library’s functions in a public protected or invite-only publication .
In any case, credit the author in your description. It is also good form to credit in open-source comments.
For more information on libraries and incorporating them into your scripts, see the Libraries section of the Pine Script User Manual.
🟩 METHOD 1: m_getHighestLowestFloat()
Finds the highest or lowest float value from an array. Simple enough. It also returns the index of the value as an offset from the end of the array.
• It works with rolling lookback windows, so you can find extremes within the last N elements
• It includes an offset parameter to skip recent elements if needed
• It handles edge cases like empty arrays and invalid ranges gracefully
• It can find either the first or last occurrence of the extreme value
We also export two enums whose sole purpose is to look pretty as method arguments.
method m_getHighestLowestFloat(_self, _highestLowest, _lookbackBars, _offset, _firstLastType)
Namespace types: array
This method finds the highest or lowest value in a float array within a rolling lookback window, and returns the value along with the offset (number of elements back from the end of the array) of its first or last occurrence.
Parameters:
_self (array) : The array of float values to search for extremes.
_highestLowest (HighestLowest) : Whether to search for the highest or lowest value. Use the enum value HighestLowest.highest or HighestLowest.lowest.
_lookbackBars (int) : The number of array elements to include in the rolling lookback window. Must be positive. Note: Array elements only correspond to bars if the consuming script always adds exactly one element on consecutive bars.
_offset (int) : The number of array elements back from the end of the array to start the lookback window. A value of zero means no offset. The _offset parameter offsets both the beginning and end of the range.
_firstLastType (FirstLast) : Whether to return the offset of the first (lowest index) or last (highest index) occurrence of the extreme value. Use FirstLast.first or FirstLast.last.
Returns: (tuple) A tuple containing the highest or lowest value and its offset -- the number of elements back from the end of the array. If not found, returns . NOTE: The _offsetFromEndOfArray value is not affected by the _offset parameter. In other words, it is not the offset from the end of the range but from the end of the array. This number may or may not have any relation to the number of *bars* back, depending on how the array is populated. The calling code needs to figure that out.
EXPORTED ENUMS
HighestLowest
Whether to return the highest value or lowest value in the range.
• highest : Find the highest value in the specified range
• lowest : Find the lowest value in the specified range
FirstLast
Whether to return the first (lowest index) or last (highest index) occurrence of the extreme value.
• first : Return the offset of the first occurrence of the extreme value
• last : Return the offset of the last occurrence of the extreme value
VDN1 - T3 Tilson + IFT + ATRThis strategy combines three powerful indicators to create a high-quality and low-noise trading system:
🔹 T3 Tilson: Serves as the main trend indicator. It reacts smoothly to market direction changes while reducing noise.
🔹 Inverse Fisher Transform of RSI: A momentum filter that sharpens the signal precision. Only trades in the direction of positive or negative momentum.
🔹 ATR Filter: Avoids entries during low volatility (sideways) periods. Ensures the market is active enough before executing trades.
Core Logic:
* Long Entry: T3 Tilson rising + IFT(RSI) > 0 + ATR > threshold
* Short Entry: T3 Tilson falling + IFT(RSI) < 0 + ATR > threshold
* All trades use a fixed size of 1 unit for consistent risk evaluation.
Performance Notes:
* Works exceptionally well on index futures (e.g., NAS100, US30, GER40)
* Shows low drawdown and high profit factor (PF > 3) on those assets
* Also performs decently on XAUUSD, even with only \~32% win rate — thanks to favorable risk/reward
* BTC and ETH may require modified versions due to higher volatility and whipsaws
This is a master version — clean, unoptimized, and stable.
Use this as a core engine to build and test enhanced versions (e.g., with TP/SL, dynamic filters, etc.)
Happy testing and trading!
Advanced Currency Strength Meter# Advanced Currency Strength Meter (ACSM)
The Advanced Currency Strength Meter (ACSM) is a scientifically-based indicator that measures relative currency strength using established academic methodologies from international finance and behavioral economics. This indicator provides traders with a comprehensive view of currency market dynamics through multiple analytical frameworks.
### Theoretical Foundation
#### 1. Purchasing Power Parity (PPP) Theory
Based on Cassel's (1918) seminal work and refined by Froot & Rogoff (1995), PPP suggests that exchange rates should reflect relative price levels between countries. The ACSM momentum component captures deviations from long-term equilibrium relationships, providing insights into currency misalignments.
#### 2. Uncovered Interest Rate Parity (UIP) and Carry Trade Theory
Building on Fama (1984) and Lustig et al. (2007), the indicator incorporates volatility-adjusted momentum to capture carry trade flows and interest rate differentials that drive currency strength. This approach helps identify currencies benefiting from interest rate differentials.
#### 3. Behavioral Finance and Currency Momentum
Following Burnside et al. (2011) and Menkhoff et al. (2012), the model recognizes that currency markets exhibit persistent momentum effects due to behavioral biases and institutional flows. The indicator captures these momentum patterns for trading opportunities.
#### 4. Portfolio Balance Theory
Based on Branson & Henderson (1985), the relative strength matrix captures how portfolio rebalancing affects currency cross-rates and creates trading opportunities between different currency pairs.
### Technical Implementation
#### Core Methodologies:
- **Z-Score Normalization**: Following Sharpe (1994), provides statistical significance testing without arbitrary scaling
- **Momentum Analysis**: Uses return-based metrics (Jegadeesh & Titman, 1993) for trend identification
- **Volatility Adjustment**: Implements Average True Range methodology (Wilder, 1978) for risk-adjusted strength
- **Composite Scoring**: Equal-weight methodology to avoid overfitting and maintain robustness
- **Correlation Analysis**: Risk management framework based on Markowitz (1952) portfolio theory
#### Key Features:
- **Multi-Source Data Integration**: Supports OANDA, Futures, and CFD data sources
- **Scientific Methodology**: No arbitrary scaling or curve-fitting; all calculations based on established statistical methods
- **Comprehensive Dashboard**: Clean, professional table showing currency strengths and best trading pairs
- **Alert System**: Automated notifications for strong/weak currency conditions and extreme values
- **Best Pair Identification**: Algorithmic detection of highest-potential trading opportunities
### Practical Applications
#### For Swing Traders:
- Identify currencies in strong uptrends or downtrends
- Select optimal currency pairs based on relative strength divergence
- Time entries based on momentum convergence/divergence
#### For Day Traders:
- Use with real-time futures data for intraday opportunities
- Monitor currency correlations for risk management
- Detect early reversal signals through extreme value alerts
#### For Portfolio Managers:
- Multi-currency exposure analysis
- Risk management through correlation monitoring
- Strategic currency allocation decisions
### Visual Design
The indicator features a clean, professional dashboard that displays:
- **Currency Strength Values**: Each major currency (EUR, GBP, JPY, CHF, AUD, CAD, NZD, USD) with color-coded strength values
- **Best Trading Pairs**: Filtered list of highest-potential currency pairs with BUY/SELL signals
- **Market Analysis**: Real-time identification of strongest and weakest currencies
- **Potential Score**: Quantitative measure of trading opportunity strength
### Data Sources and Latency
The indicator supports multiple data sources to accommodate different trading needs:
- **OANDA (Delayed)**: Free data with 15-20 minute delay, suitable for swing trading
- **Futures (Real-time)**: CME currency futures for real-time analysis
- **CFDs**: Alternative real-time data source option
### Mathematical Framework
#### Strength Calculation:
Momentum = (Price - Price ) / Price * 100
Z-Score = (Price - Mean) / Standard Deviation
Volatility-Adjusted = Momentum / ATR-based Volatility
Composite = 0.5 * Momentum + 0.3 * Z-Score + 0.2 * Volatility-Adjusted
#### USD Strength Derivation:
USD strength is calculated as the weighted average of all USD-based pairs, providing a true baseline for relative strength comparison.
### Performance Considerations
The indicator is optimized for:
- **Computational Efficiency**: Uses Pine Script v6 best practices
- **Memory Management**: Appropriate lookback periods and array handling
- **Visual Clarity**: Clean table design optimized for both light and dark themes
- **Alert Reliability**: Robust signal generation with statistical significance testing
### Limitations and Risk Disclosure
- Model performance may vary during extreme market stress (Black Swan events)
- Requires stable data feeds for accurate calculations
- Not optimized for high-frequency scalping strategies
- Central bank interventions may temporarily distort signals
- Performance assumes normal market conditions with behavioral adjustments
### Academic References
- Branson, W. H., & Henderson, D. W. (1985). "The Specification and Influence of Asset Markets"
- Burnside, C., Eichenbaum, M., & Rebelo, S. (2011). "Carry Trade and Momentum in Currency Markets"
- Cassel, G. (1918). "Abnormal Deviations in International Exchanges"
- Fama, E. F. (1984). "Forward and Spot Exchange Rates"
- Froot, K. A., & Rogoff, K. (1995). "Perspectives on PPP and Long-Run Real Exchange Rates"
- Jegadeesh, N., & Titman, S. (1993). "Returns to Buying Winners and Selling Losers"
- Lustig, H., Roussanov, N., & Verdelhan, A. (2007). "Common Risk Factors in Currency Markets"
- Markowitz, H. (1952). "Portfolio Selection"
- Menkhoff, L., Sarno, L., Schmeling, M., & Schrimpf, A. (2012). "Carry Trades and Global FX Volatility"
- Sharpe, W. F. (1994). "The Sharpe Ratio"
- Wilder, J. W. (1978). "New Concepts in Technical Trading Systems"
### Usage Instructions
1. **Setup**: Add the indicator to your chart and select your preferred data source
2. **Currency Selection**: Choose which currencies to analyze (default: all major currencies)
3. **Methodology**: Select calculation method (Composite recommended for most users)
4. **Monitoring**: Watch the dashboard for strength changes and best pair opportunities
5. **Alerts**: Set up notifications for strong/weak currency conditions
Heiken Ashi Candles - CustomizableHeiken Ashi Candles – Customizable Overlay
This TradingView indicator displays accurate Heiken Ashi candles directly on your price chart, perfectly synced with TradingView’s built-in Heiken Ashi source. It’s ideal for traders who want to backtest or analyze Heiken Ashi structure without switching chart types. The indicator also includes full customization of candle body and wick colors for both bullish and bearish candles—perfect for tailoring your chart visuals to your preferences.
Enhanced Ichimoku Cloud Strategy V1 [Quant Trading]Overview
This strategy combines the powerful Ichimoku Kinko Hyo system with a 171-period Exponential Moving Average (EMA) filter to create a robust trend-following approach. The strategy is designed for traders seeking to capitalize on strong momentum moves while using the Ichimoku cloud structure to identify optimal entry and exit points.
This is a patient, low-frequency trading system that prioritizes quality over quantity. In backtesting on Solana, the strategy achieved impressive results with approximately 3600% profit over just 29 trades, demonstrating its effectiveness at capturing major trend movements rather than attempting to profit from every market fluctuation. The extended parameters and strict entry criteria are specifically optimized for Solana's price action characteristics, making it well-suited for traders who prefer fewer, higher-conviction positions over high-frequency trading approaches.
What Makes This Strategy Original
This implementation enhances the traditional Ichimoku system by:
Custom Ichimoku Parameters: Uses non-standard periods (Conversion: 7, Base: 211, Lagging Span 2: 120, Displacement: 41) optimized for different market conditions
EMA Confirmation Filter: Incorporates a 171-period EMA as an additional trend confirmation layer
State Memory System: Implements a sophisticated memory system to track buy/sell states and prevent false signals
Dual Trade Modes: Offers both traditional Ichimoku signals ("Ichi") and cloud-based signals ("Cloud")
Breakout Confirmation: Requires price to break above the 25-period high for long entries
How It Works
Core Components
Ichimoku Elements:
-Conversion Line (Tenkan-sen): 7-period Donchian midpoint
-Base Line (Kijun-sen): 211-period Donchian midpoint
-Span A (Senkou Span A): Average of Conversion and Base lines, plotted 41 periods ahead
-Span B (Senkou Span B): 120-period Donchian midpoint, plotted 41 periods ahead
-Lagging Span (Chikou Span): Current close plotted 41 periods back
EMA Filter: 171-period EMA acts as a long-term trend filter
Entry Logic (Ichi Mode - Default)
A long position is triggered when ALL conditions are met:
Cloud Bullish: Span A > Span B (41 periods ago)
Breakout Confirmation: Current close > 25-period high
Ichimoku Bullish: Conversion Line > Base Line
Trend Alignment: Current close > 171-period EMA
State Memory: No previous buy signal is still active
Exit Logic
Positions are closed when:
Ichimoku Bearish: Conversion Line < Base Line
Alternative Cloud Mode
When "Cloud" mode is selected, the strategy uses:
Entry: Span A crosses above Span B with additional cloud and EMA confirmations
Exit: Span A crosses below Span B with cloud and EMA confirmations
Default Settings Explained
Strategy Properties
Initial Capital: $1,000 (realistic for average traders)
Position Size: 100% of equity (appropriate for backtesting single-asset strategies)
Commission: 0.1% (realistic for most brokers)
Slippage: 3 ticks (accounts for realistic execution costs)
Date Range: January 1, 2018 to December 31, 2069
Key Parameters
Conversion Periods: 7 (faster than traditional 9, more responsive to price changes)
Base Periods: 211 (much longer than traditional 26, provides stronger trend confirmation)
Lagging Span 2 Periods: 120 (custom period for stronger support/resistance levels)
Displacement: 41 (projects cloud further into future than standard 26)
EMA Period: 171 (long-term trend filter, approximately 8.5 months of daily data)
How to Use This Strategy
Best Market Conditions
Trending Markets: Works best in clearly trending markets where the cloud provides strong directional bias
Medium to Long-term Timeframes: Optimized for daily charts and higher timeframes
Volatile Assets: The breakout confirmation helps filter out weak signals in choppy markets
Risk Management
The strategy uses 100% equity allocation, suitable for backtesting single strategies
Consider reducing position size when implementing with real capital
Monitor the 25-period high breakout requirement as it may delay entries in fast-moving markets
Visual Elements
Green/Red Cloud: Shows bullish/bearish cloud conditions
Yellow Line: Conversion Line (Tenkan-sen)
Blue Line: Base Line (Kijun-sen)
Orange Line: 171-period EMA trend filter
Gray Line: Lagging Span (Chikou Span)
Important Considerations
Limitations
Lagging Nature: Like all Ichimoku strategies, signals may lag significant price moves
Whipsaw Risk: Extended periods of consolidation may generate false signals
Parameter Sensitivity: Custom parameters may not work equally well across all market conditions
Backtesting Notes
Results are based on historical data and past performance does not guarantee future results
The strategy includes realistic slippage and commission costs
Default settings are optimized for backtesting and may need adjustment for live trading
Risk Disclaimer
This strategy is for educational purposes only and should not be considered financial advice. Always conduct your own analysis and risk management before implementing any trading strategy. The unique parameter combinations used may not be suitable for all market conditions or trading styles.
Customization Options
Trade Mode: Switch between "Ichi" and "Cloud" signal generation
Short Trading: Option to enable short positions (disabled by default)
Date Range: Customize backtesting period
All Ichimoku Parameters: Fully customizable for different market conditions
This enhanced Ichimoku implementation provides a structured approach to trend following while maintaining the flexibility to adapt to different trading styles and market conditions.