Dettsec SM ALERTSThe DETTSEC SilverMic Strategy is a precision-engineered trend-following system designed to identify key market reversals using dynamic ATR-based stop levels. Built with the aim of riding trends while avoiding noise and false signals, this strategy uses the Average True Range (ATR) to calculate adaptive stop zones that respond to market volatility. With a combination of smart trailing logic and visual aids, it offers traders clear entry signals and real-time direction tracking.
At the core of this strategy lies a dual-layer stop system. When the market is trending upwards, the strategy calculates a Long Stop by subtracting the ATR from the highest price (or close, depending on user settings) over a specified period. Conversely, in a downtrend, it calculates a Short Stop by adding ATR to the lowest price (or close). These stops are not static — they trail in the direction of the trend and only reset when a reversal is confirmed, ensuring the system remains adaptive yet stable.
The strategy detects trend direction based on price behavior relative to these stops. When the price closes above the Short Stop, the system identifies a potential bullish reversal and shifts into a long mode. Similarly, a close below the Long Stop flips the system into a bearish mode. These directional changes trigger Buy or Sell signals, plotted clearly on the chart with optional label markers and circular highlights.
To enhance usability, the strategy includes visual elements such as color-filled backgrounds indicating the active trend state (green for long, red for short). Traders can customize whether to display Buy/Sell labels, use closing prices for extremum detection, and highlight state changes. Additionally, real-time alerts are built-in for direction changes and trade entries — empowering traders to stay informed even when off the charts.
Whether you're a manual trader seeking confirmation for your entries, or an algo-enthusiast automating entries based on clean signals, the DETTSEC SilverMic Strategy is designed to deliver clarity, reliability, and precision. As always, it's optimized for performance and simplicity.
Issued By Dettsec Algo Pvt Ltd,
Created By - Gaurav Sanghvi - Co-Founder Dettsec Algo Pvt Ltd
Tanmay Joshi - Founder Dettsec Algo Pvt Ltd
Chart patterns
Moving Average Convergence DivergenceDisplay different background colors based on the positive or negative value of the MACD DEA.
Yüzde 5 Kar ve Yüzde 2 Zarar Stop Stratejisi15 dk grafikte rsi,hacim,bollinger bantları kullanarak strateji oluşturur.
Returns & Distance from ATHHere’s what that Pine Script does, in everyday terms:
1. **Look back in time**
- It grabs the closing price from **3 months ago** and **1 month ago** by asking TradingView’s “monthly” data for the symbol.
2. **Calculate percentage changes**
- **3-month return** = (today’s close – close 3 months ago) ÷ (close 3 months ago) × 100
- **1-month return** = (today’s close – close 1 month ago) ÷ (close 1 month ago) × 100
3. **Track the highest price ever seen (ATH)**
- It keeps a running “all-time high” variable, updating it any time today’s high exceeds the previous ATH.
4. **Compute how far you are below ATH**
- **% from ATH** = (ATH – today’s close) ÷ ATH × 100
5. **Build a little stats table on your chart**
- It makes a 2-row by 3-column box in the **top-center** of your price panel.
- The **first row** has labels: “3M % Return”, “1M % Return”, “% from ATH”.
- The **second row** shows the three computed numbers, each formatted to two decimal places and suffixed with “%.”
6. **Refresh only once per bar**
- All of these values and the table get updated **at the close** of each bar, so your table always shows the latest stats without cluttering the chart with extra drawings.
In short, this indicator quietly collects the right historical prices, does three simple percent-change math steps, and then displays those three key numbers in a neat, always-visible box at the top of your TradingView chart.
ADR% Extension Levels from SMA 50I created this indicator inspired by RealSimpleAriel (a swing trader I recommend following on X) who does not buy stocks extended beyond 4 ADR% from the 50 SMA and uses extensions from the 50 SMA at 7-8-9-10-11-12-13 ADR% to take profits with a 20% position trimming.
RealSimpleAriel's strategy (as I understood it):
-> Focuses on leading stocks from leading groups and industries, i.e., those that have grown the most in the last 1-3-6 months (see on Finviz groups and then select sector-industry).
-> Targets stocks with the best technical setup for a breakout, above the 200 SMA in a bear market and above both the 50 SMA and 200 SMA in a bull market, selecting those with growing Earnings and Sales.
-> Buys stocks on breakout with a stop loss set at the day's low of the breakout and ensures they are not extended beyond 4 ADR% from the 50 SMA.
-> 3-5 day momentum burst: After a breakout, takes profits by selling 1/2 or 1/3 of the position after a 3-5 day upward move.
-> 20% trimming on extension from the 50 SMA: At 7 ADR% (ADR% calculated over 20 days) extension from the 50 SMA, takes profits by selling 20% of the remaining position. Continues to trim 20% of the remaining position based on the stock price extension from the 50 SMA, calculated using the 20-period ADR%, thus trimming 20% at 8-9-10-11 ADR% extension from the 50 SMA. Upon reaching 12-13 ADR% extension from the 50 SMA, considers the stock overextended, closes the remaining position, and evaluates a short.
-> Trailing stop with ascending SMA: Uses a chosen SMA (10, 20, or 50) as the definitive stop loss for the position, depending on the stock's movement speed (preferring larger SMAs for slower-moving stocks or for long-term theses). If the stock's closing price falls below the chosen SMA, the entire position is closed.
In summary:
-->Buy a breakout using the day's low of the breakout as the stop loss (this stop loss is the most critical).
--> Do not buy stocks extended beyond 4 ADR% from the 50 SMA.
--> Sell 1/2 or 1/3 of the position after 3-5 days of upward movement.
--> Trim 20% of the position at each 7-8-9-10-11-12-13 ADR% extension from the 50 SMA.
--> Close the entire position if the breakout fails and the day's low of the breakout is reached.
--> Close the entire position if the price, during the rise, falls below a chosen SMA (10, 20, or 50, depending on your preference).
--> Definitively close the position if it reaches 12-13 ADR% extension from the 50 SMA.
I used Grok from X to create this indicator. I am not a programmer, but based on the ADR% I use, it works.
Below is Grok from X's description of the indicator:
Script Description
The script is a custom indicator for TradingView that displays extension levels based on ADR% relative to the 50-period Simple Moving Average (SMA). Below is a detailed description of its features, structure, and behavior:
1. Purpose of the Indicator
Name: "ADR% Extension Levels from SMA 50".
Objective: Draw horizontal blue lines above and below the 50-period SMA, corresponding to specific ADR% multiples (4, 7, 8, 9, 10, 11, 12, 13). These levels represent potential price extension zones based on the average daily percentage volatility.
Overlay: The indicator is overlaid on the price chart (overlay=true), so the lines and SMA appear directly on the price graph.
2. Configurable Inputs
The indicator allows users to customize parameters through TradingView settings:
SMA Length (smaLength):
Default: 50 periods.
Description: Specifies the number of periods for calculating the Simple Moving Average (SMA). The 50-period SMA serves as the reference point for extension levels.
Constraint: Minimum 1 period.
ADR% Length (adrLength):
Default: 20 periods.
Description: Specifies the number of days to calculate the moving average of the daily high/low ratio, used to determine ADR%.
Constraint: Minimum 1 period.
Scale Factor (scaleFactor):
Default: 1.0.
Description: An optional multiplier to adjust the distance of extension levels from the SMA. Useful if levels are too close or too far due to an overly small or large ADR%.
Constraint: Minimum 0.1, increments of 0.1.
Tooltip: "Adjust if levels are too close or far from SMA".
3. Main Calculations
50-period SMA:
Calculated with ta.sma(close, smaLength) using the closing price (close).
Serves as the central line around which extension levels are drawn.
ADR% (Average Daily Range Percentage):
Formula: 100 * (ta.sma(dhigh / dlow, adrLength) - 1).
Details:
dhigh and dlow are the daily high and low prices, obtained via request.security(syminfo.tickerid, "D", high/low) to ensure data is daily-based, regardless of the chart's timeframe.
The dhigh / dlow ratio represents the daily percentage change.
The simple moving average (ta.sma) of this ratio over 20 days (adrLength) is subtracted by 1 and multiplied by 100 to obtain ADR% as a percentage.
The result is multiplied by scaleFactor for manual adjustments.
Extension Levels:
Defined as ADR% multiples: 4, 7, 8, 9, 10, 11, 12, 13.
Stored in an array (levels) for easy iteration.
For each level, prices above and below the SMA are calculated as:
Above: sma50 * (1 + (level * adrPercent / 100))
Below: sma50 * (1 - (level * adrPercent / 100))
These represent price levels corresponding to a percentage change from the SMA equal to level * ADR%.
4. Visualization
Horizontal Blue Lines:
For each level (4, 7, 8, 9, 10, 11, 12, 13 ADR%), two lines are drawn:
One above the SMA (e.g., +4 ADR%).
One below the SMA (e.g., -4 ADR%).
Color: Blue (color.blue).
Style: Solid (style=line.style_solid).
Management:
Each level has dedicated variables for upper and lower lines (e.g., upperLine1, lowerLine1 for 4 ADR%).
Previous lines are deleted with line.delete before drawing new ones to avoid overlaps.
Lines are updated at each bar with line.new(bar_index , level, bar_index, level), covering the range from the previous bar to the current one.
Labels:
Displayed only on the last bar (barstate.islast) to avoid clutter.
For each level, two labels:
Above: E.g., "4 ADR%", positioned above the upper line (style=label.style_label_down).
Below: E.g., "-4 ADR%", positioned below the lower line (style=label.style_label_up).
Color: Blue background, white text.
50-period SMA:
Drawn as a gray line (color.gray) for visual reference.
Diagnostics:
ADR% Plot: ADR% is plotted in the status line (orange, histogram style) to verify the value.
ADR% Label: A label on the last bar near the SMA shows the exact ADR% value (e.g., "ADR%: 2.34%"), with a gray background and white text.
5. Behavior
Dynamic Updating:
Lines update with each new bar to reflect new SMA 50 and ADR% values.
Since ADR% uses daily data ("D"), it remains constant within the same day but changes day-to-day.
Visibility Across All Bars:
Lines are drawn on every bar, not just the last one, ensuring visibility on historical data as well.
Adaptability:
The scaleFactor allows level adjustments if ADR% is too small (e.g., for low-volatility symbols) or too large (e.g., for cryptocurrencies).
Compatibility:
Works on any timeframe since ADR% is calculated from daily data.
Suitable for symbols with varying volatility (e.g., stocks, forex, cryptocurrencies).
6. Intended Use
Technical Analysis: Extension levels represent significant price zones based on average daily volatility. They can be used to:
Identify potential price targets (e.g., take profit at +7 ADR%).
Assess support/resistance zones (e.g., -4 ADR% as support).
Measure price extension relative to the 50 SMA.
Trading: Useful for strategies based on breakouts or mean reversion, where ADR% levels indicate reversal or continuation points.
Debugging: Labels and ADR% plot help verify that values align with the symbol’s volatility.
7. Limitations
Dependence on Daily Data: ADR% is based on daily dhigh/dlow, so it may not reflect intraday volatility on short timeframes (e.g., 1 minute).
Extreme ADR% Values: For low-volatility symbols (e.g., bonds) or high-volatility symbols (e.g., meme stocks), ADR% may require adjustments via scaleFactor.
Graphical Load: Drawing 16 lines (8 upper, 8 lower) on every bar may slow the chart for very long historical periods, though line management is optimized.
ADR% Formula: The formula 100 * (sma(dhigh/dlow, Length) - 1) may produce different values compared to other ADR% definitions (e.g., (high - low) / close * 100), so users should be aware of the context.
8. Visual Example
On a chart of a stock like TSLA (daily timeframe):
The 50 SMA is a gray line tracking the average trend.
Assuming an ADR% of 3%:
At +4 ADR% (12%), a blue line appears at sma50 * 1.12.
At -4 ADR% (-12%), a blue line appears at sma50 * 0.88.
Other lines appear at ±7, ±8, ±9, ±10, ±11, ±12, ±13 ADR%.
On the last bar, labels show "4 ADR%", "-4 ADR%", etc., and a gray label shows "ADR%: 3.00%".
ADR% is visible in the status line as an orange histogram.
9. Code: Technical Structure
Language: Pine Script @version=5.
Inputs: Three configurable parameters (smaLength, adrLength, scaleFactor).
Calculations:
SMA: ta.sma(close, smaLength).
ADR%: 100 * (ta.sma(dhigh / dlow, adrLength) - 1) * scaleFactor.
Levels: sma50 * (1 ± (level * adrPercent / 100)).
Graphics:
Lines: Created with line.new, deleted with line.delete to avoid overlaps.
Labels: Created with label.new only on the last bar.
Plots: plot(sma50) for the SMA, plot(adrPercent) for debugging.
Optimization: Uses dedicated variables for each line (e.g., upperLine1, lowerLine1) for clear management and to respect TradingView’s graphical object limits.
10. Possible Improvements
Option to show lines only on the last bar: Would reduce visual clutter.
Customizable line styles: Allow users to choose color or style (e.g., dashed).
Alert for anomalous ADR%: A message if ADR% is too small or large.
Dynamic levels: Allow users to specify ADR% multiples via input.
Optimization for short timeframes: Adapt ADR% for intraday timeframes.
Conclusion
The script creates a visual indicator that helps traders identify price extension levels based on daily volatility (ADR%) relative to the 50 SMA. It is robust, configurable, and includes debugging tools (ADR% plot and labels) to verify values. The ADR% formula based on dhigh/dlow
NR4/NR7 + 10 EMA Trend Filter📝 Description:
This script spots NR4 and NR7 days—those deceptively quiet candles where price volatility contracts... right before a potential breakout.
But here’s the twist:
It only highlights setups when the stock is above the 10 EMA, filtering for bullish trends with real momentum behind them.
We’re not interested in weak sauce. We want spring-loaded coils in strong uptrends.
🧠 What It Does:
🔍 NR4 (Narrow Range 4): Today's range is the smallest of the last 4 days
🧨 NR7 (Narrow Range 7): Today's range is the smallest of the last 7 days
🧭 Trend Filter: Highlights only when price is above the 10-period EMA
🎯 Visual Cues: Orange background and label for NR4, purple for NR7
Nirvana Mode PRO v2//@version=5
strategy("Nirvana Mode PRO v2", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, calc_on_every_tick=true)
// === İndikator ===
emaFast = ta.ema(close, 8)
emaSlow = ta.ema(close, 21)
rsi = ta.rsi(close, 14)
= ta.supertrend(2.0, 10)
volAvg = ta.sma(volume, 10)
volSpike = volume > volAvg * 1.5
NR4/NR7 + Trend + Refined MACD + VWAP FilterRefined Trend-Following Strategy with NR4/NR7, MACD, and VWAP Filters
This trading strategy combines multiple technical filters to identify high-probability momentum setups, using a refined approach to the MACD for added precision. It’s designed for active traders looking to capitalise on strong trends while avoiding false signals.
Key Features:
Narrow Range Days (NR4/NR7): The strategy first looks for stocks with a narrow range, either NR4 (lowest range of the last four days) or NR7 (lowest range of the last seven days). This identifies stocks that have consolidated and may be preparing for a breakout or strong move.
Trend Analysis with EMAs: Price must be above the 20-period EMA, confirming a bullish trend. Additionally, the 10-period EMA must be above the 20-period EMA, ensuring that the short-term trend is aligned with the longer-term trend, adding to the setup’s strength.
Refined MACD Filter:
If the fast MACD line (12-period) is above the slow MACD line (26-period), the strategy accepts any difference, allowing for a full range of momentum opportunities.
If the fast MACD line is below the slow MACD line, the difference must be no more than 5%. This allows the strategy to capture tight price action setups without excluding potential trends due to a small discrepancy.
VWAP Confirmation: The strategy requires the price to be above the Volume Weighted Average Price (VWAP), adding a layer of volume-based confirmation to ensure that the stock is in a strong, positive trend relative to its average price.
Why This Works: This system is designed to take advantage of stocks that show consolidation (NR4/NR7) and then provide a clear, systematic approach for confirming their breakout potential through trend-following indicators like EMAs, MACD, and VWAP. The nuanced MACD filter adds a layer of flexibility, ensuring that no potential trend is overlooked while preventing false signals due to slight technical discrepancies.
By combining multiple layers of trend confirmation and dynamic filters for volatility, momentum, and volume, the strategy offers a refined approach to capturing high-probability setups, helping traders avoid overfitting to noise and focus on the most promising opportunities.
Gold Strategy with BOS, CHOCH, 4H S/R Zones (Final Version)Gold Strategy with BOS, CHOCH, 4H S/R Zones (Final Version)
EMA + RSI + MACD (초보자용)📋 Indicator Description:
This beginner-friendly indicator combines three powerful tools to clearly identify trends and market conditions:
Features:
EMA (20, 50, 200):
Quickly identify market trends (short-term, medium-term, and long-term trends clearly indicated).
RSI (14):
Easily spot overbought (>70) or oversold (<30) market conditions, helping you make informed trading decisions.
MACD:
Visualize momentum changes intuitively.
Green background indicates bullish momentum; red background indicates bearish momentum.
How to use:
Trend Confirmation:
Check price relative to EMA lines:
Above EMA: Bullish trend
Below EMA: Bearish trend
Market Conditions (RSI):
RSI above 70 (overbought) → possible reversal down
RSI below 30 (oversold) → possible reversal up
Momentum (MACD):
MACD crossover (green) → bullish momentum
MACD crossover (red) → bearish momentum
Referral Event:
Use the indicator for free and participate in our referral event to receive additional benefits:
👉 Referral Link: www.bybit.com
EU vs GU Strength @smEURUSD vs GBPUSD Strength Tester
✅ What it does:
-Plots EURUSD change (blue line)
-Plot GBPUSD change (green line)
-Plots EURGBP change (orange line)
Background turns bluish if EUR is stronger, greenish if GBP is stronger!
So, just by watching the background color, you can immediately tell:
If you prefer EURUSD or GBPUSD for your long/short setup.
Swing Trading NR4/NR7 + 2BarNR/3BarNR + Inside Day + TrendSwing Trading Version: The Ultimate Momentum Setup
The Swing Trading Version of this strategy is tailored for traders looking to capture multi-day price movements in high-momentum stocks. It’s a carefully crafted approach combining classic patterns like NR4, NR7, and Inside Day with powerful trend filters to find the best opportunities for significant gains.
Price Compression: Identifies stocks in periods of consolidation using the NR4 and NR7 patterns, along with 2-Bar and 3-Bar Narrow Ranges—key indicators of potential volatility and breakout.
Trend Confirmation: The strategy ensures trades align with the broader trend by confirming that price is above the 20 EMA and that the 10 EMA is above the 20 EMA. This guarantees that you’re trading in the direction of strength.
Inside Day Filter: The Inside Day pattern is only triggered when the candlestick is within 1 ATR from the 10 EMA (or 20 EMA if below), ensuring you're not chasing a trade too far from a support level.
Clean, Powerful Signals: With a clear focus on momentum and price compression, you'll only get actionable signals backed by multiple layers of confirmation, including volatility and price structure.
This setup is perfect for traders seeking to ride out trends and capture sizeable moves, with an emphasis on simplicity and precision. Ideal for those who prefer to hold trades for multiple days while still maintaining control over their entries and exits.
Real Relative Strength vs SPY (Clean Visual)This indicator plots Real Relative Strength/Weakness (RS/RW) of any stock relative to SPY, normalised by ATR. Designed to aid trading aligned to RDT philosophy.
Designed for intraday and swing traders to quickly identify stocks showing true institutional strength or weakness compared to the market.
Uses a clean, color-coded center-line display for fast reading of live RS/RW performance.
It automatically syncs to whatever timeframe you’re trading (5min, 15min, 1hr)
Default comparison ticker is SPY (you can easily swap if needed later)
Length = 12 by default → (rolling 1-hour window on M5 chart)
Clean green/red visual breakout = immediately obvious relative strength or weakness!
How to use
Strong Green move above zero ➔ RS developing ➔ Long bias
Strong Red move below zero ➔ RW developing ➔ Short bias
Choppy around zero ➔ No clear edge ➔ maybe avoid that stock
Tradicators Pulse™ [v1]Tradicators Pulse™ Strategy: “AI Pulse Reversal”
Goal:
Catch reversals and trends using a smooth MA with adaptive bands and a confidence oscillator.
Step-by-Step: How to Use
① Set the Context
Timeframes: 5min, 15min, 1H (start with 15min)
Watch:
MA line color (blue = bullish, fuchsia = bearish)
Pulse Bands (upper = overbought, lower = oversold)
Yellow Oscillator for trend strength
Step-by-Step: Mean Reversion (Bounce Trade)
Wait for price to breach a band
Candle closes outside upper band (overbought) or lower band (oversold)
Check Pulse Oscillator
It must curve up (long) or down (short)
Entry Trigger
Enter on next candle that closes back inside the bands
Stop Loss
Few pips outside band edge
Take Profit
TP1 = MA line (gray-blue/fuchsia)
TP2 = Opposite band
Step-by-Step: Trend Entry (Momentum Follow)
Wait for MA color flip
Blue = Uptrend → only long setups
Fuchsia = Downtrend → only short setups
Entry Trigger
Price pulls back near MA
Oscillator still supports trend direction
Enter on bounce off MA
Stop Loss
Few pips below/above MA or last swing low/high
Take Profit
TP1 = Band in direction of trend
TP2 = Use trailing SL or R:R 1:2
Avoid Trading When:
MA is flat (no trend)
Bands are too tight or choppy
Oscillator gives conflicting signal
PH Night Session HighlightTraders who want to visually separate the night session on their charts. It highlights the period from 8:01 PM to 7:59 AM (Philippine Time), making it easy to distinguish off-hours or pre-market activity, especially when analyzing crypto or 24/7 markets.
The script automatically adjusts server time (UTC) to Philippine Time (UTC+8) and overlays a soft blue background during the specified time window.
RSI + MACD AL SinyaliIt creates a buy signal using RSI and MACD in the daily watch list. Signals give better results on the daily.
Max Daily Movement in %14DMA%-OVED=The average daily movement of a stock over the last 14 trading days, in percentage.
Scalper Signal PRO (EMA + RSI + Stoch)How to use it
Buy Signal:
. EMA 5 crosses above EMA 13
. Price is above EMA 50
. RSI near or just above 30
Sell Signal:
. EMA 5 crosses below EMA 13
. Price is below EMA 50
. RSI near or just below 30
Scalper Signal PRO (EMA + RSI + Stoch)//@version=5
indicator("Scalper Signal PRO (EMA + RSI + Stoch)", overlay=true)
// === INPUTS ===
emaFastLen = input.int(5, "EMA Fast")
emaSlowLen = input.int(13, "EMA Slow")
rsiLen = input.int(14, "RSI Length")
rsiBuy = input.int(30, "RSI Buy Level")
rsiSell = input.int(70, "RSI Sell Level")
kPeriod = input.int(5, "Stoch K")
dPeriod = input.int(3, "Stoch D")
slowing = input.int(3, "Stoch Smoothing")
// === SESSION TIME ===
sessionStart = timestamp ("GMT+8", year, month, dayofmonth, 8, 0)
sessionEnd = timestamp("GMT+8" ,year, month, dayofmonth, 18, 0)
withinSession = time >= sessionStart and time <= sessionEnd
// === LOGIC ===
emaFast = ta.ema(close, emaFastLen)
emaSlow = ta.ema(close, emaSlowLen)
emaBullish = emaFast > emaSlow and ta.crossover(emaFast, emaSlow)
emaBearish = emaFast < emaSlow and ta.crossunder(emaFast, emaSlow)
rsi = ta.rsi(close, rsiLen)
k = ta.sma(ta.stoch(close, high, low, kPeriod), slowing)
d = ta.sma(k, dPeriod)
buyCond = emaBullish and rsi < rsiBuy and k > d and withinSession
sellCond = emaBearish and rsi > rsiSell and k < d and withinSession
// === PLOTS ===
showSignals = input.bool(true, "Show Buy/Sell Signals?")
plotshape(showSignals and buyCond, location=location.belowbar, style=shape.labelup, color=color.green, text="BUY", title="Buy Signal")
plotshape(showSignals and sellCond, location=location.abovebar, style=shape.labeldown, color=color.red, text="SELL", title="Sell Signal")
plot(emaFast, "EMA Fast", color=color.orange)
plot(emaSlow, "EMA Slow", color=color.blue)
// === ALERTS ===
alertcondition(buyCond, title="Buy Alert", message="Scalper PRO Buy Signal")
alertcondition(sellCond, title="Sell Alert", message="Scalper PRO Sell Signal")
// === DASHBOARD ===
var table dash = table.new(position.top_right, 2, 5, frame_color=color.gray, frame_width=1)
bg = color.new(color.black, 85)
table.cell(dash, 0, 0, "Scalper PRO", bgcolor=bg, text_color=color.white, text_size=size.normal)
table.cell(dash, 0, 1, "Trend", bgcolor=bg)
table.cell(dash, 1, 1, emaFast > emaSlow ? "Bullish" : "Bearish", bgcolor=emaFast > emaSlow ? color.green : color.red, text_color=color.white)
table.cell(dash, 0, 2, "RSI", bgcolor=bg)
table.cell(dash, 1, 2, str.tostring(rsi, "#.0"), bgcolor=color.gray, text_color=color.white)
table.cell(dash, 0, 3, "Stoch K/D", bgcolor=bg)
table.cell(dash, 1, 3, str.tostring(k, "#.0") + "/" + str.tostring(d, "#.0"), bgcolor=color.navy, text_color=color.white)
table.cell(dash, 0, 4, "Session", bgcolor=bg)
table.cell(dash, 1, 4, withinSession ? "LIVE" : "OFF", bgcolor=withinSession ? color.green : color.red, text_color=color.white)
Scalper Signal PRO (EMA + RSI + Stoch)//@version=5
indicator("Scalper Signal PRO (EMA + RSI + Stoch)", overlay=true)
// === INPUTS ===
emaFastLen = input.int(5, "EMA Fast")
emaSlowLen = input.int(13, "EMA Slow")
rsiLen = input.int(14, "RSI Length")
rsiBuy = input.int(30, "RSI Buy Level")
rsiSell = input.int(70, "RSI Sell Level")
kPeriod = input.int(5, "Stoch K")
dPeriod = input.int(3, "Stoch D")
slowing = input.int(3, "Stoch Smoothing")
// === SESSION TIME ===
sessionStart = timestamp ("GMT+8", year, month, dayofmonth, 8, 0)
sessionEnd = timestamp("GMT+8" ,year, month, dayofmonth, 18, 0)
withinSession = time >= sessionStart and time <= sessionEnd
// === LOGIC ===
emaFast = ta.ema(close, emaFastLen)
emaSlow = ta.ema(close, emaSlowLen)
emaBullish = emaFast > emaSlow and ta.crossover(emaFast, emaSlow)
emaBearish = emaFast < emaSlow and ta.crossunder(emaFast, emaSlow)
rsi = ta.rsi(close, rsiLen)
k = ta.sma(ta.stoch(close, high, low, kPeriod), slowing)
d = ta.sma(k, dPeriod)
buyCond = emaBullish and rsi < rsiBuy and k > d and withinSession
sellCond = emaBearish and rsi > rsiSell and k < d and withinSession
// === PLOTS ===
showSignals = input.bool(true, "Show Buy/Sell Signals?")
plotshape(showSignals and buyCond, location=location.belowbar, style=shape.labelup, color=color.green, text="BUY", title="Buy Signal")
plotshape(showSignals and sellCond, location=location.abovebar, style=shape.labeldown, color=color.red, text="SELL", title="Sell Signal")
plot(emaFast, "EMA Fast", color=color.orange)
plot(emaSlow, "EMA Slow", color=color.blue)
// === ALERTS ===
alertcondition(buyCond, title="Buy Alert", message="Scalper PRO Buy Signal")
alertcondition(sellCond, title="Sell Alert", message="Scalper PRO Sell Signal")
// === DASHBOARD ===
var table dash = table.new(position.top_right, 2, 5, frame_color=color.gray, frame_width=1)
bg = color.new(color.black, 85)
table.cell(dash, 0, 0, "Scalper PRO", bgcolor=bg, text_color=color.white, text_size=size.normal)
table.cell(dash, 0, 1, "Trend", bgcolor=bg)
table.cell(dash, 1, 1, emaFast > emaSlow ? "Bullish" : "Bearish", bgcolor=emaFast > emaSlow ? color.green : color.red, text_color=color.white)
table.cell(dash, 0, 2, "RSI", bgcolor=bg)
table.cell(dash, 1, 2, str.tostring(rsi, "#.0"), bgcolor=color.gray, text_color=color.white)
table.cell(dash, 0, 3, "Stoch K/D", bgcolor=bg)
table.cell(dash, 1, 3, str.tostring(k, "#.0") + "/" + str.tostring(d, "#.0"), bgcolor=color.navy, text_color=color.white)
table.cell(dash, 0, 4, "Session", bgcolor=bg)
table.cell(dash, 1, 4, withinSession ? "LIVE" : "OFF", bgcolor=withinSession ? color.green : color.red, text_color=color.white)
Relative Strength IndexAdd EMA 9 and WMA 45 into regular RSI.
This would help people with free account to add up to three indicators at once.
Thanks