MA crossIt takes 2 moving average's, one fast one slow, when the fast MA crosses over the slow MA a signal will be generated,
W
Indicatori e strategie
Gustavo LiquidityThis script draws a user-colored horizontal ray on each green candle and places a blue flag at the ray’s end if the price touches the ray again within a specified number of future bars.
Multi-timeframe RSI AlertAlert for RSI on the 1,3, and 15 min. All msut be under the RSI 30 and this will give a alert, same for RSI 70
StoRsi# StoRSI Indicator: Combining RSI and Stochastic with multiTF
## Overview
The StoRSI indicator combines Relative Strength Index (RSI) and Stochastic oscillators in a single view to provide powerful momentum and trend analysis. By displaying both indicators together with multi-timeframe analysis, it helps traders identify stronger signals when both indicators align.
## Key Components
### 1. RSI (Relative Strength Index)
### 2. Stochastic Oscillator
### 3. EMA (Exponential Moving Average)
### 4. Multi-Timeframe Analysis
## Visual Features
- **Color-coded zones**: Highlights overbought/oversold areas
- **Signal backgrounds**: Shows when both indicators align
- **Multi-timeframe table**: Displays RSI, Stochastic, and trend across timeframes
- **Customizable colors**: Allows full visual customization
## Signal Generation (some need to uncomment in code)
The indicator generates several types of signals:
1. **RSI crosses**: When RSI crosses above/below overbought/oversold levels
2. **Stochastic crosses**: When Stochastic %K crosses above/below overbought/oversold levels
3. **Combined signals**: When both indicators show the same condition
4. **Trend alignment**: When multiple timeframes show the same trend direction
## Conclusion
The StoRSI indicator provides a comprehensive view of market momentum by combining two powerful oscillators with multi-timeframe analysis. By looking for alignment between RSI and Stochastic across different timeframes, traders can identify stronger signals and filter out potential false moves. The visual design makes it easy to spot opportunities at a glance, while the customizable parameters allow adaptation to different markets and trading styles.
For best results, use this indicator as part of a complete trading system that includes proper risk management, trend analysis, and confirmation from price action patterns.
Super YZH Modelsma200 and sma20 especially works 30m 1h. candle filter, the wick must be more than %50 of total candle. sma200 and sma20 must ne in trend. the wick must be on sma20 than we need body closure from this canlde
Buy/Sell Signals (Dynamic v2)//@version=5
indicator(title="Buy/Sell Signals (Dynamic v2)", shorttitle="Buy/Sell Dyn v2", overlay=true)
// Input for moving average lengths
lengthMA = input.int(20, title="Moving Average Length")
lengthEMA = input.int(5, title="Exponential Moving Average Length")
// Calculate Moving Averages
ma = ta.sma(close, lengthMA)
ema = ta.ema(close, lengthEMA)
// --- Buy Signal Conditions ---
buyMarketBelowMA = close < ma
buyMarketBelowEMA = close < ema
buyEMABelowMA = ema < ma
buyMarketCondition = buyMarketBelowMA and buyMarketBelowEMA and buyEMABelowMA
buyFollowingHighNotTouchedEMA = high < ema
buyCurrentCrossCloseAboveFollowingHigh = high > high and close > high
buySignalCondition = buyMarketCondition and buyFollowingHighNotTouchedEMA and buyCurrentCrossCloseAboveFollowingHigh
// Plot Buy Signal
plotshape(buySignalCondition, title="Buy Signal", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
// --- Sell Signal Conditions (Occurring After a Buy Signal Sequence) ---
sellMarketAboveMA = close > ma
sellMarketAboveEMA = close > ema
sellEMAAboveMA = ema > ma
sellMarketConditionSell = sellMarketAboveMA and sellMarketAboveEMA and sellEMAAboveMA
var bool buySignalOccurredRecently = false
if buySignalCondition
buySignalOccurredRecently := true
sellSignalCondition = buySignalOccurredRecently and sellMarketConditionSell and close < close
// Plot Sell Signal
plotshape(sellSignalCondition, title="Sell Signal", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
// Reset the buySignalOccurredRecently only after a sell signal
if sellSignalCondition
buySignalOccurredRecently := false
// Plot the Moving Averages for visual reference
plot(ma, color=color.blue, title="MA")
plot(ema, color=color.red, title="EMA")
(OFPI) Order Flow Polarity Index - Momentum Gauge (DAFE) (OFPI) Order Flow Polarity Index - Momentum Gauge: Decode Market Aggression
The (OFPI) Gauge Bar is your front-row seat to the battle between buyers and sellers. This isn’t just another indicator—it’s a momentum tracker that reveals market aggression through a sleek, centered gauge bar and a smart dashboard. Built for traders who want clarity without clutter, it’s your edge for spotting who’s driving price, bar by bar.
What Makes It Unique?
Order Flow Pressure Index (OFPI): Splits volume into buy vs. sell pressure based on candle body position. It’s not just volume—it’s intent, showing who’s got the upper hand.
T3 Smoothing Magic: Uses a Tilson T3 moving average to keep signals smooth yet responsive. No laggy SMA nonsense here.
Centered Gauge Bar: A 20-segment bar splits bullish (lime) and bearish (red) momentum around a neutral center. Empty segments scream indecision—it’s like a visual heartbeat of the market.
Momentum Shift Alerts: Catches reversals with “Momentum Shift” flags when the OFPI crests, so you’re not caught off guard.
Clean Dashboard: A compact, bottom-left table shows momentum status, the gauge bar, and the OFPI value. Color-coded, transparent, and no chart clutter.
Inputs & Customization
Lookback Length (default 10): Set the window for pressure calculations. Short for scalps, long for trends.
T3 Smoothing Length (default 5): Tune the smoothness. Tight for fast markets, relaxed for chill ones.
T3 Volume Factor (default 0.7): Crank it up for snappy signals or down for silky trends.
Toggle the dashboard for minimalist setups or mobile trading.
How to Use It
Bullish Momentum (Lime, Right-Filled): Buyers are flexing. Look for breakouts or trend continuations. Pair with support levels.
Bearish Momentum (Red, Left-Filled): Sellers are in charge. Scout for breakdowns or shorts. Check resistance zones.
Neutral (Orange, Near Center): Market’s chilling. Avoid big bets—wait for a breakout or play the range.
Momentum Shift: A reversal might be brewing. Confirm with price action before jumping in.
Not a Solo Act: Combine with your strategy—trendlines, RSI, whatever. It’s a momentum lens, not a buy/sell bot.
Why Use the OFPI Gauge?
See the Fight: Most tools just count volume. OFPI shows who’s winning with a visual that slaps.
Works Anywhere: Crypto, stocks, forex, any timeframe. Tune it to your style.
Clean & Pro: No chart spam, just a sharp gauge and a dashboard that delivers.
Unique Edge: No other indicator blends body-based pressure, T3 smoothing, and a centered gauge like this.
The OFPI Gauge catches the market’s pulse so you can trade with confidence. It’s not about predicting the future—it’s about knowing who’s in control right now.
For educational purposes only. Not financial advice. Always use proper risk management.
Use with discipline. Trade your edge.
— Dskyz , for DAFE Trading Systems
Cointegration Heatmap & Spread Table [EdgeTerminal]The Cointegration Heatmap is a powerful visual and quantitative tool designed to uncover deep, statistically meaningful relationships between assets.
Unlike traditional indicators that react to price movement, this tool analyzes the underlying statistical relationship between two time series and tracks when they diverge from their long-term equilibrium — offering actionable signals for mean-reversion trades .
What Is Cointegration?
Most traders are familiar with correlation, which measures how two assets move together in the short term. But correlation is shallow — it doesn’t imply a stable or predictable relationship over time.
Cointegration, however, is a deeper statistical concept: Two assets are cointegrated if a linear combination of their prices or returns is stationary , even if the individual series themselves are non-stationary.
Cointegration is a foundational concept in time series analysis, widely used by hedge funds, proprietary trading firms, and quantitative researchers. This indicator brings that institutional-grade concept into an easy-to-use and fully visual TradingView indicator.
This tool helps answer key questions like:
“Which stocks tend to move in sync over the long term?”
“When are two assets diverging beyond statistical norms?”
“Is now the right time to short one and long the other?”
Using a combination of regression analysis, residual modeling, and Z-score evaluation, this indicator surfaces opportunities where price relationships are stretched and likely to snap back — making it ideal for building low-risk, high-probability trade setups.
In simple terms:
Cointegrated assets drift apart temporarily, but always come back together over time. This behavior is the foundation of successful pairs trading.
How the Indicator Works
Cointegration Heatmap indicator works across any market supported on TradingView — from stocks and ETFs to cryptocurrencies and forex pairs.
You enter your list of symbols, choose a timeframe, and the indicator updates every bar with live cointegration scores, spread signals, and trade-ready insights.
Indicator Settings:
Symbol list: a customizable list of symbols separated by commas
Returns timeframe: time frame selection for return sampling (Weekly or Monthly)
Max periods: max periods to limit the data to a certain time and to control indicator performance
This indicator accomplishes three major goals in one streamlined package:
Identifies stable long-term relationships (cointegration) between assets, using a heatmap visualization.
Tracks the spread — the difference between actual prices and the predicted linear relationship — between each pair.
Generates trade signals based on Z-score deviations from the mean spread, helping traders know when a pair is statistically overextended and likely to mean revert.
The math:
Returns are calculated using spread tickers to ensure alignment in time and adjust for dividends, splits, and other inconsistencies.
For each unique pair of symbols, we perform a linear regression
Yt=α+βXt+ε
Then we compute the residuals (errors from the regression):
Spreadt=Yt−(α+βXt)
Calculate the standard deviation of the spread over a moving window (default: 100 samples) and finally, define the Cointegration Score:
S=1/Standard Deviation of Residuals
This means, the lower the deviation, the tighter the relationship, so higher scores indicate stronger cointegration.
Always remember that cointegration can break down so monitor the asset over time and over multiple different timeframes before making a decision.
How to use the indicator
The heatmap table:
The indicator displays 2 very important tables, one in the middle and one on the right side. After entering your symbols, the first table to pay attention to is the middle heatmap table.
Any assets with a cointegration value of 25% is something to pay attention to and have a strong and stable relationship. Anything below is weak and not tradable.
Additionally, the 40% level is another important line to cross. Assets that have a cointegration score of over 40% will most likely have an extremely strong relationship.
Think about it this way, the higher the percentage, the tighter and more statistically reliable the relationship is.
The spread table:
After finding a good asset pair using heatmap, locate the same pair in the spread table (right side).
Here’s what you’ll see on the table:
Spread: Current difference between the two symbols based on the regression fit
Mean: Historical average of that spread
Z-score: How far current spread is from the mean in standard deviations
Signal: Trade suggestion: Short, Long, or Neutral
Since you’re expecting mean reversion, the idea is that the spread will return to the average. You want to take a trade when the z-score is either over +2 or below -2 and exit when z-score returns to near 0.
You will usually see the trade suggestion on the spread chart but you can make your own decision based on your risk level.
Keep in mind that the Z-score for each pair refers to how off the first asset is from the mean compared to the second one, so for example if you see STOCKA vs STOCKB with a Z-score of -1.55, we are regressing STOCKB (Y) on STOCKA (X).
In this case, STOCKB is the quoted asset and STOCKA is the base asset.
In this case, this means that STOCKB is much lower than expected relative to STOCKA, so the trade would be a long position on stock B and short position on stock A.
4 EMA Modified [Ryu_xp] - Enhanced4 EMA Modified – Enhanced (Pine v6)
A highly configurable, four-line exponential moving average (EMA) overlay built in Pine Script v6. This indicator empowers traders to monitor short- and long-term trends simultaneously, with the ability to toggle each EMA on or off and adjust its period and data source—all from a single, inline control panel.
Key Features:
Pine Script v6: updated to leverage the latest performance improvements and language features.
Four EMAs:
EMA 3 for ultra-short momentum (white, medium line)
EMA 10 for short-term trend (light blue, thin line)
EMA 55 for intermediate trend (orange, thicker line)
EMA 200 for long-term trend (dynamic green/red, thickest line)
Inline Controls: Each EMA has its own checkbox, length input, and source selector arranged on a single line for fast configuration.
Dynamic Coloring: EMA 200 switches to green when price is above it (bullish) and red when price is below it (bearish).
Toggle Visibility: Enable or disable any EMA instantly without removing it from your chart.
Clean Overlay: All EMAs plotted in one pane; ideal for multi-timeframe trend confluence and crossover strategies.
Inputs:
Show/Hide each EMA
EMA Length and Source for periods 3, 10, 55, and 200
Usage:
Add the script to any price chart.
Use the inline checkboxes to show only the EMAs you need.
Adjust lengths and sources to fit your instrument and timeframe.
Watch for crossovers between EMAs or price interactions with EMA 200 to confirm trend shifts.
This open-source script offers maximum flexibility for traders seeking a customizable EMA toolkit in one simple overlay.
Linda MACD Divergence w/ Lines + Cam FilterThis is an improvement on the first. Pay around with the Diff setting and do some backtesting. you could try traditional macd settings but the Linda's divergence is the secret to this set up.
ADX Pro [Ryu_xp] - EnhancedADX Pro – Enhanced (Pine v6)
A modernized ADX indicator built in Pine Script v6, combining customizable trend-strength thresholds with optional DI plotting, candle coloring, and a built-in label table for at-a-glance readings. Designed to give traders precise entry signals and market-condition awareness in one clean pane.
Key Features:
Fully Updated to Pine v6: Leverages the latest Pine Script features for speed and reliability.
Adjustable Trend Levels: Define your own “Disinterest” (default 20) and “Strong Trend” (default 35) levels to suit any instrument or timeframe.
Monocolor Mode: Override dynamic coloring and choose a single ADX line color for a minimalistic look.
Optional +DI/–DI Plotting: Toggle directional indicators on or off without modifying the code.
Candle Coloring: Barcolors reflect current ADX strength zone, making trend bias instantly visible on price.
45° Direction Arrow: Easily read whether ADX is rising (↗) or falling (↘) without needing to inspect values.
Live Status Table: A compact, right-aligned table displays the current ADX value, arrow, and label “ADX” in a colored cell—fully resizable to your chart layout.
Built-in Alerts:
Strong Trend Alert when ADX ≥ trend level.
Disinterest Alert when ADX < range level.
Usage:
Apply to any chart on a clean pane (no extra indicators).
Configure “Disinterest” and “Trend” levels as desired.
Enable monocolor or DI plots if needed.
Watch live table and bar colors for quick decision-making.
Set up alerts to automate your strategy triggers.
Multi-Timeframe RSI Divergenceweekly RSI divergence indicator. marking are made on chart for bullish and bearish indication on charts. suggestion for improvement are welcomed for refinement.
Weekly RSI DivergenceMarks divergences on price and RSI on price chart. arrows arrears where DIVERGENCE occcure. green indicates bullish red is bearish. to be cross checked with price and used. any suggeston is welcome
Smooth Fibonacci BandsSmooth Fibonacci Bands
This indicator overlays adaptive Fibonacci bands on your chart, creating dynamic support and resistance zones based on price volatility. It combines a simple moving average with ATR-based Fibonacci levels to generate multiple bands that expand and contract with market conditions.
## Features
- Creates three pairs of upper and lower Fibonacci bands
- Smoothing option for cleaner, less noisy bands
- Fully customizable colors and line thickness
- Adapts automatically to changing market volatility
## Settings
Adjust the SMA and ATR lengths to match your trading timeframe. For short-term trading, try lower values; for longer-term analysis, use higher values. The Fibonacci factors determine how far each band extends from the center line - standard Fibonacci ratios (1.618, 2.618, and 4.236) are provided as defaults.
## Trading Applications
- Use band crossovers as potential entry and exit signals
- Look for price bouncing off bands as reversal opportunities
- Watch for price breaking through multiple bands as strong trend confirmation
- Identify potential support/resistance zones for placing stop losses or take profits
Fibonacci Bands combines the reliability of moving averages with the adaptability of ATR and the natural market harmony of Fibonacci ratios, offering a robust framework for both trend and range analysis.
Chattes-SwingCount Chattes-SwingCount
// This indicator detects swings using a custom ZigZag algorithm and calculates:
// - Average pip movement per swing
// - Standard deviation of pip movement
// - Average number of candles per swing
// - Standard deviation of candle count
//
// The stats are displayed in a compact box at the top-right corner of the chart.
//
// An alert is triggered when a swing's pip size exceeds 1.5× the standard deviation,
// helping identify unusual volatility or significant market moves.
//
// Inputs allow customization of ZigZag detection parameters and swing sample size.
Kippi-VWAPVWAP with Premarket data, when available.
The settings are like the classic VWAP but you can toggle if you want or don't want the premarket data to be included.
I really hope this description is now long enough. Netanya Oleh
ROC Spike Alert by Jaani//@version=5
indicator("ROC Spike Alert by Jaani", overlay=true)
// === Inputs ===
rocLength = input.int(9, title="ROC Length")
spikeThreshold = input.float(2.0, title="Spike Threshold (%)")
// === ROC Calculation ===
roc = 100 * (close - close ) / close
// === Spike Conditions ===
bullishSpike = roc > spikeThreshold
bearishSpike = roc < -spikeThreshold
// === Plot ROC on Separate Scale
plot(roc, title="ROC", color=color.blue, linewidth=1, display=display.none)
// === Signal Plotting on Chart ===
plotshape(bullishSpike, title="Bullish Spike", location=location.belowbar,
color=color.green, style=shape.triangleup, size=size.small, text="BUY")
plotshape(bearishSpike, title="Bearish Spike", location=location.abovebar,
color=color.red, style=shape.triangledown, size=size.small, text="SELL")
// === Alerts ===
alertcondition(bullishSpike, title="ROC Bullish Spike", message="ROC UP Spike Detected - BUY Signal")
alertcondition(bearishSpike, title="ROC Bearish Spike", message="ROC DOWN Spike Detected - SELL Signal")
My script//@version=6
strategy("Ultimate Combined Buy/Sell Strategy - 4$ Profit", overlay=true)
// تنظیمات ورودی
maFastLength = input.int(5, title="Fast MA Length", minval=1)
maSlowLength = input.int(13, title="Slow MA Length", minval=1)
rsiLength = input.int(14, title="RSI Length", minval=1)
bbLength = input.int(20, title="Bollinger Length", minval=1)
bbMult = input.float(2.0, title="Bollinger Multiplier", minval=0.1, step=0.1)
stochK = input.int(14, title="Stochastic K", minval=1)
stochD = input.int(3, title="Stochastic D", minval=1)
stochSmooth = input.int(3, title="Stochastic Smooth", minval=1)
atrThreshold = input.float(0.10, title="ATR Threshold (Pips)", minval=0.01)
volumeLookback = input.int(20, title="Volume Lookback", minval=1)
profitTargetPips = input.float(40, title="Profit Target (Pips)", minval=1)
stopLossPips = input.float(20, title="Stop Loss (Pips)", minval=1)
// محاسبه اندیکاتورها
maFast = ta.sma(close, maFastLength)
maSlow = ta.sma(close, maSlowLength)
rsi = ta.rsi(close, rsiLength)
= ta.macd(close, 5, 13, 1)
= ta.bb(close, bbLength, bbMult)
= ta.stoch(close, high, low, stochK, stochD, stochSmooth)
atr = ta.atr(14)
avgVolume = ta.sma(volume, volumeLookback)
// سیستم امتیازدهی
buyScore = 0.0
sellScore = 0.0
// امتیاز MA
if maFast > maSlow
buyScore := buyScore + 1.5
if maFast < maSlow
sellScore := sellScore + 1.5
// امتیاز RSI
if rsi < 70
buyScore := buyScore + 1.0
if rsi > 30
sellScore := sellScore + 1.0
if rsi < 30
buyScore := buyScore + 1.5 // اشباع فروش
if rsi > 70
sellScore := sellScore + 1.5 // اشباع خرید
// امتیاز MACD
if macdLine > signalLine
buyScore := buyScore + 1.0
if macdLine < signalLine
sellScore := sellScore + 1.0
// امتیاز Bollinger Bands
if close > bbUpper
buyScore := buyScore + 1.0
if close < bbLower
sellScore := sellScore + 1.0
// امتیاز Stochastic
if stochKVal > stochDVal and stochKVal < 80
buyScore := buyScore + 1.0
if stochKVal < stochDVal and stochKVal > 20
sellScore := sellScore + 1.0
// امتیاز ATR
if atr > atrThreshold
buyScore := buyScore + 1.0
sellScore := sellScore + 1.0
// امتیاز Volume
if volume > avgVolume
buyScore := buyScore + 1.0
sellScore := sellScore + 1.0
// تصمیمگیری
buyCondition = buyScore >= 4.5 and buyScore > sellScore
sellCondition = sellScore >= 4.5 and sellScore > buyScore
// ورود به ترید
if buyCondition
strategy.entry("Buy", strategy.long)
if sellCondition
strategy.entry("Sell", strategy.short)
// خروج با هدف سود و حد ضرر
strategy.exit("Exit Buy", "Buy", profit=profitTargetPips * 10, loss=stopLossPips * 10) // هر پیپ = 0.1 دلار با 0.1 لات
strategy.exit("Exit Sell", "Sell", profit=profitTargetPips * 10, loss=stopLossPips * 10)
// رسم سیگنالها (برای نمایش بصری)
plotshape(buyCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
// رسم MA
plot(maFast, "Fast MA", color=color.green, linewidth=1)
plot(maSlow, "Slow MA", color=color.red, linewidth=1)
Rolling 4-Year CAGRCalculates rolling 4-year CAGR on day, week, or month chart.
Can change timeframe to any number of years.
-Jesse Myers
First 15-Min Candle High/Low### 📘 Description of the Script
This Pine Script indicator draws **horizontal lines** at the **high and low of the first 15-minute candle after the market opens at 9:30 AM (New York time)**. It is designed for use on **intraday charts** (e.g., 1m, 5m) for U.S. stock markets.
---
### 🔍 What the Script Does
* **Fetches 15-minute candle data** using `request.security()` from the `"15"` timeframe.
* **Detects the first 15-minute candle starting at 9:30 AM** (i.e., the 9:30–9:45 candle).
* **Saves the high and low** of that first 15-minute candle.
* **Plots horizontal lines** at those high/low levels for the rest of the trading day.
* **Resets at the start of each new day**, so the levels are updated fresh each morning.
---
### 🕒 When It Updates
* At exactly 9:45 AM (when the first 15-minute candle closes), it captures the high/low.
* Lines remain plotted for the rest of the day until the script resets on a new day.
---
### 🧠 Why This Is Useful
Traders often watch the **initial 15-minute range** as a key zone for:
* Breakouts or breakdowns
* Trend direction confirmation
* Entry or exit signals
This script helps visualize that range clearly and automatically.
---
Let me know if you want to:
* Extend the line beyond today
* Add alerts for breakouts
* Support different market open times (e.g., futures or forex markets)