Fast Fourier Transform [ScorsoneEnterprises]The SCE Fast Fourier Transform (FFT) is a tool designed to analyze periodicities and cyclical structures embedded in price. This is a Fourier analysis to transform price data from the time domain into the frequency domain, showing the rhythmic behaviors that are otherwise invisible on standard charts.
Instead of merely observing raw prices, this implementation applies the FFT on the logarithmic returns of the asset:
Log Return(𝑚) = log(close / close )
This ensures stationarity and stabilizes variance, making the analysis statistically robust and less influenced by trends or large price swings.
For a user-defined lookback window 𝑁:
Each frequency component 𝑘 is computed by summing real and imaginary projections of log-returns multiplied by complex exponential functions:
𝑒^−𝑖𝜃 = cos(𝜃)−𝑖sin(𝜃)
where:
θ = 2πkm / N
he result is the magnitude spectrum, calculated as:
Magnitude(𝑘) = sqrt(Real_Sum(𝑘)^2 + Imag_Sum(𝑘)^2)
This spectrum represents the strength of oscillations at each frequency over the lookback period, helping traders identify dominant cycles.
Visual Analysis & Interpretation
To give traders context for the FFT spectrum’s values, this script calculates:
25th Percentile (Purple Line)
Represents relatively low cyclical intensity.
Values below this threshold may signal quiet, noisy, or trendless periods.
75th Percentile (Red Line)
Represents heightened cyclical dominance.
Values above this threshold may indicate significant periodic activity and potential trend formation or rhythm in price action.
The FFT magnitude of the lowest frequency component (index 0) is plotted directly on the chart in teal. Observing how this signal fluctuates relative to its percentile bands provides a dynamic measure of cyclical market activity.
Chart examples
In this NYSE:CL chart, we see the regime of the price accurately described in the spectral analysis. We see the price above the 75th percentile continue to trend higher until it breaks back below.
In long trending markets like NYSE:PL has been, it can give a very good explanation of the strength. There was confidence to not switch regimes as we never crossed below the 75th percentile early in the move.
The script is also usable on the lower timeframes. There is no difference in the usability from the different timeframes.
Script Parameters
Lookback Value (N)
Default: 30
Defines how many bars of data to analyze. Larger N captures longer-term cycles but may smooth out shorter-term oscillations.
Indicatori e strategie
LinearRegfressionL'indicatore fornisce una semplice regressione lineare dei valori High, Low, Open, Close
Daily 10-ATR & %ATR (Top Right)Better version to be able to see ATR and the percentage it has moved at a glance, no charting just the numbers
EMAs + LSMA Cross Alert (Mejorado)his indicator is designed to identify buy and sell signals based on the behavior of multiple exponential moving averages (EMAs) and a Least Squares Moving Average (LSMA). It includes 5 EMAs and one LSMA, with visual and alert features.
📌 Components:
EMA 4 (purple)
EMA 9 (Fuchsia)
EMA 21 (blue)
EMA 50 (Green)
EMA 200 (maroon)
LSMA 30 (Orange)
🔍 Signal Logic:
✅ Buy Signal:
The LSMA (30) must be below both EMA 4 and EMA 9.
A bullish crossover occurs: EMA 4 crosses above EMA 9.
Only one signal is triggered per crossover, avoiding repeated alerts during trend continuation.
❌ Sell Signal:
The LSMA (30) must be above both EMA 4 and EMA 9.
A bearish crossover occurs: EMA 4 crosses below EMA 9.
Only one signal is triggered per crossover, avoiding repeated alerts during trend continuation.
🖥️ Visual Features:
Option to show/hide each EMA and the LSMA.
Buy/Sell markers appear at cross points.
A white background highlight marks the candle where the signal occurs (optional).
Visuals scale dynamically with the chart zoom and axes.
🔔 Alerts:
Custom alert conditions for Buy and Sell.
Alerts can trigger push notifications to the TradingView mobile app, email, or webhook.
Configured to avoid repeating alerts unless the trend resets and a new valid crossover occurs.
ATR Label (Top Right)Final version easier to run daily ATR first, then move to lower time frames, only purpose is to see the ATR quick
Candles by Day, Time, Month + StatsThis Pine Script allows you to filter and display candles based on:
📅 Specific days of the week
🕒 Custom intraday time ranges (e.g., 9:15 to 10:30)
📆 Selected months
📊 Shows stats for each filtered block:
🔼 Range (High – Low)
📏 Average candle body size
⚙️ Key Features:
✅ Filter by day, time, and month
🎛 Toggle to show/hide the stats label
🟩 Candles are drawn only for selected conditions
📍 Stats label is positioned above session high (adjustable)
⚠️ Important Setup Instructions:
✅ 1. Use it on a blank chart
To avoid overlaying with default candles:
Open the chart of your preferred symbol
Click on the chart type (top toolbar: "Candles", "Bars", etc.)
Select "Blank" from the dropdown (this will hide all native candles)
Apply this indicator
This ensures only the filtered candles from the script are visible.
Adjust for your local timezone
This script uses a hardcoded timezone: "Asia/Kolkata"
If you are in a different timezone, change it to your own (e.g. "America/New_York", "Europe/London", etc.) in all instances of:
time(timeframe.period, "Asia/Kolkata")
timestamp("Asia/Kolkata", ...)
Use Cases:
Opening range behavior on specific weekdays/months
Detecting market anomalies during exact windows
Building visual logs of preferred trade hours
TVI-3 Z-Score: MA + VWAP + BB Composite🔧 Overview:
It combines:
Z-score of price relative to the 200-period simple moving average (MA)
Z-score of price relative to the 200-period VWAP (volume-weighted average price)
Z-score of Bollinger Band width
The result is an average of these three Z-scores, plotted as a composite indicator for identifying overvalued and undervalued conditions.
Normalized 180-Day RP Change (Z-Score)180 day RP change with less alpha decay, good for picking tops on 1d tf
Day and DateA simple indicator that show day and date at the start of each day. This is usefull in case you are downloading charts or get confused when studying past charts for expiry and non expiry day actions.
Normalized Reserve Risk (Proxy Z-Score)normalised version of the reserve risk indicator on btc magazine because the btc magazine one is poo .
minchang volume tradingCondition
Point color
Volume ≥ 3× MA(24)
Violet
Volume ≥ 1.5× MA(24)
Red
Volume < 1.5× MA(24) & bullish
White
Volume < 1.5× MA(24) & bearish
Black
Nến Tô Màu Theo Volume / MA(21)Condition
Point color
Volume ≥ 3× MA(24)
Violet
Volume ≥ 1.5× MA(24)
Red
Volume < 1.5× MA(24) & bullish
White
Volume < 1.5× MA(24) & bearish
Black
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.
liq depth fvg/bprA script that draws liquidity depth boxes from the 9.30-10.00 am range which can prove decent areas to look for a reversal. It also draws in fvg and bpr levels which can help add confluence to a trade ideas. The 9.30 to 10.00 am range is highlighted by blue lines to assist in opening range trades as described by Casper SMC.
Previous 10 Weekly Highs/LowsNewer vweionnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn