📈 Smart Alert System — EMA/MA/Volume/SMC AlertsHere's a detailed description of your custom TradingView **Pine Script v6**:
---
### 📌 **Title**: Smart Alert System — Webhook Ready (with EMA, MA, Volume, and SMC)
This script is designed to **monitor price behavior**, detect important **technical analysis events**, and **send real-time alerts via webhook to a Telegram bot**.
---
## 🔧 SETTINGS
| Setting | Description |
| ----------------------- | ------------------------------------------------------------------------------ |
| `volumeSpikeMultiplier` | Multiplier to determine a volume spike compared to the 20-bar average volume |
| `testAlert` | If `true`, sends a test alert when the indicator is first applied to the chart |
---
## 🔍 COMPONENT BREAKDOWN
### 1. **EMA & MA Calculations**
These indicators are calculated and plotted on the chart:
* **EMAs**: 13, 25, 30, 200 — used for trend and touch detection
* **MAs**: 100, 300 — used for break and retest detection
```pinescript
ema_13 = ta.ema(close, 13)
ema_200 = ta.ema(close, 200)
ma_100 = ta.sma(close, 100)
```
---
### 2. **📈 Volume Spike Detection**
* A volume spike is identified when the current bar's volume is **2x (default)** greater than the 20-period average.
* A red triangle is plotted above such candles.
* A **JSON alert** is triggered.
```pinescript
volSpike = volume > avgVol * volumeSpikeMultiplier
```
---
### 3. **📊 EMA Touch Alerts**
* The script checks if the current close is:
* Within 0.1% of an EMA value **OR**
* Has crossed above/below it.
* If so, it sends an alert with the EMA name.
```pinescript
touch(val, crossed) =>
math.abs(close - val) / val < 0.001 or crossed
```
---
### 4. **📉 MA Break and Retest Alerts**
* A **break** is when price falls **below** a moving average.
* A **retest** is when price climbs **above** the same average after breaking below.
```pinescript
breakBelow(ma) => close > ma and close < ma
```
---
### 5. 🧠 **SMC Alerts (Break of Structure \ & Change of Character \ )**
These follow **Smart Money Concepts (SMC)**. The script identifies:
* **BOS**: New higher high in uptrend or lower low in downtrend
* **CHOCH**: Opposite of trend, e.g. lower low in uptrend or higher high in downtrend
```pinescript
bos = (high > high ) and (low > low ) and (low > low )
choch = (low < low ) and (high < high ) and (high < high )
```
---
### 6. 🧪 Dummy Test Alert (1-time fire)
* Sends a `"✅ Test Alert Fired"` to verify setup
* Executes **once only** after adding the indicator
```pinescript
var bool sentTest = false
if testAlert and not sentTest
```
---
### 7. 🚀 Alert Delivery (Webhook JSON)
All alerts are sent as a JSON payload that looks like this:
```json
{
"pair": "BTCUSD",
"event": "🔺 Volume Spike",
"timeframe": "15",
"timestamp": "2024-06-29T12:00:00Z",
"volume": "654000"
}
```
This format makes it compatible with your **Telegram webhook server**.
---
### 🔔 Alerts You Can Create in TradingView
* Set **Webhook URL** to your `https://xxxx.ngrok-free.app/tradingview-webhook`
* Use alert condition: `"Any alert()`" — because all logic is internal.
* Select **"Webhook URL"** and leave the message body blank.
---
### 🛠️ Use Cases
* Notify yourself on **EMA interaction**
* Detect **trend shifts or retests**
* Spot **volume-based market interest**
* Get real-time **BOS/CHOCH alerts** for Smart Money strategies
* Alert through **Telegram using your Node.js webhook server**
---
Would you like me to break down the full Pine Script block-by-block as well?
Trend Analysis
TRADING GURU - WatermarkHi guys,
If you are looking to add some watermark into your charts. You can use this indicator.
You can add add a title and a subtitle, if you want to write in diferents lines, you can use as you can see in the script.
All the features are customizable: position, text size, text color, background.
Enjoy it.
ZY Legend StrategyThe ZY Legend Strategy indicator closely follows the trend of the parity. It produces trading signals in candles where the necessary conditions are met and clearly shows these signals on the chart. Although it was produced for the scalp trade strategy, it works effectively in all time frames. 'DEAD PARITY' signals indicate that healthy signals cannot be generated for the relevant parity due to shallow ATR. It is not recommended to trade on parities where this signal appears.
GlocksFibsA modded Version of AlgoAlphas fib script. reworked it into my fib set. same rules apply 868 924 entry. first tp 50% mark. using it to help speed up my charting process overall. This is by far one of the best ones ive found that wont print the fib weird once the new numbers are in. all credits to AlgoAlpha and this gem they made!
CMF Hybrid Scalper (1m Optimized)CMF Hybrid SCALPER That measures the change of CMF and smoothen it with EMA. Gives green zone zero and vise versa
Intraday TWAP SimpleSlivKurs. This script implements a classic VWAP using ChatGPT (OpenAI). Purely a home project.
Historical Volatility with HV Average & High/Low TrendlinesHere's a detailed description of your Pine Script indicator:
---
### 📊 **Indicator Title**: Historical Volatility with HV Average & High/Low Trendlines
**Version**: Pine Script v5
**Purpose**:
This script visualizes market volatility using **Historical Volatility (HV)** and enhances analysis by:
* Showing a **moving average** of HV to identify volatility trends.
* Marking **high and low trendlines** to highlight extremes in volatility over a selected period.
---
### 🔧 **Inputs**:
1. **HV Length (`length`)**:
Controls how many bars are used to calculate Historical Volatility.
*(Default: 10)*
2. **Average Length (`avgLength`)**:
Number of bars used for calculating the moving average of HV.
*(Default: 20)*
3. **Trendline Lookback Period (`trendLookback`)**:
Number of bars to look back for calculating the highest and lowest values of HV.
*(Default: 100)*
---
### 📈 **Core Calculations**:
1. **Historical Volatility (`hv`)**:
$$
HV = 100 \times \text{stdev}\left(\ln\left(\frac{\text{close}}{\text{close} }\right), \text{length}\right) \times \sqrt{\frac{365}{\text{period}}}
$$
* Measures how much the stock price fluctuates.
* Adjusts annualization factor depending on whether it's intraday or daily.
2. **HV Moving Average (`hvAvg`)**:
A simple moving average (SMA) of HV over the selected `avgLength`.
3. **HV High & Low Trendlines**:
* `hvHigh`: Highest HV value over the last `trendLookback` bars.
* `hvLow`: Lowest HV value over the last `trendLookback` bars.
---
### 🖍️ **Visual Plots**:
* 🔵 **HV**: Blue line showing raw Historical Volatility.
* 🔴 **HV Average**: Red line (thicker) indicating smoothed HV trend.
* 🟢 **HV High**: Green horizontal line marking volatility peaks.
* 🟠 **HV Low**: Orange horizontal line marking volatility lows.
---
### ✅ **Usage**:
* **High HV**: Indicates increased risk or potential breakout conditions.
* **Low HV**: Suggests consolidation or calm markets.
* **Cross of HV above Average**: May signal rising volatility (e.g., before breakout).
* **Touching High/Low Levels**: Helps identify volatility extremes and possible reversal zones.
---
Let me know if you’d like to add:
* Alerts when HV crosses its average.
* Shaded bands or histogram visualization.
* Bollinger Bands for HV.
🔁 EMA 3/21 Crossover Strategy — Exit on Opposite SignalEMA 3/21 Crossover Strategy — Exit on Opposite Signal
This strategy enters trades based on a crossover between two exponential moving averages:
Buy Entry: When the 3-period EMA crosses above the 21-period EMA
Sell Entry: When the 3-period EMA crosses below the 21-period EMA
Exit Rule: Positions are exited only when an opposite signal occurs (i.e., a new crossover in the other direction)
Key Features:
Designed for trend-following setups
Uses ATR-based SL/TP lines for visual reference only (trades do not auto-close at SL/TP)
Suitable for manual or automated trading logic with high trade clarity
Can be applied on any timeframe and any liquid instrument (Forex, crypto, indices, etc.)
Recommended Use:
Combine with volume or session filters for improved signal quality
Ideal for traders seeking clear entry/exit rules with minimal noise
Best on trending instruments and medium timeframes (USDJPY; Daily)
Momentum TrendThis indicator suite aims to confirm strong uptrends or downtrends by combining ADX, MACD, ATR, and Accumulation/Distribution signals—green dots suggest confirmed upward momentum supported by accumulation at that moment, red dots indicate strong downward momentum, while separate A/D and ADX panels help visually assess trend strength and volume pressure for confirmation.
Close Above Prev High / Below Prev LowIdentifies candles that close above the previous candle's high (bullish) and candles that close below the previous candle's low (bearish). Helps with decisions for entry and exit.
Multi Horizontal Lines 1000 BarsThis indicator is is not my code, I have copied this from another user and extened the lines so they go back 1000 bars for back testing.
I use this indicator to trade Crude Oil and set the horizontal lines to 20 cents increments, 0.2 is 20 cents. You can change the horizontal lines to any price distance to suit your style of trading.
My idea is when price crosses over a horizontal line I will enter a trade long or short looking to secure 20 cents.
Moving Average ExponentialThis indicator plots 8 Exponential Moving Averages (EMAs) with customizable lengths: 20, 25, 30, 35, 40, 45, 50, and 55. It also includes optional smoothing using various moving average types (SMA, EMA, WMA, etc.) and an optional Bollinger Bands overlay based on the EMA. It helps identify trend direction, momentum, and potential reversal zones.
Gold DynamicThis is a custom-made TradingView indicator designed to visualize "sequential price levels" based on a user-defined step value, dynamically centered around the current gold price. It draws horizontal lines at multiples of a chosen step value (e.g., 7) both above and below the current price.
Key Features:
Dynamic Price Levels: Lines are calculated relative to the live price, providing relevant support/resistance or structural levels for the current market context.
Customizable Step Value: Easily adjust the Sequence Step Value (e.g., 7, 10, 14) from the indicator settings to align with your trading theory.
Adjustable Line Count: Control the Number of Lines ABOVE Current Price and Number of Lines BELOW Current Price to show as many or as few levels as desired.
Extended Lines: Horizontal lines extend indefinitely to both the left (historical data) and right (future projection) for comprehensive visualization.
Clear Price Labels: Each line displays its exact price value, positioned at the far right of the chart for quick reference.
Customizable Appearance: Modify line color, width, and style (solid, dotted, dashed) to suit your charting preferences.
Exact Values: All displayed price labels are rounded to whole numbers for clear, precise visualization without decimal values.
This indicator is ideal for traders looking to apply a fixed-step price theory to their gold analysis.
CMF Tilson Scalper (1m Optimized)Calculates CMF and smoothens it based on Tilson MA and then sets buy sone > 0 and sell zone < 0
CMF Tilson Scalper (1m Optimized)This indicator tracks CMF based on Tilson MA with buy zone above zero and Sell zone below zero
Tuga SupertrendDescription
This strategy uses the Supertrend indicator enhanced with commission and slippage filters to capture trends on the daily chart. It’s designed to work on any asset but is especially effective in markets with consistent movements.
Use the date inputs to set the backtest period (default: from January 1, 2018, through today, June 30, 2025).
The default input values are optimized for the daily chart. For other timeframes, adjust the parameters to suit the asset you’re testing.
Release Notes
June 30, 2025
• Updated default backtest period to end on June 30, 2025.
• Default commission adjusted to 0.1 %.
• Slippage set to 3 ticks.
• Default slippage set to 3 ticks.
• Simplified the strategy name to “Tuga Supertrend”.
Default Parameters
Parameter Default Value
Supertrend Period 10
Multiplier (Factor) 3
Commission 0.1 %
Slippage 3 ticks
Start Date January 1, 2018
End Date June 30, 2025
Charts Algo Signature Stamp 🖋️
📌 Charts Algo Signature Stamp 🖋️
An elegant and professional chart signature tool to brand your trading ideas, track chart context, and add motivational affirmations to your work.
🔍 What It Does
The Signature Stamp displays a clean, customizable branding box on your chart that includes:
A Main Title (e.g., brand name or username)
A Subtitle (e.g., your trading mantra or values)
The current symbol + timeframe (optional)
The current date (optional)
This creates a polished, professional visual signature—great for screenshots, social sharing, educational content, or simply marking your charts with intention.
⚙️ How to Use It
Once added to your TradingView chart:
Customize Your Stamp:
Go to the indicator’s settings panel.
Under Main Title, enter your brand (e.g., Charts Algo, Trading by Charts Algo 📈).
Under Subtitle, input a personal mantra or values like:
PATIENCE | DISCIPLINE | FEARLESS
(You can change this anytime — see suggestions below.)
Optional Toggles:
Show Symbol – display the ticker symbol and timeframe.
Show Date – include the current date in DD/MM/YYYY format.
Position Settings:
Choose from 9 positions on the screen:
Top Left, Top Center, Top Right
Middle Left, Center, Middle Right
Bottom Left, Bottom Center, Bottom Right
Style Settings:
Set background color (e.g., transparent or muted).
Choose text colors for title, subtitle, and info text.
Adjust font sizes (tiny → huge) for visual hierarchy.
🖋️ Stamp Ideas
Here are some great 5-word signature ideas for your subtitle:
SCAN | PLAN | EXECUTE | DOMINATE | WIN
PATIENCE | DISCIPLINE | FEARLESS | CONTROL | EDGE
MINDSET | STRATEGY | SETUPS | RISK | PROFIT
SMC | FVG | OTE | CE | FLOW
OBSERVE | LEARN | TRADE | IMPROVE | MASTER
Pick the one that best reflects your trading style and mission—or create your own.
✅ Best Uses
Personal branding for social media posts
Visual signature for shared trading ideas
Motivational reminders on your chart
Identifying context (symbol + date) in screenshots
⚠️ Disclaimer
This visual stamp is for branding and educational display only. It does not provide trading signals or financial advice.
Charts Algo and its tools are intended to support analysis, not replace your judgment or due diligence. Always trade responsibly.
Momentum Trail Oscillator [AlgoAlpha]🟠 OVERVIEW
This script builds a Momentum Trail Oscillator designed to measure directional momentum strength and dynamically track shifts in trend bias using a combination of smoothed price change calculations and adaptive trailing bands. The oscillator aims to help traders visualize when momentum is expanding or contracting and to identify transitions between bullish and bearish conditions.
🟠 CONCEPTS
The core idea combines two methods. First, the script calculates a normalized momentum measure by smoothing price changes relative to their absolute values, which creates a bounded oscillator that highlights whether moves are directional or choppy. Second, it uses a trailing band mechanism inspired by volatility stops, where bands adapt to the oscillator’s volatility, adjusting the thresholds that define a shift in directional bias. This dual approach seeks to address both the magnitude and persistence of momentum, reducing false signals in ranging markets.
🟠 FEATURES
The momentum calculation applies Hull Moving Averages and double EMA smoothing to price changes, producing a smooth, responsive oscillator.
The trailing bands are derived by offsetting a weighted moving average of the oscillator by a multiple of recent momentum volatility. A directional state variable tracks whether the oscillator is above or below the bands, updating when the momentum crosses these dynamic thresholds.
Overbought and oversold zones are visually marked between fixed levels (+30/+40 and -30/-40), with color fills to highlight when momentum is in extreme areas. The script plots signals on both the oscillator pane and optionally overlays markers on the main price chart for clarity.
🟠 USAGE
To use the indicator, apply it to any symbol and timeframe. The “Oscillator Length” controls how sensitive the momentum line is to recent price changes—lower values react faster, higher values smooth out noise. The “Trail Multiplier” sets how far the adaptive bands sit from the oscillator mid-line, which affects how often trend state changes occur. When the momentum line rises into the upper filled area and then crosses back below +40, it signals potential overbought exhaustion. The opposite applies for the oversold zone below -40. The plotted trailing bands switch visibility depending on the current directional state: when momentum is trending up, the lower band acts as the active trailing stop, and when trending down, the upper band becomes active. Trend changes are marked with circular symbols when the direction variable flips, and optional overlay arrows appear on the price chart to highlight overbought or oversold reversals. Traders can combine these signals with their own price action or volume analysis to confirm entries or exits.
Fair Value GapsFair Value Gaps Indicator
The Fair Value Gaps (FVG) Indicator is a sleek, lightweight tool designed to identify and display unfilled fair value price gaps on any chart and timeframe. It dynamically updates as price moves into gaps, shrinking the displayed area to show only the remaining unfilled portion until the gap is fully closed. With a user-friendly settings panel, traders can customize visuals to suit their style, including a minimalist version.
Features
When a valid FVG is detected through a three-candle pattern, a box appears, highlighting the precise gap range. As price enters the gap, the box adjusts to reflect the remaining unfilled area, and when fully filled, the gap is deleted, allowing new gaps to appear. The settings panel offers robust customization for a tailored experience.
Preset Styles :
Custom : Define your own color and zone extension settings. (Default)
Blue Boxes : Blue gaps with 85% transparency and zones extended to the right.
Minimalist Yellow : Yellow gaps with 75% transparency, confined to the original gap area on the candlestick.
Color : Change the gap color and transparency.
Extend FVG Zone : Enable or disable zone extension to the right.
Show Borders : Toggle subtle borders on or off for enhanced visibility.
Maximum FVGs Displayed : Change the number of gaps displayed on the chart.
Thank you for your interest in my work. I use these fair value gaps as part of my trade trigger for many of my trade entries almost every day. If you have any comments, bugs, or suggestions, please leave them here, or you can find me on Twitter or Discord.
@ ContrarianIRL
Open-source developer for over 25 years
RATE OF CHANGE ROLLING INTEGRALAdded an integral balance to the ROC subchart.
just tracks the balance of area back to the ROC length.