OPEN-SOURCE SCRIPT
TGFA Flexible Alerts Multi-MA Crossovers

TGFA Flexible Alerts, Multi-MA Crossovers
Description
Flexible MA crossovers with BUY/SELL alerts, customizable candle colors, and an info box for ATR/volatility insights. Supports EMA/SMA/HMA/VWAP on any chart.
Overview
TGFA Flexible Alerts is a versatile Pine Script indicator for traders seeking customizable moving average (MA) crossovers, visual signals, and quick-reference metrics. It overlays crossover lines (e.g., fast EMA over slow SMA), generates BUY/SELL labels and alerts, colors candles based on themes, and includes an optional info box with ATR bands, support/resistance, and trend projections. Built for any symbol and timeframe (optimized for 1H intraday), it auto-detects Heikin Ashi charts and handles mixed MA types like responsive HMA with lagging EMAs. All logic uses built-in TA functions for reliability—no repainting on confirmed bars.
Key Features
Alerts fire on crossovers/crossunders (custom messages with ticker/interval). Open-source for forking.
How to Use
Limitations & Disclaimers - Designed for overlay on price charts; may overlap in tight ranges—adjust transparency via styles.
HMA can repaint intra-bar; signals confirm on close. Not back tested for all assets—validate with strategy tester.
Info box projections use SMA(50) as a trend pivot (same for up/down as reference); customize via code for advanced calcs. Candle colors are cosmetic only.
This is an analysis tool, not advice. Trading involves risk; combine with fundamentals/news. Past performance isn't indicative of future results. No liability for losses.
I'm still a newbie, so feedback encouraged!
Thank you!!
ThisGirl
Description
Flexible MA crossovers with BUY/SELL alerts, customizable candle colors, and an info box for ATR/volatility insights. Supports EMA/SMA/HMA/VWAP on any chart.
Overview
TGFA Flexible Alerts is a versatile Pine Script indicator for traders seeking customizable moving average (MA) crossovers, visual signals, and quick-reference metrics. It overlays crossover lines (e.g., fast EMA over slow SMA), generates BUY/SELL labels and alerts, colors candles based on themes, and includes an optional info box with ATR bands, support/resistance, and trend projections. Built for any symbol and timeframe (optimized for 1H intraday), it auto-detects Heikin Ashi charts and handles mixed MA types like responsive HMA with lagging EMAs. All logic uses built-in TA functions for reliability—no repainting on confirmed bars.
Key Features
- MA Crossover Engine: Configurable lines (EMA, SMA, HMA, VWAP) with dynamic colors (HMA tints green/red based on slope). Enable/disable via inputs.
- Invert Signals Toggle: Flips BUY/SELL logic for mixed MA setups (e.g., HMA as fast line over EMA).
- Reasoning: Traditional crossovers assume a fast line (low lag) crossing above a slow line (high lag) for buys. HMA's hull design makes it ultra-responsive, so it may "lead" too aggressively—causing premature signals. Inverting aligns it with user intuition (e.g., HMA dipping below then recovering signals strength), reducing false positives in trending markets. Test on your pairs!
- Visual Alerts: BUY/SELL labels at crossover price (with optional price display and offset adjustment).
- Single MA Overlays: Independent plots for EMA/SMA/HMA/VWAP (length 0 to hide).
- Info Box: Real-time table with current price, ±1/2 ATR bands, median price (over lookback), trend (SMA50 slope), volatility % (ATR normalized), support/resistance (recent highs/lows), and reversal projections (tied to SMA50 pivot for up/down bias).
- Candle Coloring: 20+ themes (dark/light canvases) for bull/bear/reversal/low-volume bars—e.g., Emerald Blaze greens uptrends, dims on low vol. Toggle off for no changes.
- Chart Source Flexibility: Auto-switches to Heikin Ashi if detected; manual override for Regular/HA.
Alerts fire on crossovers/crossunders (custom messages with ticker/interval). Open-source for forking.
How to Use
- Add to Chart: Search in TradingView's public library, apply to any symbol (e.g., stocks, forex). Best on 1H for intraday, but works on daily/weekly too.
- Setup Crossovers: Choose Line 1/2 types/lengths (e.g., HMA 9 over SMA 20). Enable "Invert Signals" if using HMA—prevents lag mismatches in volatile assets.
- Alerts & Labels: Toggle labels for visuals; set TradingView alerts on "Buy"/"Sell" conditions. Use offset for crowded charts.
- Info Box Insights: Enable for quick scans—e.g., enter long near support if trend is bullish and price > median. Adjust ATR length (default 14) for sensitivity.
- Candle Themes: Pick a scheme (e.g., Neon Pulse for dark mode); it overrides bar colors without altering data.
- Customization Tip: For HMA-heavy setups, invert + short lengths (5-9) catch turns early; pair with volume filter in alerts.
Limitations & Disclaimers - Designed for overlay on price charts; may overlap in tight ranges—adjust transparency via styles.
HMA can repaint intra-bar; signals confirm on close. Not back tested for all assets—validate with strategy tester.
Info box projections use SMA(50) as a trend pivot (same for up/down as reference); customize via code for advanced calcs. Candle colors are cosmetic only.
This is an analysis tool, not advice. Trading involves risk; combine with fundamentals/news. Past performance isn't indicative of future results. No liability for losses.
I'm still a newbie, so feedback encouraged!
Thank you!!
ThisGirl
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。