Kyal
Kyal
type == 'SMA' ? ta.sma(source, length) : type == 'EMA' ? ta.ema(source, length) : type == 'HMA' ?
ta.hma(source, length) : type == 'SMMA (RMA)' ? ta.rma(source, length) : type == 'WMA' ?
ta.wma(source, length) : type == 'VWMA' ? ta.vwma(source, length) : na
show_ma1 = input(false, '►Short MA', inline = 'MA #1', display = display.data_window, group =
MA_GROUP)
ma1_type = input.string('EMA', '', inline = 'MA #1', options = ['SMA', 'EMA', 'HMA', 'SMMA (RMA)',
'WMA', 'VWMA'])
plot(show_ma1 ? ma1 : na, color = ma1_color, title = 'Short MA', linewidth = 2,offset=0,
force_overlay = true)
ma2_type = input.string('EMA', '', inline = 'MA #2', options = ['SMA', 'EMA', 'HMA', 'SMMA (RMA)',
'WMA', 'VWMA'])
plot(show_ma2 ? ma2 : na, color = ma2_color, title = 'Long MA', linewidth = 2,offset=0,force_overlay
= true)
// Crossover Detection
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at
https://mozilla.org/MPL/2.0/
// © ask2maniish
//@version=6
import TradingView/ta/9
tip2 = "1. Volume Spike-High volume surge-Orange- 🔥 \n2. Extreme Low Volume-Lowest activity-
purple🟣\n3. Higher Volume (Above Avg.)- Strong increase in volume -Lime Green🟢\n4. Higher
Volume (Below Avg.)- Weak increase in volume -Green🟩\n5. Lower Volume (Above Avg.)- High but
declining volume -Maroon🟥\n6. Lower Volume (Below Avg.)- Weak market participation -Red🔴\n7.
Default (Neutral Volume)- No significant change -Gray⚪"
tip3 = "Direction to understand:->[(A:) BullTrend Condition = Long-term < Mid-term and Mid-term <
Short-term & (B:) BearTrend Condition = Long-term > Mid-term and Mid-term > Short-term]1.🟢
Green line for Uptrend, 2. 🔴 Red line for Downtrend, 3. 🟡 Yellow line for Sideways"
tip5 = "Divides the main period by this number to get confirmation length"
tip9 = "Select no. of Support/Resistance zone. In this zones there are solid lines or dashed lines.
Interpretation:-->> 🟡This logic dynamically adjusts how a line is displayed based on candle size:🟡If
the candle is relatively large (> 1.5 of normalized size), a solid line is used.🟡If it's not as large but still
big (> 1), a dashed line is used.🟡This can be useful in indicators where candle size plays a role in
visualization, such as strength of the zones,trend analysis or volatility detection."
tip10 = "Direction to understand:->[(A:) BullTrend Condition = Ema200 < Long-term and Long-term <
Mid-term and Mid-term < Short-term & (B:) Ema200 > Long-term and Long-term > Mid-term and
Mid-term > Short-term]1.🟢 Green line for Uptrend, 2. 🔴 Red line for Downtrend, 3. 🟡 Yellow line for
Sideways"
options=["Top Left", "Top Right", "Bottom Left", "Bottom Right", "Middle Left","Middle Right"])
atrLength = 14
// Calculate VWAP
vwap = ta.vwap
candle1_high = high[2]
candle1_low = low[2]
candle2_high = high[1]
candle2_low = low[1]
candle3_high = high
candle3_low = low
validBullishFVG = candle1_high < candle3_low // First candle’s high < Last candle’s low (Gap exists)
validBearishFVG = candle1_low > candle3_high // First candle’s low > Last candle’s high (Gap exists)
currentVolume = volume
previousVolume = nz(volume[1])
atrValue = ta.atr(atrLength)
// Volume Conditions
isExtremeLow ? getColor(color.purple) :
getColor(color.gray)
bgcolor(showLiquidityZones ? (close > liqHigh ? color.green : close < liqLow ? color.red : na) : na)
// Alerts
alertcondition(close > liqHigh, title="Price Above Liquidity Zone", message="Price has entered above
the liquidity high zone!")
alertcondition(close < liqLow, title="Price Below Liquidity Zone", message="Price has entered below
the liquidity low zone!")
position.middle_right
isHigher ? (isAboveAvg ? "🟩 Higher Volume (Above ▲ Avg.)" : "🟢 Higher Volume (Below ▼
Avg.)") :
//////////////////////////////////////////////////////////////////////////////////////////////////////////
"Moving Average"
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////
type == 'SMA' ? ta.sma(source, length) : type == 'EMA' ? ta.ema(source, length) : type == 'HMA' ?
ta.hma(source, length) : type == 'SMMA (RMA)' ? ta.rma(source, length) : type == 'WMA' ?
ta.wma(source, length) : type == 'VWMA' ? ta.vwma(source, length) : na
show_ma1 = input(false, 'Short-term MA ', inline='MA #1', group='Short term Moving Average')
ma1_type = input.string('EMA', '', inline='MA #1', options=['SMA', 'EMA', 'HMA', 'SMMA (RMA)',
'WMA', 'VWMA'])
show_ma2 = input(false, 'Mid-term MA', inline='MA #2', group='Mid term Moving Average')
ma2_type = input.string('EMA', '', inline='MA #2', options=['SMA', 'EMA', 'HMA', 'SMMA (RMA)',
'WMA', 'VWMA'])
show_ma3 = input(false, 'Long-trme MA ✅', inline='MA #3', group='Long term Moving Average')
show_trend = input(false, "Show Trend Detection of Long-term MA ✅", group='Trend Detection using
Long-term MA ✅', tooltip = tip3, inline = "show_trend")
bullTrend = Longterm < Midterm and Midterm < Shortterm // Bullish Trend Condition
bearTrend_200 = Ema200 > Longterm and Longterm > Midterm and Midterm > Shortterm // Bearish
Trend Condition
bullTrend_200 = Ema200 < Longterm and Longterm < Midterm and Midterm < Shortterm // Bullish
Trend Condition
// // Plot Longterm EMA with trend color when trend detection is enabled
//Plot EMA 200 with trend color when trend detection is enabled
////////////////////////////////////////////////////////////////////////////////////////// "Resistance
& Support using Pivot Method & Fractal Method"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Multi-Timeframe Confirmation
// Volume Filter
if shift_val >= 0
if not na(ph_pivot) and not na(ph_fractal[shift_val]) and volConfirm and not na(ph_mtf)
level_high := high
level_high_index := bar_index
if not na(pl_pivot) and not na(pl_fractal[shift_val]) and volConfirm and not na(pl_mtf)
level_low := low
level_low_index := bar_index
else
if not na(ph_fractal) and not na(ph_pivot[-shift_val]) and volConfirm and not na(ph_mtf)
level_high := high
level_high_index := bar_index
if not na(pl_fractal) and not na(pl_pivot[-shift_val]) and volConfirm and not na(pl_mtf)
level_low := low
level_low_index := bar_index
// === Determine Plot Offset ===
//////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////// "IMBALANCE"
//////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////
// Imbalance Filters
fvgisUp(index) =>
fvgisDown(index) =>
fvgisObUp(index) =>
fvgisDown(index + 1) and fvgisUp(index) and close[index] > high[index + 1] and filt_up > filter
fvgisObDown(index) =>
fvgisUp(index + 1) and fvgisDown(index) and close[index] < low[index + 1] and filt_dn > filter
//text_percentage_value=show_IMB_value
//////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////// "Support & Resistance"
//////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////
bool show_sr = input.bool(true, " " ,group = "Support & Resistance", inline = "sr")
int len = input.int(10, "Support/Resistance", group = "Support & Resistance", inline = "sr")
int no_of_rs = input.int(6, "Select no. of Support/Resistance", step=1 ,group = "Support &
Resistance", inline = "sr", tooltip = tip9)
norm_candle_size() =>
draw_levels() =>
if big_candle
if not na(PH)
if not na(PL)
for i = 0 to array.size(lines) - 1
box.set_bgcolor(box_id, ber_col)
box.set_bgcolor(box_id, bul_col)
line.delete(array.shift(lines))
box.delete(array.shift(boxes))
if show_sr
draw_levels()
//////////////// Logo /////////////