Indicators and strategies
Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)
Horizontal Lines [Yellow]The Horizontal Lines indicator is a simple yet powerful visual tool designed for traders in forex, options, and other financial markets. It allows users to mark and track key price levels directly on their chart with clear, bright yellow lines.
X Trade Planlets you define up to 10 fully manual price levels and ranges—each with its own toggle, two prices (for a band/box), an optional note, and a color. The tool draws lines that start at the first bar of a chosen anchor timeframe (e.g., Daily) and extend to the right, mirroring the “fresh start-of-session” look. If two prices are entered, the area between them is shaded using the same color at 60% transparency, so the line and box fill are visually consistent.
Key Features
10 explicit categories (Cat 1 … Cat 10)
Each category includes:
Enable/disable toggle
Price 1 (line) and Price 2 (optional, defines box top/bottom)
Note (optional): label shows note only; hidden automatically if blank
Color: used for the line, box border, and box fill (with 60% transparency)
Anchor-aware drawing
Lines and boxes begin at the new bar of your selected Anchor Timeframe (e.g., D/W/H4), producing clean, session-style extensions.
Clean visuals
Line width is standardized at 1 for a crisp, unobtrusive look
Labels are aligned to the right of current bars and inherit user label styling options (size, text color, background)
No historical dependence
The indicator does not compute or display historical pivots, opens, or derived levels. Everything is user-defined.
Inputs (Per Category)
Cat N (toggle): Show/hide the category
Price 1: Primary level; a horizontal line is drawn when set
Price 2 (optional): When set with Price 1, a box is drawn between the two values
Note (optional): Free-text label; shown only if non-empty
Color: Applies to line, box border, and box fill (fill uses 60% transparency)
Global Inputs
Anchor Timeframe: Timeframe whose new bar defines the start (anchor) of all lines/boxes
Extend Right (bars): Number of bars to extend into the future
Labels (on/off) and label style options (size, text color, background)
How It Works
On the first bar and on each new bar of the anchor timeframe, the indicator captures the current bar index as the anchor for each category.
For each enabled category:
If Price 1 is set, the script draws a horizontal line from the anchor to extend_len bars into the future.
If Price 2 is also set, a box spanning Price 1 ↔ Price 2 is drawn from the anchor to the same future point.
If a Note is provided, a right-side label is rendered at the level (or box midpoint). If the note is empty, no label is shown.
Visual objects are refreshed every bar to ensure alignment with current settings.
Common Use Cases
Scenario planning & playbooks: Define “watch zones” (e.g., Look Above & Fail) and keep them consistent across sessions.
Manual S/R & liquidity areas: Mark hand-picked levels/ranges you care about, without auto-calculated clutter.
Session-like anchoring: Start-of-day/week anchoring to mimic institutional levels that reset each period.
Trade management: Color-coded bands for entries, invalidation, and targets with clear notes
fartbombLinReg fit (history): solid line showing the best-fit linear trend over the last len bars.
Projected offset (visual): same line shifted h bars right so you can see direction.
Future projection (segments): the actual next-h forecast, drawn from the last bar.
Forecast made h bars ago: circle at each bar’s target showing what was predicted h bars earlier.
H / X markers: a hit if that earlier forecast fell inside the bar’s high–low range.
RD-DynamicTSMADescription of the RD-DynamicTSMA Pine Script Indicator:
This single indicator dynamically adjusts the three SMAs to key periods used by professional traders across timeframes:
Daily: 10, 21, 50 periods (standard for swing trading trends).
Weekly+: 10, 21, 30 periods (optimized for positional & longer-term views).
Lengths auto-update on timeframe switches.
Volume Profile with Buyer/Seller ZonesProperly uses arrays to store volume data
Correctly implements volume distribution across price levels
Uses boxes to draw the histogram
Includes toggles for POC and VA display
More efficient rendering (only draws on last bar)
ADX (Colored by Slope)_V2Option added to select 28/28 or 14/14. Also added a yellow line to mark level 20. Adx will turn red if it is lower than previous candle , else it will turn green.
Valid Candle & Impulse (sain6ayar_)I tried to detect the confirmed candles and confirmed impulse moves taught in the first lesson (Degi.Trades), but I’m not sure if they are working correctly.
mZigzagLibrary "mZigzag"
Matrix implementation of zigzag to allow further possibilities.
Main advantage of this library over previous zigzag methods is that you can attach any number of indicator/oscillator information to zigzag
calculate(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots, supertrendLength)
calculates zigzag and related information
Parameters:
length (simple int) : is zigzag length
ohlc (array) : array of OHLC values to be used for zigzag calculation
indicatorHigh (array) : Array of indicator values calculated based on high price of OHLC
indicatorLow (array) : Array of indicators values calculated based on low price of OHLC
numberOfPivots (simple int) : Number of pivots to be returned
supertrendLength (simple int) : is number of pivot history to calculate supertrend
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionMatrix Matrix containing direction of price and indicator values at pivots
ratioMatrix Matrix containing ratios of price and indicator values at pivots
divergenceMatrix matrix containing divergence details for each indicators
doubleDivergenceMatrix matrix containing double divergence details for each indicators
barArray Array containing pivot bars
supertrendDir is direction of zigzag based supertrend
supertrend is supertrend value of zigzag based supertrend
newZG is true if a new pivot is added to array
doubleZG is true if last calculation returned two new pivots (Happens on extreme price change)
calculateplain(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots, offset)
calculates zigzag and related information uses shift/unshift rather than pop and push. Also does not calculate divergence and ratios.
Parameters:
length (simple int) : is zigzag length
ohlc (array) : array of OHLC values to be used for zigzag calculation
indicatorHigh (array) : Array of indicator values calculated based on high price of OHLC
indicatorLow (array) : Array of indicators values calculated based on low price of OHLC
numberOfPivots (simple int) : Number of pivots to be returned
offset (simple int)
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionArray Matrix containing direction of price and indicator values at pivots
barArray Array containing pivot bars
newZG is true if a new pivot is added to array
doubleZG is true if last calculation returned two new pivots (Happens on extreme price change)
draw(valueMatrix, directionMatrix, ratioMatrix, divergenceMatrix, doubleDivergenceMatrix, barArray, newZG, doubleZG, indicatorLabels, lineColor, lineWidth, lineStyle, showLabel, showIndicators)
draws zigzag and related information based on preprocessed values
Parameters:
valueMatrix (matrix) : is matrix containing values of price and indicators
directionMatrix (matrix) : is matrix containing direction of price and indicators
ratioMatrix (matrix) : is matrix containing retracement ratios of price and indicators
divergenceMatrix (matrix)
doubleDivergenceMatrix (matrix)
barArray (array) : is array of pivot bars
newZG (bool) : is bool which tells whether new zigzag pivot is formed or not
doubleZG (bool) : is bool which teels us if the bar has both high and low zigzag
indicatorLabels (array)
lineColor (color) : zigzag line color. set to blue by default
lineWidth (int) : zigzag line width. set to 1 by default
lineStyle (string) : zigzag line style. set to line.style_solid by default
showLabel (bool) : Show pivot label
showIndicators (bool) : Include indicators in labels. If set to false, indicators are shown as tooltips
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionMatrix Matrix containing direction of price and indicator values at pivots
ratioMatrix Matrix containing ratios of price and indicator values at pivots
divergenceMatrix matrix containing divergence details for each indicators
doubleDivergenceMatrix matrix containing double divergence details for each indicators
barArray Array containing pivot bars
zigzaglines array of zigzag lines
zigzaglabels array of zigzag labels
draw(length, ohlc, indicatorLabels, indicatorHigh, indicatorLow, numberOfPivots, lineColor, lineWidth, lineStyle, showLabel, showIndicators)
draws zigzag and related information
Parameters:
length (simple int) : is zigzag length
ohlc (array) : array of OHLC values to be used for zigzag calculation
indicatorLabels (array) : Array of name of indicators passed
indicatorHigh (array) : Array of indicator values calculated based on high price of OHLC
indicatorLow (array) : Array of indicators values calculated based on low price of OHLC
numberOfPivots (simple int) : Number of pivots to be returned
lineColor (color) : zigzag line color. set to blue by default
lineWidth (int) : zigzag line width. set to 1 by default
lineStyle (string) : zigzag line style. set to line.style_solid by default
showLabel (bool) : Show pivot label
showIndicators (bool) : Include indicators in labels. If set to false, indicators are shown as tooltips
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionMatrix Matrix containing direction of price and indicator values at pivots
ratioMatrix Matrix containing ratios of price and indicator values at pivots
divergenceMatrix matrix containing divergence details for each indicators
doubleDivergenceMatrix matrix containing double divergence details for each indicators
barArray Array containing pivot bars
zigzaglines array of zigzag lines
zigzaglabels array of zigzag labels
AIO Entry Size CalculatorThis indicator is designed to help traders dynamically adjust their position size and drawdown expectations when their trading capital changes.
By entering your original backtest parameters — including base capital, base drawdown percentage, and base position size — along with your current capital, the script calculates two key scenarios:
Lock Drawdown %: Keeps the original drawdown percentage unchanged and calculates the new position size required.
Lock Position Size: Keeps the original position size unchanged and shows how your drawdown percentage will change.
The results are displayed in a clear, color-coded table, allowing you to instantly see how capital fluctuations affect your risk profile.
With customizable themes (dark/light) and highlight options, it’s an essential tool for risk management, portfolio rebalancing, and position sizing decisions based on real backtest data.
Additionally, this indicator is highly useful when combined with TradingView strategies — helping you interpret backtest results more accurately and translate them into real-world position sizing adjustments as your account balance evolves.
Daily Markers (adjustable)Draws daily vertical markers to visually indicate the beginning of a new day. These can be easily offset for your time zone, or e.g. for the beginning of your trading day.
Time Range by exp3rtsTime Window highlights a custom time range directly on your chart, helping you focus on specific market sessions or trading hours.
Key Features:
Highlights a custom time range with a shaded background
Fully adjustable start and end time (hour & minute)
Supports multiple time zones (e.g., GMT, UTC, Europe/Berlin)
Optional market color shading inside the window (bull/bear neutral tone)
Use Cases:
Mark London Open, New York Session, or any session overlap
Focus on high-probability trading hours
Visualize your backtesting timeframe or algo activity window
Track premarket or after-hours activity for futures or indices
Customization:
Set the beginning and end time in your local or exchange time zone
Choose your timezone string (e.g., "GMT", "Etc/UTC", "America/New_York")
Automatically colors candles in the time window for easy visibility
MA Crossover BIFTY BNF with Broker Inputs//@version=6
strategy("MA Crossover with Broker Inputs", overlay=true, margin_long=100, margin_short=100, process_orders_on_close=true)
// === BROKER & ORDER SETTINGS ===
broker = input.string("Dhan", title="Broker", options= )
orderType = input.string("MKT", title="Order Type", options= )
clientID = input.string("", title="Client ID (Optional)")
secretKey = input.string("", title="Secret Key (from JSON)")
// === INSTRUMENT SELECTION ===
instrument = input.string("BANKNIFTY", title="Select Instrument", options= )
expiryMode = input.string("Auto", title="Expiry Mode", options= )
manualExpiry = input.string("17Dec2025", title="Manual Expiry Date (if Manual Mode)")
optionType = input.string("CE", title="Option Type", options= )
strikeSel = input.string("ATM", title="Strike Selection", options= )
// === RISK MANAGEMENT ===
stopLossPts = input.int(50, title="Stop Loss (points)")
takeProfitPts = input.int(100, title="Take Profit (points)")
// === STRATEGY LOGIC: Moving Average Crossover ===
fastLength = input.int(9, title="Fast MA Length")
slowLength = input.int(18, title="Slow MA Length")
price = close
maFast = ta.sma(price, fastLength)
maSlow = ta.sma(price, slowLength)
// Crossover Long
if (ta.crossover(maFast, maSlow))
strategy.entry("Long", strategy.long, comment="MA Crossover Long")
// Crossunder Short
if (ta.crossunder(maFast, maSlow))
strategy.entry("Short", strategy.short, comment="MA Crossover Short")
// Apply SL and TP
strategy.exit("Exit Long", from_entry="Long", stop=close - stopLossPts, limit=close + takeProfitPts)
strategy.exit("Exit Short", from_entry="Short", stop=close + stopLossPts, limit=close - takeProfitPts)
// === PLOTS ===
plot(maFast, color=color.green, title="Fast MA")
plot(maSlow, color=color.red, title="Slow MA")
Volume Profile Trading Zones1. Understanding the Visual Elements
Lines on Chart:
Purple solid line (POC) = Point of Control - MOST volume traded here = strongest magnet for price
Red dashed line (VAH) = Value Area High - RESISTANCE when price is below
Green dashed line (VAL) = Value Area Low - SUPPORT when price is above
Histogram Colors:
Orange bars = High Volume Nodes (HVN) = Strong support/resistance zones
Blue bars = Low Volume Nodes (LVN) = Price moves through FAST (no buyers/sellers)
Gray bars = Normal volume areas
Total Points Range by exp3rtsThis indicator measures and displays the true intraday movement of a market by approximating tick-level activity using 1-second data aggregation. Instead of only looking at net candle movement, it sums every price change during a session, giving traders a more accurate picture of market effort and volatility.
Total Points Moved (TPM) – Captures the full distance traveled by price, not just the net gain/loss.
Bullish vs. Bearish Movement – Separates upward and downward moves so you can see who dominated the session.
Custom Sessions – Define your own session start/end times and time zone for precise tracking.
End-of-Session Summary – Automatically plots a label at session completion with totals for TPM, bullish, and bearish movement.
Visual Session Highlighting – Background shading makes it easy to see when the chosen session is active.
This tool is useful for:
Understanding the true effort vs. result of price movement
Comparing volatility across sessions
Identifying whether bulls or bears contributed more to market swings
Supporting order flow and tick-based trading strategies
EMA Crossoverx + ADX [Jamir] (Indicator)This indicator will avoid the signals during low volatility and will show the signals only when there is a volatility. Helps you to take profitable trades only and avoids noise. This script works good on 5 mins and 15 mins time frame.
Quarterly Earnings - v1This script shows company fundamentals in a TradingView table: Earnings Per Share (EPS), Price-to-Earnings Ratio (P/E, TTM), Sales (in Crores), Operating Margin (OPM %), Return on Assets (ROA %), and Return on Equity (ROE %).