Multi-Time Frame DMI with Gradient Bar ColoringDisplays a table showing the Directional Movement Index (DMI) sentiment for multiple time frames based on the Average Directional Index (ADX) value for each time frame.
Table Position and Text Size are configurable, with two styles (vertical or horizontal) available.
Time frame labels can be toggled off for color-only table.
Bars are colored based on the ADX value using a color gradient between the bullish and bearish color inputs. The neutral color is independent of the gradient for contrast.
Penunjuk dan strategi
MohammadBayazid techinique - (06-16-24)my TRADING PLAN.... everything start reading AMD and together with signal days.
14 EMA & RSI Combo with First Buy/SellEMA14 & RSI stratergy - Used as a indication for BUY and Sell based on EMA 14 and RSI. Chk for higher timeframe trend and stick to the entries that are following the trend
RSI (71/29) + Stoch RSI (90/10) IndicatorThis strategy uses a combination of RSI (Relative Strength Index) and Stochastic RSI to identify overbought and oversold conditions in the market, triggering potential buy or sell signals. A long entry is triggered when RSI is below 29 (oversold) and Stochastic RSI is below 15, indicating a potential upward price reversal. A short entry is triggered when RSI is above 71 (overbought) and Stochastic RSI is above 85, indicating a potential downward price reversal. The strategy sets a Take Profit (TP) of 30% and a Stop Loss (SL) of 10% for both long and short positions. Visual signals in the form of green triangles for long entries and red triangles for short entries are plotted on the chart, and alert conditions are defined to notify when the respective entry conditions are met.
RK_RAVI in this script
combination of
EMA 20
EMA 50
TRUE RANGE
AVERAGE TRUE RANGE
DAILY AVERAGE TRUE RANGE
THIS INDECATOR IS DEDICATED TO MY MENTOR MR RAVI R KUMAR
Vertical Lines for Kill ZonesVertical lines for Kill Zones.
4 függőleges vonalat rajzol 8-9 és 13 14 ora között.
Volume Profile / The TrendThis source code is a combination of:
- "Adaptive Trend Finder (log)" by Julien_Eche, licensed under GPL-3.0 (© Julien Eche, 2023-present)
- "Volume Profile / Fixed Range" by LonesomeTheBlue, licensed under MPL 2.0 (© LonesomeTheBlue)
Modified and combined by Saupi in April 2025
Licensed under the GNU General Public License v3.0 (GPL-3.0)
See www.gnu.org for details
----------------------------------------------------------------------------------
Hello, Im Saupi..
I am grateful to be able to modify both indicators. Because I have long wanted the "Volume Profile" display to be able to move dynamically following the market trend, and finally I found "Adaptive Trend Finder" created by Julien_Eche which seems to be able to combine both, resulting in a powerful indicator and I am sure it will be very useful for many people.
Failed Breakout DetectionThis indicator is a reverse-engineered copy of the FBD Detection indicator published by xfuturesgod. The original indicator aimed at detecting "Failed Breakdowns". This version tracks the opposite signals, "Failed Breakouts". It was coded with the ES Futures 15 minute chart in mind but may be useful on other instruments and time frames.
The original description, with terminology reversed to explain this version:
'Failed Breakouts' are a popular set up for short entries.
In short, the set up requires:
1) A significant high is made ('initial high')
2) Initial high is undercut with a new high
3) Price action then 'reclaims' the initial high by moving +8-10 points from the initial high
This script aims at detecting such set ups. It was coded with the ES Futures 15 minute chart in mind but may be useful on other instruments and time frames.
Business Logic:
1) Uses pivot highs to detect 'significant' initial highs
2) Uses amplitude threshold to detect a new high above the initial high; used /u/ben_zen script for this
3) Looks for a valid reclaim - a red candle that occurs within 10 bars of the new high
4) Price must reclaim at least 8 points for the set up to be valid
5) If a signal is detected, the initial high value (pivot high) is stored in array that prevents duplicate signals from being generated.
6) FBO Signal is plotted on the chart with "X"
7) Pivot high detection is plotted on the chart with "P" and a label
8) New highs are plotted on the chart with a red triangle
Notes:
User input
- My preference is to use the defaults as is, but as always feel free to experiment
- Can modify pivot length but in my experience 10/10 work best for pivot highs
- New high detection - 55 bars and 0.05 amplitude work well based on visual checks of signals
- Can modify the number of points needed to reclaim a high, and the # of bars limit over which this must occur.
Alerts:
- Alerts are available for detection of new highs and detection of failed breakouts
- Alerts are also available for these signals but only during 7:30PM-4PM EST - 'prime time' US trading hours
Limitations:
- Current version of the script only compares new highs to the most recent pivot high, does not look at anything prior to that
- Best used as a discretionary signal
DD Keltner Channels (1-3 ATR)This indicator creates Keltner Channels with 1, 2, and 3 ATR multipliers, allowing you to visualize different volatility levels around a moving average.
It's specifically created for people taking the "Deep Dip Buy" stock trading course, and attempts to provide a ready-to-go solution for those struggling with configuring the default Keltner indicator on TradingView to suit their needs for the course.
Any input from students or the instructor is welcome to improve this indicator so it offers more value to those looking to learn how to trade.
Features:
- Uses SMA or EMA as the base (20-period default)
- Displays 6 lines: +3, +2, +1, -1, -2, and -3 ATR levels
- Color-coded for easy identification:
• +/-1 ATR: Green
• +/-2 ATR: Light Gray (thin)
• +/-3 ATR: Dark Gray (thick)
EMA Crossover with Stop Loss
Stop Loss Calculation:
A stop loss level is calculated as a percentage below the entry price for a long position or above the entry price for a short position.
The stopLossPercent input allows you to define how far the stop loss is set from the entry price, in percentage terms.
Buy Signal:
A buySignal is generated when the fast EMA crosses above the slow EMA.
The stop loss for this trade is calculated when the buy signal occurs, and the stop loss level is plotted on the chart.
Sell Signal:
A sellSignal is generated when the fast EMA crosses below the slow EMA.
The stop loss for the short trade is calculated when the sell signal occurs.
Plotting:
Buy and Sell Labels: "BUY" and "SELL" signals are plotted as labels above or below the bars when the crossovers occur.
Stop Loss Levels: When a buy signal occurs, the stop loss for the long position is plotted in orange. When a sell signal occurs, the stop loss for the short position is plotted in purple.
Alerts:
Alerts are available for the buy and sell signals as well as for the stop loss levels being reached, so you can track those events in real-time.
How it Works:
The buy signal triggers a long position, and the stop loss is calculated below the entry price by the percentage specified in stopLossPercent.
The sell signal triggers a short position, and the stop loss is calculated above the entry price.
The stop loss is drawn on the chart when a position is open, so you can visually track where your exit would be if the price moves against you.
How to Use:
Copy the updated script into TradingView's Pine Script editor.
Apply it to your chart.
You'll see the EMAs plotted, along with "BUY", "SELL", and stop loss levels for both long and short trades.
You can set up alerts from TradingView’s alert feature to notify you when buy, sell, or stop-loss levels are triggered.
Feel free to tweak the stopLossPercent input to better fit your risk management preferences!
Let me know if you'd like further customization or need help with anything else!
[HM] Previous Day RTH LevelsPine Script Indicator: Previous Day RTH Data with Timeframe Filter
Overview
This TradingView Pine Script indicator plots key levels (High, Low, and Pivot Points) from the previous day's Regular Trading Hours (RTH) session. However, it includes a timeframe filter—meaning the indicator only displays these levels if the current chart's timeframe is equal to or shorter than a user-defined limit (default: 60 minutes).
Key Features
Session-Based Data
Uses a predefined RTH session (06:30–13:00 by default) to calculate the previous day's
High (Red line)
Low (Green line)
Pivot 1 (Yellow line) → (High + Low + Close) / 3
Pivot 2 (Blue line) → (High + Low) / 2
Adjustable Timeframe Filter
Users can set a maximum timeframe limit (in minutes).
Example:
If set to 60, the indicator only appears on 1M, 5M, 15M, 30M, 60M charts.
If set to 240, it also appears on 4H charts, etc.
Default: 60 minutes (can be changed via input settings).
Automatic Timeframe Detection
The script automatically checks the current chart’s timeframe (seconds, minutes, hours, days, etc.) and converts it to minutes for comparison.
If the chart’s timeframe exceeds the user’s limit, nothing is plotted.
How to Use
Apply the indicator to your TradingView chart.
Customize the settings:
RTH Session Time → Adjust if your market has different trading hours.
Maximum Timeframe (minutes) → Set the highest timeframe where you want the indicator to appear (default: 60).
The indicator will only display if the chart’s timeframe ≤ your selected limit.
Why Use This?
Avoids clutter on higher timeframes where these levels may be less relevant.
Focuses on intraday trading (e.g., scalping or swing trading on shorter timeframes).
Customizable to fit different trading styles and session times.
This makes it a clean, flexible tool for day traders who rely on previous session levels but don’t want them visible on longer-term charts.
MTF EMA CloudsThis indicator creates up to 3 configurable EMA clouds
Each cloud uses a fast ema and a slow ema.
Works as follows:
fast ema > slow ema : green
slow ema > fast ema : red
This also allows you to select a custom timeframe for each cloud (only higher timeframes work) and applies a multiplier to show the cloud from that timeframe on the current chart.
SMC Buy/Sell SignalsKey Components:
Order Blocks:
A Bullish Order Block is identified by the low of a bullish candle.
A Bearish Order Block is identified by the high of a bearish candle.
Break of Structure (BOS):
A BOS Up occurs when the price breaks above the highest high of the previous bosLength candles.
A BOS Down occurs when the price breaks below the lowest low of the previous bosLength candles.
Buy/Sell Signals:
A Buy Signal is generated when there is a BOS Up and the current price is above the bullish order block.
A Sell Signal is generated when there is a BOS Down and the current price is below the bearish order block.
Alerts:
Alerts are set up for buy and sell signals (alertcondition).
How to Use:
Copy and paste the script into TradingView's Pine Script editor.
Apply the script to your chart.
You’ll see the order blocks marked on the chart and buy/sell signals when the market breaks structure and aligns with bullish/bearish order blocks.
You can set up alerts from TradingView based on the conditions defined for buy/sell signals.
Limitations:
This script is relatively basic and only covers a few aspects of SMC, specifically order blocks and BOS.
You might need to further refine the strategy based on more complex aspects of SMC like liquidity zones, institutional footprints, and institutional order flow.
Let me know if you'd like further adjustments or refinements to the script!
BTC Swing Trader V2This is a trend-following swing trading strategy that uses Exponential Moving Average (EMA) crossovers to identify entry and exit points for BTC on a 15-minute chart. The goal is to capture short-term price movements (swings) in BTC’s price, aiming for a 0.5-1% profit per trade within a 4-hour window
Darvas Box Strategy (No Repeat Signals)📈 Darvas Box Strategy – No Repeated Signals
This script implements the classic Darvas Box indicator on TradingView with a twist:
🚫 No repeated Buy/Sell signals in the same direction until a reversal occurs.
💡 How it works:
The Darvas Box identifies consolidation zones based on historical highs/lows.
A Buy signal triggers when the price breaks above the TopBox.
A Sell signal triggers when the price drops below the BottomBox.
✅ Signals are filtered: after a Buy, no more Buy signals are generated until a Sell appears (and vice versa).
📊 Use it for:
Detecting breakout zones
Preventing overtrading with smarter entries
Strategy building & backtesting
🔧 Customizable Box Length lets you fine-tune how reactive the box zones are.
💻 Now live on TradingView Pine Script v5
🧪 Ideal for strategy development or visual alerts.
🔁 Want it with stop loss, take profit, or alerts? Let me know!
@ coinciyiz
EMA Crossover IndicatorThis script will not perform any trading operations; it’s purely for visualization and generating alerts. You can easily track the crossovers and make manual trading decisions or integrate it with other tools.
Let me know if you need any adjustments!
Order Flow Hawkes Process [ScorsoneEnterprises]This indicator is an implementation of the Hawkes Process. This tool is designed to show the excitability of the different sides of volume, it is an estimation of bid and ask size per bar. The code for the volume delta is from www.tradingview.com
Here’s a link to a more sophisticated research article about Hawkes Process than this post arxiv.org
This tool is designed to show how excitable the different sides are. Excitability refers to how likely that side is to get more activity. Alan Hawkes made Hawkes Process for seismology. A big earthquake happens, lots of little ones follow until it returns to normal. Same for financial markets, big orders come in, causing a lot of little orders to come. Alpha, Beta, and Lambda parameters are estimated by minimizing a negative log likelihood function.
How it works
There are a few components to this script, so we’ll go into the equation and then the other functions used in this script.
hawkes_process(params, events, lkb) =>
alpha = clamp(array.get(params, 0), 0.01, 1.0)
beta = clamp(array.get(params, 1), 0.1, 10.0)
lambda_0 = clamp(array.get(params, 2), 0.01, 0.3)
intensity = array.new_float(lkb, 0.0)
events_array = array.new_float(lkb, 0.0)
for i = 0 to lkb - 1
array.set(events_array, i, array.get(events, i))
for i = 0 to lkb - 1
sum_decay = 0.0
current_event = array.get(events_array, i)
for j = 0 to i - 1
time_diff = i - j
past_event = array.get(events_array, j)
decay = math.exp(-beta * time_diff)
past_event_val = na(past_event) ? 0 : past_event
sum_decay := sum_decay + (past_event_val * decay)
array.set(intensity, i, lambda_0 + alpha * sum_decay)
intensity
The parameters alpha, beta, and lambda all represent a different real thing.
Alpha (α):
Definition: Alpha represents the excitation factor or the magnitude of the influence that past events have on the future intensity of the process. In simpler terms, it measures how much each event "excites" or triggers additional events. It is constrained between 0.01 and 1.0 (e.g., clamp(array.get(params, 0), 0.01, 1.0)). A higher alpha means past events have a stronger influence on increasing the intensity (likelihood) of future events. Initial value is set to 0.1 in init_params. In the hawkes_process function, alpha scales the contribution of past events to the current intensity via the term alpha * sum_decay.
Beta (β):
Definition: Beta controls the rate of exponential decay of the influence of past events over time. It determines how quickly the effect of a past event fades away. It is constrained between 0.1 and 10.0 (e.g., clamp(array.get(params, 1), 0.1, 10.0)). A higher beta means the influence of past events decays faster, while a lower beta means the influence lingers longer. Initial value is set to 0.1 in init_params. In the hawkes_process function, beta appears in the decay term math.exp(-beta * time_diff), which reduces the impact of past events as the time difference (time_diff) increases.
Lambda_0 (λ₀):
Definition: Lambda_0 is the baseline intensity of the process, representing the rate at which events occur in the absence of any excitation from past events. It’s the "background" rate of the process. It is constrained between 0.01 and 0.3 .A higher lambda_0 means a higher natural frequency of events, even without the influence of past events. Initial value is set to 0.1 in init_params. In the hawkes_process function, lambda_0 sets the minimum intensity level, to which the excitation term (alpha * sum_decay) is added: lambda_0 + alpha * sum_decay
Alpha (α): Strength of event excitation (how much past events boost future events).
Beta (β): Rate of decay of past event influence (how fast the effect fades).
Lambda_0 (λ₀): Baseline event rate (background intensity without excitation).
Other parts of the script.
Clamp
The clamping function is a simple way to make sure parameters don’t grow or shrink too much.
ObjectiveFunction
This function defines the objective function (negative log-likelihood) to minimize during parameter optimization.It returns a float representing the negative log-likelihood (to be minimized).
How It Works:
Calls hawkes_process to compute the intensity array based on current parameters.Iterates over the lookback period:lambda_t: Intensity at time i.event: Event magnitude at time i.Handles na values by replacing them with 0.Computes log-likelihood: event_clean * math.log(math.max(lambda_t_clean, 0.001)) - lambda_t_clean.Ensures lambda_t_clean is at least 0.001 to avoid log(0).Accumulates into log_likelihood.Returns -log_likelihood (negative because the goal is to minimize, not maximize).
It is used in the optimization process to evaluate how well the parameters fit the observed event data.
Finite Difference Gradient:
This function calculates the gradient of the objective function we spoke about. The gradient is like a directional derivative. Which is like the direction of the rate of change. Which is like the direction of the slope of a hill, we can go up or down a hill. It nudges around the parameter, and calculates the derivative of the parameter. The array of these nudged around parameters is what is returned after they are optimized.
Minimize:
This is the function that actually has the loop and calls the Finite Difference Gradient each time. Here is where the minimizing happens, how we go down the hill. If we are below a tolerance, we are at the bottom of the hill.
Applied
After an initial guess the parameters are optimized with a mix of bid and ask levels to prevent some over-fitting for each side while keeping some efficiency. We initialize two different arrays to store the bid and ask sizes. After we optimize the parameters we clamp them for the calculations. We then get the array of intensities from the Hawkes Process of bid and ask and plot them both. When the bids are greater than the ask it represents a bullish scenario where there are likely to be more buy than sell orders, pushing up price.
Tool examples:
The idea is that when the bid side is more excitable it is more likely to see a bullish reaction, when the ask is we see a bearish reaction.
We see that there are a lot of crossovers, and I picked two specific spots. The idea of this isn’t to spot crossovers but avoid chop. The values are either close together or far apart. When they are far, it is a classification for us to look for our own opportunities in, when they are close, it signals the market can’t pick a direction just yet.
The value works just as well on a higher timeframe as on a lower one. Hawkes Process is an estimate, so there is a leading value aspect of it.
The value works on equities as well, here is NASDAQ:TSLA on a lower time frame with a lookback of 5.
Inputs
Users can enter the lookback value and timeframe.
No tool is perfect, the Hawkes Process value is also not perfect and should not be followed blindly. It is good to use any tool along with discretion and price action.
Rasool SMC Scalper - Clean Version//@version=5
indicator("RSI Divergence - Basic Working", overlay=true)
rsi = ta.rsi(close, 14)
pivot = 5
// شناسایی نقاط سقف و کف در قیمت و RSI
priceLow = ta.pivotlow(close, pivot, pivot)
priceHigh = ta.pivothigh(close, pivot, pivot)
rsiLow = ta.pivotlow(rsi, pivot, pivot)
rsiHigh = ta.pivothigh(rsi, pivot, pivot)
// واگرایی صعودی
bullishDiv = na(priceLow) or na(rsiLow) ? false :
close < close and rsi > rsi
// واگرایی نزولی
bearishDiv = na(priceHigh) or na(rsiHigh) ? false :
close > close and rsi < rsi
// نمایش سیگنالها روی چارت قیمت
plotshape(bullishDiv, location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small, title="Bull Div")
plotshape(bearishDiv, location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small, title="Bear Div")
Nifty/BankNifty Options Signals - 5m/10m/15m ONLY//@version=5
indicator("Nifty/BankNifty Options Signals - 5m/10m/15m ONLY", overlay=true)
// Manual check for valid timeframes
isValidTF = (timeframe.period == "5" or timeframe.period == "10" or timeframe.period == "15")
// Show warning label if invalid timeframe
if not isValidTF
label.new(bar_index, high, "⚠️ Use 5m, 10m or 15m timeframe",
style=label.style_label_down, color=color.red, textcolor=color.white)
// Indicators
fastEMA = ta.ema(close, 5)
slowEMA = ta.ema(close, 20)
rsi = ta.rsi(close, 14)
// Buy/Sell Conditions (only on valid timeframes)
buyCall = isValidTF and ta.crossover(fastEMA, slowEMA) and rsi > 40
buyPut = isValidTF and ta.crossunder(fastEMA, slowEMA) and rsi < 60
// Plot signals
plotshape(buyCall, title="BUY CE", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY CE")
plotshape(buyPut, title="BUY PE", location=location.abovebar, color=color.red, style=shape.labeldown, text="BUY PE")
// Plot EMAs only if valid timeframe
plot(isValidTF ? fastEMA : na, color=color.teal, title="Fast EMA (5)")
plot(isValidTF ? slowEMA : na, color=color.orange, title="Slow EMA (20)")
⚔️ ScalperX: Trap Sniper Pro
## ⚙️ **ScalperX: Trap Sniper Pro **
This script is a **smart money trap detector** built for scalpers and day traders who want to catch **reversals at liquidity sweeps** — before the big moves start.
It identifies **fakeouts**, **stop hunts**, and **trap wicks** by combining:
- Swing high/low sweeps
- Candle body confirmation
- VWAP bias
- Minimum volatility filter
---
### 🔍 Core Features:
- **Trap Wick Detection**
Detects if price sweeps a recent high or low and immediately rejects — classic liquidity grab behavior.
- **VWAP Trend Bias**
Ensures signals are only taken in the direction of institutional flow.
- **Minimum Movement Filter**
Filters out small or irrelevant candles — only signals when price range exceeds a set percentage (e.g., 0.3%).
- **Visual Debug Markers**
Triangles show sweep zones, circles show valid volatility — so you can see *why* a signal did or didn’t fire.
- **BUY / SELL Labels**
Signals are shown clearly when all trap and trend conditions align.
- **Alerts Built-In**
Set notifications for when trap signals appear in real time.
---
### 🧠 Strategy Logic:
**BUY Trap (Long Entry):**
- Price sweeps a recent low
- Candle closes bullish above VWAP
- Minimum range (e.g., 0.3%)
**SELL Trap (Short Entry):**
- Price sweeps a recent high
- Candle closes bearish below VWAP
- Minimum range (e.g., 0.3%)
---
### 🧪 Ideal For:
- Crypto scalpers (1m, 5m, 15m)
- Stop hunt reversal traders
- Smart money + liquidity-style systems
---
Futures/CFD converterMy take on converting the futures to CFD in real time and keeping it in the same window. This is written with help of POE App Builder, I will iterate and see where it leads me.