ADXZigZagLibrary "ADXZigZag"
method lastPivot(this)
Returns the last Pivot of `this` ZigZag if there is at least one Pivot to return, and `na` otherwise.
Can be used as a function or method.
Namespace types: ZigZag
Parameters:
this (ZigZag) : (series ZigZag) A ZigZag object.
Returns: (Pivot) The last Pivot in the ZigZag.
update(this)
Updates `this` ZigZag object with new pivots, volume, lines, labels. NOTE: The function must be called on every bar for accurate calculations.
Can be used as a function or method.
Parameters:
this (ZigZag) : (series ZigZag) a ZigZag object.
Returns: (bool) true if a new Zig Zag line is found or the last Zig Zag line has changed.
newInstance(settings)
Instantiates a new ZigZag object with `settings`. If no settings are provided, a default ZigZag object is created.
Parameters:
settings (Settings) : (series Settings) A Settings object.
Returns: (ZigZag) A new ZigZag instance.
Settings
Provides calculation and display attributes to ZigZag objects.
Fields:
devThreshold (series float) : The minimum percentage deviation from a point before the ZigZag will change direction.
depth (series int) : The number of bars required for pivot detection.
lineColor (series color) : Line color.
extendLast (series bool) : Condition allowing a line to connect the most recent pivot with the current close.
displayReversalPrice (series bool) : Condition to display the pivot price in the pivot label.
displayCumulativeVolume (series bool) : Condition to display the cumulative volume for the pivot segment in the pivot label.
displayReversalPriceChange (series bool) : Condition to display the change in price or percent from the previous pivot in the pivot label.
differencePriceMode (series string) : Reversal change display mode. Options are "Absolute" or "Percent".
draw (series bool) : Condition to display lines and labels.
allowZigZagOnOneBar (series bool) : Condition to allow double pivots to occur ie. when a large bar makes both a pivot high and a pivot low.
Point
A coordinate containing bar, price, and time information.
Fields:
tm (series int) : A value in UNIX time.
price (series float) : A value on the Y axis (price).
barIndex (series int) : A `bar_index`.
Pivot
A level of significance used to determine directional movement or potential support and resistance.
Fields:
ln (series line) : A line object connecting the `start` and `end` Point objects.
lb (series label) : A label object to display pivot values.
isHigh (series bool) : A condition to determine if the pivot is a pivot high.
vol (series float) : Volume for the pivot segment.
start (Point) : The coordinate of the previous Point.
end (Point) : The coordinate of the current Point.
ZigZag
An object to maintain Zig Zag settings, pivots, and volume.
Fields:
settings (Settings) : Settings object to provide calculation and display attributes.
pivots (array) : An array of Pivot objects.
sumVol (series float) : The volume sum for the pivot segment.
extend (Pivot) : Pivot object used to project a line from the last pivot to the last bar.
Indicatori e strategie
SAN VWAP and Stoch RSI Crypto StrategyCreate a pine script strategy for crypto trading, using the VWAP and the stochastic RSI only on the 15min chart. Short condition only if price closes entirely above VWAP upper band #2 or upper band #3, the stochastic RSI is above 85 need and enter on the first red candle close. take profit condition is to take 100% of the profit whenever the Stoch RSI is below 20 and the blue line is crossing over the red line. Buy condition only if price closes entirely below VWAP lower band #2 or lower band #3, the stochastic RSI is below 12 and enter on the first green candle close. take profit condition is to take 100% of the profit whenever the Stoch RSI is above 80 and the blue line is crossing below the red line
ProbabilityContextLibrary "ProbabilityContext"
initContext(sessionTime, timeframe, instrumentType, timezone, maxBufferSize, useLIFO)
Parameters:
sessionTime (string)
timeframe (string)
instrumentType (string)
timezone (int)
maxBufferSize (int)
useLIFO (bool)
addCondition(ctx, name, value, patternName, priority, confidence)
Parameters:
ctx (Context)
name (string)
value (bool)
patternName (string)
priority (float)
confidence (float)
removeCondition(ctx, name, patternName)
Parameters:
ctx (Context)
name (string)
patternName (string)
clearConditions(ctx, patternName)
Parameters:
ctx (Context)
patternName (string)
isPatternValid(ctx, patternName, minConfidence)
Parameters:
ctx (Context)
patternName (string)
minConfidence (float)
Condition
Fields:
name (series string)
value (series bool)
patternName (series string)
timestamp (series int)
priority (series float)
confidence (series float)
ConditionGroup
Fields:
conditions (array)
Context
Fields:
sessionTime (series string)
timeframe (series string)
instrumentType (series string)
conditionGroups (map)
timezone (series int)
maxBufferSize (series int)
useLIFO (series bool)
SD XO level marking Custom Horizontal Linesthis is XO strategy idel for Nifty take mid point from PDH & PDL and keet distance of line at 63 points
MathLibrary "Math"
clamp(value, minVal, maxVal)
Parameters:
value (float)
minVal (float)
maxVal (float)
5m Gold Strategy - Session Break + Previous Day High/LowHere is your complete Pine Script v5 code for TradingView that:
Implements your 5-minute Gold breakout strategy.
Uses previous day high/low levels.
Confirms entry based on 15-minute SMA trend (SMA 9 > SMA 21).
Marks session time.
Filters news time (pause trading 15 minutes before/after major red news from ForexFactory).
Order Block with BoSHere’s a professional and concise description you can use for publishing your **TradingView script** titled **"Order Block with BoS"**:
---
### 📌 **Description for TradingView Publication:**
**"Order Block with Break of Structure (BoS)"** is a powerful price action-based indicator designed to identify potential reversal zones and momentum shifts using **Order Block** detection combined with **Break of Structure (BoS)** confirmation.
### 🔍 **Key Features:**
* **Order Block Detection**: Highlights bullish and bearish order blocks using precise candle structure logic.
* **Break of Structure (BoS)**: Confirms structural breaks above swing highs or below swing lows to validate potential trend continuation or reversal.
* **Dynamic ATR Filter**: Uses a 14-period ATR with dynamic thresholds to confirm significant moves, filtering out weak breakouts.
* **Visual Aids**:
* Color-coded **boxes** to mark detected Order Blocks.
* **Arrows** at BoS confirmation points when ATR confirms strong momentum.
* Optional **dashed BoS lines** to show where price broke structure.
### ⚙️ **Customizable Inputs**:
* `Swing Length`: Defines the sensitivity of swing high/low detection.
* `Show Break of Structure`: Toggle on/off BoS confirmation lines.
* `Candle Lookback`: Number of historical candles to consider.
This indicator is ideal for traders who incorporate **smart money concepts**, **market structure analysis**, or **institutional order flow** strategies.
---
Would you like me to help write the **strategy** version of this or translate the description into another language for international audiences?
DS Gurukul RoundupRoundup (Support & Resistance Indicator) For Bank Nifty
By DS Gurukul
To be used only for Bank Nifty.
Indicator Overview
The Round Figure Indicator identifies key psychological support and resistance levels based on round numbers. These levels often act as strong turning points in price action due to trader psychology and institutional order placement.
How It Works
Key Levels:
Mid Band (Black Solid Line): Major round number
Upper Band (Green Solid Line): Mid Band (resistance)
Lower Band (Red Solid Line): Mid Band (support)
Sub-Bands (Dotted Lines): ±100 levels for tighter zones
Alerts: Triggers when price touches any band, signaling potential reversals or breakouts.
Trading Strategy
✅ Bounce Trades:
Buy near Lower Band or Mid Sub-Lower with bullish confirmation (e.g., hammer candle).
Sell near Upper Band or Mid Sub-Upper with bearish rejection (e.g., shooting star).
✅ Breakout Trades:
Enter long on a close above Upper Band with volume.
Enter short on a close below Lower Band with momentum.
⚠️ Risk Management:
Place stops just beyond the opposite sub-band.
Avoid trading if price is stuck between mid/sub-bands (choppy market).
Why It Works
Round numbers attract limit orders (support/resistance).
Institutions use these levels for stop placements and profit targets.
Works across all timeframes (scalping to swing trading).
🔔 Tip: Combine with RSI/MACD for higher-probability trades!
Bar ColorFX Gold is multi market position sizing tool designed to help you manage risk quickly and accurately. with the script simple enter your account capital the percentage of risk you wish to take and stop in ticks depending on the market lets open first after we cools see how the price will paly out .
As Always use proper risk management Guys Trade wisely best of Luck.
Bar Value TableBar Values Calculated
ATR
Previous Bar Value
Current Bar Value
Displays values in a table at the bottom left of chart
LibMirPapaICTLibrary "LibMirPapaICT"
isConsecutiveBullish(_len, _count)
Parameters:
_len (int) : int
/ @param _count int
/ @return bool
_count (int)
isConsecutiveBearish(_len, _count)
Parameters:
_len (int) : int
/ @param _count int
/ @return bool
_count (int)
createBoxOrderBlock(_isState, _leftBar, _rightBar, _priceTop, _priceBot, _useMidline, _xloc, _color, _offset)
Parameters:
_isState (bool)
_leftBar (int)
_rightBar (int)
_priceTop (float)
_priceBot (float)
_useMidline (bool)
_xloc (string)
_color (color)
_offset (int)
processBoxLevels(_levels, _useLineMid, _useTouch, _closeCount)
Parameters:
_levels (array) : BoxLevel
/ @param _useMidline bool
/ @param _useOBtouch bool
/ @param _closeCount int
_useLineMid (bool)
_useTouch (bool)
_closeCount (int)
BoxLevel
Fields:
isState (series bool)
boxInfos (series box)
lineMid (series line)
offset (series int)
priceTop (series float)
priceBot (series float)
volBuy (series float)
volSell (series float)
breakStage (series int)
breakTop (series float)
breakBot (series float)
result (series string)
US30 HMA Signal v2.8Indicator Description – US30 HMA Signal v2.8
Overview:
The US30 HMA Signal indicator is designed to generate Buy and Sell signals based on the crossover of three Hull Moving Averages (HMAs). The indicator focuses on identifying momentum shifts and directional bias using the 9, 21, and 50 HMA structures, optimised for the US30 (Dow Jones) index.
⸻
Indicator Components:
1. Hull Moving Averages (HMAs):
• 9 HMA (Green): Fastest HMA, responds quickly to price changes.
• 21 HMA (Amber): Medium-term HMA, acts as a transitional filter.
• 50 HMA (Red): Slowest HMA, defines the broader trend direction.
⸻
Logic and Signal Conditions:
1. Session Filter:
• Signals are only generated during the US session, defined as starting at 13:30 BST.
2. Directional Bias:
• Bullish Bias: Occurs when both the 9 HMA and 21 HMA are above the 50 HMA.
• Bearish Bias: Occurs when both the 9 HMA and 21 HMA are below the 50 HMA.
3. Crossover Logic:
• Buy Signal: Prints when the 9 HMA crosses above the 21 HMA while the directional bias is bullish.
• Sell Signal: Prints when the 9 HMA crosses below the 21 HMA while the directional bias is bearish.
4. Minimum Bar Spacing:
• To avoid signal clustering, a minimum bar spacing of 5 bars is implemented between consecutive signals.
⸻
Plotting:
• Buy Signal: Displays as a green label below the candle with the text “BUY.”
• Sell Signal: Displays as a red label above the candle with the text “SELL.”
⸻
Purpose and Usage:
• The indicator is designed for traders looking to capture momentum shifts in the US30 index using HMA crossovers.
• It is best applied on the 5-minute timeframe to balance signal frequency and reliability.
• The strict session filter ensures signals are only generated during the most volatile period, aligning with US market activity.
SMA 100/200The indicator shows the 100 and 200-period SMAs. It can be used to gauge the long-term market trend and useful infliction points.
MirPapaTrendConditionsLibrary "MirPapaTrendConditions"
getMaColor(level)
Parameters:
level (int) : : 1= lowest, 2= low, 3= mid, 4= high, 5= highest, 6= Base
getMA(mode, src, len)
Parameters:
mode (string) : MA 종류
/ @param src 소스
/ @param len 기간
/ @returns 선택된 MA
src (float)
len (simple int)
getMA(maName, src, intLow, intMid, intHigh)
Parameters:
maName (string) : 이동평균 종류
/ @param src 기준 소스
/ @param intLow 단기
/ @param intMid 중기
/ @param intHigh 장기
/ @returns 배열
src (float)
intLow (simple int)
intMid (simple int)
intHigh (simple int)
getMA(maName, src, intLowest, intLow, intMid, intHigh, intHighest, intBase)
Parameters:
maName (string) : 이동평균 종류
/ @param src 기준 소스
/ @param intLowest 초단기
/ @param intLow 단기
/ @param intMid 중기
/ @param intHigh 장기
/ @param intHighest 초장기
/ @param intBase 기준선
/ @returns 배열
src (float)
intLowest (simple int)
intLow (simple int)
intMid (simple int)
intHigh (simple int)
intHighest (simple int)
intBase (simple int)
getStochastic(src, intLen)
Parameters:
src (float) : 기준 소스
/ @param Len 기간
/ @returns 선택된 스토캐스틱
intLen (int)
getStochastic(src, intLow, intMid, intHigh)
Parameters:
src (float) : 기준 소스
/ @param intLow 단기 기간
/ @param intMid 중기 기간
/ @param intHigh 장기 기간
/ @returns
intLow (int)
intMid (int)
intHigh (int)
getStochastic(src, intLowest, intLow, intMid, intHigh, intHighest, intBase)
Parameters:
src (float) : 기준 소스
/ @param intLowest 초단기 기간
/ @param intLow 단기 기간
/ @param intMid 중기 기간
/ @param intHigh 장기 기간
/ @param intHighest 최장기 기간
/ @param intBase 기준선 기간
/ @returns
intLowest (int)
intLow (int)
intMid (int)
intHigh (int)
intHighest (int)
intBase (int)
getRSX(src, intLen)
Parameters:
src (float) : 기준 소스
/ @param intLen 기간
/ @returns 선택된 rsx
intLen (int)
getRSX(src, intLow, intMid, intHigh)
Parameters:
src (float) : 기준 소스
/ @param intLow 중단기
/ @param intMid 중기
/ @param intHigh 장기
/ @returns
intLow (int)
intMid (int)
intHigh (int)
getRSX(src, intLowest, intLow, intMid, intHigh, intHighest, intBase)
Parameters:
src (float) : 기준 소스
/ @param intTiny 초단기
/ @param intLowest 단기
/ @param intLow 중단기
/ @param intMid 중기
/ @param intHigh 장기
/ @param intHighest 초장기
/ @returns
intLowest (int)
intLow (int)
intMid (int)
intHigh (int)
intHighest (int)
intBase (int)
getMACD(src, fastLen, slowLen, signalLen)
Parameters:
src (float) : 기준 소스
/ @param fastLen 빠른 EMA 기간
/ @param slowLen 느린 EMA 기간
/ @param signalLen 시그널 기간
/ @returns
fastLen (simple int)
slowLen (simple int)
signalLen (simple int)
getBollingerBand(src, len, mult)
Parameters:
src (float) : 기준 소스
/ @param len 기준 기간
/ @param mult 표준편차 배수
/ @returns
len (int)
mult (float)
getATR(intLen)
Parameters:
intLen (simple int) : ATR 기간
/ @returns 선택된 ATR
getATR(intLow, intMid, intHigh)
Parameters:
intLow (simple int) : 단기 ATR 기간
/ @param intMid 중기 ATR 기간
/ @param intHigh 장기 ATR 기간
/ @returns 배열
intMid (simple int)
intHigh (simple int)
getATR(intLowest, intLow, intMid, intHigh, intHighest, intBase)
Parameters:
intLowest (simple int)
intLow (simple int)
intMid (simple int)
intHigh (simple int)
intHighest (simple int)
intBase (simple int)
isCross(fastLine, baseLine)
Parameters:
fastLine (float) : 빠른선
/ @param baseLine 기준선
/ @returns 상태
baseLine (float)
isMAtrend(maLow, maMid, maHigh)
Parameters:
maLow (float) : 가장 빠른 MA
/ @param maMid 중간 MA
/ @param maHigh 느린 MA
/ @returns 상태
maMid (float)
maHigh (float)
isMAline(val, valPrev, intBaseLine)
Parameters:
val (float) : 현재 값
/ @param valPrev 이전 값
/ @param intBaseLine 기준값
/ @returns 상태
valPrev (float)
intBaseLine (int)
getStage(v1, v2, v3)
Parameters:
v1 (float) : 첫 번째 값
/ @param v2 두 번째 값
/ @param v3 세 번째 값
/ @returns 1~6
v2 (float)
v3 (float)
getBgColor(stage)
Parameters:
stage (int) : 스테이지 값
/ @returns 색상
getBgColor(stage, transp)
Parameters:
stage (int) : 스테이지 값
/ @param transp 투명도
/ @returns 색상
transp (int)
getBGColor(v1, v2, v3)
Parameters:
v1 (float) : 첫 번째 값
/ @param v2 두 번째 값
/ @param v3 세 번째 값
/ @param transp 투명도
/ @param customColor 사용자 지정 색 (옵션)
/ @returns 색상
v2 (float)
v3 (float)
getBGColor(v1, v2, v3, transp)
Parameters:
v1 (float) : 첫 번째 값
/ @param v2 두 번째 값
/ @param v3 세 번째 값
/ @param transp 투명도
/ @param customColor 사용자 지정 색 (옵션)
/ @returns 색상
v2 (float)
v3 (float)
transp (int)
createStackedLabel(labelText, isUp, maLowest, maLow, maMid, maHigh, maHighest, maBase)
Parameters:
labelText (string) : 라벨 텍스트
/ @param isUp 위/아래 여부
/ @param maTiny~maHighest MA 값들
/ @returns 생성된 라벨
isUp (bool)
maLowest (float)
maLow (float)
maMid (float)
maHigh (float)
maHighest (float)
maBase (float)
isDoubleBottom(src, left, right)
Parameters:
src (float) : 기준 시리즈 (예: 중간 MA 값, low 등)
/ @param left PivotLow 검색 시 좌측 봉 개수
/ @param right PivotLow 검색 시 우측 봉 개수
/ @returns true: 이번 봉에 쌍바닥(이전 PivotLow < 현재 PivotLow) 발생
left (int)
right (int)
isDoubleTop(src, left, right)
Parameters:
src (float) : 기준 시리즈 (예: 중간 MA 값, high 등)
/ @param left PivotHigh 검색 시 좌측 봉 개수
/ @param right PivotHigh 검색 시 우측 봉 개수
/ @returns true: 이번 봉에 쌍봉(이전 PivotHigh > 현재 PivotHigh) 발생
left (int)
right (int)
isFractalHigh(src, left, right)
Parameters:
src (float) : 고가 시리즈 (예: high, 중간 MA 값 등)
/ @param left 좌측 확인 봉 개수
/ @param right 우측 확인 봉 개수
/ @returns true: 프랙탈 하이 발생
left (int)
right (int)
isFractalLow(src, left, right)
Parameters:
src (float) : 저가 시리즈 (예: low, 중간 MA 값 등)
/ @param left 좌측 확인 봉 개수
/ @param right 우측 확인 봉 개수
/ @returns true: 프랙탈 로우 발생
left (int)
right (int)
remaLibrary " REMA "
Custom Regional Exponential Moving Average with enhanced sensitivity to recent price action
Description: What Makes REMA Unique?
REMA introduces a dual-region weighting system that intelligently balances short-term responsiveness with long-term trend context, solving the fundamental limitation of standard EMAs where longer periods necessarily sacrifice recent price sensitivity.
Key Differences from Standard EMA:
Adaptive Regional Weighting: Applies stronger exponential decay to recent price data while maintaining appropriate weighting for historical context.
Maintains Responsiveness at Any Length: Unlike standard EMAs where longer periods become progressively less responsive, REMA preserves significant sensitivity to recent price action even at 100+ period lengths.
Mathematically Sound Enhancement: Preserves the core mathematical integrity of exponential averaging while introducing region-specific weighting that better reflects how traders actually interpret price action.
Value to TradingView Community:
Improved Signal Timing: Detects reversals 1-3 bars earlier than traditional EMAs without increasing false signals.
Better Multi-Timeframe Analysis: Provides more consistent behavior across different period settings, reducing conflicting signals between timeframes.
Ideal for Modern Markets: Better handles today's high-volatility, algorithm-driven markets where traditional indicators often lag too much to be effective.
Optimized for Both Trend and Reversal Trading: Simultaneously provides strong trend-following capabilities while remaining sensitive to legitimate reversal signals.
Computation Efficiency: The fast implementation offers enhanced capabilities with minimal computational overhead, making it practical for real-time analysis.
REMA fills a critical gap between lagging long-period EMAs and noisy short-period EMAs, giving traders a single, versatile tool that adapts to market conditions more effectively than standard technical indicators.
Implementation:
rema(src, length, recency_bias, transition_point)
Regional Exponential Moving Average that maintains recent price sensitivity even with long lookback periods
Parameters:
src (float) : Input source series
length (int) : Overall EMA period length
recency_bias (float) : Weighting factor to increase sensitivity to recent prices (1.0-3.0 recommended)
transition_point (float) : Percentage point (0.0-1.0) in the lookback period where weighting shifts from recent to historical
Returns: Custom exponentially weighted moving average with regional bias
rema_fast(src, length, recency_bias)
Simplified Regional EMA that uses a recursive calculation method
Parameters:
src (float) : Input source series
length (int) : Overall EMA period
recency_bias (float) : Factor to increase sensitivity to recent price (1.0-3.0 recommended)
Returns: Computationally efficient regional EMA
15분봉 50MAThis indicator displays the 50-period Simple Moving Average (SMA) from the 15-minute timeframe on your current chart (optimized for use on the 5-minute chart).
It helps short-term traders identify significant higher-timeframe support and resistance levels that are not visible in lower timeframes.
📌 Use cases:
Confirm pullback entries with the 15m 50MA as dynamic support.
Identify key levels for potential trend reversals or take-profit zones.
Works well with scalping, intraday, and breakout strategies.
✅ Compatible with Binance, Bybit, Bitget, and all TradingView crypto tickers.
Created with ❤️
15분봉 50MAThis indicator displays the 50-period Simple Moving Average (SMA) from the 15-minute timeframe on your current chart (optimized for use on the 5-minute chart).
It helps short-term traders identify significant higher-timeframe support and resistance levels that are not visible in lower timeframes.
📌 Use cases:
Confirm pullback entries with the 15m 50MA as dynamic support.
Identify key levels for potential trend reversals or take-profit zones.
Works well with scalping, intraday, and breakout strategies.
✅ Compatible with Binance, Bybit, Bitget, and all TradingView crypto tickers.
Created with ❤️ by tradingMaster
Watermark Stepped GridAdd a clean, professional watermark grid to any chart. “Watermark Stepped Grid” repeats your custom text in a diagonal or block pattern with adjustable rows, columns, font size, spacing, transparency, and optional semi‑transparent boxes—perfect for branding screenshots and shared analyses.