Doji Buy Signal (3-min, Body ≤ 6%)Doji Buy Signal (3-min, Body ≤ 6%) will give a buy signal when dojo candle is formed
Индикаторы и стратегии
3 Red Heikin Ashi with Higher Lows3 Red Heikin Ashi with Higher Lows. Will Give a Buy Signal when 3 Red Heikin Ashi with Higher Lows is formed
Natural Gas Intraday Strategy [15m] with Partial Profit & TrailBuy when:
1. Close > EMA 100 and EMA 20 > EMA 100
2. MACD (8,21,5) > Signal and histogram rising
3. RSI > 60
4. ATR > threshold (avoid flat market)
Sell when:
1. Close < EMA 100 and EMA 20 < EMA 100
2. MACD (8,21,5) < Signal and histogram falling
3. RSI < 40
4. ATR > threshold
Exit:
• SL = recent swing ± 0.5 ATR
• TP1 = 1 ATR, trail rest with EMA 20
Multi-Timeframe Trend Table - EMA Based Trend Analysis📊 Stay Aligned with Higher Timeframe Trends While Scalping
This powerful indicator displays real-time trend direction for 1-hour and 4-hour timeframes in a clean, easy-to-read table format. Perfect for traders who want to align their short-term trades with higher timeframe momentum.
🎯 Key Features
Multi-Timeframe Analysis: Monitor 1H and 4H trends while trading on any timeframe (3min, 5min, 15min, etc.)
EMA-Based Logic: Uses proven EMA 50 and EMA 100 crossover methodology
Visual Clarity: Color-coded table with green (uptrend) and red (downtrend) indicators
Customizable Display: Toggle EMA values and adjust table position
Real-Time Updates: Automatically refreshes with each bar close
Lightweight: Minimal resource usage with efficient data requests
📈 How It Works
The indicator determines trend direction using a simple but effective rule:
UPTREND: Price is above both EMA 50 AND EMA 100
DOWNTREND: Price is below either EMA 50 OR EMA 100
🔧 Settings
Show EMA Values: Display actual EMA 50/100 values in the table
Table Position: Choose from 4 corner positions (Top Right, Top Left, Bottom Right, Bottom Left)
Plot Current EMAs: Optional display of EMA lines on your current chart
💡 Trading Applications
✅ Trend Confirmation: Ensure your trades align with higher timeframe direction
✅ Risk Management: Avoid counter-trend trades in strong directional markets
✅ Entry Timing: Use lower timeframe for entries while respecting higher timeframe bias
✅ Scalping Enhancement: Perfect for 1-5 minute scalping with higher timeframe context
🎨 Visual Design
Clean, professional table design
Intuitive color coding (Green = Up, Red = Down)
Compact size that doesn't obstruct your chart
Clear typography for quick reading
📋 Perfect For
Day traders and scalpers
Swing traders seeking trend confirmation
Multi-timeframe analysis enthusiasts
Traders who want simple, effective trend identification
🚀 Easy Setup
Add to any chart (works on all timeframes)
Customize table position and settings
Start trading with higher timeframe awareness
Watch the table update automatically
No complex configurations needed - just add and trade!
This indicator is designed for educational and informational purposes. Always combine with proper risk management and your own analysis.
RWE (MASTER CƯỜNG BOSS)Tôi là một nhà giao dịch master, tôi muốn chia sẻ đến các bạn những chỉ báo tuyệt vời nhất
supertrendLibrary "supertrend"
supertrend : Library dedicated to different variations of supertrend
supertrend_atr(length, multiplier, atrMaType, source, highSource, lowSource, waitForClose, delayed)
supertrend_atr: Simple supertrend based on atr but also takes into consideration of custom MA Type, sources
Parameters:
length (simple int) : : ATR Length
multiplier (simple float) : : ATR Multiplier
atrMaType (simple string) : : Moving Average type for ATR calculation. This can be sma, ema, hma, rma, wma, vwma, swma
source (float) : : Default is close. Can Chose custom source
highSource (float) : : Default is high. Can also use close price for both high and low source
lowSource (float) : : Default is low. Can also use close price for both high and low source
waitForClose (simple bool) : : Considers source for direction change crossover if checked. Else, uses highSource and lowSource.
delayed (simple bool) : : if set to true lags supertrend atr stop based on target levels.
Returns: dir : Supertrend direction
supertrend : BuyStop if direction is 1 else SellStop
supertrend_bands(bandType, maType, length, multiplier, source, highSource, lowSource, waitForClose, useTrueRange, useAlternateSource, alternateSource, sticky)
supertrend_bands: Simple supertrend based on atr but also takes into consideration of custom MA Type, sources
Parameters:
bandType (simple string) : : Type of band used - can be bb, kc or dc
maType (simple string) : : Moving Average type for Bands. This can be sma, ema, hma, rma, wma, vwma, swma
length (simple int) : : Band Length
multiplier (float) : : Std deviation or ATR multiplier for Bollinger Bands and Keltner Channel
source (float) : : Default is close. Can Chose custom source
highSource (float) : : Default is high. Can also use close price for both high and low source
lowSource (float) : : Default is low. Can also use close price for both high and low source
waitForClose (simple bool) : : Considers source for direction change crossover if checked. Else, uses highSource and lowSource.
useTrueRange (simple bool) : : Used for Keltner channel. If set to false, then high-low is used as range instead of true range
useAlternateSource (simple bool) : - Custom source is used for Donchian Chanbel only if useAlternateSource is set to true
alternateSource (float) : - Custom source for Donchian channel
sticky (simple bool) : : if set to true borders change only when price is beyond borders.
Returns: dir : Supertrend direction
supertrend : BuyStop if direction is 1 else SellStop
supertrend_zigzag(length, history, useAlternativeSource, alternativeSource, source, highSource, lowSource, waitForClose, atrlength, multiplier, atrMaType)
supertrend_zigzag: Zigzag pivot based supertrend
Parameters:
length (simple int) : : Zigzag Length
history (simple int) : : number of historical pivots to consider
useAlternativeSource (simple bool)
alternativeSource (float)
source (float) : : Default is close. Can Chose custom source
highSource (float) : : Default is high. Can also use close price for both high and low source
lowSource (float) : : Default is low. Can also use close price for both high and low source
waitForClose (simple bool) : : Considers source for direction change crossover if checked. Else, uses highSource and lowSource.
atrlength (simple int) : : ATR Length
multiplier (simple float) : : ATR Multiplier
atrMaType (simple string) : : Moving Average type for ATR calculation. This can be sma, ema, hma, rma, wma, vwma, swma
Returns: dir : Supertrend direction
supertrend : BuyStop if direction is 1 else SellStop
zupertrend(length, history, useAlternativeSource, alternativeSource, source, highSource, lowSource, waitForClose, atrlength, multiplier, atrMaType)
zupertrend: Zigzag pivot based supertrend
Parameters:
length (simple int) : : Zigzag Length
history (simple int) : : number of historical pivots to consider
useAlternativeSource (simple bool)
alternativeSource (float)
source (float) : : Default is close. Can Chose custom source
highSource (float) : : Default is high. Can also use close price for both high and low source
lowSource (float) : : Default is low. Can also use close price for both high and low source
waitForClose (simple bool) : : Considers source for direction change crossover if checked. Else, uses highSource and lowSource.
atrlength (simple int) : : ATR Length
multiplier (simple float) : : ATR Multiplier
atrMaType (simple string) : : Moving Average type for ATR calculation. This can be sma, ema, hma, rma, wma, vwma, swma
Returns: dir : Supertrend direction
supertrend : BuyStop if direction is 1 else SellStop
zsupertrend(zigzagpivots, history, source, highSource, lowSource, waitForClose, atrMaType, atrlength, multiplier)
zsupertrend: Same as zigzag supertrend. But, works on already calculated array rather than Calculating fresh zigzag
Parameters:
zigzagpivots (array) : : Precalculated zigzag pivots
history (simple int) : : number of historical pivots to consider
source (float) : : Default is close. Can Chose custom source
highSource (float) : : Default is high. Can also use close price for both high and low source
lowSource (float) : : Default is low. Can also use close price for both high and low source
waitForClose (simple bool) : : Considers source for direction change crossover if checked. Else, uses highSource and lowSource.
atrMaType (simple string) : : Moving Average type for ATR calculation. This can be sma, ema, hma, rma, wma, vwma, swma
atrlength (simple int) : : ATR Length
multiplier (simple float) : : ATR Multiplier
Returns: dir : Supertrend direction
supertrend : BuyStop if direction is 1 else SellStop
msupertrend(bandType, source, maType, length, useTrueRange, highSource, lowSource, waitForClose, numberOfBands, multiplierStart, multiplierStep, trailingDistance, trailStates)
msupertrend : Dynamic trailing supertrend based on multiple bands - either bollinger bands or keltener channel
Parameters:
bandType (simple string) : : Band type - can be either bb or kc
source (float) : : custom source if required
maType (simple string) : : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length (simple int) : : Oscillator length - not used for TSI
useTrueRange (simple bool) : : if set to false, uses high-low.
highSource (float) : : Default is high. Can also use close price for both high and low source
lowSource (float) : : Default is low. Can also use close price for both high and low source
waitForClose (simple bool) : : Considers source for direction change crossover if checked. Else, uses highSource and lowSource.
numberOfBands (simple int) : : Number of bands to generate
multiplierStart (simple float) : : Starting ATR or Standard deviation multiplier for first band
multiplierStep (simple float) : : Incremental value for multiplier for each band
trailingDistance (simple int) : : Number of band states to trail for trailing stop.
trailStates (simple bool) : : If selected trails the band states along with trailing price. If unselected only price is trailed.
Returns: dir : Supertrend direction
supertrend : BuyStop if direction is 1 else SellStop
zigzagLibrary "zigzag"
Library dedicated to zigzags and related indicators
zigzag(length, numberOfPivots, useAlternativeSource, source, oscillatorSource, oscillatorHighSource, oscillatorLowSource, directionBias, divergenceOption)
zigzag: Calculates zigzag pivots and generates an array
Parameters:
length (int) : : Zigzag Length
numberOfPivots (simple int) : : Max number of pivots to return in the array. Default is 20
useAlternativeSource (simple bool) : : If set uses the source for genrating zigzag. Default is false
source (float) : : Alternative source used only if useAlternativeSource is set to true. Default is close
oscillatorSource (float) : : Oscillator source for calculating divergence
oscillatorHighSource (float)
oscillatorLowSource (float)
directionBias (int) : : Direction bias for calculating divergence
divergenceOption (int) : : 1 - hidden/regular, 2 - regular, 3 - hidden
Returns: zigzagpivots : Array containing zigzag pivots
zigzagpivotbars : Array containing zigzag pivot bars
zigzagpivotdirs : Array containing zigzag pivot directions (Lower High : 1, Higher High : 2, Lower Low : -2 and Higher Low : -1)
zigzagpivotratios : Array containing zigzag retracement ratios for each pivot
zigzagoscillators : Array of oscillator values at pivots. Will have valid values only if valid oscillatorSource is provided as per input.
zigzagoscillatordirs: Array of oscillator directions (HH, HL, LH, LL) at pivots. Will have valid values only if valid oscillatorSource is provided as per input.
zigzagtrendbias : Array of trend bias at pivots. Will have valid value only if directionBias series is sent in input parameters
zigzagdivergence : Array of divergence sentiment at each pivot. Will have valid values only if oscillatorSource and directionBias inputs are provided
newPivot : Returns true if new pivot created
doublePivot : Returns true if two new pivots are created on same bar (Happens in case of candles with long wicks and shorter zigzag lengths)
czigzag(length, numberOfPivots, highSource, lowSource, oscillatorHighSource, oscillatorLowSource, directionBias, divergenceOption)
czigzag: Calculates zigzag pivots and generates an array based on custom high and low source
Parameters:
length (int) : : Zigzag Length
numberOfPivots (simple int) : : Max number of pivots to return in the array. Default is 20
highSource (float) : : High Source for prices to calculate zigzag.
lowSource (float) : : Low source for prices to calculate zigzag.
oscillatorHighSource (float) : : Oscillator high source for calculating divergence
oscillatorLowSource (float) : : Oscillator high source for calculating divergence
directionBias (int) : : Direction bias for calculating divergence
divergenceOption (int) : : 1 - hidden/regular, 2 - regular, 3 - hidden
Returns: zigzagpivots : Array containing zigzag pivots
zigzagpivotbars : Array containing zigzag pivot bars
zigzagpivotdirs : Array containing zigzag pivot directions (Lower High : 1, Higher High : 2, Lower Low : -2 and Higher Low : -1)
zigzagpivotratios : Array containing zigzag retracement ratios for each pivot
zigzagoscillators : Array of oscillator values at pivots. Will have valid values only if valid oscillatorSource is provided as per input.
zigzagoscillatordirs: Array of oscillator directions (HH, HL, LH, LL) at pivots. Will have valid values only if valid oscillatorSource is provided as per input.
zigzagtrendbias : Array of trend bias at pivots. Will have valid value only if directionBias series is sent in input parameters
zigzagdivergence : Array of divergence sentiment at each pivot. Will have valid values only if oscillatorSource and directionBias inputs are provided
zigzagdoubledivergence : Array of double divergence sentiment at each pivot
newPivot : Returns true if new pivot created
doublePivot : Returns true if two new pivots are created on same bar (Happens in case of candles with long wicks and shorter zigzag lengths)
drawczigzag(length, numberOfPivots, highSource, lowSource, oscillatorHighSource, oscillatorLowSource, directionBias, showHighLow, showRatios, showDivergence, showDoubleDivergence, showIndicator, linecolor, linewidth, linestyle)
drawczigzag: Calculates and draws zigzag pivots and generates an array based on custom high and low source
Parameters:
length (int) : : Zigzag Length
numberOfPivots (simple int) : : Max number of pivots to return in the array. Default is 20
highSource (float) : : High Source for prices to calculate zigzag.
lowSource (float) : : Low source for prices to calculate zigzag.
oscillatorHighSource (float) : : Oscillator high source for calculating divergence
oscillatorLowSource (float) : : Oscillator high source for calculating divergence
directionBias (int) : : Direction bias for calculating divergence
showHighLow (simple bool) : : show highlow label
showRatios (simple bool) : : show retracement ratios
showDivergence (simple bool) : : Show divergence on label (Only works if divergence data is available - that is if we pass valid oscillatorSource and directionBias input)
showDoubleDivergence (simple bool) : : Show double divergence label
showIndicator (simple bool)
linecolor (color) : : zigzag line color
linewidth (int) : : zigzag line width
linestyle (string) : : zigzag line style
Returns: zigzagpivots : Array containing zigzag pivots
zigzagpivotbars : Array containing zigzag pivot bars
zigzagpivotdirs : Array containing zigzag pivot directions (Lower High : 1, Higher High : 2, Lower Low : -2 and Higher Low : -1)
zigzagpivotratios : Array containing zigzag retracement ratios for each pivot
zigzagoscillators : Array of oscillator values at pivots. Will have valid values only if valid oscillatorSource is provided as per input.
zigzagoscillatordirs: Array of oscillator directions (HH, HL, LH, LL) at pivots. Will have valid values only if valid oscillatorSource is provided as per input.
zigzagtrendbias : Array of trend bias at pivots. Will have valid value only if directionBias series is sent in input parameters
zigzagdivergence : Array of divergence sentiment at each pivot. Will have valid values only if oscillatorSource and directionBias inputs are provided
zigzagdoubledivergence : Array of double divergence sentiment at each pivot
zigzaglines : Returns array of zigzag lines
zigzaglabels : Returns array of zigzag labels
drawczigzag2(length, numberOfPivots, highSource, lowSource, oscillatorHighSource, oscillatorLowSource, directionBias, showHighLow, showRatios, showDivergence, showDoubleDivergence, showIndicator, linecolor, linewidth, linestyle)
drawczigzag2: Same as drawczigzag. But, returns newPivot and doublePivot bools as well.
Parameters:
length (int) : : Zigzag Length
numberOfPivots (simple int) : : Max number of pivots to return in the array. Default is 20
highSource (float) : : High Source for prices to calculate zigzag.
lowSource (float) : : Low source for prices to calculate zigzag.
oscillatorHighSource (float) : : Oscillator high source for calculating divergence
oscillatorLowSource (float) : : Oscillator high source for calculating divergence
directionBias (int) : : Direction bias for calculating divergence
showHighLow (simple bool) : : show highlow label
showRatios (simple bool) : : show retracement ratios
showDivergence (simple bool) : : Show divergence on label (Only works if divergence data is available - that is if we pass valid oscillatorSource and directionBias input)
showDoubleDivergence (simple bool) : : Show double divergence label
showIndicator (simple bool)
linecolor (color) : : zigzag line color
linewidth (int) : : zigzag line width
linestyle (string) : : zigzag line style
Returns: zigzagpivots : Array containing zigzag pivots
zigzagpivotbars : Array containing zigzag pivot bars
zigzagpivotdirs : Array containing zigzag pivot directions (Lower High : 1, Higher High : 2, Lower Low : -2 and Higher Low : -1)
zigzagpivotratios : Array containing zigzag retracement ratios for each pivot
zigzagoscillators : Array of oscillator values at pivots. Will have valid values only if valid oscillatorSource is provided as per input.
zigzagoscillatordirs: Array of oscillator directions (HH, HL, LH, LL) at pivots. Will have valid values only if valid oscillatorSource is provided as per input.
zigzagtrendbias : Array of trend bias at pivots. Will have valid value only if directionBias series is sent in input parameters
zigzagdivergence : Array of divergence sentiment at each pivot. Will have valid values only if oscillatorSource and directionBias inputs are provided
zigzagdoubledivergence : Array of double divergence sentiment at each pivot
zigzaglines : Returns array of zigzag lines
zigzaglabels : Returns array of zigzag labels
drawzigzag(length, numberOfPivots, useAlternativeSource, source, linecolor, linewidth, linestyle, oscillatorSource, oscillatorHighSource, oscillatorLowSource, directionBias, showHighLow, showRatios, showDivergence)
drawzigzag: Calculates and draws zigzag pivots
Parameters:
length (int) : : Zigzag Length
numberOfPivots (simple int) : : Max number of pivots to return in the array. Default is 20
useAlternativeSource (simple bool)
source (float) : : Alternative source used only if useAlternativeSource is set to true. Default is close
linecolor (color) : : zigzag line color
linewidth (int) : : zigzag line width
linestyle (string) : : zigzag line style
oscillatorSource (float) : : Oscillator source for calculating divergence
oscillatorHighSource (float)
oscillatorLowSource (float)
directionBias (int) : : Direction bias for calculating divergence
showHighLow (simple bool) : : show highlow label
showRatios (simple bool) : : show retracement ratios
showDivergence (simple bool) : : Show divergence on label (Only works if divergence data is available - that is if we pass valid oscillatorSource and directionBias input)
Returns: zigzagpivots : Array containing zigzag pivots
zigzagpivotbars : Array containing zigzag pivot bars
zigzagpivotdirs : Array containing zigzag pivot directions (Lower High : 1, Higher High : 2, Lower Low : -2 and Higher Low : -1)
zigzagpivotratios : Array containing zigzag retracement ratios for each pivot
zigzagoscillators : Array of oscillator values at pivots. Will have valid values only if valid oscillatorSource is provided as per input.
zigzagoscillatordirs: Array of oscillator directions (HH, HL, LH, LL) at pivots. Will have valid values only if valid oscillatorSource is provided as per input.
zigzagtrendbias : Array of trend bias at pivots. Will have valid value only if directionBias series is sent in input parameters
zigzagdivergence : Array of divergence sentiment at each pivot. Will have valid values only if oscillatorSource and directionBias inputs are provided
zigzaglines : Returns array of zigzag lines
zigzaglabels : Returns array of zigzag labels
_matrixLibrary "_matrix"
Library helps visualize matrix as array of arrays and enables users to use array methods such as push, pop, shift, unshift etc along with cleanup activities on drawing objects wherever required
delete(mtx, rowNumber)
deletes row from a matrix
Parameters:
mtx (matrix) : matrix of objects
rowNumber (int) : row index to be deleted
Returns: void
delete(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
delete(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
delete(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
delete(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
delete(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
delete(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
delete(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
delete(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
delete(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
remove(mtx, rowNumber)
remove row from a matrix and returns them to caller
Parameters:
mtx (matrix) : matrix of objects
rowNumber (int) : row index to be deleted
Returns: type
remove(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
remove(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
remove(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
remove(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
remove(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
remove(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
remove(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
remove(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
remove(mtx, rowNumber)
Parameters:
mtx (matrix)
rowNumber (int)
unshift(mtx, row, maxItems)
unshift array of lines to first row of the matrix
Parameters:
mtx (matrix) : matrix of lines
row (array) : array of lines to be inserted in row
maxItems (simple int)
Returns: resulting matrix of type
unshift(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
unshift(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
unshift(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
unshift(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
unshift(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
unshift(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
unshift(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
unshift(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
unshift(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
push(mtx, row, maxItems)
push array of lines to end of the matrix row
Parameters:
mtx (matrix) : matrix of lines
row (array) : array of lines to be inserted in row
maxItems (simple int)
Returns: resulting matrix of lines
push(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
push(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
push(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
push(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
push(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
push(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
push(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
push(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
push(mtx, row, maxItems)
Parameters:
mtx (matrix)
row (array)
maxItems (simple int)
shift(mtx)
shift removes first row from matrix of lines
Parameters:
mtx (matrix) : matrix of lines from which the shift operation need to be performed
Returns: void
shift(mtx)
Parameters:
mtx (matrix)
shift(mtx)
Parameters:
mtx (matrix)
shift(mtx)
Parameters:
mtx (matrix)
shift(mtx)
Parameters:
mtx (matrix)
shift(mtx)
Parameters:
mtx (matrix)
shift(mtx)
Parameters:
mtx (matrix)
shift(mtx)
Parameters:
mtx (matrix)
shift(mtx)
Parameters:
mtx (matrix)
shift(mtx)
Parameters:
mtx (matrix)
rshift(mtx)
rshift removes first row from matrix of lines and returns them as array
Parameters:
mtx (matrix) : matrix of lines from which the rshift operation need to be performed
Returns: type
rshift(mtx)
Parameters:
mtx (matrix)
rshift(mtx)
Parameters:
mtx (matrix)
rshift(mtx)
Parameters:
mtx (matrix)
rshift(mtx)
Parameters:
mtx (matrix)
rshift(mtx)
Parameters:
mtx (matrix)
rshift(mtx)
Parameters:
mtx (matrix)
rshift(mtx)
Parameters:
mtx (matrix)
rshift(mtx)
Parameters:
mtx (matrix)
rshift(mtx)
Parameters:
mtx (matrix)
pop(mtx)
pop removes last row from matrix of lines
Parameters:
mtx (matrix) : matrix of lines from which the pop operation need to be performed
Returns: void
pop(mtx)
Parameters:
mtx (matrix)
pop(mtx)
Parameters:
mtx (matrix)
pop(mtx)
Parameters:
mtx (matrix)
pop(mtx)
Parameters:
mtx (matrix)
pop(mtx)
Parameters:
mtx (matrix)
pop(mtx)
Parameters:
mtx (matrix)
pop(mtx)
Parameters:
mtx (matrix)
pop(mtx)
Parameters:
mtx (matrix)
pop(mtx)
Parameters:
mtx (matrix)
rpop(mtx)
rpop removes last row from matrix of lines and reutnrs the array to caller
Parameters:
mtx (matrix) : matrix of lines from which the rpop operation need to be performed
Returns: void
rpop(mtx)
Parameters:
mtx (matrix)
rpop(mtx)
Parameters:
mtx (matrix)
rpop(mtx)
Parameters:
mtx (matrix)
rpop(mtx)
Parameters:
mtx (matrix)
rpop(mtx)
Parameters:
mtx (matrix)
rpop(mtx)
Parameters:
mtx (matrix)
rpop(mtx)
Parameters:
mtx (matrix)
rpop(mtx)
Parameters:
mtx (matrix)
rpop(mtx)
Parameters:
mtx (matrix)
clear(mtx)
clear clears the matrix
Parameters:
mtx (matrix) : matrix of lines which needs to be cleared
Returns: void
clear(mtx)
Parameters:
mtx (matrix)
clear(mtx)
Parameters:
mtx (matrix)
clear(mtx)
Parameters:
mtx (matrix)
clear(mtx)
Parameters:
mtx (matrix)
clear(mtx)
Parameters:
mtx (matrix)
clear(mtx)
Parameters:
mtx (matrix)
clear(mtx)
Parameters:
mtx (matrix)
clear(mtx)
Parameters:
mtx (matrix)
clear(mtx)
Parameters:
mtx (matrix)
rclear(mtx)
clear clears the matrix but retains the drawing objects
Parameters:
mtx (matrix) : matrix of lines which needs to be cleared
Returns: void
rclear(mtx)
Parameters:
mtx (matrix)
rclear(mtx)
Parameters:
mtx (matrix)
rclear(mtx)
Parameters:
mtx (matrix)
rclear(mtx)
Parameters:
mtx (matrix)
rclear(mtx)
Parameters:
mtx (matrix)
rclear(mtx)
Parameters:
mtx (matrix)
rclear(mtx)
Parameters:
mtx (matrix)
rclear(mtx)
Parameters:
mtx (matrix)
rclear(mtx)
Parameters:
mtx (matrix)
arraysLibrary "arrays"
Library contains utility functions using arrays. These are mostly customized for personal use. Hence, will not add documentation to it.
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (int)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (float)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (bool)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (string)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (color)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (line)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (label)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (box)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (table)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (linefill)
maxItems (simple int)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
push(arr, val, maxItems)
Parameters:
arr (array)
val (int)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (float)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (bool)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (string)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (color)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (line)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (label)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (box)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (table)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (linefill)
maxItems (simple int)
enhanced_taLibrary "enhanced_ta"
ma(source, maType, length)
returns custom moving averages
Parameters:
source (float) : Moving Average Source
maType (simple string) : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length (simple int) : Moving Average Length
Returns: moving average for the given type and length
atr(maType, length)
returns ATR with custom moving average
Parameters:
maType (simple string) : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length (simple int) : Moving Average Length
Returns: ATR for the given moving average type and length
atrpercent(maType, length)
returns ATR as percentage of close price
Parameters:
maType (simple string) : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length (simple int) : Moving Average Length
Returns: ATR as percentage of close price for the given moving average type and length
bb(source, maType, length, multiplier, sticky)
returns Bollinger band for custom moving average
Parameters:
source (float) : Moving Average Source
maType (simple string) : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length (simple int) : Moving Average Length
multiplier (float) : Standard Deviation multiplier
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
Returns: Bollinger band with custom moving average for given source, length and multiplier
bbw(source, maType, length, multiplier, sticky)
returns Bollinger bandwidth for custom moving average
Parameters:
source (float) : Moving Average Source
maType (simple string) : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length (simple int) : Moving Average Length
multiplier (float) : Standard Deviation multiplier
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
Returns: Bollinger Bandwidth for custom moving average for given source, length and multiplier
bpercentb(source, maType, length, multiplier, sticky)
returns Bollinger Percent B for custom moving average
Parameters:
source (float) : Moving Average Source
maType (simple string) : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length (simple int) : Moving Average Length
multiplier (float) : Standard Deviation multiplier
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
Returns: Bollinger Percent B for custom moving average for given source, length and multiplier
kc(source, maType, length, multiplier, useTrueRange, sticky)
returns Keltner Channel for custom moving average
Parameters:
source (float) : Moving Average Source
maType (simple string) : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length (simple int) : Moving Average Length
multiplier (float) : Standard Deviation multiplier
useTrueRange (simple bool) : - if set to false, uses high-low.
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
Returns: Keltner Channel for custom moving average for given souce, length and multiplier
kcw(source, maType, length, multiplier, useTrueRange, sticky)
returns Keltner Channel Width with custom moving average
Parameters:
source (float) : Moving Average Source
maType (simple string) : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length (simple int) : Moving Average Length
multiplier (float) : Standard Deviation multiplier
useTrueRange (simple bool) : - if set to false, uses high-low.
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
Returns: Keltner Channel Width for custom moving average
kpercentk(source, maType, length, multiplier, useTrueRange, sticky)
returns Keltner Channel Percent K Width with custom moving average
Parameters:
source (float) : Moving Average Source
maType (simple string) : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length (simple int) : Moving Average Length
multiplier (float) : Standard Deviation multiplier
useTrueRange (simple bool) : - if set to false, uses high-low.
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
Returns: Keltner Percent K for given moving average, source, length and multiplier
dc(length, useAlternateSource, alternateSource, sticky)
returns Custom Donchian Channel
Parameters:
length (simple int) : - donchian channel length
useAlternateSource (simple bool) : - Custom source is used only if useAlternateSource is set to true
alternateSource (float) : - Custom source
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
Returns: Donchian channel
dcw(length, useAlternateSource, alternateSource, sticky)
returns Donchian Channel Width
Parameters:
length (simple int) : - donchian channel length
useAlternateSource (simple bool) : - Custom source is used only if useAlternateSource is set to true
alternateSource (float) : - Custom source
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
Returns: Donchian channel width
dpercentd(length, useAlternateSource, alternateSource, sticky)
returns Donchian Channel Percent of price
Parameters:
length (simple int) : - donchian channel length
useAlternateSource (simple bool) : - Custom source is used only if useAlternateSource is set to true
alternateSource (float) : - Custom source
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
Returns: Donchian channel Percent D
oscillatorRange(source, method, highlowLength, rangeLength, sticky)
oscillatorRange - returns Custom overbought/oversold areas for an oscillator input
Parameters:
source (float) : - Osillator source such as RSI, COG etc.
method (simple string) : - Valid values for method are : sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
highlowLength (simple int) : - length on which highlow of the oscillator is calculated
rangeLength (simple int) : - length used for calculating oversold/overbought range - usually same as oscillator length
sticky (simple bool) : - overbought, oversold levels won't change unless crossed
Returns: Dynamic overbought and oversold range for oscillator input
oscillator(type, length, shortLength, longLength, source, highSource, lowSource, method, highlowLength, sticky)
oscillator - returns Choice of oscillator with custom overbought/oversold range
Parameters:
type (simple string) : - oscillator type. Valid values : cci, cmo, cog, mfi, roc, rsi, stoch, tsi, wpr
length (simple int) : - Oscillator length - not used for TSI
shortLength (simple int) : - shortLength only used for TSI
longLength (simple int) : - longLength only used for TSI
source (float) : - custom source if required
highSource (float) : - custom high source for stochastic oscillator
lowSource (float) : - custom low source for stochastic oscillator
method (simple string) : - Valid values for method are : sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
highlowLength (simple int) : - length on which highlow of the oscillator is calculated
sticky (simple bool) : - overbought, oversold levels won't change unless crossed
Returns: Oscillator value along with dynamic overbought and oversold range for oscillator input
multibands(bandType, source, maType, length, useTrueRange, sticky, numberOfBands, multiplierStart, multiplierStep)
multibands - returns Choice of oscillator with custom overbought/oversold range
Parameters:
bandType (simple string) : - Band type - can be either bb or kc
source (float) : - custom source if required
maType (simple string) : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length (simple int) : - Oscillator length - not used for TSI
useTrueRange (simple bool) : - if set to false, uses high-low.
sticky (simple bool) : - for sticky borders which only change upon source crossover/crossunder
numberOfBands (simple int) : - Number of bands to generate
multiplierStart (simple float) : - Starting ATR or Standard deviation multiplier for first band
multiplierStep (simple float) : - Incremental value for multiplier for each band
Returns: array of band values sorted in ascending order
mbandoscillator(bandType, source, maType, length, useTrueRange, stickyBands, numberOfBands, multiplierStart, multiplierStep)
mbandoscillator - Multiband oscillator created on the basis of bands
Parameters:
bandType (simple string) : - Band type - can be either bb or kc
source (float) : - custom source if required
maType (simple string) : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length (simple int) : - Oscillator length - not used for TSI
useTrueRange (simple bool) : - if set to false, uses high-low.
stickyBands (simple bool) : - for sticky borders which only change upon source crossover/crossunder for band detection
numberOfBands (simple int) : - Number of bands to generate
multiplierStart (simple float) : - Starting ATR or Standard deviation multiplier for first band
multiplierStep (simple float) : - Incremental value for multiplier for each band
Returns: oscillator currentStates - Array containing states for last n bars
timer(timeStart, timeEnd)
finds difference between two timestamps
Parameters:
timeStart (int) : - start timestamp
timeEnd (int)
arrayutilsLibrary "arrayutils"
delete(arr, index)
remove an item from array at specific index. Also deletes the item
Parameters:
arr (array) : - array from which the item needs to be deleted
index (int) : - index of item to be deleted
Returns: void
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
delete(arr, index)
Parameters:
arr (array)
index (int)
pop(arr)
remove the last item from array. Also deletes the item
Parameters:
arr (array) : - array from which the last item needs to be removed and deleted
Returns: void
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
pop(arr)
Parameters:
arr (array)
shift(arr)
remove an item from array at index 0. Also deletes the item
Parameters:
arr (array) : - array from which the first item needs to be removed and deleted
Returns: void
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
shift(arr)
Parameters:
arr (array)
unshift(arr, val, maxItems)
add an item to the beginning of an array with max items cap
Parameters:
arr (array) : - array to which the item needs to be added at the beginning
val (int) : - value of item which needs to be added
maxItems (simple int) : - max items array can hold. After that, items are removed from the other end
Returns: resulting array
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (float)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (bool)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (string)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (color)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (line)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (label)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (box)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (table)
maxItems (simple int)
unshift(arr, val, maxItems)
Parameters:
arr (array)
val (linefill)
maxItems (simple int)
clear(arr)
remove and delete all items in an array
Parameters:
arr (array) : - array which needs to be cleared
Returns: void
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
clear(arr)
Parameters:
arr (array)
push(arr, val, maxItems)
add an item to the end of an array with max items cap
Parameters:
arr (array) : - array to which the item needs to be added at the beginning
val (int) : - value of item which needs to be added
maxItems (simple int) : - max items array can hold. After that, items are removed from the starting index
Returns: resulting array
push(arr, val, maxItems)
Parameters:
arr (array)
val (float)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (bool)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (string)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (color)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (line)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (label)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (box)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (table)
maxItems (simple int)
push(arr, val, maxItems)
Parameters:
arr (array)
val (linefill)
maxItems (simple int)
check_overflow(a, b, c, pivots, barArray)
finds difference between two timestamps
Parameters:
a (float)
b (float)
c (float)
pivots (array) : pivots array
barArray (array) : pivot bar array
Returns: bool overflow
get_trend_series(pivots, length, highLow, trend)
finds series of pivots in particular trend
Parameters:
pivots (array) : pivots array
length (int) : length for which trend series need to be checked
highLow (int) : filter pivot high or low
trend (int) : Uptrend or Downtrend
Returns: int trendIndexes
get_trend_series(pivots, firstIndex, lastIndex)
finds series of pivots in particular trend
Parameters:
pivots (array) : pivots array
firstIndex (int) : First index of the series
lastIndex (int) : Last index of the series
Returns: int trendIndexes
sma(source)
calculates sma for elements in array
Parameters:
source (array) : source array
Returns: float sma
ema(source, length)
calculates ema for elements in array
Parameters:
source (array) : source array
length (simple int) : ema length
Returns: float ema
rma(source, length)
calculates rma for elements in array
Parameters:
source (array) : source array
length (simple int) : rma length
Returns: float rma
wma(source, length)
calculates wma for elements in array
Parameters:
source (array) : source array
length (simple int) : wma length
Returns: float wma
hma(source, length)
calculates hma for elements in array
Parameters:
source (array) : source array
length (simple int) : hma length
Returns: float hma
ma(source, matype, length)
wrapper for all moving averages based on array
Parameters:
source (array) : source array
matype (simple string) : moving average type. Valud values are: sma, ema, rma, wma, hma, high, low, median, medianHigh, medianLow
length (simple int) : moving average length length
Returns: float moving average
getFibSeries(numberOfFibs, start)
gets fib series in array
Parameters:
numberOfFibs (simple int) : number of fibs
start (simple int) : starting number
Returns: float fibArray
Custom Choppiness HistogramThe Custom Choppiness Histogram is a visually enhanced, multi-timeframe version of the traditional Choppiness Index , designed to make it easier to spot when the market is trending vs. ranging.
🔹 Key Features:
Histogram Visualization: Clear, color-coded bars for instant interpretation.
Two Coloring Modes:
1.Change Mode → Colors based on increase/decrease vs. previous CI value.
2.Absolute Levels → Uses common CI thresholds (e.g., >61.8 = choppy, <38.2 = trending).
Grey Bars / Neutral Zone: Bars turn grey when the market is neither strongly trending nor strongly choppy — signaling a neutral or indecisive market.
Multi-Timeframe Option: Analyze Choppiness from any higher timeframe while trading on a lower chart.
Custom Thresholds: Adjust high/low CI levels to fit your strategy.
🔹 How to Use:
Green bars → Market is becoming more trending.
Red bars → Market is becoming more choppy/ranging.
Grey bars → Market is in a neutral zone; use caution and combine with other signals.
Use the timeframe input to filter trades (e.g., check if the 1H is trending before entering on the 5M).
🔹 Best Practice:
Use as a context filter alongside your entry/exit strategy (e.g., MACD, ICT/Smart Money, Supply & Demand).
Helps reduce false entries by avoiding trades during sideways conditions.
⚠️ Disclaimer:
This script is provided for educational purposes only. It is not financial advice and should not be used as a sole basis for making trading decisions. Always do your own research and test thoroughly before applying to live markets. Trading carries risk, and you are solely responsible for your decisions.
Nth Candle by exp3rtsThis lightweight and versatile TradingView indicator highlights every Xth candle on your chart, making it easy to spot cyclical price behavior or track specific intervals in the market.
- Custom Interval – Choose how often candles should be highlighted (e.g., every 5th, 10th, or
20th bar).
- Color Coding – Highlighted candles are shaded green if bullish and red if bearish, giving you
quick visual insights into momentum at those intervals.
- Clean Overlay – The indicator draws directly on your main chart without clutter, so you can
combine it with your favorite setups and strategies.
Use this tool to:
1) Identify repeating patterns and cycles
2) Mark periodic reference candles
3) Support discretionary trading decisions with clear visual cues
RSI Prior DayLagged RSI indicator showing the prior day's RSI(14) value for easy divergence detection. Plot it alongside current RSI to spot bullish/bearish signals. Ideal for swing traders scanning for momentum shifts.
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.
Open Range Breakout (ORB) with Alerts and LabelsThis is a classic 5min ORB indicator that highlights the orb range for your chosen session. This makes it easy to reference the range later in the trading day. In addition to the original orb signals for both buy and sell you can play off that zone for powerful entries later in the session. The signals give TP1 1:1 TP2 2:1
Options
You can set the name of the session
The color of the range.
The buffer for the SL
How many entries for the orb
EQ + Bandas Pro 📊 EQ + Bands Pro is an advanced indicator built on OHLC analysis. It calculates a synthetic equilibrium price and plots dynamic, robust bands that adapt to volatility while filtering outliers. The tool highlights zones of overvaluation and undervaluation, helping traders identify key imbalances, potential reversals, and trend confirmations.
Basic ICT PD Array MarkerIt focuses on OBs and FVGs on your chosen timeframe (e.g., H1 for /NQ). This is open-source friendly and based on ICT logic from community scripts.
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
FibPulse144 [CHE] FibPulse144 — ADX-gated 13/21 crossover with 144-trend regime and closed-bar labels
Summary
FibPulse144 combines a fast moving-average crossover with a 144-period trend regime and an ADX strength gate. Signals are confirmed on closed bars only and drawn as labels on the price chart, while an ADX line in a separate pane provides context. Color gradients are derived from normalized ADX, so visual intensity reflects trend strength without changing the underlying logic. The approach reduces false flips during weak conditions and keeps entries aligned with the dominant trend.
Motivation: Why this design?
Traditional crossover signals can flip repeatedly during sideways phases and often trigger against the higher-time regime. By requiring alignment with a slower trend proxy and by gating entries through a rising ADX condition, FibPulse144 favors structurally cleaner transitions. Gradient coloring communicates strength visually, helping users temper aggressiveness without additional indicators.
What’s different vs. standard approaches?
Baseline: Classic dual-MA crossover with unconditional signals.
Architecture differences:
Two-bar regime confirmation against a 144-period trend average.
Pending-signal logic that waits for regime and optional ADX approval.
ADX strength gate using the prior reading relative to a user threshold and earlier value.
Gradient colors scaled by an ADX window with gamma controls.
Price-chart labels enforced via overlay on an otherwise pane-based indicator.
Practical effect: Fewer signals during weak or choppy conditions, labels that appear only after a bar closes, and color intensity that mirrors trend quality.
How it works (technical)
The script computes fast and slow moving averages using the selected method and lengths. A separate 144-length average defines the regime using a two-bar confirmation above or below it. Crossovers are observed on the previous bar to avoid intrabar ambiguity; once a prior crossover is detected, it is stored as pending. A pending long requires regime alignment and, if enabled, an ADX condition based on the previous reading being above the threshold and greater than an earlier reading. The state machine holds neutral, long, or short until an exit condition or ADX reset is met. ADX is normalized within a user window, scaled with gamma, and mapped to up and down color palettes to render gradients. Labels on the price panel are forced to overlay, while the ADX line and threshold guide remain in a separate pane.
Parameter Guide
Source — Input data for all calculations. Default: close. Tip: keep consistent with your chart.
MA Type — EMA or SMA. Default: EMA. EMA reacts faster; SMA is smoother.
Fast / Slow — Fast and slow lengths for crossover. Defaults: 13 and 21. Shorter reacts earlier; longer reduces noise.
Trend — Regime average length. Default: 144. Larger values stabilize regime; smaller values increase sensitivity.
Use 144 as trend filter — Enables regime gating. Default: true. Disable to allow raw crossovers.
Use ADX filter — Requires ADX strength. Default: true. Disable to allow signals regardless of strength.
ADX Len — DI and ADX smoothing length. Default: 14. Higher values smooth strength; lower values react faster.
ADX Thresh — Minimum strength for signals. Default: 25. Raise to reduce flips; lower to capture earlier moves.
Entry/Exit labels (price) — Price-panel labels on state changes. Default: true.
Signal labels in ADX pane — Small markers at the ADX value on entries. Default: true.
Label size — tiny, small, normal, large. Default: normal.
Enable barcolor — Optional candle tint by regime and gradient. Default: false.
Enable gradient — Turns on ADX-driven color blending. Default: true.
Window — Bars used to normalize ADX for colors. Default: 100; minimum: 5.
Gamma bars / Gamma plots — Nonlinear scaling for bar and line intensities. Default: 0.80; between 0.30 and 2.00.
Gradient transp (0–90) — Transparency for gradient colors. Default: 0.
MA fill transparency (0–100) — Fill opacity between fast and slow lines. Default: 65.
Palette colors (Up/Down) — Dark and neon endpoints for up and down gradients. Defaults as in the code.
Reading & Interpretation
Fast/Slow lines: When the fast line is above the slow line, the line and fill use the long palette; when below, the short palette is used.
Trend MA (144): Neutral gray line indicating the regime boundary.
Labels on price: “LONG” appears when the state turns long; “SHORT” when it turns short. Labels appear only after the bar closes and conditions are satisfied.
ADX pane: The ADX line shows current strength. The dotted threshold line is the user level for gating. Optional small markers indicate entries at the ADX value.
Bar colors (optional): Candle tint intensity reflects normalized ADX. Higher intensity implies stronger conditions.
Practical Workflows & Combinations
Trend following: Use long entries when fast crosses above slow and price has held above the trend average for two bars, with ADX above threshold. Mirror this for shorts below the trend average.
Exits and stops: Consider reducing exposure when price closes on the opposite side of the trend average for two consecutive bars or when ADX fades below the threshold if the ADX filter is enabled.
Structure confirmation: Combine with higher-timeframe structure such as swing highs and lows or a simple market structure overlay for confirmation.
Multi-asset/Multi-TF: Works across liquid assets. For lower timeframes, consider a slightly lower ADX threshold; for higher timeframes, maintain or raise the threshold to avoid unnecessary flips.
Behavior, Constraints & Performance
Repaint/confirmation: Signals are based on previous-bar crossovers and are confirmed on bar close. No higher-timeframe or security calls are used. Intrabar markers are not relied upon.
Resources: The script declares `max_bars_back` of 2000, uses no loops or arrays, and employs persistent variables for pending signals and state.
Known limits: Crossover systems can lag after sudden reversals. During tight ranges, disabling the ADX filter may increase flips; keeping it enabled may skip early transitions.
Sensible Defaults & Quick Tuning
Starting point: EMA, 13/21/144, ADX length 14, ADX threshold 25, gradients on, barcolor off.
Too many flips: Increase ADX threshold or length; increase trend length; consider SMA instead of EMA.
Too sluggish: Lower ADX threshold slightly; shorten fast and slow lengths; reduce the trend length.
Colors overpowering: Increase gradient transparency or reduce gamma values toward one.
What this indicator is—and isn’t
This is a visualization and signal layer that combines crossover, regime, and strength gating. It does not predict future movements, manage risk, or execute trades. Use it alongside clear structure, risk controls, and a defined position management plan.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
Harry Dunn Volatility BandsEnter strike price and 2 percentage numbers to automatically calculate and draw volatility bands on chart.