Machine Learning: Lorentzian ClassificationUpdated with just the indicator for easier analysis. Moving average with machine learning built in.
Pattern grafici
Adaptive Fibonacci Pullback System -FibonacciFluxAdaptive Fibonacci Pullback System (AFPS) - FibonacciFlux
This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). Original concepts by FibonacciFlux.
Abstract
The Adaptive Fibonacci Pullback System (AFPS) presents a sophisticated, institutional-grade algorithmic strategy engineered for high-probability trend pullback entries. Developed by FibonacciFlux, AFPS uniquely integrates a proprietary Multi-Fibonacci Supertrend engine (0.618, 1.618, 2.618 ratios) for harmonic volatility assessment, an Adaptive Moving Average (AMA) Channel providing dynamic market context, and a synergistic Multi-Timeframe (MTF) filter suite (RSI, MACD, Volume). This strategy transcends simple indicator combinations through its strict, multi-stage confluence validation logic. Historical simulations suggest that specific MTF filter configurations can yield exceptional performance metrics, potentially achieving Profit Factors exceeding 2.6 , indicative of institutional-level potential, while maintaining controlled risk under realistic trading parameters (managed equity risk, commission, slippage).
4 hourly MTF filtering
1. Introduction: Elevating Pullback Trading with Adaptive Confluence
Traditional pullback strategies often struggle with noise, false signals, and adapting to changing market dynamics. AFPS addresses these challenges by introducing a novel framework grounded in Fibonacci principles and adaptive logic. Instead of relying on static levels or single confirmations, AFPS seeks high-probability pullback entries within established trends by validating signals through a rigorous confluence of:
Harmonic Volatility Context: Understanding the trend's stability and potential turning points using the unique Multi-Fibonacci Supertrend.
Adaptive Market Structure: Assessing the prevailing trend regime via the AMA Channel.
Multi-Dimensional Confirmation: Filtering signals with lower-timeframe Momentum (RSI), Trend Alignment (MACD), and Market Conviction (Volume) using the MTF suite.
The objective is to achieve superior signal quality and adaptability, moving beyond conventional pullback methodologies.
2. Core Methodology: Synergistic Integration
AFPS's effectiveness stems from the engineered synergy between its core components:
2.1. Multi-Fibonacci Supertrend Engine: Utilizes specific Fibonacci ratios (0.618, 1.618, 2.618) applied to ATR, creating a multi-layered volatility envelope potentially resonant with market harmonics. The averaged and EMA-smoothed result (`smoothed_supertrend`) provides a robust, dynamic trend baseline and context filter.
// Key Components: Multi-Fibonacci Supertrend & Smoothing
average_supertrend = (supertrend1 + supertrend2 + supertrend3) / 3
smoothed_supertrend = ta.ema(average_supertrend, st_smooth_length)
2.2. Adaptive Moving Average (AMA) Channel: Provides dynamic market context. The `ama_midline` serves as a key filter in the entry logic, confirming the broader trend bias relative to adaptive price action. Extended Fibonacci levels derived from the channel width offer potential dynamic S/R zones.
// Key Component: AMA Midline
ama_midline = (ama_high_band + ama_low_band) / 2
2.3. Multi-Timeframe (MTF) Filter Suite: An optional but powerful validation layer (RSI, MACD, Volume) assessed on a lower timeframe. Acts as a **validation cascade** – signals must pass all enabled filters simultaneously.
2.4. High-Confluence Entry Logic: The core innovation. A pullback entry requires a specific sequence and validation:
Price interaction with `average_supertrend` and recovery above/below `smoothed_supertrend`.
Price confirmation relative to the `ama_midline`.
Simultaneous validation by all enabled MTF filters.
// Simplified Long Entry Logic Example (incorporates key elements)
long_entry_condition = enable_long_positions and
(low < average_supertrend and close > smoothed_supertrend) and // Pullback & Recovery
(close > ama_midline and close > ama_midline) and // AMA Confirmation
(rsi_filter_long_ok and macd_filter_long_ok and volume_filter_ok) // MTF Validation
This strict, multi-stage confluence significantly elevates signal quality compared to simpler pullback approaches.
1hourly filtering
3. Realistic Implementation and Performance Potential
AFPS is designed for practical application, incorporating realistic defaults and highlighting performance potential with crucial context:
3.1. Realistic Default Strategy Settings:
The script includes responsible default parameters:
strategy('Adaptive Fibonacci Pullback System - FibonacciFlux', shorttitle = "AFPS", ...,
initial_capital = 10000, // Accessible capital
default_qty_type = strategy.percent_of_equity, // Equity-based risk
default_qty_value = 4, // Default 4% equity risk per initial trade
commission_type = strategy.commission.percent,
commission_value = 0.03, // Realistic commission
slippage = 2, // Realistic slippage
pyramiding = 2 // Limited pyramiding allowed
)
Note: The default 4% risk (`default_qty_value = 4`) requires careful user assessment and adjustment based on individual risk tolerance.
3.2. Historical Performance Insights & Institutional Potential:
Backtesting provides insights into historical behavior under specific conditions (always specify Asset/Timeframe/Dates when sharing results):
Default Performance Example: With defaults, historical tests might show characteristics like Overall PF ~1.38, Max DD ~1.16%, with potential Long/Short performance variance (e.g., Long PF 1.6+, Short PF < 1).
Optimized MTF Filter Performance: Crucially, historical simulations demonstrate that meticulous configuration of the MTF filters (particularly RSI and potentially others depending on market) can significantly enhance performance. Under specific, optimized MTF filter settings combined with appropriate risk management (e.g., 7.5% risk), historical tests have indicated the potential to achieve **Profit Factors exceeding 2.6**, alongside controlled drawdowns (e.g., ~1.32%). This level of performance, if consistently achievable (which requires ongoing adaptation), aligns with metrics often sought in institutional trading environments.
Disclaimer Reminder: These results are strictly historical simulations. Past performance does not guarantee future results. Achieving high performance requires careful parameter tuning, adaptation to changing markets, and robust risk management.
3.3. Emphasizing Risk Management:
Effective use of AFPS mandates active risk management. Utilize the built-in Stop Loss, Take Profit, and Trailing Stop features. The `pyramiding = 2` setting requires particularly diligent oversight. Do not rely solely on default settings.
4. Conclusion: Advancing Trend Pullback Strategies
The Adaptive Fibonacci Pullback System (AFPS) offers a sophisticated, theoretically grounded, and highly adaptable framework for identifying and executing high-probability trend pullback trades. Its unique blend of Fibonacci resonance, adaptive context, and multi-dimensional MTF filtering represents a significant advancement over conventional methods. While requiring thoughtful implementation and risk management, AFPS provides discerning traders with a powerful tool potentially capable of achieving institutional-level performance characteristics under optimized conditions.
Acknowledgments
Developed by FibonacciFlux. Inspired by principles of Fibonacci analysis, adaptive averaging, and multi-timeframe confirmation techniques explored within the trading community.
Disclaimer
Trading involves substantial risk. AFPS is an analytical tool, not a guarantee of profit. Past performance is not indicative of future results. Market conditions change. Users are solely responsible for their decisions and risk management. Thorough testing is essential. Deploy at your own considered risk.
Strat Pattern Highlighter (with Alerts)This indicator helps you isolate Failed 2d and Failed 2u candles, and the 3-1-2 Pattern in the strat with colored candles. It also has alerts added. Enjoy!
2013-2025 EclipsesIndicator Description: 2013-2025 Eclipses
This Pine Script (version 5) indicator overlays solar and lunar eclipse events on a TradingView chart, covering the period from 2013 to 2025. It is designed for traders and astrology enthusiasts who wish to visualize these significant astronomical events alongside price action, potentially identifying correlations with market movements or key turning points.
Features:
Eclipses:
Visualization: Displayed as a semi-transparent aqua background highlight across the chart.
Data: Includes 48 specific eclipse dates (both solar and lunar) from April 25, 2013, to September 21, 2025.
Purpose: Highlights dates of eclipses, which are often considered powerful astrological events associated with sudden changes, revelations, or significant shifts in energy and market sentiment.
Technical Details:
Overlay: The indicator is set to overlay=true, ensuring it displays directly on the price chart rather than in a separate pane.
Date Matching: Utilizes a helper function is_date(y, m, d) to determine if the current chart date matches any of the predefined eclipse dates, using TradingView's year, month, and dayofmonth variables.
Visualization Method:
bgcolor: Applies a light aqua background (using color.new(color.aqua, 85)) on the specific dates of eclipses. The transparency level of 85 allows price action to remain visible through the highlight.
Time Range: Spans from April 2013 to September 2025, covering a 12+ year period of eclipse events.
Usage:
Add the script to your TradingView chart to see eclipse dates highlighted with an aqua background on your chosen symbol and timeframe.
The background highlight appears only on the exact dates of eclipses, making it easy to spot these events amidst price data.
Ideal for those incorporating astrological analysis into trading or studying the potential impact of eclipses on financial markets.
Notes:
The script uses a single-line definition for eclipse_dates to ensure compatibility with Pine Script v5 syntax and avoid line continuation errors.
The aqua color matches the original circle-based visualization, with transparency adjustable via the color.new(color.aqua, 85) parameter (0 = fully opaque, 100 = fully transparent).
Works best on daily or higher timeframes for clear visibility of individual eclipse dates, though it functions on any TradingView-supported timeframe.
Eclipse dates should be cross-checked with astronomical sources for critical applications, as the script relies on the provided data accuracy.
Purpose:
This indicator provides a straightforward way to track eclipses over a 12-year period, offering a visual representation of these potent celestial events. By using a background highlight instead of markers, it maintains chart clarity while emphasizing the specific days when eclipses occur, potentially aiding in the analysis of their influence on market behavior or personal trading strategies.
2013-2025 Moon Phases & Mercury RetrogradesIndicator Description: 2013-2025 Moon Phases & Mercury Retrogrades
This Pine Script (version 5) indicator overlays key astrological events on a TradingView chart, specifically tracking full moons, new moons, and Mercury retrograde periods from 2013 to 2025. It is designed to help traders and astrology enthusiasts visualize these celestial events alongside price action, potentially identifying correlations or patterns.
Features:
New Moons:
Visualization: Plotted as small white circles above the price bars.
Data: Includes 156 specific new moon dates from January 11, 2013, to December 20, 2025.
Purpose: Marks the start of the lunar cycle, often associated with new beginnings or shifts in energy.
Full Moons:
Visualization: Plotted as small orange circles above the price bars.
Data: Includes 157 specific full moon dates from January 27, 2013, to December 15, 2025.
Purpose: Highlights the peak of the lunar cycle, often linked to heightened emotions or market volatility in astrological analysis.
Mercury Retrogrades:
Visualization: Displayed as a light red background highlight across the chart.
Data: Covers 39 Mercury retrograde periods, with precise start and end timestamps from February 23, 2013, to November 29, 2025.
Purpose: Indicates periods traditionally associated with communication issues, delays, or reversals, which some traders monitor for potential market impacts.
Technical Details:
Overlay: The indicator is set to overlay=true, meaning it displays directly on the price chart rather than in a separate pane.
Date Matching: Uses a helper function is_date(y, m, d) to check if the current chart date matches any of the predefined event dates, leveraging TradingView's year, month, and dayofmonth variables.
Visualization Methods:
plotshape: Used for new moons (white circles) and full moons (orange circles), positioned above bars for clear visibility.
bgcolor: Used for Mercury retrograde periods, applying a semi-transparent red highlight (transparency level 85) to the background during active retrograde periods.
Time Range: Spans from January 2013 to December 2025, providing a comprehensive 13-year view of these astrological events.
Usage:
Add the script to your TradingView chart to see new moons, full moons, and Mercury retrograde periods overlaid on your chosen symbol and timeframe.
The white and orange circles appear on specific dates, while the red background highlights extend across the duration of each Mercury retrograde period.
Useful for traders incorporating astrology into their analysis or anyone interested in tracking these celestial events alongside financial data.
Notes:
The script assumes accurate date data as provided; users should verify dates against astronomical sources if precision is critical.
The transparency of the Mercury retrograde background can be adjusted by modifying the value in color.new(color.red, 85) (0 = fully opaque, 100 = fully transparent).
Best viewed on daily or higher timeframes for clarity, though it works on any timeframe supported by TradingView.
This indicator provides a visual tool to explore the potential influence of lunar phases and Mercury retrograde periods on market behavior, blending astrology with technical analysis in a clear, customizable format.
JW Momentum IndicatorJW Momentum Indicator
This indicator provides clear and actionable buy/sell signals based on a combination of volume-enhanced momentum, divergence detection, and volatility adjustment. It's designed to identify potential trend reversals and momentum shifts with a focus on high-probability setups.
Key Features:
Volume-Enhanced Momentum: The indicator calculates a custom oscillator that combines momentum with volume, giving more weight to momentum when volume is significant. This helps to identify strong momentum moves.
Divergence Detection: It detects bullish and bearish divergences using pivot highs and lows, highlighting potential trend reversals.
Volatility-Adjusted Signals: The indicator adjusts signal sensitivity based on the Average True Range (ATR), making it more reliable in varying market conditions.
Clear Visuals: Buy and sell signals are clearly indicated with up and down triangles, while divergences are highlighted with distinct labels.
How to Use:
Buy Signals: Look for green up triangles or bullish divergence labels.
Sell Signals: Look for red down triangles or bearish divergence labels.
Oscillator and Thresholds: Use the plotted oscillator and thresholds to confirm signal strength.
Parameters:
Momentum Period: Adjusts the length of the momentum calculation.
Volume Average Period: Adjusts the length of the volume average calculation.
Volatility Period: Adjusts the length of the ATR calculation.
Volatility Multiplier: Adjusts the sensitivity of the volatility-adjusted signals.
Disclaimer:
This indicator is for informational purposes only and should not be considered financial advice. Always conduct 1 thorough research and use appropriate risk management techniques when trading.
EMA + MA + Daily Pivot Levels + Supertrend
🔹 20 EMA – A fast-moving average to track short-term trend
🔹 100 & 200 SMA – Long-term trend indicators
🔹 Daily Pivot Levels – PDH, PDL, Pivot Point, R1, S1
🔹 Supertrend (10, 2) – Trend-following signal with color-coded direction
RSI + VWAP + MA + Volume Signalsa script using a good level of rsi with much filtrations from MA and vwap
ORB Strategy - 1st Breakout + Success Only15m ORB Breakout (white) with 20(+,-) Point Target indicating (green)
BTC High-Reliability Candlestick Patterns🔍 BTC High-Reliability Candlestick Patterns
This script highlights bullish and bearish candlestick patterns based on their reliability level (High / Moderate) and trend role (Reversal / Continuation). It's optimized for intraday traders on BTC.
✅ Key Features
📊 Legend Overlay: Visual legend with emoji and color codes for clarity.
⏱️ Timeframe Restriction: Works only on intraday charts — 2min, 3min, 8min, 10min, 15min, 30min, 60min.
🔄/🔁 Pattern Types:
🔄 Reversal patterns
🔁 Continuation patterns
🎯 Reliability Levels & Colors:
🟩 BuH = High Bullish (Lime Green)
🟢 BuM = Moderate Bullish (Dark Green)
🟥 BeH = High Bearish (Light Red)
🔴 BeM = Moderate Bearish (Dark Red)
🚨 Built-in alerts & box/label visualizations for fast recognition.
📈 Patterns Included:
Bullish High: Morning Star, Three Inside Up, Bullish Engulfing, etc.
Bullish Moderate: Stick Sandwich, Ladder Bottom, Piercing Line, etc.
Bearish High: Evening Star, Three Crows, Bearish Engulfing, etc.
Bearish Moderate: Harami Cross, In Neck, Side By Side White Lines, etc.
(Its open source I used Claude AI and Chat GPT to create the whole code)
Heikin Ashi Buy/Sell with Custom TimeframeSimple indicator that can catch trend,it helps to catch trends,prevent noise and uses heikin ashi calculation
Trend-Based Buy/Sell/Sideways SignalThick trend bands with gradient coloring
✅ Clear "BUY", "SELL", and "SIDEWAYS" signals with labels
✅ Proper visual elements to enhance clarity
SmallCapToLargecapRatioThis Ratio Shows when to shift your allocation from Small Cap to Large Cap before a potential crash. So that you can protect your wealth.
Ex. When the ratio is around 2 (1.6-1.8) (Shift from SMALL CAP to LARGE CAP )
When the ratio is 1 or below (Shift from LARGE CAP to SMALL CAP )
Multi-Timeframe S/R & Breakout Projection1) What This Script Does
Collects S/R levels from the 15-minute and 1-hour timeframes, using each timeframe’s pivot detection.
Sorts those pivot-based levels by their distance from the current price, so you see the nearest levels first.
Draws up to a user-defined number of those levels as horizontal rays on the current chart.
Checks breakouts at the nearest S/R line (the one with the smallest distance from price):
Real Breakout: price breaks above a level and sustains above it for the specified number of bars.
False Breakout: price breaks above but quickly closes back below within the specified lookback.
On confirmation of a real or false breakout, that S/R line changes color to green if price is going higher, or red if price is going lower.
Displays a small table in the corner with:
Daily Trend: bullish or bearish, using an SMA on a 30-minute timeframe.
Sentiment: bullish or bearish, using RSI on the same 30-minute timeframe.
2) How It Works
Multi-Timeframe Pivot Detection
The script uses request.security() to fetch pivot highs/lows from two higher timeframes (15m and 60m).
It collects up to a user-specified number of these pivots (numRecent) from each TF.
Sorting & Plotting S/R Lines
Once pivot values are gathered, the script calculates their “distance” from current price.
It sorts them so that the S/R lines drawn on your chart are the nearest ones first.
Each line is drawn with a color and style you can customize:
srRayColor sets the overall color (e.g. yellow).
srRayStyleOptions can be Solid, Dashed, or Dotted.
Breakout Determination
After drawing the lines, the script looks at the nearest line and applies two specialized checks (f_isFalseBreakout & f_isRealBreakout):
A real breakout occurs if price closes above (or below) and remains on that side for breakLook bars.
A false breakout occurs if price closes above (or below) but quickly returns.
When a breakout is confirmed, that nearest line changes color to:
Green if price is ultimately going up,
Red if price is going down.
Daily Trend & Sentiment Table
A small table in the bottom-right corner shows:
Daily Trend: uses a 30-minute SMA to see if your price is above/below on that timeframe.
Sentiment: uses the RSI (also on 30m). A value over 50 suggests bullish sentiment; under 50 suggests bearish.
3) How to Use It
Timeframes & Pivots
Choose how many pivots (numRecent) from each TF to fetch (up to 10 total). A higher number means you’ll see more historical S/R lines.
Customize pivotLeft & pivotRight for how “wide” the pivot detection is.
Line Customization
In the script’s Inputs tab, you’ll find:
S/R Rays Color – sets the hue of the lines.
S/R Line Style – pick from Solid, Dashed, or Dotted.
Liquidity Lines Color – color for the smaller pivot lines from your chart timeframe’s pivot detection.
Breakout Lookback
breakLook determines how many bars must confirm or refute the breakout. Adjust it based on how conservative or aggressive you want the breakout detection.
Check the Table
In the bottom-right, watch the script’s “Daily Trend” & “Sentiment”. This can be a quick filter for trades:
“Bullish” daily trend with a bullish sentiment is often more favorable for long trades.
Conversely, “Bearish” daily trend & sentiment can confirm short ideas.
Scenarios
If you see a “Real Breakout” label near the line, the script recolors that line green or red, indicating a possible continuous move.
A “False Breakout” label suggests the price has quickly retraced.
4) Originality & Concepts
Multi-Timeframe Approach: Many S/R indicators fetch only local pivot lines; here, we explicitly gather pivot points from two separate TFs (15m & 60m) and project them onto your lower timeframe chart.
Distance-Based Sorting ensures you only see the nearest lines on the chart, preventing clutter from excessive lines.
Breakout Logic used is straightforward but effective: it checks if price truly holds beyond a level (real breakout) or fails to hold (false breakout).
Line Recoloring provides immediate visual feedback on the success or failure of the breakout.
5) Chart Usage
Plot this script on a relatively low timeframe chart (like the 1m, 5m, or 15m) to see the higher timeframe S/R lines.
Select how many S/R lines you want to show, choose the line style, set your pivot detection parameters, then watch for breakouts.
Tips:
Start with fewer lines (maxLevels=3 or 5) so the chart remains clear.
You can experiment with a small breakLook if you want more immediate breakout signals, or a higher breakLook if you need stronger confirmation.
Enjoy using the “Multi-Timeframe S/R & Breakout Projection” script! It simplifies the manual process of spotting higher timeframe pivot lines and helps you quickly assess potential breakouts or fakes on your intraday charts, all while giving you a snapshot of the higher timeframe’s trend and sentiment.
Grok Scalper M5
//@version=5
indicator("Grok Scalper M5", overlay=true, shorttitle="GROK-M5")
// === Inputs ===
// --- Geral ---
timeframe = input.timeframe("5", "Timeframe (ex.: 5 para M5)", group="Configurações Gerais")
side_threshold = input.float(0.3, "Lateral Threshold (%)", minval=0.1, maxval=1.0, step=0.1, group="Configurações Gerais", tooltip="Diferença mínima para definir tendência")
// --- Períodos ---
ema5_period = input.int(5, "EMA5 Period", minval=1, group="Períodos")
ema9_period = input.int(9, "EMA9 Period", minval=1, group="Períodos")
ema20_period = input.int(20, "EMA20 Period", minval=1, group="Períodos")
ema41_period = input.int(41, "EMA41 Period", minval=1, group="Períodos")
ema8_period = input.int(8, "EMA8 Period (Sinal)", minval=1, group="Períodos")
sma50_period = input.int(50, "SMA50 Period", minval=1, group="Períodos")
sma100_period = input.int(100, "SMA100 Period", minval=1, group="Períodos")
ma200_period = input.int(200, "MA200 Period", minval=1, group="Períodos")
hilo_period = input.int(13, "HiLo Period", minval=1, group="Períodos")
rsi_period = input.int(5, "RSI Period", minval=1, group="Períodos")
candle_up = input.color(color.green, "Candle Up", group="Cores")
candle_down = input.color(color.red, "Candle Down", group="Cores")
candle_side = input.color(color.blue, "Candle Side", group="Cores")
ma_up = input.color(color.green, "Médias Up", group="Cores")
ma_down = input.color(color.red, "Médias Down", group="Cores")
ma_side = input.color(color.yellow, "Médias Side", group="Cores")
rsi_buy = input.int(40, "RSI Buy Level", minval=0, maxval=100, group="Filtros")
rsi_sell = input.int(60, "RSI Sell Level", minval=0, maxval=100, group="Filtros")
vol_mult = input.float(1.5, "Volume Multiplier", minval=1.0, step=0.1, group="Filtros", tooltip="Volume mínimo para validar sinal")
/
ema5 = ta.ema(close, ema5_period)
ema9 = ta.ema(close, ema9_period)
ema20 = ta.ema(close, ema20_period)
ema41 = ta.ema(close, ema41_period)
ema8 = ta.ema(close, ema8_period)
sma50 = ta.sma(close, sma50_period)
sma100 = ta.sma(close, sma100_period)
ma200 = ta.sma(close, ma200_period)
// HiLo
hilo = ta.sma((high + low) / 2, hilo_period)
// RSI
rsi = ta.rsi(close, rsi_period)
rsiBuyCond = rsi > rsi_buy and rsi > rsi
rsiSellCond = rsi < rsi_sell and rsi < rsi
// Volume
volMA = ta.sma(volume, 10)
volCond = volume >= volMA * vol_mult
// Tendência
diff = math.abs((ema5 - ema20) / close) * 100
isUp = ema5 > ema20 and close > hilo and diff > side_threshold
isDown = ema5 < ema20 and close < hilo and diff > side_threshold
isSide = not isUp and not isDown
// Coloração
maColor = isUp ? ma_up : isDown ? ma_down : ma_side
plot(ema5, color=maColor, title="EMA5", linewidth=1)
plot(ema9, color=maColor, title="EMA9", linewidth=1)
plot(ema20, color=maColor, title="EMA20", linewidth=1)
plot(ema41, color=maColor, title="EMA41", linewidth=1)
plot(ema8, color=maColor, title="EMA8", linewidth=1)
plot(sma50, color=maColor, title="SMA50", linewidth=1)
plot(sma100, color=maColor, title="SMA100", linewidth=1)
plot(ma200, color=maColor, title="MA200", linewidth=2)
plot(hilo, color=color.purple, title="HiLo", linewidth=1)
D3m4h GIFVGDescription
D3m4h GIFVG is an indicator designed to automatically detect market imbalances—often referred to as FVGs (Fair Value Gaps)—and potential pivot-based shifts in market structure. It offers a dynamic approach to visualizing supply/demand inefficiencies and pivot-based trend changes. Key features include:
1. Pivot-Based Bullish/Bearish Detection
The indicator identifies higher-high/lower-low pivot logic as well as “outside bar” pivots.
It tracks when the market transitions from bullish to bearish ranges, or vice versa, by using multiple checks:
Pivot low/high detection
Break-of-structure (when price crosses the last pivot)
Opposing FVG detection to confirm an intraday pivot shift
2. FVG (Fair Value Gap) Detection
The script automatically scans for bullish or bearish FVG conditions:
Bullish FVG: Candle at position (bar_index - 2) has a high below the current candle’s low.
Bearish FVG: Candle at position (bar_index - 2) has a low above the current candle’s high.
When it detects an FVG, it draws a box on the chart to highlight the price gap (yellow boxes by default).
3. Pivot Range FVG
If an FVG forms while the market is in a bullish pivot range, the script can paint a special “blue” FVG to underscore its significance. The same logic applies if a newly formed FVG appears in a bearish pivot range.
4. Filled Gap Cleanup
You can optionally hide standard FVG boxes once they’re filled. For example, if the candle’s body (or candle range) covers that gap, the box is removed to keep your chart clean.
5. Pivot-Range FVG “Raided” Cleanup
If the pivot-based FVG is later filled from the opposing direction, it turns green and can optionally remove itself after a set number of bars.
6. Informative Table
A small table on the chart optionally displays whether or not the pivot-based FVG has been “raided”. You can toggle this table on/off in the settings.
How It Works
1. Pivot Shifts
The script tracks the last pivot high/low using a combination of candle-based pivot detection and break-of-structure checks (when price crosses the last pivot in the opposite direction).
When a shift is detected, the pivot range ID increments—this helps the script know when to remove old pivot-based FVGs or draw new ones.
2. FVG Formation
Each new bar checks if a bullish or bearish FVG formed (comparing the high of bar two bars ago to the current low, or the low of bar two bars ago to the current high).
If one is found, a box is drawn to highlight the imbalance. Its color and extension depend on script settings.
3. Imbalance or Pivot FVG
Standard imbalance boxes appear in yellow.
If the new imbalance coincides with a bullish or bearish pivot range, a special “pivot imbalance” box in blue is drawn.
3. Hide Filled
If a newly formed candle’s body fully covers the FVG, the box is considered filled. If Hide Filled Gaps is enabled, the box is deleted once it’s covered.
4. Raid Status
For the pivot-based (blue) FVG, once price invalidates it from the opposite side, it changes color to green and gets removed after a user-defined number of bars.
How to Use
1. Look for FVGs
Observe yellow boxes to identify potential intraday imbalances. Watch for price returning to fill these zones.
If you see a “blue” box, it signifies a pivot-based FVG in line with a recognized shift in structure—arguably a higher-probability zone.
2. “Hide Filled Gaps”
Turn this on if you only want to see currently active or partially filled imbalances. The script cleans up old, fully covered boxes to keep your chart neat.
3. Pivot Shifts
Note the script’s internal pivot logic. Each new pivot re-defines bullish or bearish states. Use these states to gauge the short-term trend shifts.
4. Toggle the Table
You can show or hide the chart table by enabling/disabling “Show Table” from the inputs. This table indicates if the pivot-based “GIFVG” has been “raided” or not.
5. Extend Count
Adjust the extendCount in the code if you want FVG boxes to extend further or shorter in time.
Underlying Concepts
Fair Value Gaps
Market inefficiencies that occur when price jumps, leaving a “gap” from the candle 2 bars ago to the current candle. They can act like mini supply/demand zones where price may revisit for balance.
Pivot Ranges
The script tries to maintain an internal sense of whether the market is in a bullish or bearish pivot range. When it sees a contrary FVG or break-of-structure, it flips the pivot state.
Outside Bars
A candle that has both a higher high and a lower low than the previous bar. The script uses these to mark significant pivot shifts.
By combining pivot-based logic with FVG detection, the D3m4h GIFVG indicator helps highlight potential areas of liquidity or unfilled value. Traders can use these zones to plan entries/exits or to confirm short-term trend shifts.
D3m4h GIFVGDescription
D3m4h GIFVG is an indicator designed to automatically detect market imbalances—often referred to as FVGs (Fair Value Gaps)—and potential pivot-based shifts in market structure. It offers a dynamic approach to visualizing supply/demand inefficiencies and pivot-based trend changes. Key features include:
1. Pivot-Based Bullish/Bearish Detection
The indicator identifies higher-high/lower-low pivot logic as well as “outside bar” pivots.
It tracks when the market transitions from bullish to bearish ranges, or vice versa, by using multiple checks:
Pivot low/high detection
Break-of-structure (when price crosses the last pivot)
Opposing FVG detection to confirm an intraday pivot shift
2. FVG (Fair Value Gap) Detection
The script automatically scans for bullish or bearish FVG conditions:
Bullish FVG: Candle at position (bar_index - 2) has a high below the current candle’s low.
Bearish FVG: Candle at position (bar_index - 2) has a low above the current candle’s high.
When it detects an FVG, it draws a box on the chart to highlight the price gap (yellow boxes by default).
3. Pivot Range FVG
If an FVG forms while the market is in a bullish pivot range, the script can paint a special “blue” FVG to underscore its significance. The same logic applies if a newly formed FVG appears in a bearish pivot range.
4. Filled Gap Cleanup
You can optionally hide standard FVG boxes once they’re filled. For example, if the candle’s body (or candle range) covers that gap, the box is removed to keep your chart clean.
5. Pivot-Range FVG “Raided” Cleanup
If the pivot-based FVG is later filled from the opposing direction, it turns green and can optionally remove itself after a set number of bars.
6. Informative Table
A small table on the chart optionally displays whether or not the pivot-based FVG has been “raided”. You can toggle this table on/off in the settings.
How It Works
1. Pivot Shifts
The script tracks the last pivot high/low using a combination of candle-based pivot detection and break-of-structure checks (when price crosses the last pivot in the opposite direction).
When a shift is detected, the pivot range ID increments—this helps the script know when to remove old pivot-based FVGs or draw new ones.
2. FVG Formation
Each new bar checks if a bullish or bearish FVG formed (comparing the high of bar two bars ago to the current low, or the low of bar two bars ago to the current high).
If one is found, a box is drawn to highlight the imbalance. Its color and extension depend on script settings.
3. Imbalance or Pivot FVG
Standard imbalance boxes appear in yellow.
If the new imbalance coincides with a bullish or bearish pivot range, a special “pivot imbalance” box in blue is drawn.
3. Hide Filled
If a newly formed candle’s body fully covers the FVG, the box is considered filled. If Hide Filled Gaps is enabled, the box is deleted once it’s covered.
4. Raid Status
For the pivot-based (blue) FVG, once price invalidates it from the opposite side, it changes color to green and gets removed after a user-defined number of bars.
How to Use
1. Look for FVGs
Observe yellow boxes to identify potential intraday imbalances. Watch for price returning to fill these zones.
If you see a “blue” box, it signifies a pivot-based FVG in line with a recognized shift in structure—arguably a higher-probability zone.
2. “Hide Filled Gaps”
Turn this on if you only want to see currently active or partially filled imbalances. The script cleans up old, fully covered boxes to keep your chart neat.
3. Pivot Shifts
Note the script’s internal pivot logic. Each new pivot re-defines bullish or bearish states. Use these states to gauge the short-term trend shifts.
4. Toggle the Table
You can show or hide the chart table by enabling/disabling “Show Table” from the inputs. This table indicates if the pivot-based “GIFVG” has been “raided” or not.
5. Extend Count
Adjust the extendCount in the code if you want FVG boxes to extend further or shorter in time.
Underlying Concepts
Fair Value Gaps
Market inefficiencies that occur when price jumps, leaving a “gap” from the candle 2 bars ago to the current candle. They can act like mini supply/demand zones where price may revisit for balance.
Pivot Ranges
The script tries to maintain an internal sense of whether the market is in a bullish or bearish pivot range. When it sees a contrary FVG or break-of-structure, it flips the pivot state.
Outside Bars
A candle that has both a higher high and a lower low than the previous bar. The script uses these to mark significant pivot shifts.
By combining pivot-based logic with FVG detection, the D3m4h GIFVG indicator helps highlight potential areas of liquidity or unfilled value. Traders can use these zones to plan entries/exits or to confirm short-term trend shifts.
[JPMM]SuperTrendThis indicator is built on a combination of indicators: SuperTrend, RSI, Stochastic, ADX, EMA.
It works on the principle of finding accumulation zones combined with momentum.
You can buy or sell when you see a BUY/SELL signal, but this is an indicator used to accumulate positions, so you have to divide your capital into many equal parts to accumulate (the safest is over 50 parts).
You can adjust the overbought/oversold zone of RSI in the settings, this can help you choose better BUY/SELL zones.
Please use it and give feedback!
GALFER {GALFER} SMCGentryIntroducing Our TradingView Indicator
This leading indicator is designed to automatically mark major swing points in any market of your choice—forex, crypto, indices, or commodities.
✅ It adapts to your strategy and is ideal for:
Day Trading
Swing Trading
Scalping (even on second-based timeframes)
📌 Important Note:
The true value of this tool depends on your understanding of forex basics and price action. With the right knowledge, you'll be ready to trade with precision and confidence.
🎯 Whether you're a beginner or an experienced trader, this indicator is your edge in identifying key market turning points—before they happen.
Simple Moving Averageimport yfinance as yf
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
✅ Enhanced Daily FVG & Gaps ❌this is an enhanced daily fvg and gaps and it shows previous fvg and gaps if it was successful support or resistance