AURUM-5 Gold Engine (Trend+VWAP MR+EBP, 5m)The Alchemist — Gold (AURUM-5)
What it is:
A 5-minute, session-aware gold strategy that blends three complementary “engines” to catch the best intraday rotations on XAUUSD/GC:
Trend Pullback — trades with the prevailing move after shallow pullbacks.
VWAP Mean-Reversion — fades stretched moves back toward value when trend pressure is light.
EBP Sweep — a simple, fast “liquidity sweep & reclaim/reject” candle read that flips early inflection points.
It’s built for clean execution and risk discipline: dollar-based sizing, ATR-anchored stops, $2.5 grid rounding, session caps, and cooldowns to prevent over-trading.
نماذج فنيه
Volume % + OBV intensity + histogram (v6)1) Volume % (logic that already existed)
• Average volume at the last 20 days =
• Average level → 50%
• More than double the average → **100%**
• Mapping between 0 and 100%
2) OBV % (newly added)
• Look at the OBV change compared to the previous bar
• obvChange = obv - obv
• Compare the absolute value of this change (the magnitude of the force) to the average change in the last 20 bars
• Average level → 50%
• More than double the average → 100%
• Use the value from 0 to 100% as obvPercent
3) Long/Short Section Judgment (OBV basis)
• obvChange > 0 이고 obvPercent >= 60 →
👉 Good section to enter long (buying energy is strong) → Green number
• obvChange < 0 이고 obvPercent >= 60 →
👉 Short entry decent section (sell energy strong) → Red number
myOpenPrice2Displays current session Open price as a line to make it easy to see where the market is in relation regardless of the zoom level of the chart.
ILM & IFVG StrategyPlease feel free to adjust in any way possible. Let me know if you can create something better from this initial coding.
//═══════════════════════════════════════════════════════════════════════
// Inverted Liquidity Model (ILM) – Strategy
//═══════════════════════════════════════════════════════════════════════
//
// The **Inverted Liquidity Model (ILM)** is a liquidity-based algorithm
// built to capture high-probability reversals after:
//
// • A liquidity sweep (SSL/BSL taken)
// • Rejection back inside the range
// • A Fair Value Gap (FVG) forms
// • That FVG becomes invalidated → becomes an IFVG entry zone
//
// ILM combines:
// • LTF BOS / CHOCH structure confirmation
// • HTF structure (expansion) filtering
// • Premium / Discount filter (17:00 CST session midline)
// • Optional ATR volatility filter
// • Optional trading session restrictions
// • Optional partial profit-taking + runners
//
// When all conditions align, the strategy enters:
// ✔ Long after sweep of SSL + valid long IFVG + trend confirmation
// ✔ Short after sweep of BSL + valid short IFVG + trend confirmation
//
// Stops are placed at the sweep wick.
// Full target is set at the next structural high/low.
// Optional partial TP sends a runner to full target.
//
// Visual tools (labels, sweep lines, IFVG boxes, midline) assist
// with review and forward testing.
//
//───────────────────────────────────────────────────────────────────────
// USER CONFIGURABLE FEATURES
//───────────────────────────────────────────────────────────────────────
//
// • **Liquidity & Structure**
// - pivotLen → swing length for pivots / liquidity
// - htfOn → toggle higher-timeframe pivots
// - htfTF → timeframe for HTF structure/liquidity
// - useStructureFilter → enforce LTF BOS/CHOCH trend
// - useHtfExpansionFilter → enforce HTF trend
// - showStructureLabels → show BOS/CHOCH labels
// - showHtfStructureLabels → show HTF BOS/CHOCH labels
//
// • **Premium / Discount Midline**
// - usePremiumDiscountFilter → only long in discount / short in premium
// - pdSession → session used for midline (default 17:00 CST)
// - showPdMidLine → show 50% midline
//
// • **FVG / IFVG Detection**
// - useBodyGapFVG → FVG uses candle bodies instead of wicks
// - useDisplacementFVG → require displacement bar
// - dispAtrMult → minimum ATR threshold for displacement
// - showIFVG → draw IFVG boxes
//
// • **ATR / Volatility / Sessions**
// - useRangeFilter → require minimum ATR%
// - atrLen → ATR period
// - minAtrPerc → minimum ATR% of price
// - useSessionFilter → restrict trading hours
// - sessionTimes → allowed trading session
//
// • **Sweep Visualization**
// - showSweepLines → draw sweep lines at SSL/BSL sweeps
// - sweepLineWidth → thickness of sweep lines
//
// • **Exits: Partial Targets & Runners**
// - usePartialTargets → enable partial TP logic
// - tp1QtyPercent → percent closed at TP1
// - tp1FractionOfPath → TP1 relative to path to full target
//
// • **Formatting / Visibility**
// - labelFontSizeInput → tiny / small / normal / large / huge
// - showEntries → entry markers
// - showTargets → target lines
//
//═══════════════════════════════════════════════════════════════════════
// END OF STRATEGY DESCRIPTION
//═══════════════════════════════════════════════════════════════════════
ITM EMA Scalper (9/15) + Dual Index ConfirmationITM EMA Scalper (9/15) + Dual Index Confirmation is a precision scalping tool designed for traders who want high-probability entries, tight risk, and clean momentum trades using ITM options on NIFTY & BANKNIFTY.
This indicator combines price action, EMA trend filters, momentum candle logic, and a dual-index confirmation system to eliminate fake signals and catch only high-quality moves.
🔥 Core Logic
This indicator uses:
9 EMA & 15 EMA for trend direction
EMA angle filter (≥30°) to ensure strong directional momentum
Momentum candle detection (Pin Bar, Big Body, Rejection Candle)
EMA touch/rejection logic for precision entries
Dual index alignment (NIFTY + BANKNIFTY) for institutional-level confirmation
Trades occur only when both indices agree, dramatically reducing false setups.
🎯 Entry Conditions
A BUY signal appears when:
9 EMA > 15 EMA
Both EMAs have strong upward slope
Momentum candle forms while touching/near EMAs
Candle closes bullish
Confirmation index (e.g., BankNifty) also bullish
A SELL signal is the exact opposite.
🛡 Risk Management Built-In
For every valid setup, the indicator automatically plots:
Entry level (break of candle high/low)
Stop-loss level (low/high of signal candle)
1:2 Risk–Reward Target
These lines extend until target or SL is hit (or are cleared automatically after N bars).
🧠 Why ITM Options?
Using ITM options gives:
Higher delta
Faster momentum capture
Lower time decay impact
Cleaner correlation with spot movement
Perfect for scalping.
📈 Ideal Timeframe
Designed for 5-minute charts
Works for both NIFTY and BANKNIFTY
⚡ Alerts Included
BUY Alert
SELL Alert
These alerts trigger exactly when the strategy identifies a high-probability setup.
🚫 Avoid False Signals
This indicator prevents trades if:
Trend is flat
EMAs lose angle
Opposite index contradicts the setup
Candle lacks momentum
Market is choppy or sideways
💡 Perfect For
Scalpers
Index option traders
ITM directional traders
Algo traders needing clean signal logic
Momentum strategy users
Screener: Multi-Timeframe CRT / ORB [Yosiet]Are you tired of manually scanning dozens of charts across different timeframes, searching for that perfect reversal setup? What if you could have a system that does the heavy lifting for you, pinpointing high-probability reversal patterns across the entire market in real-time?
Several names for the same candlestick pattern: CRT, ORB, Morning Star, Evening Star, and others, but I'm not going to talk about it.
What is a Candle Retracement (CRT) Pattern?
For those who may be unfamiliar, the Candle Retracement pattern is a robust 3-candle setup that signals the potential exhaustion of a trend and the start of a reversal.
Bullish CRT:
Candle 1 (Signal): A significant bearish candle.
Candle 2 (Retracement): A candle that sweeps the lows of Candle 1 but closes within its body. This shows the sellers are overextended and losing momentum.
Candle 3 (Confirmation): A bullish candle that closes above Candle 2's close, confirming the reversal.
Bearish CRT:
Candle 1 (Signal): A significant bullish candle.
Candle 2 (Retracement): A candle that sweeps the highs of Candle 1 but closes within its body.
Candle 3 (Confirmation): A bearish candle that closes below Candle 2's close.
How This Screener Supercharges Your Trading
Manually finding these setups is time-consuming. This indicator automates the entire process, scanning up to four symbols across nine different timeframes—from the fast-paced 5-minute chart to the strategic weekly view.
Key Features:
Multi-Symbol, Multi-Timeframe Matrix: Get an instant, bird's-eye view of all CRT signals in a clean, easy-to-read table.
Customizable Logic: Fine-tune the pattern detection to your liking:
Lookback Period: How many bars back to search for patterns.
Min Candle %: The minimum body size of Candle 1, ensuring you only get significant signals.
Sweep %: The minimum required wick sweep of Candle 2, filtering for meaningful false breaks.
Visual & Alert System:
Clear Visuals: Green circles (🟢) for Bullish CRT and red circles (🔴) for Bearish CRT.
Proactive Alerts: Receive real-time pop-up and push notifications the moment a new pattern is confirmed on any timeframe.
Final Thoughts & Risk Management
The Multi-Timeframe CRT Screener is designed to be a cornerstone of your trading strategy, helping you find high-quality setups with efficiency. However, no indicator is infallible.
Always use confluence: Use the signals from this screener in conjunction with other factors like key support/resistance levels, volume, or momentum indicators.
Manage your risk: Always use a stop-loss. A good initial stop for a CRT pattern can be placed just beyond the extreme of Candle 1 (the low for bullish, high for bearish).
I hope you find this tool as invaluable in your trading as I have. I'm constantly working on improvements, so please feel free to leave your suggestions, comments, and questions below. If you find it useful, give it a like and share it with your trading community!
Happy Trading,
Yosiet
MAGS ETF – Daily Chart Breakdown & Price Forecast📈 MAGS ETF – Daily Chart Breakdown & Price Forecast
Timeframe: 1D
MAGS is currently trading at $63.54, down -1.87% on the day. The chart shows a potential distribution structure forming after a strong prior uptrend.
🔍 Technical Highlights:
RSI Divergence (14 Close):
The RSI is at 40.14, trending lower after multiple bearish divergences. These signals typically warn of a momentum breakdown after an extended uptrend.
Structure Overview:
After a sharp move up, price action entered a ranging zone, marked by multiple lower highs and support retests. The current projection shows a possible head and shoulders or complex corrective structure forming.
Support Zone:
Critical support rests around $60.00–$61.00, marked by horizontal and dynamic levels. A breakdown from here could send prices lower toward the mid-$50s.
Bullish Reversal Zone:
If support holds, the projected wave count shows a potential rebound leg that may revisit previous resistance levels in the $68–$70 range.
🧠 Market Interpretation:
This chart suggests MAGS may be transitioning from an impulsive bullish phase to a corrective consolidation. While short-term bearish pressure is visible, a confirmed bounce from support could spark a recovery rally. Keep an eye on RSI behavior near the 40 level a sharp bullish divergence could flip the short-term outlook.
📉 Current bias: Neutral to Bearish (watch support)
📈 Upside target on reversal: $68–$70
⚠️ Breakdown trigger: Below $60 support zone
⚠️ Disclaimer: This is general information only and not financial advice. Always do your own research or consult a licensed professional before making any trading decisions.
Franjas Horarias Personalizables (Madrid)Franjas de sesiones en las que opero por horario.
Sesiones de Asia, London y NY
TT_Lite Indicator – Performance Optimized (Standardized)add it to the chart and be amazed add it to the chart and be amazed add it to the chart and be amazed add it to the chart and be amazed add it to the chart and be amazed add it to the chart and be amazed add it to the chart and be amazed add it to the chart and be amazed add it to the chart and be amazed
Kripto Fema ind/ This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © Femayakup
//@version=5
indicator(title = "Kripto Fema ind", shorttitle="Kripto Fema ind", overlay=true, format=format.price, precision=2,max_lines_count = 500, max_labels_count = 500, max_bars_back=500)
showEma200 = input(true, title="EMA 200")
showPmax = input(true, title="Pmax")
showLinreg = input(true, title="Linreg")
showMavilim = input(true, title="Mavilim")
showNadaray = input(true, title="Nadaraya Watson")
ma(source, length, type) =>
switch type
"SMA" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
//Ema200
timeFrame = input.timeframe(defval = '240',title= 'EMA200 TimeFrame',group = 'EMA200 Settings')
len200 = input.int(200, minval=1, title="Length",group = 'EMA200 Settings')
src200 = input(close, title="Source",group = 'EMA200 Settings')
offset200 = input.int(title="Offset", defval=0, minval=-500, maxval=500,group = 'EMA200 Settings')
out200 = ta.ema(src200, len200)
higherTimeFrame = request.security(syminfo.tickerid,timeFrame,out200 ,barmerge.gaps_on,barmerge.lookahead_on)
ema200Plot = showEma200 ? higherTimeFrame : na
plot(ema200Plot, title="EMA200", offset=offset200)
//Linreq
group1 = "Linreg Settings"
lengthInput = input.int(100, title="Length", minval = 1, maxval = 5000,group = group1)
sourceInput = input.source(close, title="Source")
useUpperDevInput = input.bool(true, title="Upper Deviation", inline = "Upper Deviation", group = group1)
upperMultInput = input.float(2.0, title="", inline = "Upper Deviation", group = group1)
useLowerDevInput = input.bool(true, title="Lower Deviation", inline = "Lower Deviation", group = group1)
lowerMultInput = input.float(2.0, title="", inline = "Lower Deviation", group = group1)
group2 = "Linreg Display Settings"
showPearsonInput = input.bool(true, "Show Pearson's R", group = group2)
extendLeftInput = input.bool(false, "Extend Lines Left", group = group2)
extendRightInput = input.bool(true, "Extend Lines Right", group = group2)
extendStyle = switch
extendLeftInput and extendRightInput => extend.both
extendLeftInput => extend.left
extendRightInput => extend.right
=> extend.none
group3 = "Linreg Color Settings"
colorUpper = input.color(color.new(color.blue, 85), "Linreg Renk", inline = group3, group = group3)
colorLower = input.color(color.new(color.red, 85), "", inline = group3, group = group3)
calcSlope(source, length) =>
max_bars_back(source, 5000)
if not barstate.islast or length <= 1
else
sumX = 0.0
sumY = 0.0
sumXSqr = 0.0
sumXY = 0.0
for i = 0 to length - 1 by 1
val = source
per = i + 1.0
sumX += per
sumY += val
sumXSqr += per * per
sumXY += val * per
slope = (length * sumXY - sumX * sumY) / (length * sumXSqr - sumX * sumX)
average = sumY / length
intercept = average - slope * sumX / length + slope
= calcSlope(sourceInput, lengthInput)
startPrice = i + s * (lengthInput - 1)
endPrice = i
var line baseLine = na
if na(baseLine) and not na(startPrice) and showLinreg
baseLine := line.new(bar_index - lengthInput + 1, startPrice, bar_index, endPrice, width=1, extend=extendStyle, color=color.new(colorLower, 0))
else
line.set_xy1(baseLine, bar_index - lengthInput + 1, startPrice)
line.set_xy2(baseLine, bar_index, endPrice)
na
calcDev(source, length, slope, average, intercept) =>
upDev = 0.0
dnDev = 0.0
stdDevAcc = 0.0
dsxx = 0.0
dsyy = 0.0
dsxy = 0.0
periods = length - 1
daY = intercept + slope * periods / 2
val = intercept
for j = 0 to periods by 1
price = high - val
if price > upDev
upDev := price
price := val - low
if price > dnDev
dnDev := price
price := source
dxt = price - average
dyt = val - daY
price -= val
stdDevAcc += price * price
dsxx += dxt * dxt
dsyy += dyt * dyt
dsxy += dxt * dyt
val += slope
stdDev = math.sqrt(stdDevAcc / (periods == 0 ? 1 : periods))
pearsonR = dsxx == 0 or dsyy == 0 ? 0 : dsxy / math.sqrt(dsxx * dsyy)
= calcDev(sourceInput, lengthInput, s, a, i)
upperStartPrice = startPrice + (useUpperDevInput ? upperMultInput * stdDev : upDev)
upperEndPrice = endPrice + (useUpperDevInput ? upperMultInput * stdDev : upDev)
var line upper = na
lowerStartPrice = startPrice + (useLowerDevInput ? -lowerMultInput * stdDev : -dnDev)
lowerEndPrice = endPrice + (useLowerDevInput ? -lowerMultInput * stdDev : -dnDev)
var line lower = na
if na(upper) and not na(upperStartPrice) and showLinreg
upper := line.new(bar_index - lengthInput + 1, upperStartPrice, bar_index, upperEndPrice, width=1, extend=extendStyle, color=color.new(colorUpper, 0))
else
line.set_xy1(upper, bar_index - lengthInput + 1, upperStartPrice)
line.set_xy2(upper, bar_index, upperEndPrice)
na
if na(lower) and not na(lowerStartPrice) and showLinreg
lower := line.new(bar_index - lengthInput + 1, lowerStartPrice, bar_index, lowerEndPrice, width=1, extend=extendStyle, color=color.new(colorUpper, 0))
else
line.set_xy1(lower, bar_index - lengthInput + 1, lowerStartPrice)
line.set_xy2(lower, bar_index, lowerEndPrice)
na
showLinregPlotUpper = showLinreg ? upper : na
showLinregPlotLower = showLinreg ? lower : na
showLinregPlotBaseLine = showLinreg ? baseLine : na
linefill.new(showLinregPlotUpper, showLinregPlotBaseLine, color = colorUpper)
linefill.new(showLinregPlotBaseLine, showLinregPlotLower, color = colorLower)
// Pearson's R
var label r = na
label.delete(r )
if showPearsonInput and not na(pearsonR) and showLinreg
r := label.new(bar_index - lengthInput + 1, lowerStartPrice, str.tostring(pearsonR, "#.################"), color = color.new(color.white, 100), textcolor=color.new(colorUpper, 0), size=size.normal, style=label.style_label_up)
//Mavilim
group4 = "Mavilim Settings"
mavilimold = input(false, title="Show Previous Version of MavilimW?",group=group4)
fmal=input(3,"First Moving Average length",group = group4)
smal=input(5,"Second Moving Average length",group = group4)
tmal=fmal+smal
Fmal=smal+tmal
Ftmal=tmal+Fmal
Smal=Fmal+Ftmal
M1= ta.wma(close, fmal)
M2= ta.wma(M1, smal)
M3= ta.wma(M2, tmal)
M4= ta.wma(M3, Fmal)
M5= ta.wma(M4, Ftmal)
MAVW= ta.wma(M5, Smal)
col1= MAVW>MAVW
col3= MAVWpmaxsrc ? pmaxsrc-pmaxsrc : 0
vdd1=pmaxsrc
ma = 0.0
if mav == "SMA"
ma := ta.sma(pmaxsrc, length)
ma
if mav == "EMA"
ma := ta.ema(pmaxsrc, length)
ma
if mav == "WMA"
ma := ta.wma(pmaxsrc, length)
ma
if mav == "TMA"
ma := ta.sma(ta.sma(pmaxsrc, math.ceil(length / 2)), math.floor(length / 2) + 1)
ma
if mav == "VAR"
ma := VAR
ma
if mav == "WWMA"
ma := WWMA
ma
if mav == "ZLEMA"
ma := ZLEMA
ma
if mav == "TSF"
ma := TSF
ma
ma
MAvg=getMA(pmaxsrc, length)
longStop = Normalize ? MAvg - Multiplier*atr/close : MAvg - Multiplier*atr
longStopPrev = nz(longStop , longStop)
longStop := MAvg > longStopPrev ? math.max(longStop, longStopPrev) : longStop
shortStop = Normalize ? MAvg + Multiplier*atr/close : MAvg + Multiplier*atr
shortStopPrev = nz(shortStop , shortStop)
shortStop := MAvg < shortStopPrev ? math.min(shortStop, shortStopPrev) : shortStop
dir = 1
dir := nz(dir , dir)
dir := dir == -1 and MAvg > shortStopPrev ? 1 : dir == 1 and MAvg < longStopPrev ? -1 : dir
PMax = dir==1 ? longStop: shortStop
plot(showsupport ? MAvg : na, color=#fbff04, linewidth=2, title="EMA9")
pALL=plot(PMax, color=color.new(color.red, transp = 0), linewidth=2, title="PMax")
alertcondition(ta.cross(MAvg, PMax), title="Cross Alert", message="PMax - Moving Avg Crossing!")
alertcondition(ta.crossover(MAvg, PMax), title="Crossover Alarm", message="Moving Avg BUY SIGNAL!")
alertcondition(ta.crossunder(MAvg, PMax), title="Crossunder Alarm", message="Moving Avg SELL SIGNAL!")
alertcondition(ta.cross(pmaxsrc, PMax), title="Price Cross Alert", message="PMax - Price Crossing!")
alertcondition(ta.crossover(pmaxsrc, PMax), title="Price Crossover Alarm", message="PRICE OVER PMax - BUY SIGNAL!")
alertcondition(ta.crossunder(pmaxsrc, PMax), title="Price Crossunder Alarm", message="PRICE UNDER PMax - SELL SIGNAL!")
buySignalk = ta.crossover(MAvg, PMax)
plotshape(buySignalk and showsignalsk ? PMax*0.995 : na, title="Buy", text="Buy", location=location.absolute, style=shape.labelup, size=size.tiny, color=color.new(color.green, transp = 0), textcolor=color.white)
sellSignallk = ta.crossunder(MAvg, PMax)
plotshape(sellSignallk and showsignalsk ? PMax*1.005 : na, title="Sell", text="Sell", location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.new(color.red, transp = 0), textcolor=color.white)
// buySignalc = ta.crossover(pmaxsrc, PMax)
// plotshape(buySignalc and showsignalsc ? PMax*0.995 : na, title="Buy", text="Buy", location=location.absolute, style=shape.labelup, size=size.tiny, color=#0F18BF, textcolor=color.white)
// sellSignallc = ta.crossunder(pmaxsrc, PMax)
// plotshape(sellSignallc and showsignalsc ? PMax*1.005 : na, title="Sell", text="Sell", location=location.absolute, style=shape.labeldown, size=size.tiny, color=#0F18BF, textcolor=color.white)
// mPlot = plot(ohlc4, title="", style=plot.style_circles, linewidth=0,display=display.none)
longFillColor = highlighting ? (MAvg>PMax ? color.new(color.green, transp = 90) : na) : na
shortFillColor = highlighting ? (MAvg math.exp(-(math.pow(x, 2)/(h * h * 2)))
//-----------------------------------------------------------------------------}
//Append lines
//-----------------------------------------------------------------------------{
n = bar_index
var ln = array.new_line(0)
if barstate.isfirst and repaint
for i = 0 to 499
array.push(ln,line.new(na,na,na,na))
//-----------------------------------------------------------------------------}
//End point method
//-----------------------------------------------------------------------------{
var coefs = array.new_float(0)
var den = 0.
if barstate.isfirst and not repaint
for i = 0 to 499
w = gauss(i, h)
coefs.push(w)
den := coefs.sum()
out = 0.
if not repaint
for i = 0 to 499
out += src * coefs.get(i)
out /= den
mae = ta.sma(math.abs(src - out), 499) * mult
upperN = out + mae
lowerN = out - mae
//-----------------------------------------------------------------------------}
//Compute and display NWE
//-----------------------------------------------------------------------------{
float y2 = na
float y1 = na
nwe = array.new(0)
if barstate.islast and repaint
sae = 0.
//Compute and set NWE point
for i = 0 to math.min(499,n - 1)
sum = 0.
sumw = 0.
//Compute weighted mean
for j = 0 to math.min(499,n - 1)
w = gauss(i - j, h)
sum += src * w
sumw += w
y2 := sum / sumw
sae += math.abs(src - y2)
nwe.push(y2)
sae := sae / math.min(499,n - 1) * mult
for i = 0 to math.min(499,n - 1)
if i%2 and showNadaray
line.new(n-i+1, y1 + sae, n-i, nwe.get(i) + sae, color = upCss)
line.new(n-i+1, y1 - sae, n-i, nwe.get(i) - sae, color = dnCss)
if src > nwe.get(i) + sae and src < nwe.get(i) + sae and showNadaray
label.new(n-i, src , '▼', color = color(na), style = label.style_label_down, textcolor = dnCss, textalign = text.align_center)
if src < nwe.get(i) - sae and src > nwe.get(i) - sae and showNadaray
label.new(n-i, src , '▲', color = color(na), style = label.style_label_up, textcolor = upCss, textalign = text.align_center)
y1 := nwe.get(i)
//-----------------------------------------------------------------------------}
//Dashboard
//-----------------------------------------------------------------------------{
var tb = table.new(position.top_right, 1, 1
, bgcolor = #1e222d
, border_color = #373a46
, border_width = 1
, frame_color = #373a46
, frame_width = 1)
if repaint
tb.cell(0, 0, 'Repainting Mode Enabled', text_color = color.white, text_size = size.small)
//-----------------------------------------------------------------------------}
//Plot
//-----------------------------------------------------------------------------}
// plot(repaint ? na : out + mae, 'Upper', upCss)
// plot(repaint ? na : out - mae, 'Lower', dnCss)
//Crossing Arrows
// plotshape(ta.crossunder(close, out - mae) ? low : na, "Crossunder", shape.labelup, location.absolute, color(na), 0 , text = '▲', textcolor = upCss, size = size.tiny)
// plotshape(ta.crossover(close, out + mae) ? high : na, "Crossover", shape.labeldown, location.absolute, color(na), 0 , text = '▼', textcolor = dnCss, size = size.tiny)
//-----------------------------------------------------------------------------}
//////////////////////////////////////////////////////////////////////////////////
enableD = input (true, "DIVERGANCE ON/OFF" , group="INDICATORS ON/OFF")
//DIVERGANCE
prd1 = input.int (defval=5 , title='PIVOT PERIOD' , minval=1, maxval=50 , group="DIVERGANCE")
source = input.string(defval='HIGH/LOW' , title='SOURCE FOR PIVOT POINTS' , options= , group="DIVERGANCE")
searchdiv = input.string(defval='REGULAR/HIDDEN', title='DIVERGANCE TYPE' , options= , group="DIVERGANCE")
showindis = input.string(defval='FULL' , title='SHOW INDICATORS NAME' , options= , group="DIVERGANCE")
showlimit = input.int(1 , title='MINIMUM NUMBER OF DIVERGANCES', minval=1, maxval=11 , group="DIVERGANCE")
maxpp = input.int (defval=20 , title='MAXIMUM PIVOT POINTS TO CHECK', minval=1, maxval=20 , group="DIVERGANCE")
maxbars = input.int (defval=200 , title='MAXIMUM BARS TO CHECK' , minval=30, maxval=200 , group="DIVERGANCE")
showlast = input (defval=false , title='SHOW ONLY LAST DIVERGANCE' , group="DIVERGANCE")
dontconfirm = input (defval=false , title="DON'T WAIT FOR CONFORMATION" , group="DIVERGANCE")
showlines = input (defval=false , title='SHOW DIVERGANCE LINES' , group="DIVERGANCE")
showpivot = input (defval=false , title='SHOW PIVOT POINTS' , group="DIVERGANCE")
calcmacd = input (defval=true , title='MACD' , group="DIVERGANCE")
calcmacda = input (defval=true , title='MACD HISTOGRAM' , group="DIVERGANCE")
calcrsi = input (defval=true , title='RSI' , group="DIVERGANCE")
calcstoc = input (defval=true , title='STOCHASTIC' , group="DIVERGANCE")
calccci = input (defval=true , title='CCI' , group="DIVERGANCE")
calcmom = input (defval=true , title='MOMENTUM' , group="DIVERGANCE")
calcobv = input (defval=true , title='OBV' , group="DIVERGANCE")
calcvwmacd = input (true , title='VWMACD' , group="DIVERGANCE")
calccmf = input (true , title='CHAIKIN MONEY FLOW' , group="DIVERGANCE")
calcmfi = input (true , title='MONEY FLOW INDEX' , group="DIVERGANCE")
calcext = input (false , title='CHECK EXTERNAL INDICATOR' , group="DIVERGANCE")
externalindi = input (defval=close , title='EXTERNAL INDICATOR' , group="DIVERGANCE")
pos_reg_div_col = input (defval=#ffffff , title='POSITIVE REGULAR DIVERGANCE' , group="DIVERGANCE")
neg_reg_div_col = input (defval=#00def6 , title='NEGATIVE REGULAR DIVERGANCE' , group="DIVERGANCE")
pos_hid_div_col = input (defval=#00ff0a , title='POSITIVE HIDDEN DIVERGANCE' , group="DIVERGANCE")
neg_hid_div_col = input (defval=#ff0015 , title='NEGATIVE HIDDEN DIVERGANCE' , group="DIVERGANCE")
reg_div_l_style_ = input.string(defval='SOLID' , title='REGULAR DIVERGANCE LINESTYLE' , options= , group="DIVERGANCE")
hid_div_l_style_ = input.string(defval='SOLID' , title='HIDDEN DIVERGANCE LINESTYLE' , options= , group="DIVERGANCE")
reg_div_l_width = input.int (defval=2 , title='REGULAR DIVERGANCE LINEWIDTH' , minval=1, maxval=5 , group="DIVERGANCE")
hid_div_l_width = input.int (defval=2 , title='HIDDEN DIVERGANCE LINEWIDTH' , minval=1, maxval=5 , group="DIVERGANCE")
showmas = input.bool (defval=false , title='SHOW MOVING AVERAGES (50 & 200)', inline='MA' , group="DIVERGANCE")
cma1col = input.color (defval=#ffffff , title='' , inline='MA' , group="DIVERGANCE")
cma2col = input.color (defval=#00def6 , title='' , inline='MA' , group="DIVERGANCE")
//PLOTS
plot(showmas ? ta.sma(close, 50) : na, color=showmas ? cma1col : na)
plot(showmas ? ta.sma(close, 200) : na, color=showmas ? cma2col : na)
var reg_div_l_style = reg_div_l_style_ == 'SOLID' ? line.style_solid : reg_div_l_style_ == 'DASHED' ? line.style_dashed : line.style_dotted
var hid_div_l_style = hid_div_l_style_ == 'SOLID' ? line.style_solid : hid_div_l_style_ == 'DASHED' ? line.style_dashed : line.style_dotted
rsi = ta.rsi(close, 14)
= ta.macd(close, 12, 26, 9)
moment = ta.mom(close, 10)
cci = ta.cci(close, 10)
Obv = ta.obv
stk = ta.sma(ta.stoch(close, high, low, 14), 3)
maFast = ta.vwma(close, 12)
maSlow = ta.vwma(close, 26)
vwmacd = maFast - maSlow
Cmfm = (close - low - (high - close)) / (high - low)
Cmfv = Cmfm * volume
cmf = ta.sma(Cmfv, 21) / ta.sma(volume, 21)
Mfi = ta.mfi(close, 14)
var indicators_name = array.new_string(11)
var div_colors = array.new_color(4)
if barstate.isfirst and enableD
array.set(indicators_name, 0, showindis == "DON'T SHOW" ? '' : '')
array.set(indicators_name, 1, showindis == "DON'T SHOW" ? '' : '')
array.set(indicators_name, 2, showindis == "DON'T SHOW" ? '' : '')
array.set(indicators_name, 3, showindis == "DON'T SHOW" ? '' : '')
array.set(indicators_name, 4, showindis == "DON'T SHOW" ? '' : '')
array.set(indicators_name, 5, showindis == "DON'T SHOW" ? '' : '')
array.set(indicators_name, 6, showindis == "DON'T SHOW" ? '' : '')
array.set(indicators_name, 7, showindis == "DON'T SHOW" ? '' : '')
array.set(indicators_name, 8, showindis == "DON'T SHOW" ? '' : '')
array.set(indicators_name, 9, showindis == "DON'T SHOW" ? '' : '')
array.set(indicators_name, 10, showindis == "DON'T SHOW" ? '' : '')
array.set(div_colors, 0, pos_reg_div_col)
array.set(div_colors, 1, neg_reg_div_col)
array.set(div_colors, 2, pos_hid_div_col)
array.set(div_colors, 3, neg_hid_div_col)
float ph1 = ta.pivothigh(source == 'CLOSE' ? close : high, prd1, prd1)
float pl1 = ta.pivotlow(source == 'CLOSE' ? close : low, prd1, prd1)
plotshape(ph1 and showpivot, text='H', style=shape.labeldown, color=color.new(color.white, 100), textcolor=#00def6, location=location.abovebar, offset=-prd1)
plotshape(pl1 and showpivot, text='L', style=shape.labelup, color=color.new(color.white, 100), textcolor=#ffffff, location=location.belowbar, offset=-prd1)
var int maxarraysize = 20
var ph_positions = array.new_int(maxarraysize, 0)
var pl_positions = array.new_int(maxarraysize, 0)
var ph_vals = array.new_float(maxarraysize, 0.)
var pl_vals = array.new_float(maxarraysize, 0.)
if ph1
array.unshift(ph_positions, bar_index)
array.unshift(ph_vals, ph1)
if array.size(ph_positions) > maxarraysize
array.pop(ph_positions)
array.pop(ph_vals)
if pl1
array.unshift(pl_positions, bar_index)
array.unshift(pl_vals, pl1)
if array.size(pl_positions) > maxarraysize
array.pop(pl_positions)
array.pop(pl_vals)
positive_regular_positive_hidden_divergence(src, cond) =>
divlen = 0
prsc = source == 'CLOSE' ? close : low
if dontconfirm or src > src or close > close
startpoint = dontconfirm ? 0 : 1
for x = 0 to maxpp - 1 by 1
len = bar_index - array.get(pl_positions, x) + prd1
if array.get(pl_positions, x) == 0 or len > maxbars
break
if len > 5 and (cond == 1 and src > src and prsc < nz(array.get(pl_vals, x)) or cond == 2 and src < src and prsc > nz(array.get(pl_vals, x)))
slope1 = (src - src ) / (len - startpoint)
virtual_line1 = src - slope1
slope2 = (close - close ) / (len - startpoint)
virtual_line2 = close - slope2
arrived = true
for y = 1 + startpoint to len - 1 by 1
if src < virtual_line1 or nz(close ) < virtual_line2
arrived := false
break
virtual_line1 -= slope1
virtual_line2 -= slope2
virtual_line2
if arrived
divlen := len
break
divlen
negative_regular_negative_hidden_divergence(src, cond) =>
divlen = 0
prsc = source == 'CLOSE' ? close : high
if dontconfirm or src < src or close < close
startpoint = dontconfirm ? 0 : 1
for x = 0 to maxpp - 1 by 1
len = bar_index - array.get(ph_positions, x) + prd1
if array.get(ph_positions, x) == 0 or len > maxbars
break
if len > 5 and (cond == 1 and src < src and prsc > nz(array.get(ph_vals, x)) or cond == 2 and src > src and prsc < nz(array.get(ph_vals, x)))
slope1 = (src - src ) / (len - startpoint)
virtual_line1 = src - slope1
slope2 = (close - nz(close )) / (len - startpoint)
virtual_line2 = close - slope2
arrived = true
for y = 1 + startpoint to len - 1 by 1
if src > virtual_line1 or nz(close ) > virtual_line2
arrived := false
break
virtual_line1 -= slope1
virtual_line2 -= slope2
virtual_line2
if arrived
divlen := len
break
divlen
//CALCULATIONS
calculate_divs(cond, indicator_1) =>
divs = array.new_int(4, 0)
array.set(divs, 0, cond and (searchdiv == 'REGULAR' or searchdiv == 'REGULAR/HIDDEN') ? positive_regular_positive_hidden_divergence(indicator_1, 1) : 0)
array.set(divs, 1, cond and (searchdiv == 'REGULAR' or searchdiv == 'REGULAR/HIDDEN') ? negative_regular_negative_hidden_divergence(indicator_1, 1) : 0)
array.set(divs, 2, cond and (searchdiv == 'HIDDEN' or searchdiv == 'REGULAR/HIDDEN') ? positive_regular_positive_hidden_divergence(indicator_1, 2) : 0)
array.set(divs, 3, cond and (searchdiv == 'HIDDEN' or searchdiv == 'REGULAR/HIDDEN') ? negative_regular_negative_hidden_divergence(indicator_1, 2) : 0)
divs
var all_divergences = array.new_int(44)
array_set_divs(div_pointer, index) =>
for x = 0 to 3 by 1
array.set(all_divergences, index * 4 + x, array.get(div_pointer, x))
array_set_divs(calculate_divs(calcmacd , macd) , 0)
array_set_divs(calculate_divs(calcmacda , deltamacd) , 1)
array_set_divs(calculate_divs(calcrsi , rsi) , 2)
array_set_divs(calculate_divs(calcstoc , stk) , 3)
array_set_divs(calculate_divs(calccci , cci) , 4)
array_set_divs(calculate_divs(calcmom , moment) , 5)
array_set_divs(calculate_divs(calcobv , Obv) , 6)
array_set_divs(calculate_divs(calcvwmacd, vwmacd) , 7)
array_set_divs(calculate_divs(calccmf , cmf) , 8)
array_set_divs(calculate_divs(calcmfi , Mfi) , 9)
array_set_divs(calculate_divs(calcext , externalindi), 10)
total_div = 0
for x = 0 to array.size(all_divergences) - 1 by 1
total_div += math.round(math.sign(array.get(all_divergences, x)))
total_div
if total_div < showlimit
array.fill(all_divergences, 0)
var pos_div_lines = array.new_line(0)
var neg_div_lines = array.new_line(0)
var pos_div_labels = array.new_label(0)
var neg_div_labels = array.new_label(0)
delete_old_pos_div_lines() =>
if array.size(pos_div_lines) > 0
for j = 0 to array.size(pos_div_lines) - 1 by 1
line.delete(array.get(pos_div_lines, j))
array.clear(pos_div_lines)
delete_old_neg_div_lines() =>
if array.size(neg_div_lines) > 0
for j = 0 to array.size(neg_div_lines) - 1 by 1
line.delete(array.get(neg_div_lines, j))
array.clear(neg_div_lines)
delete_old_pos_div_labels() =>
if array.size(pos_div_labels) > 0
for j = 0 to array.size(pos_div_labels) - 1 by 1
label.delete(array.get(pos_div_labels, j))
array.clear(pos_div_labels)
delete_old_neg_div_labels() =>
if array.size(neg_div_labels) > 0
for j = 0 to array.size(neg_div_labels) - 1 by 1
label.delete(array.get(neg_div_labels, j))
array.clear(neg_div_labels)
delete_last_pos_div_lines_label(n) =>
if n > 0 and array.size(pos_div_lines) >= n
asz = array.size(pos_div_lines)
for j = 1 to n by 1
line.delete(array.get(pos_div_lines, asz - j))
array.pop(pos_div_lines)
if array.size(pos_div_labels) > 0
label.delete(array.get(pos_div_labels, array.size(pos_div_labels) - 1))
array.pop(pos_div_labels)
delete_last_neg_div_lines_label(n) =>
if n > 0 and array.size(neg_div_lines) >= n
asz = array.size(neg_div_lines)
for j = 1 to n by 1
line.delete(array.get(neg_div_lines, asz - j))
array.pop(neg_div_lines)
if array.size(neg_div_labels) > 0
label.delete(array.get(neg_div_labels, array.size(neg_div_labels) - 1))
array.pop(neg_div_labels)
pos_reg_div_detected = false
neg_reg_div_detected = false
pos_hid_div_detected = false
neg_hid_div_detected = false
var last_pos_div_lines = 0
var last_neg_div_lines = 0
var remove_last_pos_divs = false
var remove_last_neg_divs = false
if pl1
remove_last_pos_divs := false
last_pos_div_lines := 0
last_pos_div_lines
if ph1
remove_last_neg_divs := false
last_neg_div_lines := 0
last_neg_div_lines
divergence_text_top = ''
divergence_text_bottom = ''
distances = array.new_int(0)
dnumdiv_top = 0
dnumdiv_bottom = 0
top_label_col = color.white
bottom_label_col = color.white
old_pos_divs_can_be_removed = true
old_neg_divs_can_be_removed = true
startpoint = dontconfirm ? 0 : 1
for x = 0 to 10 by 1
div_type = -1
for y = 0 to 3 by 1
if array.get(all_divergences, x * 4 + y) > 0
div_type := y
if y % 2 == 1
dnumdiv_top += 1
top_label_col := array.get(div_colors, y)
top_label_col
if y % 2 == 0
dnumdiv_bottom += 1
bottom_label_col := array.get(div_colors, y)
bottom_label_col
if not array.includes(distances, array.get(all_divergences, x * 4 + y))
array.push(distances, array.get(all_divergences, x * 4 + y))
new_line = showlines ? line.new(x1=bar_index - array.get(all_divergences, x * 4 + y), y1=source == 'CLOSE' ? close : y % 2 == 0 ? low : high , x2=bar_index - startpoint, y2=source == 'CLOSE' ? close : y % 2 == 0 ? low : high , color=array.get(div_colors, y), style=y < 2 ? reg_div_l_style : hid_div_l_style, width=y < 2 ? reg_div_l_width : hid_div_l_width) : na
if y % 2 == 0
if old_pos_divs_can_be_removed
old_pos_divs_can_be_removed := false
if not showlast and remove_last_pos_divs
delete_last_pos_div_lines_label(last_pos_div_lines)
last_pos_div_lines := 0
last_pos_div_lines
if showlast
delete_old_pos_div_lines()
array.push(pos_div_lines, new_line)
last_pos_div_lines += 1
remove_last_pos_divs := true
remove_last_pos_divs
if y % 2 == 1
if old_neg_divs_can_be_removed
old_neg_divs_can_be_removed := false
if not showlast and remove_last_neg_divs
delete_last_neg_div_lines_label(last_neg_div_lines)
last_neg_div_lines := 0
last_neg_div_lines
if showlast
delete_old_neg_div_lines()
array.push(neg_div_lines, new_line)
last_neg_div_lines += 1
remove_last_neg_divs := true
remove_last_neg_divs
if y == 0
pos_reg_div_detected := true
pos_reg_div_detected
if y == 1
neg_reg_div_detected := true
neg_reg_div_detected
if y == 2
pos_hid_div_detected := true
pos_hid_div_detected
if y == 3
neg_hid_div_detected := true
neg_hid_div_detected
if div_type >= 0
divergence_text_top += (div_type % 2 == 1 ? showindis != "DON'T SHOW" ? array.get(indicators_name, x) + ' ' : '' : '')
divergence_text_bottom += (div_type % 2 == 0 ? showindis != "DON'T SHOW" ? array.get(indicators_name, x) + ' ' : '' : '')
divergence_text_bottom
if showindis != "DON'T SHOW"
if dnumdiv_top > 0
divergence_text_top += str.tostring(dnumdiv_top)
divergence_text_top
if dnumdiv_bottom > 0
divergence_text_bottom += str.tostring(dnumdiv_bottom)
divergence_text_bottom
if divergence_text_top != ''
if showlast
delete_old_neg_div_labels()
array.push(neg_div_labels, label.new(x=bar_index, y=math.max(high, high ), color=top_label_col, style=label.style_diamond, size = size.auto))
if divergence_text_bottom != ''
if showlast
delete_old_pos_div_labels()
array.push(pos_div_labels, label.new(x=bar_index, y=math.min(low, low ), color=bottom_label_col, style=label.style_diamond, size = size.auto))
// POSITION AND SIZE
PosTable = input.string(defval="Bottom Right", title="Position", options= , group="Table Location & Size", inline="1")
SizTable = input.string(defval="Auto", title="Size", options= , group="Table Location & Size", inline="1")
Pos1Table = PosTable == "Top Right" ? position.top_right : PosTable == "Middle Right" ? position.middle_right : PosTable == "Bottom Right" ? position.bottom_right : PosTable == "Top Center" ? position.top_center : PosTable == "Middle Center" ? position.middle_center : PosTable == "Bottom Center" ? position.bottom_center : PosTable == "Top Left" ? position.top_left : PosTable == "Middle Left" ? position.middle_left : position.bottom_left
Siz1Table = SizTable == "Auto" ? size.auto : SizTable == "Huge" ? size.huge : SizTable == "Large" ? size.large : SizTable == "Normal" ? size.normal : SizTable == "Small" ? size.small : size.tiny
tbl = table.new(Pos1Table, 21, 16, border_width = 1, border_color = color.gray, frame_color = color.gray, frame_width = 1)
// Kullanıcı tarafından belirlenecek yeşil ve kırmızı zaman dilimi sayısı
greenThreshold = input.int(5, minval=1, maxval=10, title="Yeşil Zaman Dilimi Sayısı", group="Alarm Ayarları")
redThreshold = input.int(5, minval=1, maxval=10, title="Kırmızı Zaman Dilimi Sayısı", group="Alarm Ayarları")
// TIMEFRAMES OPTIONS
box01 = input.bool(true, "TF ", inline = "01", group="Select Timeframe")
tf01 = input.timeframe("1", "", inline = "01", group="Select Timeframe")
box02 = input.bool(false, "TF ", inline = "02", group="Select Timeframe")
tf02 = input.timeframe("3", "", inline = "02", group="Select Timeframe")
box03 = input.bool(true, "TF ", inline = "03", group="Select Timeframe")
tf03 = input.timeframe("5", "", inline = "03", group="Select Timeframe")
box04 = input.bool(true, "TF ", inline = "04", group="Select Timeframe")
tf04 = input.timeframe("15", "", inline = "04", group="Select Timeframe")
box05 = input.bool(false, "TF ", inline = "05", group="Select Timeframe")
tf05 = input.timeframe("30", "", inline = "05", group="Select Timeframe")
box06 = input.bool(true, "TF ", inline = "01", group="Select Timeframe")
tf06 = input.timeframe("60", "", inline = "01", group="Select Timeframe")
box07 = input.bool(false, "TF ", inline = "02", group="Select Timeframe")
tf07 = input.timeframe("120", "", inline = "02", group="Select Timeframe")
box08 = input.bool(false, "TF ", inline = "03", group="Select Timeframe")
tf08 = input.timeframe("180", "", inline = "03", group="Select Timeframe")
box09 = input.bool(true, "TF ", inline = "04", group="Select Timeframe")
tf09 = input.timeframe("240", "", inline = "04", group="Select Timeframe")
box10 = input.bool(false, "TF ", inline = "05", group="Select Timeframe")
tf10 = input.timeframe("D", "", inline = "05", group="Select Timeframe")
// indicator('Tillson FEMA', overlay=true)
length1 = input(1, 'FEMA Length')
a1 = input(0.7, 'Volume Factor')
e1 = ta.ema((high + low + 2 * close) / 4, length1)
e2 = ta.ema(e1, length1)
e3 = ta.ema(e2, length1)
e4 = ta.ema(e3, length1)
e5 = ta.ema(e4, length1)
e6 = ta.ema(e5, length1)
c1 = -a1 * a1 * a1
c2 = 3 * a1 * a1 + 3 * a1 * a1 * a1
c3 = -6 * a1 * a1 - 3 * a1 - 3 * a1 * a1 * a1
c4 = 1 + 3 * a1 + a1 * a1 * a1 + 3 * a1 * a1
FEMA = c1 * e6 + c2 * e5 + c3 * e4 + c4 * e3
tablocol1 = FEMA > FEMA
tablocol3 = FEMA < FEMA
color_1 = col1 ? color.rgb(149, 219, 35): col3 ? color.rgb(238, 11, 11) : color.yellow
plot(FEMA, color=color_1, linewidth=3, title='FEMA')
tilson1 = FEMA
tilson1a =FEMA
// DEFINITION OF VALUES
symbol = ticker.modify(syminfo.tickerid, syminfo.session)
tfArr = array.new(na)
tilson1Arr = array.new(na)
tilson1aArr = array.new(na)
// DEFINITIONS OF RSI & CCI FUNCTIONS APPENDED IN THE TIMEFRAME OPTIONS
cciNcciFun(tf, flg) =>
= request.security(symbol, tf, )
if flg and (barstate.isrealtime ? true : timeframe.in_seconds(timeframe.period) <= timeframe.in_seconds(tf))
array.push(tfArr, na(tf) ? timeframe.period : tf)
array.push(tilson1Arr, tilson_)
array.push(tilson1aArr, tilson1a_)
cciNcciFun(tf01, box01), cciNcciFun(tf02, box02), cciNcciFun(tf03, box03), cciNcciFun(tf04, box04),
cciNcciFun(tf05, box05), cciNcciFun(tf06, box06), cciNcciFun(tf07, box07), cciNcciFun(tf08, box08),
cciNcciFun(tf09, box09), cciNcciFun(tf10, box10)
// TABLE AND CELLS CONFIG
// Post Timeframe in format
tfTxt(x)=>
out = x
if not str.contains(x, "S") and not str.contains(x, "M") and
not str.contains(x, "W") and not str.contains(x, "D")
if str.tonumber(x)%60 == 0
out := str.tostring(str.tonumber(x)/60)+"H"
else
out := x + "m"
out
if barstate.islast
table.clear(tbl, 0, 0, 20, 15)
// TITLES
table.cell(tbl, 0, 0, "⏱", text_color=color.white, text_size=Siz1Table, bgcolor=#000000)
table.cell(tbl, 1, 0, "FEMA("+str.tostring(length1)+")", text_color=#FFFFFF, text_size=Siz1Table, bgcolor=#000000)
j = 1
greenCounter = 0 // Yeşil zaman dilimlerini saymak için bir sayaç
redCounter = 0
if array.size(tilson1Arr) > 0
for i = 0 to array.size(tilson1Arr) - 1
if not na(array.get(tilson1Arr, i))
//config values in the cells
TF_VALUE = array.get(tfArr,i)
tilson1VALUE = array.get(tilson1Arr, i)
tilson1aVALUE = array.get(tilson1aArr, i)
SIGNAL1 = tilson1VALUE >= tilson1aVALUE ? "▲" : tilson1VALUE <= tilson1aVALUE ? "▼" : na
// Yeşil oklar ve arka planı ayarla
greenArrowColor1 = SIGNAL1 == "▲" ? color.rgb(0, 255, 0) : color.rgb(255, 0, 0)
greenBgColor1 = SIGNAL1 == "▲" ? color.rgb(25, 70, 22) : color.rgb(93, 22, 22)
allGreen = tilson1VALUE >= tilson1aVALUE
allRed = tilson1VALUE <= tilson1aVALUE
// Determine background color for time text
timeBgColor = allGreen ? #194616 : (allRed ? #5D1616 : #000000)
txtColor = allGreen ? #00FF00 : (allRed ? #FF4500 : color.white)
if allGreen
greenCounter := greenCounter + 1
redCounter := 0
else if allRed
redCounter := redCounter + 1
greenCounter := 0
else
redCounter := 0
greenCounter := 0
// Dinamik pair değerini oluşturma
pair = "USDT_" + syminfo.basecurrency + "USDT"
// Bot ID için kullanıcı girişi
bot_id = input.int(12387976, title="Bot ID", minval=0,group ='3Comas Message', inline = '1') // Varsayılan değeri 12387976 olan bir tamsayı girişi alır
// E-posta tokenı için kullanıcı girişi
email_token = input("cd4111d4-549a-4759-a082-e8f45c91fa47", title="Email Token",group ='3Comas Message', inline = '1')
// USER INPUT FOR DELAY
delay_seconds = input.int(0, title="Delay Seconds", minval=0, maxval=86400,group ='3Comas Message', inline = '1')
// Dinamik mesajın oluşturulması
message = '{ "message_type": "bot", "bot_id": ' + str.tostring(bot_id) + ', "email_token": "' + email_token + '", "delay_seconds": ' + str.tostring(delay_seconds) + ', "pair": "' + pair + '"}'
// Kullanıcının belirlediği yeşil veya kırmızı zaman dilimi sayısına ulaşıldığında alarmı tetikle
if greenCounter >= greenThreshold
alert(message, alert.freq_once_per_bar_close)
// if redCounter >= redThreshold
// alert(message, alert.freq_once_per_bar_close)
// Kullanıcının belirlediği yeşil veya kırmızı zaman dilimi sayısına ulaşıldığında alarmı tetikle
// if greenCounter >= greenThreshold
// alert("Yeşil zaman dilimi sayısı " + str.tostring(greenThreshold) + " adede ulaştı", alert.freq_once_per_bar_close)
// if redCounter >= redThreshold
// alert("Kırmızı zaman dilimi sayısı " + str.tostring(redThreshold) + " adede ulaştı", alert.freq_once_per_bar_close)
table.cell(tbl, 0, j, tfTxt(TF_VALUE), text_color=txtColor, text_halign=text.align_left, text_size=Siz1Table, bgcolor=timeBgColor)
table.cell(tbl, 1, j, str.tostring(tilson1VALUE, "#.#######")+SIGNAL1, text_color=greenArrowColor1, text_halign=text.align_right, text_size=Siz1Table, bgcolor=greenBgColor1)
j += 1
prd = input.int(defval=10, title='Pivot Period', minval=4, maxval=30, group='Setup')
ppsrc = input.string(defval='High/Low', title='Source', options= , group='Setup')
maxnumpp = input.int(defval=20, title=' Maximum Number of Pivot', minval=5, maxval=100, group='Setup')
ChannelW = input.int(defval=10, title='Maximum Channel Width %', minval=1, group='Setup')
maxnumsr = input.int(defval=5, title=' Maximum Number of S/R', minval=1, maxval=10, group='Setup')
min_strength = input.int(defval=2, title=' Minimum Strength', minval=1, maxval=10, group='Setup')
labelloc = input.int(defval=20, title='Label Location', group='Colors', tooltip='Positive numbers reference future bars, negative numbers reference histical bars')
linestyle = input.string(defval='Dashed', title='Line Style', options= , group='Colors')
linewidth = input.int(defval=2, title='Line Width', minval=1, maxval=4, group='Colors')
resistancecolor = input.color(defval=color.red, title='Resistance Color', group='Colors')
supportcolor = input.color(defval=color.lime, title='Support Color', group='Colors')
showpp = input(false, title='Show Point Points')
float src1 = ppsrc == 'High/Low' ? high : math.max(close, open)
float src2 = ppsrc == 'High/Low' ? low : math.min(close, open)
float ph = ta.pivothigh(src1, prd, prd)
float pl = ta.pivotlow(src2, prd, prd)
plotshape(ph and showpp, text='H', style=shape.labeldown, color=na, textcolor=color.new(color.red, 0), location=location.abovebar, offset=-prd)
plotshape(pl and showpp, text='L', style=shape.labelup, color=na, textcolor=color.new(color.lime, 0), location=location.belowbar, offset=-prd)
Lstyle = linestyle == 'Dashed' ? line.style_dashed : linestyle == 'Solid' ? line.style_solid : line.style_dotted
//calculate maximum S/R channel zone width
prdhighest = ta.highest(300)
prdlowest = ta.lowest(300)
cwidth = (prdhighest - prdlowest) * ChannelW / 100
var pivotvals = array.new_float(0)
if ph or pl
array.unshift(pivotvals, ph ? ph : pl)
if array.size(pivotvals) > maxnumpp // limit the array size
array.pop(pivotvals)
get_sr_vals(ind) =>
float lo = array.get(pivotvals, ind)
float hi = lo
int numpp = 0
for y = 0 to array.size(pivotvals) - 1 by 1
float cpp = array.get(pivotvals, y)
float wdth = cpp <= lo ? hi - cpp : cpp - lo
if wdth <= cwidth // fits the max channel width?
if cpp <= hi
lo := math.min(lo, cpp)
else
hi := math.max(hi, cpp)
numpp += 1
numpp
var sr_up_level = array.new_float(0)
var sr_dn_level = array.new_float(0)
sr_strength = array.new_float(0)
find_loc(strength) =>
ret = array.size(sr_strength)
for i = ret > 0 ? array.size(sr_strength) - 1 : na to 0 by 1
if strength <= array.get(sr_strength, i)
break
ret := i
ret
ret
check_sr(hi, lo, strength) =>
ret = true
for i = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
//included?
if array.get(sr_up_level, i) >= lo and array.get(sr_up_level, i) <= hi or array.get(sr_dn_level, i) >= lo and array.get(sr_dn_level, i) <= hi
if strength >= array.get(sr_strength, i)
array.remove(sr_strength, i)
array.remove(sr_up_level, i)
array.remove(sr_dn_level, i)
ret
else
ret := false
ret
break
ret
var sr_lines = array.new_line(11, na)
var sr_labels = array.new_label(11, na)
for x = 1 to 10 by 1
rate = 100 * (label.get_y(array.get(sr_labels, x)) - close) / close
label.set_text(array.get(sr_labels, x), text=str.tostring(label.get_y(array.get(sr_labels, x))) + '(' + str.tostring(rate, '#.##') + '%)')
label.set_x(array.get(sr_labels, x), x=bar_index + labelloc)
label.set_color(array.get(sr_labels, x), color=label.get_y(array.get(sr_labels, x)) >= close ? color.red : color.lime)
label.set_textcolor(array.get(sr_labels, x), textcolor=label.get_y(array.get(sr_labels, x)) >= close ? color.white : color.black)
label.set_style(array.get(sr_labels, x), style=label.get_y(array.get(sr_labels, x)) >= close ? label.style_label_down : label.style_label_up)
line.set_color(array.get(sr_lines, x), color=line.get_y1(array.get(sr_lines, x)) >= close ? resistancecolor : supportcolor)
if ph or pl
//because of new calculation, remove old S/R levels
array.clear(sr_up_level)
array.clear(sr_dn_level)
array.clear(sr_strength)
//find S/R zones
for x = 0 to array.size(pivotvals) - 1 by 1
= get_sr_vals(x)
if check_sr(hi, lo, strength)
loc = find_loc(strength)
// if strength is in first maxnumsr sr then insert it to the arrays
if loc < maxnumsr and strength >= min_strength
array.insert(sr_strength, loc, strength)
array.insert(sr_up_level, loc, hi)
array.insert(sr_dn_level, loc, lo)
// keep size of the arrays = 5
if array.size(sr_strength) > maxnumsr
array.pop(sr_strength)
array.pop(sr_up_level)
array.pop(sr_dn_level)
for x = 1 to 10 by 1
line.delete(array.get(sr_lines, x))
label.delete(array.get(sr_labels, x))
for x = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
float mid = math.round_to_mintick((array.get(sr_up_level, x) + array.get(sr_dn_level, x)) / 2)
rate = 100 * (mid - close) / close
array.set(sr_labels, x + 1, label.new(x=bar_index + labelloc, y=mid, text=str.tostring(mid) + '(' + str.tostring(rate, '#.##') + '%)', color=mid >= close ? color.red : color.lime, textcolor=mid >= close ? color.white : color.black, style=mid >= close ? label.style_label_down : label.style_label_up))
array.set(sr_lines, x + 1, line.new(x1=bar_index, y1=mid, x2=bar_index - 1, y2=mid, extend=extend.both, color=mid >= close ? resistancecolor : supportcolor, style=Lstyle, width=linewidth))
f_crossed_over() =>
ret = false
for x = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
float mid = math.round_to_mintick((array.get(sr_up_level, x) + array.get(sr_dn_level, x)) / 2)
if close <= mid and close > mid
ret := true
ret
ret
f_crossed_under() =>
ret = false
for x = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
float mid = math.round_to_mintick((array.get(sr_up_level, x) + array.get(sr_dn_level, x)) / 2)
if close >= mid and close < mid
ret := true
ret
ret
alertcondition(f_crossed_over(), title='Resistance Broken', message='Resistance Broken')
alertcondition(f_crossed_under(), title='Support Broken', message='Support Broken')
Session Sweep + Retrace (London + NY) - FixedORB Strategy with confluence. This sets out the 5 min session sweep from London and NY, and highlights a test back into the order zone with fib retracement.
S&P 500 Offense vs. Defense RatioS&P 500 Offense vs. Defense Ratio
Formula: (XLK+XLY+XLC+XLF+XLI) / (XLP+XLU+XLRE+XLV+XLE)
change of offensive sectors vs defensive sectors
The Operator Schedule (Daily/Repeating) - Time-Based AlertsKKRESULT PLAYBOOK SUCCES FORMULA
DAILY ROUTINE — THE OPERATOR SCHEDULE
• 5 AM wake-up. (5-6hrs)
• Pre-workout meal.
• Boxing or conditioning.
• Fuel + hydration.
• Morning silence.
• Chart prep.
• Trade 9:30 AM – 3 PM.
• Journal.
• Shutdown routine to reset. A consistent routine builds a consistent trader.
• Edit YouTube Video
• 12 PM Fuel + hydration
TP Calculator (70% & 1.5x)//@version=5
indicator("TP Calculator (70% & 1.5x)", overlay=true)
// -------- Inputs --------
entry = input.float(100.0, "Entry Price")
stoploss = input.float(90.0, "Stop Loss")
// -------- Determine Direction --------
// اگر SL پایینتر بود = پوزیشن Long
// اگر SL بالاتر بود = پوزیشن Short
isLong = stoploss < entry ? true : false
// -------- Calculations --------
distance = math.abs(entry - stoploss)
// جهت پوزیشن (بالا یا پایین TP میرود)
direction = isLong ? 1 : -1
tp1 = entry + direction * (distance * 0.70) // 70%
tp2 = entry + direction * (distance * 1.50) // 1.5x
// -------- Plot Levels --------
plot(entry, "Entry", color=color.blue, linewidth=2)
plot(stoploss, "Stop Loss", color=color.red, linewidth=2)
plot(tp1, "TP1 (70%)", color=color.green, linewidth=2)
plot(tp2, "TP2 (1.5x)", color=color.orange, linewidth=2)
Live Session Extremes: Asia / London / NY (5m)This script automatically tracks and plots the live high and low levels of the three major Forex trading sessions:
Asia Session (18:00–03:00) — Teal
London Session (03:00–08:00) — Blue
New York Session (08:00–12:00) — Red
Designed specifically for 5-minute charts, it updates in real time as each session forms new highs or lows.
You always see the most recent session’s levels, cleanly plotted and color-coded on your chart.
✔ Features
Live updating lines for each session’s high & low
Lines anchored to the exact candles that created the extreme
Auto-cleaning: old session levels are deleted when a new session begins
Clear labeling:
Asia High / Asia Low (Teal)
London High / London Low (Blue)
NY High / NY Low (Red)
Extend-right option for projecting session levels into future price action
Built for precision session-based strategies such as:
Liquidity grabs
Session sweeps
BOS/CHOCH analysis
ICT-style trading
High/low power levels
Simple Monthly Up/Down HighlighterThis just highlights the month 1-12 you have selected. If it is a down month, it displays red. If it is a green month, it displays green.
The default is set to 11 (November), so January would be 1, December 12. Etc.
Hope this helps highlight historical monthly moves for you!
A++ / A+ REAL EDGE — Long & Short (No Fakeouts)A++ / A+ REAL EDGE — Long & Short (No Fakeouts)
The cleanest, strictest, highest-probability A++/A+ confluence indicator on TradingView.
Only triggers when EVERYTHING lines up perfectly:
• Real God candle (≥85% body) + volume spike ≥2×
• Alligator mouth WIDE OPEN and widening
• MACD histogram expanding in direction
• SAR flipped + White Dot confirmation
• Price touching Daily/4H PDH/PDL/VWAP
• Requires strong green/red candle + breakout of previous
Match Finder [theUltimator5]Match Finder is the dating app of indicators. It takes your current ticker and finds the most compatible match over a recent time period. The match may not be Mr. right, but it is Mr. right now. It doesn't forecast future connection, but it tells you current compatibility for today.
Jokes aside, it is a pattern–comparison tool that was designed to find the ticker that tracks most closely to the one you are currently looking at. It scans a user-defined list of 40 tickers (pre-set to a bunch of liquid ETFs) and finds which one most closely matches the recent price action of the current chart over a fixed lookback window.
LOGIC BEHIND THE SCENES
For each bar, the script:
Takes the last N bars (Correlation Window Length) of the current symbol.
Takes the last N bars of each selected comparison ticker.
Calculates the Pearson correlation between the current symbol and each comparison ticker.
Identifies the single best-matching ticker (highest positive correlation, excluding the current symbol itself).
Rescales and overlays that matched segment on the chart so you can visually compare shapes.
Optionally shows a correlation table with all tickers and their correlation values.
The use case of this indicator is to help you see which symbol has recently moved most similarly to your current chart, and how that shape looks when overlaid in the same panel. It helps you see which sectors it may be following most closely to.
Here is an image with arrows showing the elements of this indicator that will be mostly explained later.
USER INPUTS
1. Correlation Window Length
Default: 30
Range: 10–500
This is the number of bars used to compare the current symbol against each ticker.
Important - Larger values produce more “global” shape comparison but increase computational load and may cause the indicator to timeout if the length is too long
2. Drawing Mode
Options:
Scale Only - Adjusts min and max of the plotted line segment to match the chart over the range
Scale & Rotate - Scales as above, but matches the first and last point to the close of the chart over the range. This effectively rotates the pattern to force it to track the chart to an extent.
3. Show Correlation Table
When enabled (disabled by default), shows a table in the bottom-right of the chart that displays the correlation values over the lookback range for all 40 tickers. The best fit ticker is highlighted.
4. Best Fit Line Color
Color used to draw the overlaid best-match segment (yellow by default).
5. Ticker inputs (1–40)
Default set to a broad universe of major ETFs (e.g., SPY, QQQ, IWM, sector and bond ETFs, commodities, etc.).
You can replace these with any symbols supported by your data feed (stocks, ETFs, indexes, etc.).
The script always excludes the current chart’s symbol from being considered as its own best match.
NOTE: THIS INDICATOR IS EXTREMELY MEMORY INTENSIVE AND MAY TAKE SEVERAL SECONDS TO LOAD. PLEASE BE PATIENT AND GIVE THE INDICATOR UP TO 20 SECONDS FOR THE DATA TO DISPLAY
Fredo Stochastics (On Bar Close)ninjatrader stochastics , calculate set to ''on bar close by default''
OB & FVG IndicatorOB & FVG Indicator
SHORT DESCRIPTION
Clean and simple visualization of Order Blocks (OB) and Fair Value Gaps (FVG) with automatic detection and customizable display settings. Perfect for Smart Money Concepts (SMC) traders.
FULL DESCRIPTION
📊 OVERVIEW
This indicator automatically detects and displays two key Smart Money Concepts (SMC) elements on your chart:
Order Blocks (OB) - Institutional supply and demand zones
Fair Value Gaps (FVG) - Price imbalances that often get revisited
Designed for clarity and simplicity, this tool helps traders identify high-probability reversal zones and potential entry points based on institutional trading behavior.
🔧 KEY FEATURES
Order Blocks Detection:
Automatically identifies bullish OB (last bearish candle before upward move)
Automatically identifies bearish OB (last bullish candle before downward move)
Customizable colors for bullish/bearish zones
Optional labels for easy identification
Minimum size filter to eliminate noise
Fair Value Gaps Detection:
Detects bullish FVG (gap between candle high and previous candle low)
Detects bearish FVG (gap between candle low and previous candle high)
Color-coded zones for instant recognition
Auto-deletion of filled gaps (optional)
Minimum size filter in pips
Visual Customization:
Adjustable transparency levels
Custom color schemes for all elements
Configurable box extension length
Toggle labels on/off
Clean, non-cluttered chart display
Performance Optimization:
Automatic deletion of old boxes to maintain chart performance
Maximum 100 boxes stored at once
Lightweight code for fast rendering
⚙️ HOW TO USE
1. Installation
Click "Add to Chart"
The indicator will appear on your chart overlay
2. Configuration
Open Settings panel (gear icon)
Customize colors, transparency, and filters under respective groups
Adjust minimum size filters to match your trading style and timeframe
3. Interpretation
Order Blocks:
Blue zones = Bullish OB (potential support/demand)
Orange zones = Bearish OB (potential resistance/supply)
Price often reacts strongly when revisiting these zones
Fair Value Gaps:
Green zones = Bullish FVG (potential retracement target in uptrends)
Red zones = Bearish FVG (potential retracement target in downtrends)
Gaps are often "filled" before continuation moves
📈 BEST PRACTICES
Timeframe Recommendations:
15m - 1H charts: Best for intraday trading
4H - Daily charts: Best for swing trading
Higher timeframes produce more reliable zones
Trading Strategy Tips:
Wait for price to return to OB/FVG zones before entry
Combine with other confirmation signals (candlestick patterns, volume)
Higher timeframe OBs/FVGs carry more weight
Use as confluence with support/resistance levels
Filter Settings:
Lower timeframes: Increase minimum size filters to reduce noise
Higher timeframes: Can use smaller minimum size settings
Adjust based on asset volatility (crypto vs. forex vs. stocks)
⚠️ IMPORTANT NOTES
This indicator identifies potential zones but does not guarantee reversals
Always use proper risk management and stop losses
Combine with price action analysis for best results
Not all OBs/FVGs will result in reactions
Past performance does not guarantee future results
🎯 IDEAL FOR:
Smart Money Concepts (SMC) traders
ICT (Inner Circle Trader) methodology followers
Swing traders and day traders
Support/resistance zone identification
Confluence-based trading strategies
📝 SETTINGS OVERVIEW
FVG Settings:
Enable/disable FVG display
Bullish and bearish color selection
Extension length (bars)
Auto-delete filled gaps option
Minimum gap size filter (pips)
OB Settings:
Enable/disable OB display
Bullish and bearish color selection
Extension length (bars)
Show/hide labels
Minimum block size filter (pips)
✨ Clean, Simple, Effective
No complicated signals or cluttered displays - just clear visualization of the institutional footprints that matter most.
OB & FVG IndicatorClean and simple visualization of Order Blocks (OB) and Fair Value Gaps (FVG) with automatic detection and customizable display settings. Perfect for Smart Money Concepts (SMC) traders.
FULL DESCRIPTION
📊 OVERVIEW
This indicator automatically detects and displays two key Smart Money Concepts (SMC) elements on your chart:
Order Blocks (OB) - Institutional supply and demand zones
Fair Value Gaps (FVG) - Price imbalances that often get revisited
Designed for clarity and simplicity, this tool helps traders identify high-probability reversal zones and potential entry points based on institutional trading behavior.
🔧 KEY FEATURES
Order Blocks Detection:
Automatically identifies bullish OB (last bearish candle before upward move)
Automatically identifies bearish OB (last bullish candle before downward move)
Customizable colors for bullish/bearish zones
Optional labels for easy identification
Minimum size filter to eliminate noise
Fair Value Gaps Detection:
Detects bullish FVG (gap between candle high and previous candle low)
Detects bearish FVG (gap between candle low and previous candle high)
Color-coded zones for instant recognition
Auto-deletion of filled gaps (optional)
Minimum size filter in pips
Visual Customization:
Adjustable transparency levels
Custom color schemes for all elements
Configurable box extension length
Toggle labels on/off
Clean, non-cluttered chart display
Performance Optimization:
Automatic deletion of old boxes to maintain chart performance
Maximum 100 boxes stored at once
Lightweight code for fast rendering
⚙️ HOW TO USE
1. Installation
Click "Add to Chart"
The indicator will appear on your chart overlay
2. Configuration
Open Settings panel (gear icon)
Customize colors, transparency, and filters under respective groups
Adjust minimum size filters to match your trading style and timeframe
3. Interpretation
Order Blocks:
Blue zones = Bullish OB (potential support/demand)
Orange zones = Bearish OB (potential resistance/supply)
Price often reacts strongly when revisiting these zones
Fair Value Gaps:
Green zones = Bullish FVG (potential retracement target in uptrends)
Red zones = Bearish FVG (potential retracement target in downtrends)
Gaps are often "filled" before continuation moves
📈 BEST PRACTICES
Timeframe Recommendations:
15m - 1H charts: Best for intraday trading
4H - Daily charts: Best for swing trading
Higher timeframes produce more reliable zones
Filter Settings:
Lower timeframes: Increase minimum size filters to reduce noise
Higher timeframes: Can use smaller minimum size settings
Adjust based on asset volatility (crypto vs. forex vs. stocks)
⚠️ IMPORTANT NOTES
This indicator identifies potential zones but does not guarantee reversals
Always use proper risk management and stop losses
Combine with price action analysis for best results
Not all OBs/FVGs will result in reactions
Past performance does not guarantee future results
📝 SETTINGS OVERVIEW
FVG Settings:
Enable/disable FVG display
Bullish and bearish color selection
Extension length (bars)
Auto-delete filled gaps option
Minimum gap size filter (pips)
OB Settings:
Enable/disable OB display
Bullish and bearish color selection
Extension length (bars)
Show/hide labels
Minimum block size filter (pips)
✨ Clean, Simple, Effective
No complicated signals or cluttered displays - just clear visualization of the institutional footprints that matter most.
OB & FVG シンプル表示Here's a professional TradingView indicator description in English:
OB & FVG Indicator
SHORT DESCRIPTION
Clean and simple visualization of Order Blocks (OB) and Fair Value Gaps (FVG) with automatic detection and customizable display settings. Perfect for Smart Money Concepts (SMC) traders.
FULL DESCRIPTION
📊 OVERVIEW
This indicator automatically detects and displays two key Smart Money Concepts (SMC) elements on your chart:
Order Blocks (OB) - Institutional supply and demand zones
Fair Value Gaps (FVG) - Price imbalances that often get revisited
Designed for clarity and simplicity, this tool helps traders identify high-probability reversal zones and potential entry points based on institutional trading behavior.
🔧 KEY FEATURES
Order Blocks Detection:
Automatically identifies bullish OB (last bearish candle before upward move)
Automatically identifies bearish OB (last bullish candle before downward move)
Customizable colors for bullish/bearish zones
Optional labels for easy identification
Minimum size filter to eliminate noise
Fair Value Gaps Detection:
Detects bullish FVG (gap between candle high and previous candle low)
Detects bearish FVG (gap between candle low and previous candle high)
Color-coded zones for instant recognition
Auto-deletion of filled gaps (optional)
Minimum size filter in pips
Visual Customization:
Adjustable transparency levels
Custom color schemes for all elements
Configurable box extension length
Toggle labels on/off
Clean, non-cluttered chart display
Performance Optimization:
Automatic deletion of old boxes to maintain chart performance
Maximum 100 boxes stored at once
Lightweight code for fast rendering
⚙️ HOW TO USE
1. Installation
Click "Add to Chart"
The indicator will appear on your chart overlay
2. Configuration
Open Settings panel (gear icon)
Customize colors, transparency, and filters under respective groups
Adjust minimum size filters to match your trading style and timeframe
3. Interpretation
Order Blocks:
Blue zones = Bullish OB (potential support/demand)
Orange zones = Bearish OB (potential resistance/supply)
Price often reacts strongly when revisiting these zones
Fair Value Gaps:
Green zones = Bullish FVG (potential retracement target in uptrends)
Red zones = Bearish FVG (potential retracement target in downtrends)
Gaps are often "filled" before continuation moves
📈 BEST PRACTICES
Timeframe Recommendations:
15m - 1H charts: Best for intraday trading
4H - Daily charts: Best for swing trading
Higher timeframes produce more reliable zones
Trading Strategy Tips:
Wait for price to return to OB/FVG zones before entry
Combine with other confirmation signals (candlestick patterns, volume)
Higher timeframe OBs/FVGs carry more weight
Use as confluence with support/resistance levels
Filter Settings:
Lower timeframes: Increase minimum size filters to reduce noise
Higher timeframes: Can use smaller minimum size settings
Adjust based on asset volatility (crypto vs. forex vs. stocks)
⚠️ IMPORTANT NOTES
This indicator identifies potential zones but does not guarantee reversals
Always use proper risk management and stop losses
Combine with price action analysis for best results
Not all OBs/FVGs will result in reactions
Past performance does not guarantee future results
📝 SETTINGS OVERVIEW
FVG Settings:
Enable/disable FVG display
Bullish and bearish color selection
Extension length (bars)
Auto-delete filled gaps option
Minimum gap size filter (pips)
OB Settings:
Enable/disable OB display
Bullish and bearish color selection
Extension length (bars)
Show/hide labels
Minimum block size filter (pips)
✨ Clean, Simple, Effective
No complicated signals or cluttered displays - just clear visualization of the institutional footprints that matter most.






















