V2 – Trailing SL Optimize | Universal EMA+RSI StrategyA clean and flexible trend-following strategy using RSI and EMA, combined with a trailing stop-loss system.
Features:
– RSI crossover at 50 level as entry signal
– EMA 200 trend filter
– ATR-based dynamic stop-loss
– Trailing stop to let winners run
– No take profit: exits are managed dynamically
– Suitable for NASDAQ (NAS100), Gold (XAUUSD), and similar trending assets
– Default position size: 1 contract
This is the universal version of the strategy, without max loss enforcement or volatility filters. Ideal for well-behaved, non-explosive markets.
Statistics
Ultimate Adaptive Multi-Regime Trading System🧩 What is the UA-MTS Indicator?
UA-MTS is an intelligent trading indicator built for scalping, day trading, and adaptive decision-making. It analyzes price action, trend, volatility, volume, and patterns across multiple timeframes to give traders clear, context-aware buy and sell signals.
It’s like having a smart assistant on your chart that tells you:
What kind of market you’re in (trend, range, volatility, etc.)
What patterns are forming and how reliable they are
When a high-confidence trade opportunity appears
How far price might go next (via projection lines)
⚙️ What Does It Do?
Detects Market Regime
Identifies whether the market is Trending, Ranging, Volatile, Accumulating, or Distributing
Adjusts strategy logic based on the regime
Scans for Patterns
Finds smart price patterns (like engulfing, divergences, fractals, head & shoulders)
Evaluates pattern quality and importance
Uses AI-like Logic
Includes a mini neural network that digests market data and projects price movement
Confirms with Volume and Volatility
Filters out weak signals based on how strong the volume and volatility are
Gives Trade Signals
Shows Buy or Sell markers with scores and confidence %
Highlights high-quality trades with a star (★)
Visual Tools
Confidence bands (projected price range)
Prediction lines
Color-coded market regime
🕹 How to Use It (in TradingView)
Use the Regime Label
Bottom of chart will say "Regime: Trending (80%)" or similar
Trust trend signals more in Trending regime, reversal patterns more in Ranging
Enable Multi-Timeframe Analysis (optional)
It blends data from multiple timeframes (like 1m + 5m + 15m) to sharpen signal logic
Confirm Before Entering
Look at the Score and Confidence %
Use it with other tools like support/resistance or price structure for even better entries
📈 Best Use Cases
Scalping on 1m/5m/15m charts
Day trading breakouts or reversals
Filtering trades during sideways markets
Avoiding traps in high volatility
Projecting short-term price direction
ARS a Híbrido CCL+USDTThis script converts any ARS-denominated stock into USD using a hybrid rate: the daily CCL (Contado con Liquidación) combined with the real-time crypto dollar (USDTARS).
It auto-detects your chart's timeframe and overlays USD-adjusted candles using the average of both sources for better intraday accuracy.
Features:
– Hybrid USD rate (daily CCL + minute-by-minute USDTARS)
– Auto-adjusted USD candles
– Dynamic USD label with both CCL and crypto values
– Visual separator for each trading day
– Autoscale-safe design
CCL en USD para Argentina
💸 convert any argentine stock to USD CCL — directly on your chart
this script lets you see the price of any argentina-listed stock (in pesos) adjusted to the “contado con liquidación” (ccl) dollar, using a reference adr.
🔧 what does it do?
automatically detects the price of the current ticker in argentine pesos (ars)
calculates the daily ccl using two tickers: a local one (e.g. BCBA:GGAL) and its adr in usd (e.g. NASDAQ:GGAL), plus its ratio (*10)
adjusts all chart candles (open, high, low, close) to usd ccl
displays the current ccl value on the chart
💡 ideal for argentine traders who operate in pesos but want a real usd reference — no more hacks.
✍️ you can easily change which tickers are used to calculate the ccl via the script settings.
Vietnamese Stock Market FTD (Follow Through Day) AlertA Pine Script implementing William O'Neil’s Follow Through Day (FTD) strategy for the Vietnamese stock market. It scans 7 predefined sector groups (Banks, Real Estate, Retail, etc.) to detect momentum breakouts.
Key Features :
Triggers an FTD signal when ≥X groups (default: 3) have ≥Y stocks (default: 2) rising above a Z% threshold (default: 5%) daily.
Highlights qualifying stocks by group in a dynamic label during alerts.
Visualizes strength via histograms and background shading.
Open-source under Mozilla Public License 2.0 .
Purpose : Identify institutional buying and potential market reversals.
BTC Strategy with Strict + Normal BuyUpdated Quant Trend Strategy intended for weekly timeframe. Uses RSI and EMA20 primarily with buy and sell rules. Add max drawdown (recommend on closing basis) of ~10% on weekly or to your choosing for tighter risk management.
MGC, GLD, SLV Live Prices (Customizable)This indicator will allow you to see Gold and Silver prices while watching any other ticker on the market.
NYSE TICK OHLC Bars with Multiple ThresholdsProvides an indicator that tracks NYSE TICK in OCHL Bar format with multiple threshold boundaries.
ETI IndicatorThe Ensemble Technical Indicator (ETI) is a script that combines multiple established indicators into one single powerful indicator. Specifically, it takes a number of technical indicators and then converts them into +1 to represent a bullish trend, or a -1 to represent a bearish trend. It then adds these values together and takes the running sum over the past 20 days.
The ETI is composed of the following indicators and converted to +1 or -1 using the following criteria:
Simple Moving Average (10 days) : When the price is above the 10-day simple moving averaging, +1, when below -1
Weighted Moving Average (10 days) : Similar to the SMA 10, when the the price is above the 10-day weighted moving average, +1, when below -1
Stochastic K% : If the current Stochastic K% is greater than the previous value, then +1, else -1.
Stochastic D% : Similar to the Stochastic K%, when the current Stochastic D% is greater than the previous value, +1, else -1.
MACD Difference : First subtract the MACD signal (i.e. the moving average) from the MACD value and if the current value is higher than the previous value, then +1, else -1.
William's R% : If the current William's R% is greater than the previous one, then +1, else -1.
William's Accumulation/Distribution : If the current William's AD value is greater than the previous value, then +1, else -1.
Commodity Channel Index : If the Commodity Channel Index is greater than 200 (overbought), then -1, if it is less than -200 (oversold) then +1. When it is between those values, if the current value is greater than the previous value then +1, else -1.
Relative Strength Index : If the Relative Strength Index is over 70 (overbought) then -1 and if under 30 (oversold) then +1. If the Relative Strength Indicator is between those values then if the current value is higher than the previous value +1, else -1.
Momentum (9 days) : If the momentum value is greater than 0, then +1, else -1.
Again, once these values have been calculated and converted, they are added up to produce a single value. This single value is then summed across the previous 20 candles to produce a running sum.
By coalescing multiple technical indicators into a single value across time, traders can better understand how multiple inter-related indicators are behaving at once; high scores indicate that numerous indicators are showing bullish signals indicating a potential or ongoing uptrend (and vice-versa with low scores).
Additional Features
Numerous smoothing transformations have also been added (e.g. gaussian smoothing) to remove some of the noise might exist.
Suggested Use
It is recommended that stocks are shorted when the cross below 0, and are bought when the ETI crosses above -40. Arrows can be shown on the indicator to show these points. However feel free to use levels that work best for you.
Traditionally, I have treated values above +50 as overbought and below -40 as undersold (with -80 indicating extremely oversold); however these levels could also indicate either upwards and downwards momentum so taking a position based on where the ETI is (rather than crossing levels) should be done with caution.
Relative Strength Index with Percentile📈 Relative Strength Index with Percentile Rank (RSI + Percentile)
This advanced RSI indicator adds a powerful percentile ranking system to the classic Relative Strength Index, providing deeper insight into current RSI values relative to recent history.
🔍 Key Features:
Standard RSI Calculation: Identifies overbought/oversold levels using a customizable period.
RSI Percentile (0–100%): Calculates where the current RSI value stands within a user-defined lookback period.
Dynamic Background Coloring:
🟩 Green when RSI percentile is above 80% (strong relative strength)
🟥 Red when RSI percentile is below 20% (strong relative weakness)
Optional Divergence Detection: Spot classic bullish and bearish divergences between price and RSI.
Smoothing Options: Apply various moving averages (SMA, EMA, RMA, etc.) to the RSI, with optional Bollinger Bands.
Flexible Settings: Full control over lookback periods, smoothing type, and band sensitivity.
🧠 Why Use RSI Percentile?
Traditional RSI values can become less informative during trending markets. By ranking the RSI as a percentile, you gain contextual insight into whether the current strength is unusually high or low compared to recent history, rather than just a fixed 70/30 threshold.
Money Flow based probabilityMoney Flow based probability
This indicator provides a comprehensive correlation and momentum analysis between your main asset and up to three selected correlated assets. It combines correlation, trend, momentum, and overbought/oversold signals into a single, easy-to-read table directly on your chart.
Correlated Asset Selection :
You can select up to three correlated assets (e.g., indices, currencies, bonds) to compare with your main chart symbol. Each asset can be toggled on or off.
Correlation Calculation :
The indicator uses the native Pine Script ta.correlation function to measure the statistical relationship between the closing prices of your asset and each selected pair over a user-defined period.
Technical Analysis Integration :
For each asset (including the main one), the indicator calculates:
Trend direction using EMA (Exponential Moving Average) – optional
Momentum using MACD – optional
Overbought/oversold status using RSI – optional
Probability Scoring :
A weighted scoring system combines correlation, trend, MACD, RSI, and trend exhaustion signals to produce buy and sell probabilities for the main asset.
Visual Table Output :
A customizable table is displayed on the chart, showing:
Asset name
Correlation (as a percentage, -100% to +100%)
Trend (Bullish/Bearish)
MACD status (Bullish/Bearish)
RSI value and status
Buy/Sell probability (with fixed-width formatting for stability)
User Customization :
You can adjust:
Table size, color, and position
Correlation period
EMA, MACD, and RSI parameters
Which assets to display
This indicator is ideal for traders who want to quickly assess the influence of major correlated markets and technical signals on their trading instrument, all in a single glance.
---
Example: Correlation Calculation
corrCurrentAsset1 = ta.correlation(close, asset1Data, correlationPeriod)
Example: Table Output (Buy/Sell %)
buyStr = f_formatPercent(buyProbability) + "%"
sellStr = f_formatPercent(sellProbability) + "%"
cellStr = buyStr + " / " + sellStr
The Echo System🔊 The Echo System – Trend + Momentum Trading Strategy
Overview:
The Echo System is a trend-following and momentum-based trading tool designed to identify high-probability buy and sell signals through a combination of market trend analysis, price movement strength, and candlestick validation.
Key Features:
📈 Trend Detection:
Uses a 30 EMA vs. 200 EMA crossover to confirm bullish or bearish trends.
Visual trend strength meter powered by percentile ranking of EMA distance.
🔄 Momentum Check:
Detects significant price moves over the past 6 bars, enhanced by ATR-based scaling to filter weak signals.
🕯️ Candle Confirmation:
Validates recent price action using the previous and current candle body direction.
✅ Smart Conditions Table:
A live dashboard showing all trade condition checks (Trend, Recent Price Move, Candlestick confirmations) in real-time with visual feedback.
📊 Backtesting & Stats:
Auto-calculates average win, average loss, risk-reward ratio (RRR), and win rate across historical signals.
Clean performance dashboard with color-coded metrics for easy reading.
🔔 Alerts:
Set alerts for trade signals or significant price movements to stay updated without monitoring the chart 24/7.
Visuals:
Trend markers and price movement flags plotted directly on the chart.
Dual tables:
📈 Conditions table (top-right): breaks down trade criteria status.
📊 Performance table (bottom-right): shows real-time stats on win/loss and RRR.🔊 The Echo System – Trend + Momentum Trading Strategy
Overview:
The Echo System is a trend-following and momentum-based trading tool designed to identify high-probability buy and sell signals through a combination of market trend analysis, price movement strength, and candlestick validation.
Key Features:
📈 Trend Detection:
Uses a 30 EMA vs. 200 EMA crossover to confirm bullish or bearish trends.
Visual trend strength meter powered by percentile ranking of EMA distance.
🔄 Momentum Check:
Detects significant price moves over the past 6 bars, enhanced by ATR-based scaling to filter weak signals.
🕯️ Candle Confirmation:
Validates recent price action using the previous and current candle body direction.
✅ Smart Conditions Table:
A live dashboard showing all trade condition checks (Trend, Recent Price Move, Candlestick confirmations) in real-time with visual feedback.
📊 Backtesting & Stats:
Auto-calculates average win, average loss, risk-reward ratio (RRR), and win rate across historical signals.
Clean performance dashboard with color-coded metrics for easy reading.
🔔 Alerts:
Set alerts for trade signals or significant price movements to stay updated without monitoring the chart 24/7.
Visuals:
Trend markers and price movement flags plotted directly on the chart.
Dual tables:
📈 Conditions table (top-right): breaks down trade criteria status.
📊 Performance table (bottom-right): shows real-time stats on win/loss and RRR.
SPY, NQ, SPX, ES Live Prices (Customizable)This indicator lets you see the most popular S&P tickers on any chart.
Currently shows SPY, NQ, SPX, and ES
Machine Learning: ARIMA + SARIMADescription
The ARIMA (Autoregressive Integrated Moving Average) and SARIMA (Seasonal ARIMA) are advanced statistical models that use machine learning to forecast future price movements. It uses autoregression to find the relationship between observed data and its lagged observations. The data is differenced to make it more predictable. The MA component creates a dependency between observations and residual errors. The parameters are automatically adjusted to market conditions.
Differences
ARIMA - This excels at identifying trends in the form of directions
SARIMA - Incorporates seasonality. It's better at capturing patterns previously seen
How To Use
1. Model: Determine if you want to use ARIMA (better for direction) or SARIMA (better for overall prediction). You can click on the 'Show Historic Prediction' to see the direction of the previous candles. Green = forecast ending up, red = forecast ending down
2. Metrics: The RMSE% and MAPE are 10 day moving averages of the first 10 predictions made at candle close. They're error metrics that compare the observed data with the predicted data. It is better to use them when they're below 8%. Higher timeframes will be higher, as these models are partly mean-reverting and higher TFs tend to trend more. Better to compare RMSE% and MAPE with similar timeframes. They naturally lag as data is being collected
3. Parameter selection: The simpler, the better. Both are used for ARIMA(1,1,1) and SARIMA(1,1,1)(1,1,1)5. Increasing may cause overfitting
4. Training period: Keep at 50. Because of limitations in pine, higher values do not make for more powerful forecasts. They will only criminally lag. So best to keep between 20 and 80
BTC vs ALT Lag Detector [MEXC Overlay]This indicator monitors the price movement of Bitcoin (BTC) and compares it in real time to a customizable list of major altcoins on the MEXC exchange.
It helps you identify lagging altcoins — tokens that are underperforming or overperforming BTC’s price action over a selected timeframe. These temporary deviations can offer profitable entry or rotation opportunities, especially for scalpers, day traders, and arbitrage-style strategies.
Key Features:
- Real-time deviation detection between BTC and altcoins
- Customizable comparison timeframe: 1m, 6m, 12m, 30m, 1h, 4h, or 1d
- Deviation threshold alert: Highlights coins that lag BTC by more than 0.5%, 1%, 2%, or 3%
- Compact stats table embedded in the price chart
- Fully adjustable layout: Table position (Top/Bottom/Center + Left/Right), Font size (Tiny, Small, Medium)
- Built-in alert system when deviation exceeds your chosen threshold
How to Use It:
Set your desired timeframe for comparison (e.g., 1 hour).
Select a deviation threshold (e.g., 1.0%).
The table will show:
Each altcoin’s % change
BTC’s % change
The delta (deviation) vs BTC
Red highlights indicate alts whose deviation exceeded the threshold.
When at least one alt lags beyond your threshold, the indicator can trigger an alert — helping you capitalize on potential catch-up trades.
Please provide any feedback on it.
Float LabelFloat label
Float label is simply a label that will display the float (number of shares that are publicly available for trading on the open market) for the ticker currently open in the chart.
Very handy for trading smaller cap names.
Currently working on a complete low float label to replace this.
Kassa Eröffnungskerze (z. B. DAX)This Pine Script automatically draws a horizontal line at the 09:00 CET open price every trading day. It’s designed for use on any timeframe – from 1-minute to daily – and is ideal for traders following European indices like the DAX (GER40) or EuroStoxx.
🛠 Features:
• Automatically detects the cash market open (09:00 CET)
• Works on all timeframes
• Uses Europe/Zurich timezone (CET/CEST)
• Draws a new line once per day at 09:00
• No repainting – consistent and reliable behavior
💡 Use Case:
Perfect for intraday and day traders who want to anchor their analysis to the official cash market open price. This level is often critical for observing volume spikes, trend initiations, or mean-reversion behavior during the European session.
Best SMA FinderThis script, Best SMA Finder, is a tool designed to identify the most robust simple moving average (SMA) length for a given chart, based on historical backtest performance. It evaluates hundreds of SMA values (from 10 to 1000) and selects the one that provides the best balance between profitability, consistency, and trade frequency.
What it does:
The script performs individual backtests for each SMA length using either "Long Only" or "Buy & Sell" logic, as selected by the user. For each tested SMA, it computes:
- Total number of trades
- Profit Factor (total profits / total losses)
- Win Rate
- A composite Robustness Score, which integrates Profit Factor, number of trades (log-scaled), and win rate.
Only SMA configurations that meet the user-defined minimum trade count are considered valid. Among all valid candidates, the script selects the SMA length with the highest robustness score and plots it on the chart.
How to use it:
- Choose the strategy type: "Long Only" or "Buy & Sell"
- Set the minimum trade count to filter out statistically irrelevant results
- Enable or disable the summary stats table (default: enabled)
The selected optimal SMA is plotted on the chart in blue. The optional table in the top-right corner shows the corresponding SMA length, trade count, Profit Factor, Win Rate, and Robustness Score for transparency.
Key Features:
- Exhaustive SMA optimization across 991 values
- Customizable trade direction and minimum trade filters
- In-chart visualization of results via table and plotted optimal SMA
- Uses a custom robustness formula to rank SMA lengths
Use cases:
Ideal for traders who want to backtest and auto-select a historically effective SMA without manual trial-and-error. Useful for swing and trend-following strategies across different timeframes.
📌 Limitations:
- Not a full trading strategy with position sizing or stop-loss logic
- Only one entry per direction at a time is allowed
- Designed for exploration and optimization, not as a ready-to-trade system
This script is open-source and built entirely from original code and logic. It does not replicate any closed-source script or reuse significant external open-source components.
Sessioni di Trading - Londra & New YorkIndicator for mechanics 3.0 marking the London and New York sessions with vertical dotted lines
Sessioni di Trading - Londra & New YorkMarks the London and New York trading sessions with vertical colored lines (Mechanics 3.0)
Bitcoin Monthly Seasonality [Alpha Extract]The Bitcoin Monthly Seasonality indicator analyzes historical Bitcoin price performance across different months of the year, enabling traders to identify seasonal patterns and potential trading opportunities. This tool helps traders:
Visualize which months historically perform best and worst for Bitcoin.
Track average returns and win rates for each month of the year.
Identify seasonal patterns to enhance trading strategies.
Compare cumulative or individual monthly performance.
🔶 CALCULATION
The indicator processes historical Bitcoin price data to calculate monthly performance metrics
Monthly Return Calculation
Inputs:
Monthly open and close prices.
User-defined lookback period (1-15 years).
Return Types:
Percentage: (monthEndPrice / monthStartPrice - 1) × 100
Price: monthEndPrice - monthStartPrice
Statistical Measures
Monthly Averages: ◦ Average return for each month calculated from historical data.
Win Rate: ◦ Percentage of positive returns for each month.
Best/Worst Detection: ◦ Identifies months with highest and lowest average returns.
Cumulative Option
Standard View: Shows discrete monthly performance.
Cumulative View: Shows compounding effect of consecutive months.
Example Calculation (Pine Script):
monthReturn = returnType == "Percentage" ?
(monthEndPrice / monthStartPrice - 1) * 100 :
monthEndPrice - monthStartPrice
calcWinRate(arr) =>
winCount = 0
totalCount = array.size(arr)
if totalCount > 0
for i = 0 to totalCount - 1
if array.get(arr, i) > 0
winCount += 1
(winCount / totalCount) * 100
else
0.0
🔶 DETAILS
Visual Features
Monthly Performance Bars: ◦ Color-coded bars (teal for positive, red for negative returns). ◦ Special highlighting for best (yellow) and worst (fuchsia) months.
Optional Trend Line: ◦ Shows continuous performance across months.
Monthly Axis Labels: ◦ Clear month names for easy reference.
Statistics Table: ◦ Comprehensive view of monthly performance metrics. ◦ Color-coded rows based on performance.
Interpretation
Strong Positive Months: Historically bullish periods for Bitcoin.
Strong Negative Months: Historically bearish periods for Bitcoin.
Win Rate Analysis: Higher win rates indicate more consistently positive months.
Pattern Recognition: Identify recurring seasonal patterns across years.
Best/Worst Identification: Quickly spot the historically strongest and weakest months.
🔶 EXAMPLES
The indicator helps identify key seasonal patterns
Bullish Seasons: Visualize historically strong months where Bitcoin tends to perform well, allowing traders to align long positions with favorable seasonality.
Bearish Seasons: Identify historically weak months where Bitcoin tends to underperform, helping traders avoid unfavorable periods or consider short positions.
Seasonal Strategy Development: Create trading strategies that capitalize on recurring monthly patterns, such as entering positions in historically strong months and reducing exposure during weak months.
Year-to-Year Comparison: Assess how current year performance compares to historical seasonal patterns to identify anomalies or confirmation of trends.
🔶 SETTINGS
Customization Options
Lookback Period: Adjust the number of years (1-15) used for historical analysis.
Return Type: Choose between percentage returns or absolute price changes.
Cumulative Option: Toggle between discrete monthly performance or cumulative effect.
Visual Style Options: Bar Display: Enable/disable and customize colors for positive/negative bars, Line Display: Enable/disable and customize colors for trend line, Axes Display: Show/hide reference axes.
Visual Enhancement: Best/Worst Month Highlighting: Toggle special highlighting of extreme months, Custom highlight colors for best and worst performing months.
The Bitcoin Monthly Seasonality indicator provides traders with valuable insights into Bitcoin's historical performance patterns throughout the year, helping to identify potentially favorable and unfavorable trading periods based on seasonal tendencies.
Morning & EOD ReportThis is not financial advice, nor meant to influence anyone's trading strategies.
Please use at your discretion and if you decide to give this indicator a shot, please leave some feedback if there could be changes made to the intervals or if there any other necessary changes to make
As you can see, this indicator provides a detailed morning report on all timeframes. Also, when you switch to the 15 minute time interval you are able to see an EOD report as well. These both print after collecting enough data based on key indicators within a designated time frame.
The reports will provide short-term data showing whether the stock price is above or below VWAP, as well as if the MACD and RSI are trending upwards or downwards. This is the code that builds the model and signal:
= ta.macd(close, 12, 26, 9)
rsiST = ta.rsi(close, 14)
vwapST = ta.vwap
priceAboveVWAP = close > vwapST
macdBullish = macdST > signalST
rsiBullish = rsiST > 50
The long-term uses a mid/daily time frame and analyzes key indicators like MACD, RSI, PMO, SMA on a 50 day moving average, and if price is above or below VWAP. These indicators allow the model to display BUY Signal Active, SELL Signal Active, or Neutral. Along with this, it also tracks price change percentage and can indicate whether volume is normal or if there has been a spike detected. The code that makes all this possible is listed below:
= request.security(syminfo.tickerid, "D", ta.macd(close, 12, 26, 9))
rsiD = request.security(syminfo.tickerid, "D", ta.rsi(close, 14))
pmo = request.security(syminfo.tickerid, "D", ta.ema(ta.roc(close, 1), 35))
pmoSMA = request.security(syminfo.tickerid, "D", ta.sma(ta.ema(ta.roc(close, 1), 35), 10))
priceAboveSMA50 = close > ta.sma(close, 50)
buySignalD = macdD > signalD and rsiD > 50 and pmo > pmoSMA and priceAboveSMA50
sellSignalD = macdD < signalD and rsiD < 50 and pmo < pmoSMA and not priceAboveSMA50
// --- % CHANGE FROM OPEN ---
sessionOpen = request.security(syminfo.tickerid, "D", open)
pctChange = ((close - sessionOpen) / sessionOpen) * 100
// --- Volume Spike Detection ---
avgVol = ta.sma(volume, 20)
volSpike = volume > avgVol * 1.5