Daily Swing High/Low Fibs (Clean v6)This indicator automatically detects the latest Daily Swing High and Swing Low and plots clean Fibonacci retracement levels based on those swings.
Even if you switch to 4H, 1H, 15m, or 5m, the levels remain locked to the Daily timeframe, giving you consistent higher-timeframe structure on any chart.
Indicators and strategies
Buyer-Seller Locomotive IndexBuyer-Seller Locomotive Index (BSLI)
An original indicator that measures buyer and seller pressure, momentum shifts, and structural control in the market.
Overview
The Buyer-Seller Locomotive Index evaluates candle-level positioning relative to an adaptive EMA-based reference price. It calculates bull vs bear strength percentages and Total Power momentum using fast and slow EMAs, providing insight into which side currently dominates market structure. By combining pressure analysis with momentum smoothing, BSLI highlights both the intensity and direction of market control.
Features
Bull/Bear Strength Percentages: Normalized 0–100 values showing current dominance and threshold-based high-strength alerts.
Total Power Momentum: Fast and slow EMA crossover signals with a histogram to visualize expansion or contraction of pressure.
Visual Markers: Optional fight diamonds highlight candles intersecting the reference price, while dynamic labels show the exact strength percentages.
Crossover Signals: Circles mark potential shifts in momentum, helping to identify early transitions in market control.
Customizable Display: Users can toggle labels, markers, and histogram visibility for a clean or detailed chart view.
How to Use
BSLI provides traders with a multi-layered view of market structure:
Observe shifts in buyer vs seller dominance.
Spot early momentum transitions before trends become obvious.
Confirm price structure with Total Power and strength percentages.
Highlight periods of compression, conflict, or indecision for additional context.
This indicator is intended as a supportive analysis tool. Traders should combine it with personal methodology, risk management, and other analysis techniques. It is not a standalone trade signal.
Important Notes
Measures relative pressure, not absolute volume.
Percentages reflect current structure, not predicted price direction.
Signals are contextual; do not rely solely on crossovers for trading decisions.
Uses no lookahead; all calculations are based on completed bars.
Results may vary by asset, timeframe, and market volatility.
Originality
BSLI uniquely combines adaptive pressure extraction, normalized strength percentages, dual-EMA power momentum, conflict detection, and integrated labeling. This multi-component approach provides a clear and actionable view of the evolving balance between buyers and sellers, supporting both short-term and structural analysis.
3-bar Swing Liquidity Grab📊 3-BAR SWING LIQUIDITY GRAB
WHAT IT DOES
Automatically detects 3-bar swing highs/lows and alerts you to liquidity grab moments — when price breaks structural levels to trigger stop-losses, then reverses.
SIGNALS AT A GLANCE
Signal What It Means Trade Idea
SH 🟠▼ Swing High (Resistance) Reference level
SL 🔵▲ Swing Low (Support) Reference level
LQH 🔴❌ Fake break ABOVE resistance SHORT ⬇️
LQL 🟢❌ Fake break BELOW support LONG ⬆️
HOW TO TRADE IT
Spot the trend — Is price going up or down?
Wait for signal — LQL (green) in uptrend, LQH (red) in downtrend
Enter on signal — Place order on that bar
Stop Loss — Just outside the swing level
Take Profit — At the next swing level
SETTINGS EXPLAINED
Swing length: 1 = 3-bar swing, 2 = 5-bar swing (use 1 for scalp, 2 for larger TF)
Lookback bars: Time window to find liquidity grabs (10-20 for scalp, 50+ for position)
Toggles: Show/hide swing markers and signals
BEST ON THESE TIMEFRAMES
TF Type Settings
M5-M15 Scalp SL: 1, LB: 10-15
M15-H1 Intraday SL: 1, LB: 15-20
H1-H4 Swing SL: 1-2, LB: 20-50
D+ Position SL: 2, LB: 50+
KEY RULES
✅ DO:
Trade signals aligned with major trend
Always use stop loss
Use 2-5% risk per trade
Confirm with price action
❌ DON'T:
Trade choppy/sideways markets
Ignore the trend
Chase signals
Overtrade
REAL EXAMPLE
LONG Trade (LQL Signal):
text
Uptrend → Swing Low forms at 1.0950
→ Price dips to 1.0930 (below SL)
→ Closes at 1.0955 (above SL) = GREEN ❌ (LQL)
→ BUY at 1.0960
→ Stop Loss: 1.0920
→ Take Profit: 1.1050 (previous Swing High)
WORKS ON
✅ Crypto (Bitcoin, Ethereum, Altcoins)
✅ Forex (EUR/USD, GBP/USD, etc.)
✅ Stocks & Indices
✅ Commodities (Gold, Oil, etc.)
Any asset, any timeframe, any market.
DISCLAIMER
This is a technical analysis tool, not financial advice. Past performance does not guarantee future results. Always use proper risk management and test on a demo account first.
FCPO MASTER v6 – Sideway + Breakout + OB + FVG (TUPLE SAFE)TL;DR cepat
1. Gunakan M5 untuk entry & OB/FVG confirmation.
2. Gunakan M15 untuk confirm trend/false breakout.
3. Gunakan H1 untuk bias arah (overall market).
4. Entry hanya bila signal + OB/FVG/candle rejection (script buatkan).
5. SL 5–8 tick, TP 10–25 tick ikut setup (sideway vs breakout).
6. Follow checklist setiap trade — jangan lompat.
________________________________________
Setup awal (1–2 min)
1. Pasang script FCPO Sideway MASTER – OB + Imbalance + Confirmation di TradingView.
2. Timeframes: buka M5, M15, H1 (susun 3 chart atau 1 chart multi-timeframe).
3. Input default: ATR14, Breakout Buffer 5 tick, RangeLen 20, ADX14, TP12, SL8. (Kau boleh tweak nanti).
4. Aktifkan alerts pada BUY Confirm / SELL Confirm / Sideway Buy / Sideway Sell.
________________________________________
Step-by-step trading process
1) Mulakan dengan H1 — tentukan bias HTF
• Lihat H1 untuk jawapan: Trend Up / Down / Sideway.
• Rule ringkas:
o ADX H1 > 20 + price above H1 EMA → bias Bull
o ADX H1 > 20 + price below H1 EMA → bias Bear
o ADX H1 < 20 → market HTF sideway (no strong bias)
Kenapa: H1 bagi kau idea “kalau breakout pada M5, patut follow atau tolak”.
________________________________________
2) Pergi ke M15 — confirm trend & valid breakout
• M15 kena setuju dengan idea breakout.
o Untuk strong breakout: M15 kena tunjuk candle close di atas/bawah range + volume naik.
o Kalau M5 breakout tapi M15 tak setuju (M15 masih sideway) → treat as fakeout. Jangan masuk.
________________________________________
3) M5 — cari entry & confirmation (OB/FVG + candle)
• M5 adalah tempat kau buat keputusan masuk.
• Tunggu script keluarkan Sideway Buy/Sell atau Breakout Buy/Sell.
• CONFIRM entry mesti ada sekurang-kurangnya 1 dari:
o Bull/Bear Order Block searah signal (script detect).
o FVG / Imbalance zone dipenuhi & price retest.
o Candle rejection (pinbar / bearish/bullish engulfing) pada zone.
Jika tiada confirmation → no trade.
________________________________________
4) Checklist sebelum tekan Buy/Sell (MUST)
• H1 bias tidak melawan trade (prefer sama arah).
• M15 confirm breakout / trend or neutral.
• Script keluarkan signal (sideway or breakout).
• OB or FVG atau candle rejection ada.
• ATR kenaikan jika breakout (untuk breakout trade).
• Volume spike jika breakout.
• Risk:SL <= 2% akaun (position sizing).
Kalau semua ticked → boleh entry.
________________________________________
5) Setting SL / TP & position sizing
• Sideway (scalp): SL = 5–8 tick, TP = 8–12 tick.
• Breakout (trend): SL = 8–12 tick, TP = 15–25+ tick (trail later).
• Position sizing: Risk per trade 1–2%.
o Lot size = (Account Risk RM × 1 tick value) / (SL ticks × tickValue) — (kalau kau gunakan fixed tick value, adjust ikut lot).
(Script tunjuk SL & TP label — follow itu.)
________________________________________
6) Entry types
• A. Sideway Reversal (M5)
o Signal: Sideway Buy / Sideway Sell
o Confirm: OB/FVG or rejection candle at range bottom/top
o Trade: scalp target 8–12 tick, tight SL 5–8 tick
• B. Breakout (M5 entry, M15 confirm)
o Signal: Breakout Buy/Sell (Strong)
o Confirm: ATR expanding + volume spike + M15 alignment
o Trade: trend follow, TP 15–25 tick, trailing stop active
• C. Retest Entry
o Breakout happens, price returns to retest range / OB / FVG → wait for rejection candle then enter. Safer.
________________________________________
7) Trailing & exit rules
• Jika useTrail = true script plots trailing stop (ATR × multiplier).
• Exit rules:
1. Hit TP → close.
2. Hit SL → close.
3. If trailing stop hit → close.
4. If opposing confirmed signal muncul (e.g., SELL confirm while long) → consider close early.
5. If H1 bias flips strongly vs trade → tighten stop or close.
________________________________________
8) Multiple signals & scaling
• Never add to losing position (no averaging down).
• If want scale-in on confirmed trend: add 1 partial size after price moves +10–12 tick in favor and shows continuation candle + no bearish OB/FVG.
• Keep aggregated risk within your max (2–3%).
________________________________________
9) Example trade walkthrough (concrete)
• RangeHigh = 4065, RangeLow = 4035 (contoh).
• Market sideway M5.
Case A — Sideway Sell:
1. Price touches 4064–4065, script shows sidewaySell.
2. Lihat OB: ada bear OB zone di 4062–4066 → confirm.
3. Candle rejection (bearish pinbar) muncul → enter SELL M5.
4. Set SL = 5 tick above rangeHigh = 4070, TP = 10 tick → 4055.
5. Trail jika price turun > 8 tick: aktifkan trailing.
6. Close at TP or trail/SL.
Case B — Breakout Buy:
1. Price closes above 4065 + 5 tick buffer = 4070 on M5. Script shows trueBreakUp.
2. M15 shows candle close above M15 resistance + volume spike → confirm.
3. Enter BUY, SL = 8 tick below entry, TP initial 20 tick, trail with ATR×1.5.
4. Move stop to breakeven after +10 tick, scale out half at +12 tick, leave rest to trail.
________________________________________
10) Journal & review
• Semua trade: record entry time, TF, reason (which confirmations), SL/TP, result, lesson.
• Weekly review: check which confirmation worked best (OB vs FVG vs candle) and tweak settings.
________________________________________
11) Tweaks / optimisations cepat
• Jika terlalu banyak false sideway signals → kurangkan touchDist ke 2 tick.
• Kalau fakeout breakout banyak → tambah tickBuf ke 6–8.
• Nak lebih konservatif → cuma trade breakout yang juga setuju M15.
________________________________________
12) Alerts & execution (practical)
• Pasang alert pada BUY Confirm / SELL Confirm (script).
• Kalau kau guna broker yang support one-click order, siap sediakan template order (SL/TP default).
• Kalau manual, bila alert masuk: buka M5, cepat confirm OB/FVG & candle rejection → entry.
________________________________________
Quick reference table (handy)
• TF utama entry: M5
• Confirm mid-TF: M15
• Bias HTF: H1
• Sideway SL/TP: SL 5–8, TP 8–12
• Breakout SL/TP: SL 8–12, TP 15–25+
• Mandatory confirmation: (Script signal) + (OB or FVG or candle)
Aydan ScalperBy when EMA 8 cross EMA 21 from Below to Abouve and SELL when EMA 21 cross EMA 8 from Abouve to Belove
3rd Candle Coach – VWAP/ORB Tool3rd Candle Coach, VWAP and ORB Logic Script
This script helps you spot clean setups by checking your key conditions at the same time. It shows a simple pass or fail for each piece and prints a signal only when everything agrees.
What this script checks:
1. **3 Candle Breakouts from VWAP, Volume Weighted Average Price, or ORB, Opening Range Breakout**
* Needs two full candles above or below VWAP or ORB
* Third candle must follow in the same direction
* Marks the setup once all three confirm
2. **Trend Using EMAs, Exponential Moving Averages (9 and 21)**
* Shows if the fast EMA is above or below the slow EMA
* Can confirm if the EMAs support the trade direction
3. **Momentum Using RSI, Relative Strength Index, and MACD, Moving Average Convergence Divergence**
* RSI must clear your level for longs or shorts
* MACD must agree with the direction
4. **Volume Check, Simple and Relative Volume Comparison**
* Compares current volume to a volume moving average
* Can check relative volume for strength
5. **Higher Timeframe Trend Using HTF EMA, Higher Timeframe Exponential Moving Average**
* Shows larger trend direction for bias
6. **Session Timing Filter, Session Based Signal Control**
* Lets signals fire only inside your chosen session window
7. **ATR Extension Check, Average True Range Distance from VWAP or ORB**
* Measures how far price has stretched from VWAP or ORB using ATR units
* Blocks signals when the move is too extended
8. **Long and Short Signal Markers, Directional Trade Alerts**
* Prints a long marker when all enabled conditions pass
* Prints a short marker when all enabled conditions pass
9. **Condition Breakdown Panel, Real Time Pass or Fail Table**
* Shows pass or fail for trend, RSI, MACD, volume, relative volume, higher timeframe bias, session, and extension
10. **Explanation Labels, Signal Reasoning Summary**
* When a signal fires, a label shows which conditions triggered it
---
This script gives you a clean checklist and one clear signal only when everything lines up. It helps you see the setup form step by step and keeps your chart easy to read.
---
note:
I built this to help you spot when indicators actually agree. It is mainly a training script. Alerts on the one minute fire a lot, so turn them off or use a five minute chart. You can turn almost everything off to keep it as simple or strict as you want.
📈 Price Crossed Above 50 SMA (One-Time Marker)//@version=5
indicator("📈 Price Above 50 SMA Marker", overlay=true)
// === Calculate 50 SMA ===
sma50 = ta.sma(close, 50)
priceAboveSMA50 = close > sma50
// === Plot the 50 SMA ===
plot(sma50, title="50 SMA", color=color.orange, linewidth=2)
// === Plot Shape When Price Is Above 50 SMA ===
plotshape(
priceAboveSMA50, // condition to trigger
title="Price Above 50 SMA", // tooltip title
location=location.abovebar, // place above candle
color=color.green, // shape color
style=shape.triangleup, // shape style
size=size.small, // size
text="SMA+" // optional label
)
Khango's Key//@version=5
//@sbtnc thank you for doing the base code
//Added additional levels for convienience sake.
indicator('Key Levels SpacemanBTC IDWM', shorttitle='Khangos Key', overlay=true, max_lines_count=100)
//35 works
displayStyle = input.string(defval='Standard', title='Display Style', options= , inline='Display')
mergebool = input.bool(defval=true, title='Merge Levels?', inline='Display')
distanceright = input.int(defval=30, title='Distance', minval=5, maxval=500, inline='Dist')
radistance = input.int(defval=250, title='Anchor Distance', minval=5, maxval=500, inline='Dist')
labelsize = input.string(defval='Medium', title='Text Size', options= )
linesize = input.string(defval='Small', title='Line Width', options= , inline='Line')
linestyle = input.string(defval='Solid', title='Line Style', options= , inline='Line')
GlobalTextType = input.bool(defval=false, title='Global Text ShortHand', tooltip='Enable for shorthand text on all text')
var globalcoloring = input.bool(defval=false, title='Global Coloring', tooltip='Enable for all color controls via one color', inline='GC')
GlobalColor = input.color(title='', defval=color.white, inline='GC')
//var show_tails = input(defval = false, title = "Always Show", type = input.bool)
= request.security(syminfo.tickerid, 'D', , lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, 'D', [time , high ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, 'D', [time , low ], lookahead=barmerge.lookahead_on)
cdailyh_open = request.security(syminfo.tickerid, 'D', high, lookahead=barmerge.lookahead_on)
cdailyl_open = request.security(syminfo.tickerid, 'D', low, lookahead=barmerge.lookahead_on)
var monday_time = time
var monday_high = high
var monday_low = low
= request.security(syminfo.tickerid, 'W', , lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, 'W', [time , high ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, 'W', [time , low ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, 'M', , lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, 'M', [time , high ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, 'M', [time , low ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, '3M', , lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, '3M', [time , high ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, '3M', [time , low ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, '12M', , lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, '12M', , lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, '12M', , lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, '240', , lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, '240', [time , high ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, '240', [time , low ], lookahead=barmerge.lookahead_on)
//------------------------------ Inputs -------------------------------
var is_intra_enabled = input.bool(defval=false, title='Open', group='4H', inline='4H')
var is_intrarange_enabled = input.bool(defval=false, title='Prev H/L', group='4H', inline='4H')
var is_intram_enabled = input.bool(defval=false, title='Prev Mid', group='4H', inline='4H')
IntraTextType = input.bool(defval=false, title='ShortHand', group='4H', inline='4Hsh')
var is_daily_enabled = input.bool(defval=true, title='Open', group='Daily', inline='Daily')
var is_dailyrange_enabled = input.bool(defval=false, title='Prev H/L', group='Daily', inline='Daily')
var is_dailym_enabled = input.bool(defval=false, title='Prev Mid', group='Daily', inline='Daily')
DailyTextType = input.bool(defval=false, title='ShortHand', group='Daily', inline='Dailysh')
var is_monday_enabled = input.bool(defval=true, title='Range', group='Monday Range', inline='Monday')
var is_monday_mid = input.bool(defval=true, title='Mid', group='Monday Range', inline='Monday')
var untested_monday = false
MondayTextType = input.bool(defval=false, title='ShortHand', group='Monday Range', inline='Mondaysh')
var is_weekly_enabled = input.bool(defval=true, title='Open', group='Weekly', inline='Weekly')
var is_weeklyrange_enabled = input.bool(defval=true, title='Prev H/L', group='Weekly', inline='Weekly')
var is_weekly_mid = input.bool(defval=true, title='Prev Mid', group='Weekly', inline='Weekly')
WeeklyTextType = input.bool(defval=false, title='ShortHand', group='Weekly', inline='Weeklysh')
var is_monthly_enabled = input.bool(defval=true, title='Open', group='Monthly', inline='Monthly')
var is_monthlyrange_enabled = input.bool(defval=true, title='Prev H/L', group='Monthly', inline='Monthly')
var is_monthly_mid = input.bool(defval=true, title='Prev Mid', group='Monthly', inline='Monthly')
MonthlyTextType = input.bool(defval=false, title='ShortHand', group='Monthly', inline='Monthlysh')
var is_quarterly_enabled = input.bool(defval=true, title='Open', group='Quarterly', inline='Quarterly')
var is_quarterlyrange_enabled = input.bool(defval=false, title='Prev H/L', group='Quarterly', inline='Quarterly')
var is_quarterly_mid = input.bool(defval=true, title='Prev Mid', group='Quarterly', inline='Quarterly')
QuarterlyTextType = input.bool(defval=false, title='ShortHand', group='Quarterly', inline='Quarterlysh')
var is_yearly_enabled = input.bool(defval=true, title='Open', group='Yearly', inline='Yearly')
var is_yearlyrange_enabled = input.bool(defval=false, title='Current H/L', group='Yearly', inline='Yearly')
var is_yearly_mid = input.bool(defval=true, title='Mid', group='Yearly', inline='Yearly')
YearlyTextType = input.bool(defval=false, title='ShortHand', group='Yearly', inline='Yearlysh')
var is_londonrange_enabled = input.bool(defval=false, title='London Range', group='FX Sessions', inline='FX')
var is_usrange_enabled = input.bool(defval=false, title='New York Range', group='FX Sessions', inline='FX')
var is_asiarange_enabled = input.bool(defval=false, title='Asia Range', group='FX Sessions', inline='FX')
SessionTextType = input.bool(defval=false, title='ShortHand', group='FX Sessions', inline='FXColor')
Londont = input.session("0800-1600", "London Session")
USt = input.session("1400-2100", "New York Session")
Asiat = input.session("0000-0900", "Tokyo Session")
DailyColor = input.color(title='', defval=#08bcd4, group='Daily', inline='Dailysh')
MondayColor = input.color(title='', defval=color.white, group='Monday Range', inline='Mondaysh')
WeeklyColor = input.color(title='', defval=#fffcbc, group='Weekly', inline='Weeklysh')
MonthlyColor = input.color(title='', defval=#08d48c, group='Monthly', inline='Monthlysh')
YearlyColor = input.color(title='', defval=color.red, group='Yearly', inline='Yearlysh')
quarterlyColor = input.color(title='', defval=color.red, group='Quarterly', inline='Quarterlysh')
IntraColor = input.color(title='', defval=color.orange, group='4H', inline='4Hsh')
LondonColor = input.color(title='', defval=color.white, group='FX Sessions', inline='FXColor')
USColor = input.color(title='', defval=color.white, group='FX Sessions', inline='FXColor')
AsiaColor = input.color(title='', defval=color.white, group='FX Sessions', inline='FXColor')
var pdhtext = GlobalTextType or DailyTextType ? 'PDH' : 'Prev Day High'
var pdltext = GlobalTextType or DailyTextType ? 'PDL' : 'Prev Day Low'
var dotext = GlobalTextType or DailyTextType ? 'DO' : 'Daily Open'
var pdmtext = GlobalTextType or DailyTextType ? 'PDM' : 'Prev Day Mid'
var pwhtext = GlobalTextType or WeeklyTextType ? 'PWH' : 'Prev Week High'
var pwltext = GlobalTextType or WeeklyTextType ? 'PWL' : 'Prev Week Low'
var wotext = GlobalTextType or WeeklyTextType ? 'WO' : 'Weekly Open'
var pwmtext = GlobalTextType or WeeklyTextType ? 'PWM' : 'Prev Week Mid'
var pmhtext = GlobalTextType or MonthlyTextType ? 'PMH' : 'Prev Month High'
var pmltext = GlobalTextType or MonthlyTextType ? 'PML' : 'Prev Month Low'
var motext = GlobalTextType or MonthlyTextType ? 'MO' : 'Monthly Open'
var pmmtext = GlobalTextType or MonthlyTextType ? 'PMM' : 'Prev Month Mid'
var pqhtext = GlobalTextType or QuarterlyTextType ? 'PQH' : 'Prev Quarter High'
var pqltext = GlobalTextType or QuarterlyTextType ? 'PQL' : 'Prev Quarter Low'
var qotext = GlobalTextType or QuarterlyTextType ? 'QO' : 'Quarterly Open'
var pqmtext = GlobalTextType or QuarterlyTextType ? 'PQM' : 'Prev Quarter Mid'
var cyhtext = GlobalTextType or YearlyTextType ? 'CYH' : 'Current Year High'
var cyltext = GlobalTextType or YearlyTextType ? 'CYL' : 'Current Year Low'
var yotext = GlobalTextType or YearlyTextType ? 'YO' : 'Yearly Open'
var cymtext = GlobalTextType or YearlyTextType ? 'CYM' : 'Current Year Mid'
var pihtext = GlobalTextType or IntraTextType ? 'P-4H-H' : 'Prev 4H High'
var piltext = GlobalTextType or IntraTextType ? 'P-4H-L' : 'Prev 4H Low'
var iotext = GlobalTextType or IntraTextType ? '4H-O' : '4H Open'
var pimtext = GlobalTextType or IntraTextType ? 'P-4H-M' : 'Prev 4H Mid'
var pmonhtext = GlobalTextType or MondayTextType ? 'MDAY-H' : 'Monday High'
var pmonltext = GlobalTextType or MondayTextType ? 'MDAY-L' : 'Monday Low'
var pmonmtext = GlobalTextType or MondayTextType ? 'MDAY-M' : 'Monday Mid'
var lhtext = GlobalTextType or SessionTextType ? 'Lon-H' : 'London High'
var lltext = GlobalTextType or SessionTextType ? 'Lon-L' : 'London Low'
var lotext = GlobalTextType or SessionTextType ? 'Lon-O' : 'London Open'
var ushtext = GlobalTextType or SessionTextType ? 'NY-H' : 'New York High'
var usltext = GlobalTextType or SessionTextType ? 'NY-L' : 'New York Low'
var usotext = GlobalTextType or SessionTextType ? 'NY-O' : 'New York Open'
var asiahtext = GlobalTextType or SessionTextType ? 'AS-H' : 'Asia High'
var asialtext = GlobalTextType or SessionTextType ? 'AS-L' : 'Asia Low'
var asiaotext = GlobalTextType or SessionTextType ? 'AS-O' : 'Asia Open'
if globalcoloring == true
DailyColor := GlobalColor
MondayColor := GlobalColor
WeeklyColor := GlobalColor
MonthlyColor := GlobalColor
YearlyColor := GlobalColor
quarterlyColor := GlobalColor
IntraColor := GlobalColor
IntraColor
if weekly_time != weekly_time
untested_monday := false
untested_monday
if is_monday_enabled == true and untested_monday == false
untested_monday := true
monday_time := daily_time
monday_high := cdailyh_open
monday_low := cdailyl_open
monday_low
linewidthint = 1
if linesize == 'Small'
linewidthint := 1
linewidthint
if linesize == 'Medium'
linewidthint := 2
linewidthint
if linesize == 'Large'
linewidthint := 3
linewidthint
var DEFAULT_LINE_WIDTH = linewidthint
var DEFAULT_TAIL_WIDTH = linewidthint
fontsize = size.small
if labelsize == 'Small'
fontsize := size.small
fontsize
if labelsize == 'Medium'
fontsize := size.normal
fontsize
if labelsize == 'Large'
fontsize := size.large
fontsize
linestyles = line.style_solid
if linestyle == 'Dashed'
linestyles := line.style_dashed
linestyles
if linestyle == 'Dotted'
linestyles := line.style_dotted
linestyles
var DEFAULT_LABEL_SIZE = fontsize
var DEFAULT_LABEL_STYLE = label.style_none
var DEFAULT_EXTEND_RIGHT = distanceright
London = time(timeframe.period, Londont)
US = time(timeframe.period, USt)
Asia = time(timeframe.period, Asiat)
var clondonhigh = 0.0
var clondonlow = close
var londontime = time
var flondonhigh = 0.0
var flondonlow = 0.0
var flondonopen = 0.0
var onelondonfalse = false
if London
if high > clondonhigh
clondonhigh := high
clondonhigh
if low < clondonlow
clondonlow := low
clondonlow
if onelondonfalse
londontime := time
flondonopen := open
flondonopen
flondonhigh := clondonhigh
flondonlow := clondonlow
onelondonfalse := false
onelondonfalse
else
if onelondonfalse == false
flondonhigh := clondonhigh
flondonlow := clondonlow
flondonlow
onelondonfalse := true
clondonhigh := 0.0
clondonlow := close
clondonlow
//////////////////////////////////
var cushigh = 0.0
var cuslow = close
var ustime = time
var fushigh = 0.0
var fuslow = 0.0
var fusopen = 0.0
var oneusfalse = false
if US
if high > cushigh
cushigh := high
cushigh
if low < cuslow
cuslow := low
cuslow
if oneusfalse
ustime := time
fusopen := open
fusopen
fushigh := cushigh
fuslow := cuslow
oneusfalse := false
oneusfalse
else
if oneusfalse == false
fushigh := cushigh
fuslow := cuslow
fuslow
oneusfalse := true
cushigh := 0.0
cuslow := close
cuslow
//////////////////////////////////
var casiahigh = 0.0
var casialow = close
var asiatime = time
var fasiahigh = 0.0
var fasialow = 0.0
var fasiaopen = 0.0
var oneasiafalse = false
if Asia
if high > casiahigh
casiahigh := high
casiahigh
if low < casialow
casialow := low
casialow
if oneasiafalse
asiatime := time
fasiaopen := open
fasiaopen
fasiahigh := casiahigh
fasialow := casialow
oneasiafalse := false
oneasiafalse
else
if oneasiafalse == false
fasiahigh := casiahigh
fasialow := casialow
fasialow
oneasiafalse := true
casiahigh := 0.0
casialow := close
casialow
//------------------------------ Plotting ------------------------------
var pricearray = array.new_float(0)
var labelarray = array.new_label(0)
f_LevelMerge(pricearray, labelarray, currentprice, currentlabel, currentcolor) =>
if array.includes(pricearray, currentprice)
whichindex = array.indexof(pricearray, currentprice)
labelhold = array.get(labelarray, whichindex)
whichtext = label.get_text(labelhold)
label.set_text(labelhold, label.get_text(currentlabel) + ' / ' + whichtext)
label.set_text(currentlabel, '')
label.set_textcolor(labelhold, currentcolor)
else
array.push(pricearray, currentprice)
array.push(labelarray, currentlabel)
var can_show_daily = is_daily_enabled and timeframe.isintraday
var can_show_weekly = is_weekly_enabled and not timeframe.isweekly and not timeframe.ismonthly
var can_show_monthly = is_monthly_enabled and not timeframe.ismonthly
get_limit_right(bars) =>
timenow + (time - time ) * bars
// the following code doesn't need to be processed on every candle
if barstate.islast
is_weekly_open = dayofweek == dayofweek.monday
is_monthly_open = dayofmonth == 1
can_draw_daily = (is_weekly_enabled ? not is_weekly_open : true) and (is_monthly_enabled ? not is_monthly_open : true)
can_draw_weekly = is_monthly_enabled ? not(is_monthly_open and is_weekly_open) : true
can_draw_intra = is_intra_enabled
can_draw_intrah = is_intrarange_enabled
can_draw_intral = is_intrarange_enabled
can_draw_intram = is_intram_enabled
pricearray := array.new_float(0)
labelarray := array.new_label(0)
/////////////////////////////////
if is_londonrange_enabled
//label.new(bar_index,high)
london_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
londontime := get_limit_right(radistance)
londontime
var londonh_line = line.new(x1=londontime, x2=london_limit_right, y1=flondonhigh, y2=flondonhigh, color=LondonColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var londonl_line = line.new(x1=londontime, x2=london_limit_right, y1=flondonlow, y2=flondonlow, color=LondonColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var londono_line = line.new(x1=londontime, x2=london_limit_right, y1=flondonopen, y2=flondonopen, color=LondonColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var londonh_label = label.new(x=london_limit_right, y=flondonhigh, text=lhtext, style=DEFAULT_LABEL_STYLE, textcolor=LondonColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
var londonl_label = label.new(x=london_limit_right, y=flondonlow, text=lltext, style=DEFAULT_LABEL_STYLE, textcolor=LondonColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
var londono_label = label.new(x=london_limit_right, y=flondonopen, text=lotext, style=DEFAULT_LABEL_STYLE, textcolor=LondonColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(londonh_line, londontime)
line.set_x2(londonh_line, london_limit_right)
line.set_y1(londonh_line, flondonhigh)
line.set_y2(londonh_line, flondonhigh)
line.set_x1(londonl_line, londontime)
line.set_x2(londonl_line, london_limit_right)
line.set_y1(londonl_line, flondonlow)
line.set_y2(londonl_line, flondonlow)
line.set_x1(londono_line, londontime)
line.set_x2(londono_line, london_limit_right)
line.set_y1(londono_line, flondonopen)
line.set_y2(londono_line, flondonopen)
label.set_x(londonh_label, london_limit_right)
label.set_y(londonh_label, flondonhigh)
label.set_text(londonh_label, lhtext)
label.set_x(londonl_label, london_limit_right)
label.set_y(londonl_label, flondonlow)
label.set_text(londonl_label, lltext)
label.set_x(londono_label, london_limit_right)
label.set_y(londono_label, flondonopen)
label.set_text(londono_label, lotext)
if mergebool
f_LevelMerge(pricearray, labelarray, flondonhigh, londonh_label, LondonColor)
f_LevelMerge(pricearray, labelarray, flondonlow, londonl_label, LondonColor)
f_LevelMerge(pricearray, labelarray, flondonopen, londono_label, LondonColor)
//////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////
if is_usrange_enabled
//label.new(bar_index,high)
us_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
ustime := get_limit_right(radistance)
ustime
var ush_line = line.new(x1=ustime, x2=us_limit_right, y1=fushigh, y2=fushigh, color=USColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var usl_line = line.new(x1=ustime, x2=us_limit_right, y1=fuslow, y2=fuslow, color=USColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var uso_line = line.new(x1=ustime, x2=us_limit_right, y1=fusopen, y2=fusopen, color=USColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var ush_label = label.new(x=us_limit_right, y=fushigh, text=lhtext, style=DEFAULT_LABEL_STYLE, textcolor=USColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
var usl_label = label.new(x=us_limit_right, y=fuslow, text=lltext, style=DEFAULT_LABEL_STYLE, textcolor=USColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
var uso_label = label.new(x=us_limit_right, y=fusopen, text=lotext, style=DEFAULT_LABEL_STYLE, textcolor=USColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(ush_line, ustime)
line.set_x2(ush_line, us_limit_right)
line.set_y1(ush_line, fushigh)
line.set_y2(ush_line, fushigh)
line.set_x1(usl_line, ustime)
line.set_x2(usl_line, us_limit_right)
line.set_y1(usl_line, fuslow)
line.set_y2(usl_line, fuslow)
line.set_x1(uso_line, ustime)
line.set_x2(uso_line, us_limit_right)
line.set_y1(uso_line, fusopen)
line.set_y2(uso_line, fusopen)
label.set_x(ush_label, us_limit_right)
label.set_y(ush_label, fushigh)
label.set_text(ush_label, ushtext)
label.set_x(usl_label, us_limit_right)
label.set_y(usl_label, fuslow)
label.set_text(usl_label, usltext)
label.set_x(uso_label, us_limit_right)
label.set_y(uso_label, fusopen)
label.set_text(uso_label, usotext)
if mergebool
f_LevelMerge(pricearray, labelarray, fushigh, ush_label, USColor)
f_LevelMerge(pricearray, labelarray, fuslow, usl_label, USColor)
f_LevelMerge(pricearray, labelarray, fusopen, uso_label, USColor)
/////////////////////////////////
if is_asiarange_enabled
//label.new(bar_index,high)
asia_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
asiatime := get_limit_right(radistance)
asiatime
var asiah_line = line.new(x1=asiatime, x2=asia_limit_right, y1=fasiahigh, y2=fasiahigh, color=AsiaColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var asial_line = line.new(x1=asiatime, x2=asia_limit_right, y1=fasialow, y2=fasialow, color=AsiaColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var asiao_line = line.new(x1=asiatime, x2=asia_limit_right, y1=fasiaopen, y2=fasiaopen, color=AsiaColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var asiah_label = label.new(x=asia_limit_right, y=fasiahigh, text=asiahtext, style=DEFAULT_LABEL_STYLE, textcolor=AsiaColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
var asial_label = label.new(x=asia_limit_right, y=fasialow, text=asialtext, style=DEFAULT_LABEL_STYLE, textcolor=AsiaColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
var asiao_label = label.new(x=asia_limit_right, y=fasiaopen, text=asiaotext, style=DEFAULT_LABEL_STYLE, textcolor=AsiaColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(asiah_line, asiatime)
line.set_x2(asiah_line, asia_limit_right)
line.set_y1(asiah_line, fasiahigh)
line.set_y2(asiah_line, fasiahigh)
line.set_x1(asial_line, asiatime)
line.set_x2(asial_line, asia_limit_right)
line.set_y1(asial_line, fasialow)
line.set_y2(asial_line, fasialow)
line.set_x1(asiao_line, asiatime)
line.set_x2(asiao_line, asia_limit_right)
line.set_y1(asiao_line, fasiaopen)
line.set_y2(asiao_line, fasiaopen)
label.set_x(asiah_label, asia_limit_right)
label.set_y(asiah_label, fasiahigh)
label.set_text(asiah_label, asiahtext)
label.set_x(asial_label, asia_limit_right)
label.set_y(asial_label, fasialow)
label.set_text(asial_label, asialtext)
label.set_x(asiao_label, asia_limit_right)
label.set_y(asiao_label, fasiaopen)
label.set_text(asiao_label, asiaotext)
if mergebool
f_LevelMerge(pricearray, labelarray, fasiahigh, asiah_label, AsiaColor)
f_LevelMerge(pricearray, labelarray, fasialow, asial_label, AsiaColor)
f_LevelMerge(pricearray, labelarray, fasiaopen, asiao_label, AsiaColor)
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
if can_draw_intra
intra_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
intra_time := get_limit_right(radistance)
intra_time
var intra_line = line.new(x1=intra_time, x2=intra_limit_right, y1=intra_open, y2=intra_open, color=IntraColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var intra_label = label.new(x=intra_limit_right, y=intra_open, text=iotext, style=DEFAULT_LABEL_STYLE, textcolor=IntraColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(intra_line, intra_time)
line.set_x2(intra_line, intra_limit_right)
line.set_y1(intra_line, intra_open)
line.set_y2(intra_line, intra_open)
label.set_x(intra_label, intra_limit_right)
label.set_y(intra_label, intra_open)
label.set_text(intra_label, iotext)
if mergebool
f_LevelMerge(pricearray, labelarray, intra_open, intra_label, IntraColor)
//////////////////////////////////////////////////////////////////////////////////
//HIGH HIGH HIGH HIGH HIGH HIGH HIGH HIGH HIGH HIGH HIGH HIGH HIGH HIGH HIGH HIGH
if can_draw_intrah
intrah_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
intrah_time := get_limit_right(radistance)
intrah_time
var intrah_line = line.new(x1=intrah_time, x2=intrah_limit_right, y1=intrah_open, y2=intrah_open, color=IntraColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var intrah_label = label.new(x=intrah_limit_right, y=intrah_open, text=pihtext, style=DEFAULT_LABEL_STYLE, textcolor=IntraColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(intrah_line, intrah_time)
line.set_x2(intrah_line, intrah_limit_right)
line.set_y1(intrah_line, intrah_open)
line.set_y2(intrah_line, intrah_open)
label.set_x(intrah_label, intrah_limit_right)
label.set_y(intrah_label, intrah_open)
label.set_text(intrah_label, pihtext)
if mergebool
f_LevelMerge(pricearray, labelarray, intrah_open, intrah_label, IntraColor)
//////////////////////////////////////////////////////////////////////////////////
//LOW LOW LOW LOW LOW LOW LOW LOW LOW LOW LOW LOW LOW LOW LOW LOW
if can_draw_intral
intral_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
intral_time := get_limit_right(radistance)
intral_time
var intral_line = line.new(x1=intral_time, x2=intral_limit_right, y1=intral_open, y2=intral_open, color=IntraColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var intral_label = label.new(x=intral_limit_right, y=intral_open, text=piltext, style=DEFAULT_LABEL_STYLE, textcolor=IntraColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(intral_line, intral_time)
line.set_x2(intral_line, intral_limit_right)
line.set_y1(intral_line, intral_open)
line.set_y2(intral_line, intral_open)
label.set_x(intral_label, intral_limit_right)
label.set_y(intral_label, intral_open)
label.set_text(intral_label, piltext)
if mergebool
f_LevelMerge(pricearray, labelarray, intral_open, intral_label, IntraColor)
///////////////////////////////////////////////////////////////////////////////
if can_draw_intram
intram_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
intram_time = intrah_time
intram_open = (intral_open + intrah_open) / 2
if displayStyle == 'Right Anchored'
intram_time := get_limit_right(radistance)
intram_time
var intram_line = line.new(x1=intram_time, x2=intram_limit_right, y1=intram_open, y2=intram_open, color=IntraColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var intram_label = label.new(x=intram_limit_right, y=intram_open, text=pimtext, style=DEFAULT_LABEL_STYLE, textcolor=IntraColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(intram_line, intram_time)
line.set_x2(intram_line, intram_limit_right)
line.set_y1(intram_line, intram_open)
line.set_y2(intram_line, intram_open)
label.set_x(intram_label, intram_limit_right)
label.set_y(intram_label, intram_open)
label.set_text(intram_label, pimtext)
if mergebool
f_LevelMerge(pricearray, labelarray, intram_open, intram_label, IntraColor)
////////////////////////////////////////// MONDAY
if is_monday_enabled
monday_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
monday_time := get_limit_right(radistance)
monday_time
var monday_line = line.new(x1=monday_time, x2=monday_limit_right, y1=monday_high, y2=monday_high, color=MondayColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var monday_label = label.new(x=monday_limit_right, y=monday_high, text=pmonhtext, style=DEFAULT_LABEL_STYLE, textcolor=MondayColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(monday_line, monday_time)
line.set_x2(monday_line, monday_limit_right)
line.set_y1(monday_line, monday_high)
line.set_y2(monday_line, monday_high)
label.set_x(monday_label, monday_limit_right)
label.set_y(monday_label, monday_high)
label.set_text(monday_label, pmonhtext)
if mergebool
f_LevelMerge(pricearray, labelarray, monday_high, monday_label, MondayColor)
if is_monday_enabled
monday_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
monday_time := get_limit_right(radistance)
monday_time
var monday_low_line = line.new(x1=monday_time, x2=monday_limit_right, y1=monday_low, y2=monday_low, color=MondayColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var monday_low_label = label.new(x=monday_limit_right, y=monday_low, text=pmonltext, style=DEFAULT_LABEL_STYLE, textcolor=MondayColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(monday_low_line, monday_time)
line.set_x2(monday_low_line, monday_limit_right)
line.set_y1(monday_low_line, monday_low)
line.set_y2(monday_low_line, monday_low)
label.set_x(monday_low_label, monday_limit_right)
label.set_y(monday_low_label, monday_low)
label.set_text(monday_low_label, pmonltext)
if mergebool
f_LevelMerge(pricearray, labelarray, monday_low, monday_low_label, MondayColor)
if is_monday_mid
mondaym_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
mondaym_open = (monday_high + monday_low) / 2
if displayStyle == 'Right Anchored'
monday_time := get_limit_right(radistance)
monday_time
var mondaym_line = line.new(x1=monday_time, x2=mondaym_limit_right, y1=mondaym_open, y2=mondaym_open, color=MondayColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var mondaym_label = label.new(x=mondaym_limit_right, y=mondaym_open, text=pmonmtext, style=DEFAULT_LABEL_STYLE, textcolor=MondayColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(mondaym_line, monday_time)
line.set_x2(mondaym_line, mondaym_limit_right)
line.set_y1(mondaym_line, mondaym_open)
line.set_y2(mondaym_line, mondaym_open)
label.set_x(mondaym_label, mondaym_limit_right)
label.set_y(mondaym_label, mondaym_open)
label.set_text(mondaym_label, pmonmtext)
if mergebool
f_LevelMerge(pricearray, labelarray, mondaym_open, mondaym_label, MondayColor)
//////////////////////////////////////////////////////////////////////////////////
////////////////////////DAILY OPEN DAILY OPEN DAILY OPEN DAILY OPEN DAILY OPEN DAILY OPEN DAILY OPEN
if is_daily_enabled
daily_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
daily_time := get_limit_right(radistance)
daily_time
var daily_line = line.new(x1=daily_time, x2=daily_limit_right, y1=daily_open, y2=daily_open, color=DailyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var daily_label = label.new(x=daily_limit_right, y=daily_open, text=dotext, style=DEFAULT_LABEL_STYLE, textcolor=DailyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(daily_line, daily_time)
line.set_x2(daily_line, daily_limit_right)
line.set_y1(daily_line, daily_open)
line.set_y2(daily_line, daily_open)
label.set_x(daily_label, daily_limit_right)
label.set_y(daily_label, daily_open)
label.set_text(daily_label, dotext)
if mergebool
f_LevelMerge(pricearray, labelarray, daily_open, daily_label, DailyColor)
//////////////////////////////////////////////////////////////////////////////////
//////////////////DAILY HIGH DAILY HIGH DAILY HIGH DAILY HIGH DAILY HIGH DAILY HIGH DAILY HIGH
if is_dailyrange_enabled
dailyh_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
dailyh_time := get_limit_right(radistance)
dailyh_time
// draw tails before lines for better visual
var dailyh_line = line.new(x1=dailyh_time, x2=dailyh_limit_right, y1=dailyh_open, y2=dailyh_open, color=DailyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var dailyh_label = label.new(x=dailyh_limit_right, y=dailyh_open, text=pdhtext, style=DEFAULT_LABEL_STYLE, textcolor=DailyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(dailyh_line, dailyh_time)
line.set_x2(dailyh_line, dailyh_limit_right)
line.set_y1(dailyh_line, dailyh_open)
line.set_y2(dailyh_line, dailyh_open)
label.set_x(dailyh_label, dailyh_limit_right)
label.set_y(dailyh_label, dailyh_open)
label.set_text(dailyh_label, pdhtext)
if mergebool
f_LevelMerge(pricearray, labelarray, dailyh_open, dailyh_label, DailyColor)
//////////////////////////////////////////////////////////////////////////////////
//////////////////DAILY LOW DAILY LOW DAILY LOW DAILY LOW DAILY LOW DAILY LOW DAILY LOW DAILY LOW
if is_dailyrange_enabled
dailyl_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
dailyl_time := get_limit_right(radistance)
dailyl_time
var dailyl_line = line.new(x1=dailyl_time, x2=dailyl_limit_right, y1=dailyl_open, y2=dailyl_open, color=DailyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var dailyl_label = label.new(x=dailyl_limit_right, y=dailyl_open, text=pdltext, style=DEFAULT_LABEL_STYLE, textcolor=DailyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(dailyl_line, dailyl_time)
line.set_x2(dailyl_line, dailyl_limit_right)
line.set_y1(dailyl_line, dailyl_open)
line.set_y2(dailyl_line, dailyl_open)
label.set_x(dailyl_label, dailyl_limit_right)
label.set_y(dailyl_label, dailyl_open)
label.set_text(dailyl_label, pdltext)
if mergebool
f_LevelMerge(pricearray, labelarray, dailyl_open, dailyl_label, DailyColor)
//////////////////////////////////////////////////////////////////////////////// Daily MID
if is_dailym_enabled
dailym_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
dailym_time = dailyh_time
dailym_open = (dailyl_open + dailyh_open) / 2
if displayStyle == 'Right Anchored'
dailym_time := get_limit_right(radistance)
dailym_time
var dailym_line = line.new(x1=dailym_time, x2=dailym_limit_right, y1=dailym_open, y2=dailym_open, color=DailyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var dailym_label = label.new(x=dailym_limit_right, y=dailym_open, text=pdmtext, style=DEFAULT_LABEL_STYLE, textcolor=DailyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(dailym_line, dailym_time)
line.set_x2(dailym_line, dailym_limit_right)
line.set_y1(dailym_line, dailym_open)
line.set_y2(dailym_line, dailym_open)
label.set_x(dailym_label, dailym_limit_right)
label.set_y(dailym_label, dailym_open)
label.set_text(dailym_label, pdmtext)
if mergebool
f_LevelMerge(pricearray, labelarray, dailym_open, dailym_label, DailyColor)
//////////////////////////////////////////////////////////////////////////////////
if is_weekly_enabled
weekly_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
cweekly_time = weekly_time
if displayStyle == 'Right Anchored'
cweekly_time := get_limit_right(radistance)
cweekly_time
var weekly_line = line.new(x1=cweekly_time, x2=weekly_limit_right, y1=weekly_open, y2=weekly_open, color=WeeklyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var weekly_label = label.new(x=weekly_limit_right, y=weekly_open, text=wotext, style=DEFAULT_LABEL_STYLE, textcolor=WeeklyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(weekly_line, cweekly_time)
line.set_x2(weekly_line, weekly_limit_right)
line.set_y1(weekly_line, weekly_open)
line.set_y2(weekly_line, weekly_open)
label.set_x(weekly_label, weekly_limit_right)
label.set_y(weekly_label, weekly_open)
label.set_text(weekly_label, wotext)
if mergebool
f_LevelMerge(pricearray, labelarray, weekly_open, weekly_label, WeeklyColor)
// the weekly open can be the daily open too (monday)
// only the weekly will be draw, in these case we update its label
// if is_weekly_open and can_show_daily
// label.set_text(weekly_label, "DO / WO ")
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// WEEKLY HIGH WEEKLY HIGH WEEKLY HIGH
if is_weeklyrange_enabled
weeklyh_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
weeklyh_time := get_limit_right(radistance)
weeklyh_time
var weeklyh_line = line.new(x1=weeklyh_time, x2=weeklyh_limit_right, y1=weeklyh_open, y2=weeklyh_open, color=WeeklyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var weeklyh_label = label.new(x=weeklyh_limit_right, y=weeklyh_open, text=pwhtext, style=DEFAULT_LABEL_STYLE, textcolor=WeeklyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(weeklyh_line, weeklyh_time)
line.set_x2(weeklyh_line, weeklyh_limit_right)
line.set_y1(weeklyh_line, weeklyh_open)
line.set_y2(weeklyh_line, weeklyh_open)
label.set_x(weeklyh_label, weeklyh_limit_right)
label.set_y(weeklyh_label, weeklyh_open)
label.set_text(weeklyh_label, pwhtext)
if mergebool
f_LevelMerge(pricearray, labelarray, weeklyh_open, weeklyh_label, WeeklyColor)
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// WEEKLY LOW WEEKLY LOW WEEKLY LOW
if is_weeklyrange_enabled
weeklyl_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
weeklyl_time := get_limit_right(radistance)
weeklyl_time
var weeklyl_line = line.new(x1=weeklyl_time, x2=weeklyl_limit_right, y1=weekly_open, y2=weekly_open, color=WeeklyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var weeklyl_label = label.new(x=weeklyl_limit_right, y=weeklyl_open, text=pwltext, style=DEFAULT_LABEL_STYLE, textcolor=WeeklyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(weeklyl_line, weeklyl_time)
line.set_x2(weeklyl_line, weeklyl_limit_right)
line.set_y1(weeklyl_line, weeklyl_open)
line.set_y2(weeklyl_line, weeklyl_open)
label.set_x(weeklyl_label, weeklyl_limit_right)
label.set_y(weeklyl_label, weeklyl_open)
label.set_text(weeklyl_label, pwltext)
if mergebool
f_LevelMerge(pricearray, labelarray, weeklyl_open, weeklyl_label, WeeklyColor)
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// Weekly MID
if is_weekly_mid
weeklym_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
weeklym_time = weeklyh_time
weeklym_open = (weeklyl_open + weeklyh_open) / 2
if displayStyle == 'Right Anchored'
weeklym_time := get_limit_right(radistance)
weeklym_time
var weeklym_line = line.new(x1=weeklym_time, x2=weeklym_limit_right, y1=weeklym_open, y2=weeklym_open, color=WeeklyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var weeklym_label = label.new(x=weeklym_limit_right, y=weeklym_open, text=pwmtext, style=DEFAULT_LABEL_STYLE, textcolor=WeeklyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(weeklym_line, weeklym_time)
line.set_x2(weeklym_line, weeklym_limit_right)
line.set_y1(weeklym_line, weeklym_open)
line.set_y2(weeklym_line, weeklym_open)
label.set_x(weeklym_label, weeklym_limit_right)
label.set_y(weeklym_label, weeklym_open)
label.set_text(weeklym_label, pwmtext)
if mergebool
f_LevelMerge(pricearray, labelarray, weeklym_open, weeklym_label, WeeklyColor)
////////////////////////////////////////////////////////////////////////////////// YEEEAARRLLYY LOW LOW LOW
if is_yearlyrange_enabled
yearlyl_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
yearlyl_time := get_limit_right(radistance)
yearlyl_time
var yearlyl_line = line.new(x1=yearlyl_time, x2=yearlyl_limit_right, y1=yearlyl_open, y2=yearlyl_open, color=YearlyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var yearlyl_label = label.new(x=yearlyl_limit_right, y=yearlyl_open, text=cyltext, style=DEFAULT_LABEL_STYLE, textcolor=YearlyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(yearlyl_line, yearlyl_time)
line.set_x2(yearlyl_line, yearlyl_limit_right)
line.set_y1(yearlyl_line, yearlyl_open)
line.set_y2(yearlyl_line, yearlyl_open)
label.set_x(yearlyl_label, yearlyl_limit_right)
label.set_y(yearlyl_label, yearlyl_open)
label.set_text(yearlyl_label, cyltext)
if mergebool
f_LevelMerge(pricearray, labelarray, yearlyl_open, yearlyl_label, YearlyColor)
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// YEEEAARRLLYY HIGH HIGH HIGH
if is_yearlyrange_enabled
yearlyh_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
yearlyh_time := get_limit_right(radistance)
yearlyh_time
var yearlyh_line = line.new(x1=yearlyh_time, x2=yearlyh_limit_right, y1=yearlyh_open, y2=yearlyh_open, color=YearlyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var yearlyh_label = label.new(x=yearlyh_limit_right, y=yearlyh_open, text=cyhtext, style=DEFAULT_LABEL_STYLE, textcolor=YearlyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(yearlyh_line, yearlyh_time)
line.set_x2(yearlyh_line, yearlyh_limit_right)
line.set_y1(yearlyh_line, yearlyh_open)
line.set_y2(yearlyh_line, yearlyh_open)
label.set_x(yearlyh_label, yearlyh_limit_right)
label.set_y(yearlyh_label, yearlyh_open)
label.set_text(yearlyh_label, cyhtext)
if mergebool
f_LevelMerge(pricearray, labelarray, yearlyh_open, yearlyh_label, YearlyColor)
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// YEEEAARRLLYY OPEN
if is_yearly_enabled
yearly_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
yearly_time := get_limit_right(radistance)
yearly_time
var yearly_line = line.new(x1=yearly_time, x2=yearly_limit_right, y1=yearly_open, y2=yearly_open, color=YearlyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var yearly_label = label.new(x=yearly_limit_right, y=yearly_open, text=yotext, style=DEFAULT_LABEL_STYLE, textcolor=YearlyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(yearly_line, yearly_time)
line.set_x2(yearly_line, yearly_limit_right)
line.set_y1(yearly_line, yearly_open)
line.set_y2(yearly_line, yearly_open)
label.set_x(yearly_label, yearly_limit_right)
label.set_y(yearly_label, yearly_open)
label.set_text(yearly_label, yotext)
if mergebool
f_LevelMerge(pricearray, labelarray, yearly_open, yearly_label, YearlyColor)
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// yearly MID
if is_yearly_mid
yearlym_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
yearlym_time = yearlyh_time
yearlym_open = (yearlyl_open + yearlyh_open) / 2
if displayStyle == 'Right Anchored'
yearlym_time := get_limit_right(radistance)
yearlym_time
var yearlym_line = line.new(x1=yearlym_time, x2=yearlym_limit_right, y1=yearlym_open, y2=yearlym_open, color=YearlyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var yearlym_label = label.new(x=yearlym_limit_right, y=yearlym_open, text=cymtext, style=DEFAULT_LABEL_STYLE, textcolor=YearlyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(yearlym_line, yearlym_time)
line.set_x2(yearlym_line, yearlym_limit_right)
line.set_y1(yearlym_line, yearlym_open)
line.set_y2(yearlym_line, yearlym_open)
label.set_x(yearlym_label, yearlym_limit_right)
label.set_y(yearlym_label, yearlym_open)
label.set_text(yearlym_label, cymtext)
if mergebool
f_LevelMerge(pricearray, labelarray, yearlym_open, yearlym_label, YearlyColor)
////////////////////////////////////////////////////////////////////////////////// QUATERLLYYYYY OPEN
if is_quarterly_enabled
quarterly_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
quarterly_time := get_limit_right(radistance)
quarterly_time
var quarterly_line = line.new(x1=quarterly_time, x2=quarterly_limit_right, y1=quarterly_open, y2=quarterly_open, color=quarterlyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var quarterly_label = label.new(x=quarterly_limit_right, y=quarterly_open, text=qotext, style=DEFAULT_LABEL_STYLE, textcolor=quarterlyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(quarterly_line, quarterly_time)
line.set_x2(quarterly_line, quarterly_limit_right)
line.set_y1(quarterly_line, quarterly_open)
line.set_y2(quarterly_line, quarterly_open)
label.set_x(quarterly_label, quarterly_limit_right)
label.set_y(quarterly_label, quarterly_open)
label.set_text(quarterly_label, qotext)
if mergebool
f_LevelMerge(pricearray, labelarray, quarterly_open, quarterly_label, quarterlyColor)
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// QUATERLLYYYYY High
if is_quarterlyrange_enabled
quarterlyh_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
quarterlyh_time := get_limit_right(radistance)
quarterlyh_time
var quarterlyh_line = line.new(x1=quarterlyh_time, x2=quarterlyh_limit_right, y1=quarterlyh_open, y2=quarterlyh_open, color=quarterlyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var quarterlyh_label = label.new(x=quarterlyh_limit_right, y=quarterlyh_open, text=pqhtext, style=DEFAULT_LABEL_STYLE, textcolor=quarterlyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(quarterlyh_line, quarterlyh_time)
line.set_x2(quarterlyh_line, quarterlyh_limit_right)
line.set_y1(quarterlyh_line, quarterlyh_open)
line.set_y2(quarterlyh_line, quarterlyh_open)
label.set_x(quarterlyh_label, quarterlyh_limit_right)
label.set_y(quarterlyh_label, quarterlyh_open)
label.set_text(quarterlyh_label, pqhtext)
if mergebool
f_LevelMerge(pricearray, labelarray, quarterlyh_open, quarterlyh_label, quarterlyColor)
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// QUATERLLYYYYY Low
if is_quarterlyrange_enabled
quarterlyl_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
quarterlyl_time := get_limit_right(radistance)
quarterlyl_time
var quarterlyl_line = line.new(x1=quarterlyl_time, x2=quarterlyl_limit_right, y1=quarterlyl_open, y2=quarterlyl_open, color=quarterlyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var quarterlyl_label = label.new(x=quarterlyl_limit_right, y=quarterlyl_open, text=pqltext, style=DEFAULT_LABEL_STYLE, textcolor=quarterlyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(quarterlyl_line, quarterlyl_time)
line.set_x2(quarterlyl_line, quarterlyl_limit_right)
line.set_y1(quarterlyl_line, quarterlyl_open)
line.set_y2(quarterlyl_line, quarterlyl_open)
label.set_x(quarterlyl_label, quarterlyl_limit_right)
label.set_y(quarterlyl_label, quarterlyl_open)
label.set_text(quarterlyl_label, pqltext)
if mergebool
f_LevelMerge(pricearray, labelarray, quarterlyl_open, quarterlyl_label, quarterlyColor)
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// QUATERLLYYYYY MID
if is_quarterly_mid
quarterlym_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
quarterlym_time = quarterlyh_time
quarterlym_open = (quarterlyl_open + quarterlyh_open) / 2
if displayStyle == 'Right Anchored'
quarterlym_time := get_limit_right(radistance)
quarterlym_time
var quarterlym_line = line.new(x1=quarterlym_time, x2=quarterlym_limit_right, y1=quarterlym_open, y2=quarterlym_open, color=quarterlyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var quarterlym_label = label.new(x=quarterlym_limit_right, y=quarterlym_open, text=pqmtext, style=DEFAULT_LABEL_STYLE, textcolor=quarterlyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(quarterlym_line, quarterlym_time)
line.set_x2(quarterlym_line, quarterlym_limit_right)
line.set_y1(quarterlym_line, quarterlym_open)
line.set_y2(quarterlym_line, quarterlym_open)
label.set_x(quarterlym_label, quarterlym_limit_right)
label.set_y(quarterlym_label, quarterlym_open)
label.set_text(quarterlym_label, pqmtext)
if mergebool
f_LevelMerge(pricearray, labelarray, quarterlym_open, quarterlym_label, quarterlyColor)
////////////////////////////////////////////////////////////////////////////////// Monthly LOW LOW LOW
if is_monthlyrange_enabled
monthlyl_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
monthlyl_time := get_limit_right(radistance)
monthlyl_time
var monthlyl_line = line.new(x1=monthlyl_time, x2=monthlyl_limit_right, y1=monthlyl_open, y2=monthlyl_open, color=MonthlyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var monthlyl_label = label.new(x=monthlyl_limit_right, y=monthlyl_open, text=pmltext, style=DEFAULT_LABEL_STYLE, textcolor=MonthlyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(monthlyl_line, monthlyl_time)
line.set_x2(monthlyl_line, monthlyl_limit_right)
line.set_y1(monthlyl_line, monthlyl_open)
line.set_y2(monthlyl_line, monthlyl_open)
label.set_x(monthlyl_label, monthlyl_limit_right)
label.set_y(monthlyl_label, monthlyl_open)
label.set_text(monthlyl_label, pmltext)
if mergebool
f_LevelMerge(pricearray, labelarray, monthlyl_open, monthlyl_label, MonthlyColor)
// the weekly open can be the daily open too (monday)
// only the weekly will be draw, in these case we update its label
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// MONTHLY HIGH HIGH HIGH
if is_monthlyrange_enabled
monthlyh_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
monthlyh_time := get_limit_right(radistance)
monthlyh_time
var monthlyh_line = line.new(x1=monthlyh_time, x2=monthlyh_limit_right, y1=monthlyh_open, y2=monthlyh_open, color=MonthlyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var monthlyh_label = label.new(x=monthlyh_limit_right, y=monthlyh_open, text=pmhtext, style=DEFAULT_LABEL_STYLE, textcolor=MonthlyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(monthlyh_line, monthlyl_time)
line.set_x2(monthlyh_line, monthlyh_limit_right)
line.set_y1(monthlyh_line, monthlyh_open)
line.set_y2(monthlyh_line, monthlyh_open)
label.set_x(monthlyh_label, monthlyh_limit_right)
label.set_y(monthlyh_label, monthlyh_open)
label.set_text(monthlyh_label, pmhtext)
if mergebool
f_LevelMerge(pricearray, labelarray, monthlyh_open, monthlyh_label, MonthlyColor)
// the weekly open can be the daily open too (monday)
// only the weekly will be draw, in these case we update its label
//////////////////////////////////////////////////////////////////////////////// MONTHLY MID
if is_monthly_mid
monthlym_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
monthlym_time = monthlyh_time
monthlym_open = (monthlyl_open + monthlyh_open) / 2
if displayStyle == 'Right Anchored'
monthlym_time := get_limit_right(radistance)
monthlym_time
var monthlym_line = line.new(x1=monthlym_time, x2=monthlym_limit_right, y1=monthlym_open, y2=monthlym_open, color=MonthlyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var monthlym_label = label.new(x=monthlym_limit_right, y=monthlym_open, text=pmmtext, style=DEFAULT_LABEL_STYLE, textcolor=MonthlyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(monthlym_line, monthlym_time)
line.set_x2(monthlym_line, monthlym_limit_right)
line.set_y1(monthlym_line, monthlym_open)
line.set_y2(monthlym_line, monthlym_open)
label.set_x(monthlym_label, monthlym_limit_right)
label.set_y(monthlym_label, monthlym_open)
label.set_text(monthlym_label, pmmtext)
if mergebool
f_LevelMerge(pricearray, labelarray, monthlym_open, monthlym_label, MonthlyColor)
//////////////////////////////////////////////////////////////////////////////////
if is_monthly_enabled
monthly_limit_right = get_limit_right(DEFAULT_EXTEND_RIGHT)
if displayStyle == 'Right Anchored'
monthly_time := get_limit_right(radistance)
monthly_time
var monthlyLine = line.new(x1=monthly_time, x2=monthly_limit_right, y1=monthly_open, y2=monthly_open, color=MonthlyColor, width=DEFAULT_LINE_WIDTH, xloc=xloc.bar_time, style=linestyles)
var monthlyLabel = label.new(x=monthly_limit_right, y=monthly_open, text=motext, style=DEFAULT_LABEL_STYLE, textcolor=MonthlyColor, size=DEFAULT_LABEL_SIZE, xloc=xloc.bar_time)
line.set_x1(monthlyLine, monthly_time)
line.set_x2(monthlyLine, monthly_limit_right)
line.set_y1(monthlyLine, monthly_open)
line.set_y2(monthlyLine, monthly_open)
label.set_x(monthlyLabel, monthly_limit_right)
label.set_y(monthlyLabel, monthly_open)
label.set_text(monthlyLabel, motext)
if mergebool
f_LevelMerge(pricearray, labelarray, monthly_open, monthlyLabel, MonthlyColor)
/////////////////////////////////////////////////////////////////////////////
// the monthly open can be the weekly open (monday 1st) and/or daily open too
// only the monthly will be draw, in these case we update its label
// if is_monthly_open
// if can_show_daily
// label.set_text(monthlyLabel, "DO / MO ")
// if is_weekly_open
// if can_show_weekly
// label.set_text(monthlyLabel, "WO / MO ")
// if can_show_daily and can_show_weekly
// label.set_text(monthlyLabel, "DO / WO / MO ")
// the start of the line is drew from the first week of the month
// if the first day of the weekly candle (monday) is the 2nd of the month
// we fix the start of the line position on the Prev weekly candle
if timeframe.isweekly and dayofweek(monthly_time) != dayofweek.monday
line.set_x1(monthlyLine, monthly_time - (weekly_time - weekly_time ))
Dual Account Position Size CalculatorA quick and easy to use position sizing calculator for use on the daily TF only. inputs for two different account sizes and risk %. Calculates risk to low of day (plus a small buffer which can be changed based on ATR). Shows # of shares to buy, stop loss, portfolio %.
Will show on smaller timeframes , but be aware that the stop level will no longer be low of day, so it will not calculate properly. Always use on the daily.
Confluence Retournement Haussier - Ultimate V1This indicator was originally designed to visualize the right moment to enter a position. I buy stocks when they are falling, at the bottom before they rebound.
The 30‑minute chart with its 100 EMA was used as the baseline, but it can be applied to multiple timeframes. I even used it on a 1‑second chart for a ticker, and when there is volume it works wonderfully.
It’s up to you to check whether it fits the ticker you’re analyzing by testing it on historical data.
Drawback: it takes up screen space. Feel free to improve it.
See a ticker in freefall and wonder whether it’s a good time to buy or if it will keep falling? Switch your chart to 30 minutes and watch for triangles and green circles to start appearing.
You could call it momentum. Your background begins to show color when there is confluence. If it stays black, don’t buy.
Already in the trade and the screen turns black? Sell, and wait for the colors to return before buying back in
Relative Strength Index w/ BandsStandard RSI but with the option to add a shaded zone around the Upper and Lower Bands, based on an offset value.
Value/level of shaded zones need to be modified separately in the Settings from the Upper and Lower Band values.
Key Levels v1Key Levels
This comprehensive multi-timeframe indicator provides traders with key price levels and opening ranges across multiple timeframes, designed to identify significant support/resistance zones and market structure.
KEY FEATURES:
📦 Monthly Range Box
- Automatically draws a box capturing the high and low of the first 9 hours of each new month
- Box extends until the next month begins
- Includes an optional mid-line showing the 50% level of the range
- Fully customizable colors, line styles, and background opacity
📊 Multi-Timeframe Open Lines
The indicator plots horizontal lines at the open price of:
- Midnight Open (00:00 session start)
- 4-Hour Open (updates every 4-hour candle)
- Daily Open (true daily candle open)
- Weekly Open (start of trading week)
- Monthly Open (start of new month)
- Yearly Open (start of new year)
🎯 Smart Label System
- Automatic label combining when multiple timeframe opens overlap at the same price
- Clean text labels positioned ahead of current price to avoid obstruction
- Labels show combined timeframes (e.g., "Monthly Open / Weekly Open")
⚙️ Customization Options
Each timeframe open line includes:
- Toggle on/off independently
- Custom color selection
- Line style options (Solid, Dashed, Dotted)
- Organized settings grouped by timeframe for easy navigation
🔧 Technical Implementation
- Uses request.security() for accurate higher timeframe data
- Works on any chart timeframe
- Lines extend 10 bars beyond current price for clear label visibility
- Efficient overlap detection prevents duplicate labels
IDEAL FOR:
✓ Identifying key institutional levels
✓ Trading range breakouts
✓ Multi-timeframe analysis
✓ Support and resistance zones
✓ Session-based trading strategies
All settings are organized chronologically from shortest to longest timeframe for intuitive configuration.
Viking Wheel Signals — CSP & CC (BB + RSI Confluence)This indicator highlights moments when Bollinger Bands expand while RSI confirms exhaustion, creating high-probability inflection points for Wheel Strategy entries.
When price tags the lower Bollinger Band while RSI is oversold, it often signals ideal zones for selling Cash-Secured Puts (CSPs). When price tags the upper Bollinger Band with RSI overbought, it helps time Covered Calls (CCs) or anticipate when shares may be called away.
Built specifically for the Wheel Strategy (CSP + CC), this tool maps volatility contractions, expansions, and trend shifts. For best results, use on the Daily chart and combine these signals with your own key support/resistance levels to fine-tune strike selection.
Tags: volatility, bollinger bands, rsi, options trading, wheel strategy, confluence, trend analysis
FX Fresh Momentum FX Fresh Momentum calculates the true strength and session momentum of the 8 major currencies using a 7-pair average and session resets (Tokyo, London, New York).
Each session opens with a zero-base, allowing you to see only the fresh momentum.
Includes pair-averaged strength, ×100 momentum scaling, vertical session dividers, and institutional color coding.
Ideal for FX day traders who want cleaner session-based momentum signals
Dual MA Crossover with Profit Targets + Stop-LossChatGPT script and is a dual moving average crossover script with profit targets and stop loss
MTF EMA Hariss 369Indicators used here are Current Time Frame (CTF) and Higher Time Frame (HTF) 20 EMAs. 20 EMA is good to detect dynamic support and resistance levels. HTF EMA acts as trend filter to visualize price moment in bigger view. RVOL has also been considered to fire buy and sell signals.
Buy signal is plotted when price closes above CTF 20 EMA and CTF 20 EMA is above HTF 20 EMA and RVOL is greater than 1.5. One can adjust the RVOL value from input section depending on the class of asset. However, 1.5 is recommended for smooth trading.
Sell signal is plotted when price closes below CTF 20 EMA and CTF 20 EMA is below HTF 20 EMA RVOL is greater 1.5.
Choosing higher time frame depends upon the trading style.
CTF HTF
5m 15m
15m 1h
1h 4h
The above setting of CTF and HTF work well when combined together. However, one can choose according to trading pattern with respect to time frame.
*This is purely for educational purpose only*
Momentum Reversal / Dip Buyer [Score Based]Strategy Overview
Momentum Reversal / Dip Buyer is a quantitative reversal engine designed to fade stretched moves and buy dips / sell rallies when multiple momentum and context factors line up. It’s built for liquid instruments especially for ticker CME_MINI:ES1! and works best on intraday timeframes like the 5-minute or 1-minute chart.
Core Logic
This strategy builds a composite Momentum Score by combining:
Price Location: Relative to 100 SMA, 1000 EMA, and VWAP (trend / regime filter).
RSI: Overbought/oversold and mid-zone strength.
VWMO (Volume-Weighted Momentum): Direction and strength of volume-weighted price drift.
ADX: Trend strength filter (high vs low trend environment).
Full Stoch (%K): Short-term exhaustion and mean-reversion context.
CCI: Overbought/oversold turns (key trigger).
MFI: Volume-confirmed buying/selling pressure.
ATR Regime: High vs low volatility environment.
Cumulative Delta: Whether net aggressor flow is rising or falling.
From this, a single Momentum Score is computed each bar:
Longs: Taken when the score is depressed (scoreLow) and CCI crosses up from oversold.
Shorts: Taken when the score is elevated (scoreHigh) and CCI crosses down from overbought.
Risk Management & Trade Logic
Max Daily Trades: Hard cap on entries per day.
Hard Stop: Fixed % stop based on entry price.
Profit Target: Target ATR Multiplier × main ATR from entry.
Breakeven Logic: Optional; moves stop to breakeven (plus optional offset) after price moves a configurable multiple of the main ATR in your favor.
Trailing Stop (Separate ATR): Optional; uses its own ATR length and ATR-based trigger and distance. This lets you run slower ATR for targets while using a tighter, more reactive ATR for the trail.
Session Control
Trading Window: Optional session filter (e.g., 09:30–16:00). Entries are only allowed inside the defined window.
Force Flat at Session End: Option to automatically close all open positions when the session ends.
Visuals
The script plots entry arrows and a compact dashboard displaying: current Momentum Score, daily trade usage, and CCI status.
Disclaimer:
This script is for educational and research purposes only and is not financial advice. Past performance does not guarantee future results. Always forward-test and adjust parameters to your own risk tolerance and market.
Shoutout and all credit goes to AuclairsCapital for building the base foundation of this strategy on ThinkScript
Advanced Breakout SystemAdvanced Breakout System
Developed by: Mohammed Bedaiwi
This script hunts for high-probability breakouts by combining price consolidation zones, volume spikes vs. average volume, smart money flow (OBV), and a Momentum Override for explosive moves that skip consolidation. Additionally, it automatically identifies and plots Support and Resistance levels with price labels to help you visualize market structure.
The system follows a "Watch & Confirm" logic: it first prints a WATCH setup, then a BUY only if price confirms strength.
🔑 Color Legend (Visual Guide)
🟡 WATCH – Setup (Yellow Arrow Down) :
Potential breakout setup detected. Monitor the stock and do not enter yet. Triggered when price breaks out of a recent consolidation with strong volume or makes a big momentum move (e.g. >5%) in a single bar.
🟢 BUY – Confirmation (Green Arrow Up) :
Confirmed breakout. Consider entering a long position according to your own rules. Triggered when price trades above the high of the WATCH candle.
🟠 SELL – Break (Orange Arrow) :
Short-term trend weakness. Triggered when price closes below the Fast EMA (9). Used as a protective exit or partial profit-taking.
🔴 SELL – Dump (Dark Red Arrow) :
Distribution / volume dump. Triggered by a bearish candle with abnormally high volume compared to the average (e.g. ≥ Dump Volume Multiplier × average volume).
🟣 SELL – Pattern (Purple Arrow) :
Bearish price-action pattern (such as a bearish engulfing). Indicates a possible top or reversal.
🔴/🟢 Support & Resistance Lines :
Small horizontal lines plotted at key swing points. Red Line: Resistance (Swing High). Green Line: Support (Swing Low). Both include exact price labels for quick reference.
⚙️ Inputs
Entry settings: Consolidation Lookback (default 20) = bars used to detect consolidation. Consolidation Range % (default 12%) = max allowed range size; higher values make the script more sensitive. Volume Spike Multiplier (default 1.2) = factor above average volume to count as a spike. Force Signal on Big Moves (default ON) = forces a WATCH signal if price jumps more than a set % (e.g. 5%) even without consolidation/OBV confirmation.
Exit settings: Enable Fast Exit (EMA 9) toggles the SELL – Break signal. Dump Volume Multiplier defines what counts as “dump” volume (e.g. 2× average).
Support & Resistance: Adjustable Pivot Left/Right bars allow you to control the sensitivity of the support and resistance lines.
⚠️ Disclaimer
Trading involves significant risk of loss. This script is for educational and informational purposes only and is not financial advice or a recommendation to buy or sell any asset. BUY and SELL signals are rule-based and derived from historical behavior and do not guarantee future performance. Always use your own analysis and risk management.
Volume Flow Anatomy [Kodexius]Volume Flow Anatomy is a dynamic, multi-dimensional volume map that reconstructs how buy, sell, and “stealth” activity is distributed across price rather than just across time. Instead of relying on a static, session-based volume profile, it uses an exponentially decaying memory of recent bars to build a constantly evolving “anatomy” of the auction, where each price level carries an adaptive history of order flow.
The script separates buy vs. sell pressure, adds a third “Stealth Flow” dimension for low-volume price movement (ease of movement / divergence), and automatically derives POC, Value Area, imbalances, absorption zones, and classic profile shapes (D, P, b, B). This gives the trader a compact but highly information-dense map on the right side of the chart to read control (buyers vs. sellers), structure (balanced vs. trending vs. double distribution), and key reaction levels (support/resistance born from flow, not just wicks).
🔹 Features
🔸 Dynamic Lookback with Decay
- The script computes an effective lookback N from the Decay Factor and caps it with Max Lookback.
- Higher decay keeps more history; lower decay emphasizes the most recent flow.
- The profile continuously adapts as new bars are printed.
🔸 Price-Bucketed Flow Map
Each bucket accumulates:
- Sell Flow (sell pressure)
- Buy Flow (buy pressure)
- Stealth Flow (low-volume price movement)
- Box width at each bucket is proportional to the relative intensity of that component.
🔸 Stealth Flow (Low-Volume Price Movement)
- Measures close to close movement relative to volume, emphasizing price movement that occurs on comparatively low volume.
- Helps reveal hidden participation, inefficient moves, and areas that may be vulnerable to re-tests or reversions.
🔸 POC & 70% Value Area (VA)
- Identifies the Point of Control (price bucket with the highest total volume) over the effective lookback.
- Builds a 70% Value Area by expanding from POC towards the nearest high volume neighbors until 70% of the total volume is included.
- POC is drawn as a line over the analyzed range; VA is displayed as a shaded band in the profile area.
🔸 Market Profile Shape Detection
Splits the profile vertically into three zones (bottom / middle / top) and compares their volume distribution.
Classifies structure as:
- D-Shape (Balanced)
- P-Shape (Short Covering)
- b-Shape (Long Liquidation)
- B-Shape (Double Distribution)
Displays a shape label with color coded bias for quick auction context interpretation.
🔸 Imbalance Zones & Absorption
Imbalance: detects buckets where Buy Flow or Sell Flow exceeds the opposite side by at least Imbalance Ratio.
Absorption: flags zones with high volume but low price “ease”, where price is not moving much despite significant volume.
Extends these levels into horizontal zones, marking potential support/resistance and trap areas.
Bullish Imbalance Zone :
Bearish Imbalance Zone :
Absorption Zone :
🔸 Range Context & On-Chart Legend
Draws a Range Box covering the dynamically determined lookback (N bars), with a label displaying the effective bar count.
A bottom-right legend summarizes:
- Color keys for Buy / Sell / Stealth
- POC / VA status
- Bullish vs. Bearish dominance percentage
- Profile shape classification
- Imbalance and Absorption conventions
🔹 Calculations
1. Dynamic Lookback & Price Buckets
int N = math.min(int(4 / (1 - decayFactor) - 1), maxHistory)
float priceHigh = ta.highest(high, N)
float priceLow = ta.lowest(low, N)
float bucketSize = (priceHigh - priceLow) / bucketCount
The effective lookback N is derived from the Decay Factor, using the approximation 4 / (1 - decay) to capture roughly 99% of the decayed influence, then capped with maxHistory to control performance. Over that adaptive range, the script finds the highest and lowest prices and divides the band into bucketCount equal slices (bucketSize). Each slice is a price bucket that will accumulate volume-flow information.
2. Exponentially Decayed Volume Allocation
addValue(array profile, float weight, float minPrice, float maxPrice) =>
for j = 0 to bucketCount - 1
float bucketMin = priceLow + j * bucketSize
float bucketMax = bucketMin + bucketSize
float overlapMin = math.max(minPrice, bucketMin)
float overlapMax = math.min(maxPrice, bucketMax)
float overlapRange = overlapMax - overlapMin
if overlapRange > 0
profile.set(j, profile.get(j) * decayFactor + weight * overlapRange)
This function is the core engine of the indicator. For a given price span and intensity, it checks every bucket for overlap, distributes the weight proportionally to the overlapping range, and before adding new value, decays the existing bucket content by decayFactor. This results in an exponentially weighted profile: recent activity dominates, while older levels retain a gradually fading footprint.
3. POC and 70% Value Area
array totalProfile = array.new(bucketCount, 0)
for j = 0 to bucketCount - 1
float total = sellProfile.get(j) + buyProfile.get(j)
totalProfile.set(j, total)
if total > eaMax
eaMax := total
int pocIdx = 0
float pocVal = 0.0
for j = 0 to bucketCount - 1
if totalProfile.get(j) > pocVal
pocVal := totalProfile.get(j)
pocIdx := j
float totalSum = totalProfile.sum()
float targetSum = totalSum * 0.70
int vaLow = pocIdx
int vaHigh = pocIdx
float currentSum = pocVal
while currentSum < targetSum and (vaLow > 0 or vaHigh < bucketCount - 1)
float lowVal = vaLow > 0 ? totalProfile.get(vaLow - 1) : 0.0
float highVal = vaHigh < bucketCount - 1 ? totalProfile.get(vaHigh + 1) : 0.0
First, totalProfile is built as the sum of buy and sell flow per bucket, and eaMax (the maximum total) is tracked for later normalization. The POC bucket (pocIdx) is simply the index with the highest totalProfile value.
To compute the 70% Value Area, the algorithm starts at the POC bucket and expands outward, each step adding either the upper or lower neighbor depending on which has more volume. This continues until the cumulative volume reaches 70% of totalSum. The result is a volume-driven VA, not necessarily symmetric around POC, which more accurately represents where the market has truly traded.
4. Market Profile Shape Classification
float volTopThird = 0.0
float volMidThird = 0.0
float volBotThird = 0.0
int thirdIdx = int(bucketCount / 3)
for j = 0 to bucketCount - 1
float val = totalProfile.get(j)
if j < thirdIdx
volBotThird += val
else if j < thirdIdx * 2
volMidThird += val
else
volTopThird += val
float totalVolShape = totalProfile.sum()
string shapeStr = "D-Shape (Balanced)"
if (volTopThird > totalVolShape * 0.20) and (volBotThird > totalVolShape * 0.20) and (volMidThird < totalVolShape * 0.50)
shapeStr := "B-Shape (Double Dist)"
else
if pocIdx > bucketCount * 0.5 and volTopThird > volBotThird * 1.3
shapeStr := "P-Shape (Short Covering)"
else if pocIdx < bucketCount * 0.5 and volBotThird > volTopThird * 1.3
shapeStr := "b-Shape (Long Liquidation)"
else
shapeStr := "D-Shape (Balanced)"
The profile is split into bottom, middle, and top thirds. The script compares how much volume is concentrated in each and combines that with the relative location of POC. If both extremes are heavy and the middle light, it labels a B-Shape (double distribution). If the POC is high and the top dominates the bottom, it’s a P-Shape (short covering). If the POC is low and the bottom dominates, it’s a b-Shape (long liquidation). Otherwise, it defaults to a D-Shape (balanced). This provides a quick, at-a-glance assessment of auction structure.
5. Imbalances, Absorption & Zones
bool isBuyImb = showImb and sVal > 0 and (bVal / sVal >= imbRatio)
bool isSellImb = showImb and bVal > 0 and (sVal / bVal >= imbRatio)
float volRatio = eaMax > 0 ? tVal / eaMax : 0
float stRatio = esmRange > 0 ? (stVal - esmMin) / esmRange : 1.0
bool isAbsorp = showAbsorp and volRatio > 0.6 and stRatio < 0.25
if showImbZone
if isSellImb
zoneBoxes.push(box.new(bar_index - N + 1, bucketHi, bar_index + 1, bucketLo, ...))
if isBuyImb
zoneBoxes.push(box.new(bar_index - N + 1, bucketHi, bar_index + 1, bucketLo, ...))
if isAbsorp
zoneBoxes.push(box.new(bar_index - N + 1, bucketHi, bar_index + 1, bucketLo, ...))
Imbalances are identified where one side’s volume (buy or sell) exceeds the other by at least Imbalance Ratio. These buckets are marked as buy or sell imbalance zones, indicating aggressive participation from one side.
Absorption is detected by combining a high volume ratio (volRatio) with a low normalized stealth ratio (stRatio). High volume with limited price movement suggests that opposing orders are absorbing flow at that level. Both imbalance and absorption buckets are extended into horizontal zones from the start of the lookback to the current bar, visually emphasizing key support/resistance and liquidity areas.
6. Building Buy, Sell & Stealth Profiles
sellProfile := array.new(bucketCount, 0)
buyProfile := array.new(bucketCount, 0)
stealthProfile := array.new(bucketCount, 0)
Three arrays are used to store Sell Flow, Buy Flow, and Stealth Flow. Bars are processed from oldest to newest so that decay is applied in correct chronological order. For each bar, a volume density (volume / range) is calculated and distributed across the candle range. Bull candles feed buyProfile, bear candles feed sellProfile.
Stealth Flow computes the close-to-close move between consecutive bars, scaled by 1 / (1 + volume). Big moves on low volume produce high stealth values, which are then allocated across the move’s price span into stealthProfile. This yields a three-layer profile per price level: directional volume and stealthy price movement.
Trend Gazer: Unified ICT Trading System with Signals# Trend Gazer User Guide (English)
## 📖 Table of Contents
1. (#about-this-indicator)
2. (#quick-start-guide-3-steps)
3. (#detailed-usage)
4. (#settings-customization)
5. (#why-combine-multiple-features)
6. (#faq)
---
## About This Indicator
**Trend Gazer** is an integrated trading system designed to read institutional order flow like professional traders.
### 🎯 3 Problems This Indicator Solves
#### ❌ Problem 1: Too Many Indicators = Information Overload
```
Normal: RSI + MACD + Moving Average + Bollinger Bands... → Cluttered chart
Solution: All integrated into ONE indicator → Clean & Clear
```
#### ❌ Problem 2: Single Indicators Give False Signals
```
Normal: Enter based on RSI alone → Frequent stop-outs
Solution: Structure × Zone × Momentum multi-angle confirmation → Higher win rate
```
#### ❌ Problem 3: Unclear Entry Timing
```
Normal: Know the trend but don't know WHERE to enter
Solution: LS Bounce Signal shows EXACT entry points
```
---
## Quick Start Guide (3 Steps)
### 🚀 STEP 1: Confirm Trend Direction
**Look for CHoCH (Change of Character)**
```
📍 (1.CHoCH) label = Uptrend starting
📍 (a.CHoCH) label = Downtrend starting
```
**Important**: Wait for CHoCH! No direction without it.
---
### 🎯 STEP 2: Find Entry Points
**Wait for LS Bounce Signal (green/red labels)**
```
🟢 "Long@ HL only" label → LONG (buy) candidate
🔴 "Short@ LH only" label → SHORT (sell) candidate
```
**Label text color meaning**:
- **White text**: Clean trend (high confidence)
- **Yellow text**: Trend transition (moderate caution)
---
### 🛡️ STEP 3: Final Confirmation with Bar Color
**Bar color shows market state**
```
🔴 Red bar: BUY zone (buying is favored)
🟢 Green bar: SELL zone (selling is favored)
⚪ White bar: Neutral (wait and see)
```
---
## Detailed Usage
### 📊 Understanding the Chart
#### 1. Labels (Market Structure Changes)
```
(1.CHoCH) / (a.CHoCH) : Trend reversal
(2.SiMS) / (b.SiMS) : Momentum confirmation
(3.BoMS) / (c.BoMS) : Trend continuation
```
#### 2. Boxes (Institutional Order Zones)
```
📦 Blue boxes: Bullish OB (buy orders accumulated)
📦 Red boxes: Bearish OB (sell orders accumulated)
📦 Black transparent boxes: Liquidity Sweep
```
**How to use Order Blocks**:
- Function as support/resistance
- Signals within OB have higher reliability
- Use for stop-loss placement
#### 3. Lines (Trends and Support/Resistance)
```
━━━ Red lines: EMA20, EMA50, EMA100 (short to mid-term trends)
━━━ Blue lines: 60min NPR/BB bands (support/resistance)
```
#### 4. Bar Colors (Filter 6)
```
Bar color = Real-time market state
🔴 Red: Buying is favored
🟢 Green: Selling is favored
⚪ White: Neutral
```
---
### 🎯 Practical Trading Flow
#### 📍 Preparation Phase
```
1. Open chart (recommended: 5min or 15min)
2. Add Trend Gazer to chart
3. Start in observation mode (don't enter yet)
```
#### 📍 Entry Decision
```
✅ CHoCH confirms direction → Uptrend starting
✅ LS Bounce Signal "Long@ HL only" appears
→ Entry point candidate
✅ Bar turns red → Market supports buying
→ Entry decision 🎯
✅ Place stop below nearest Order Block (blue box)
```
#### 📍 Exit Decision
```
🔴 Opposite LS Bounce Signal "Short@ LH only" appears
→ Consider taking profit
🔴 Bar turns green
→ Potential trend reversal, review position
🔴 Stop loss hit
→ Exit with loss
```
---
### 💡 Tips for Higher Win Rate
#### ✅ DO's
```
1. Enter AFTER CHoCH appears
2. Prioritize white-text LS Bounce Signals
3. Check higher timeframe (1H or Daily) trend
4. Emphasize signals within Order Blocks
5. Use bar color as final confirmation
```
#### ❌ DON'Ts
```
1. Enter before CHoCH → No clear direction
2. Enter only on yellow text → Unstable transition period
3. Ignore bar color → Trading against market state
4. Don't check Order Blocks → Unclear support/resistance
5. Enter same direction consecutively → Overtrading
```
---
## Settings Customization
### 🔧 How to Open Settings
```
1. Right-click on indicator name on chart
2. Select "Settings..."
3. Settings panel opens
```
---
### 📋 Recommended Setting Profiles
#### 🔰 Beginner Settings (Simple)
**Goal**: Reduce noise, show only important signals
```
【FILTERS】
✅ Bonus Filter: ON
✅ Filter 6 (OB/BB/NPR Zone Filter): ON
❌ Direction Filter: OFF
❌ Liquidation Reversal Filter: OFF
❌ ICT Market Structure Filter: OFF
❌ EMA Trend Filter: OFF
❌ OB/FVG Filter 1: OFF
❌ OB/FVG Filter 2: OFF
【SIGNALS】
✅ Signal 0 (Bonus): ON
✅ Signal 1 (VWC Change): ON
✅ Signal 2 (Liq Rev): ON
❌ Signal 3 (LS): OFF (complex alone)
❌ Signal 4 (LS Break): OFF
❌ Signal 5 (OB+LS NPR): OFF
❌ Signal 6 (OB+LS EMA): OFF
【LS BOUNCE SIGNAL】
✅ Exclude EMA50 from touch detection: OFF
❌ Only show when EMA fills are mixed: OFF
```
**What happens with this setup**:
- Only Bonus (black background) signals display
- LS Bounce Signals clearly visible
- Noisy signals filtered out
---
#### 💪 Intermediate Settings (Balanced)
**Goal**: Enable key filters for better accuracy
```
【FILTERS】
✅ Bonus Filter: ON
✅ Filter 6 (OB/BB/NPR Zone Filter): ON
✅ ICT Market Structure Filter: ON
❌ Direction Filter: OFF
❌ Liquidation Reversal Filter: OFF
❌ EMA Trend Filter: OFF
❌ OB/FVG Filter 1: OFF
❌ OB/FVG Filter 2: OFF
【SIGNALS】
✅ Signal 0 (Bonus): ON
✅ Signal 1 (VWC Change): ON
✅ Signal 2 (Liq Rev): ON
✅ Signal 3 (LS): ON
❌ Signal 4 (LS Break): OFF
❌ Signal 5 (OB+LS NPR): OFF
❌ Signal 6 (OB+LS EMA): OFF
【LS BOUNCE SIGNAL】
✅ Exclude EMA50 from touch detection: OFF
❌ Only show when EMA fills are mixed: OFF
```
**What happens with this setup**:
- Signals only after CHoCH (trend confirmed)
- Filter 6 changes bar colors
- Liquidity Sweeps also displayed
---
#### 🚀 Advanced Settings (Full Utilization)
**Goal**: Master all features
```
【FILTERS】
✅ Bonus Filter: ON
✅ Filter 6 (OB/BB/NPR Zone Filter): ON
✅ ICT Market Structure Filter: ON
✅ Direction Filter: ON
✅ EMA Trend Filter: ON
❌ Liquidation Reversal Filter: OFF (optional)
✅ OB/FVG Filter 1: ON
✅ OB/FVG Filter 2: ON
【SIGNALS】
✅ All ON
【LS BOUNCE SIGNAL】
✅ Exclude EMA50 from touch detection: ON (reduce EMA50 noise)
✅ Only show when EMA fills are mixed: ON (show only transition zones)
```
**What happens with this setup**:
- Fewer signals (precision-focused)
- Multiple confirmations greatly reduce false signals
- Only signals confirmed by trend, momentum, and zones
---
### 🎨 Display Customization
#### Change Label Size
```
【BUY/SELL SIGNAL APPEARANCE】
→ "BUY/SELL Label Size"
→ Choose from: tiny / small / normal / large / huge
Recommended: small (default)
```
#### Order Block Display Settings
```
【ORDER BLOCK (OB) SETTINGS】
✅ Show Current TF OB: Current timeframe OB
✅ Show 1min OB: 1-minute OB
✅ Show 5min OB: 5-minute OB
✅ Show 15min OB: 15-minute OB
Recommended: Only 15min OB ON (simple)
```
#### Liquidity Sweep Display
```
【LIQUIDITY SWEEPS SETTINGS】
→ "Sweep Length": Sensitivity (small=frequent, large=selective)
→ "Sweep Option": Standard / Maximum
Recommended: Length=40, Option=Standard
```
#### NPR/BB Bands Display
```
【NPR (NON-REPAINT STDEV) SETTINGS】
✅ Display 60min NPR Bands: 60-minute support/resistance
❌ Display Current TF NPR Bands: Current timeframe (optional)
Recommended: Only 60min ON
```
---
### ⚙️ Advanced Settings
#### Fine-tune Filter 6
```
【FINAL FILTERS】
→ "Enable Filter 6 (OB/BB/NPR Zone Filter)"
When ON:
- Bars color-coded red/green/white
- Behavior at OB, NPR/BB touches controlled
```
#### LS Bounce Signal Adjustments
```
【LS BOUNCE SIGNAL】
→ "Exclude EMA50 from touch detection"
OFF: Detect NPR/BB/EMA50 (all 3)
ON: Detect NPR/BB only (exclude EMA50)
→ "Only show when EMA fills are mixed"
OFF: Show all LS Bounce Signals
ON: Show only transition zone signals (yellow text)
```
#### MTF (Multi-Timeframe) Control
```
【ORDER BLOCK (OB) SETTINGS】
→ "Disable MTF on 1hr+ Charts"
ON: Disable MTF on 1H+ (save memory)
OFF: MTF enabled on all timeframes
Recommended: ON (unnecessary on larger timeframes)
```
---
### 🎯 Purpose-Based Configuration Guide
#### 🔍 Goal 1: Reduce Signal Count
```
✅ Bonus Filter: ON
✅ ICT Market Structure Filter: ON
✅ Filter 6: ON
✅ All Signals OFF, only Signal 0 ON
```
#### 🔍 Goal 2: Get More Signals
```
❌ All Filters OFF
✅ All Signals ON
```
#### 🔍 Goal 3: Trend Following Only
```
✅ ICT Market Structure Filter: ON
✅ Direction Filter: ON
✅ EMA Trend Filter: ON
```
#### 🔍 Goal 4: Counter-Trend Trading
```
✅ LS Bounce Signal: ON
✅ Filter 6: ON
❌ ICT Market Structure Filter: OFF
```
#### 🔍 Goal 5: Day Trading (5-15min charts)
```
✅ Show 15min OB: ON
✅ Display 60min NPR Bands: ON
✅ LS Bounce Signal: ON
❌ Show 1min/5min OB: OFF
```
#### 🔍 Goal 6: Scalping (1-5min charts)
```
✅ Show 5min OB: ON
✅ Show 15min OB: ON
✅ Display 60min NPR Bands: ON
✅ All Signals: ON
```
---
### 💾 Saving and Loading Settings
#### Save Settings
```
1. Click "..." in top-right of Settings screen
2. Select "Save as default"
→ Same settings auto-applied next time
```
#### Reset Settings
```
1. Click "..." in top-right of Settings screen
2. Select "Reset settings"
→ Return to default settings
```
---
## Why Combine Multiple Features?
### 🎯 Problem: Single Indicator Limitations
Common trader problems:
```
❌ RSI alone → Trade against trend, lose
❌ Moving Average alone → Late entry timing
❌ Support/Resistance alone → Caught by false breakouts
```
**Markets are complex**. One angle isn't enough.
---
### 💡 Solution: Multi-Angle Integrated Approach
#### 1️⃣ Structure × Zone × Momentum
```
📐 Structure (ICT CHoCH)
→ "Which direction is likely?"
📦 Zone (OB/NPR/BB)
→ "Where will price react?"
💨 Momentum (EMA/VWC)
→ "Is there momentum now?"
```
**When all 3 align = Highest win-rate timing**
---
#### 2️⃣ Multi-Timeframe Analysis
```
Big picture: Confirm Daily direction
Medium-term: Check 1H Order Blocks
Short-term: Time entry on 5min
```
**Short-term entries aligned with higher timeframes = Better win rate**
---
#### 3️⃣ Understanding Liquidity
```
🎣 Institutional strategy:
1. Intentionally move price opposite to stop out retail
2. Then, move in real direction
💡 Liquidity Sweep = Visualize this "trap"
→ Read institutional order flow
```
---
### 🧠 Integration Examples
#### Case 1: RSI Alone vs Integrated System
**Scenario**: RSI at 30 (oversold)
```
❌ RSI-only decision:
→ "Buy!"
→ But downtrend continues, loss 😢
✅ Trend Gazer:
CHoCH check → Still downtrend ❌
Order Block → In Bearish OB ❌
LS Bounce → SHORT signal only ❌
→ Skip or SHORT
→ Avoid loss ✅
```
**Result**: Multiple filters block wrong entry
---
#### Case 2: LS Bounce Signal 2-Stage Logic
**Scenario**: Price touches 60min NPR lower band
```
🔍 Traditional method:
Touched → Buy!
→ But price continues down 😢
✅ Trend Gazer:
Stage 1: NPR touch + red bar → Flag ON
Stage 2: EMA20 crosses above EMA50 → Confirm bounce
→ Now "Long@ HL only" displays
→ Entry → Success ✅
```
**Result**: Not just "touch" but "touch + bounce confirmation" improves accuracy
---
### 🎓 Progressive Learning Design
This indicator is designed for **beginners to advanced**:
```
📖 Beginner (Month 1):
Use only CHoCH + LS Bounce Signal
→ Learn trend and entry points
📖 Intermediate (Months 2-3):
Add Order Block + Bar Color
→ Learn support/resistance and filtering
📖 Advanced (Month 6+):
Master all features
→ Read institutional order flow
```
**Ultimate goal**: Indicator becomes confirmation tool. Your market sense becomes primary.
---
### 🔬 Technical Advantages
#### 1. Non-Repaint STDEV (NPR)
```
Normal Bollinger Bands:
→ Past data changes (repaints)
→ Inaccurate backtesting
NPR:
→ Past data doesn't change (non-repaint)
→ Reliable verification possible
```
#### 2. 2-Stage Signal Logic
```
Traditional: Condition met → Immediate signal
→ Many false signals
Trend Gazer: Condition1 → Flag ON → Condition2 → Signal
→ Confirmation step improves accuracy
```
#### 3. Alternating Filter
```
Problem: Same-direction signals spam
→ Overtrading
Solution: LONG → SHORT → LONG alternating only
→ Prevent unnecessary entries
```
---
### 💎 Conclusion: Why Integration?
```
Single indicator = "Partial truth"
Integrated system = "3D market perspective"
```
**Markets are multifaceted**. One angle isn't enough.
Trend Gazer **integrates multiple screens pros watch simultaneously into ONE**,
allowing beginners to read charts with institutional perspective.
---
## FAQ
### ❓ Q1: Which timeframe is best?
**A**: Depends on trading style
```
Scalping: 1min ~ 5min
Day Trading: 5min ~ 15min
Swing: 1H ~ 4H
```
**Important**: LS Bounce Signal only works on 30min and below.
---
### ❓ Q2: Too many signals, confused
**A**: Enable filters
```
【Recommended Settings】
✅ Bonus Filter: ON
✅ Filter 6: ON
✅ ICT Market Structure Filter: ON
→ Show only Signal 0
```
This significantly reduces signal count.
---
### ❓ Q3: No CHoCH appearing, what to do?
**A**: Wait or check higher timeframe
```
Method 1: Wait for CHoCH (recommended)
Method 2: Check higher timeframe (e.g., Daily) for trend
Method 3: Disable ICT Filter (not recommended)
```
**When trend is unclear, sitting out is also strategy**.
---
### ❓ Q4: LS Bounce Signal not appearing
**A**: Checkpoints
```
1. Are you on 30min or below chart?
→ Doesn't show on 1H+
2. Are NPR/BB bands displayed?
→ Check Settings "Display 60min NPR Bands"
3. Is EMA50 excluded?
→ If "Exclude EMA50" is ON, EMA50 signals won't show
```
---
### ❓ Q5: Bar color not changing?
**A**: Check Filter 6
```
Settings → FINAL FILTERS
→ Confirm "Enable Filter 6 (OB/BB/NPR Zone Filter)" is ON
If ON but still not changing:
→ Current price may be outside OB/NPR/BB zones
```
---
### ❓ Q6: Too many Order Blocks, hard to see
**A**: Narrow down displayed OBs
```
Settings → ORDER BLOCK (OB) SETTINGS
Recommended:
❌ Show Current TF OB: OFF
❌ Show 1min OB: OFF
❌ Show 5min OB: OFF
✅ Show 15min OB: ON (only this)
```
---
### ❓ Q7: How to improve win rate?
**A**: Thorough multiple confirmations
```
Checklist:
✅ CHoCH appeared
✅ LS Bounce Signal (white text)
✅ Bar color matches (red bar=LONG, green bar=SHORT)
✅ Signal within Order Block
✅ Aligns with higher timeframe trend
Enter ONLY when all align
```
---
### ❓ Q8: Want to practice on demo
**A**: Recommended practice method
```
Week 1: Observation only
→ Watch signals and chart movement
→ Resist entering
Weeks 2-3: Keep records
→ Screenshot when signal appears
→ Record subsequent movement
Week 4+: Start demo trading
→ Start with small amounts
→ Continue keeping records
```
---
### ❓ Q9: Are there alert features?
**A**: Yes, multiple alerts available
```
Setup method:
1. Right-click indicator on chart
2. Select "Add Alert..."
3. Choose from:
- ANY ALERT: BUY/SELL Signals
- BUY ONLY ALERT
- SELL ONLY ALERT
- MS UP / MS DOWN
- BAR COLOR: RED / LIME
- LS BOUNCE: LONG / SHORT Signal
```
---
### ❓ Q10: Works on other markets?
**A**: Yes, works on all markets
```
✅ Cryptocurrency (BTC, ETH, etc.)
✅ Forex (EUR/USD, USD/JPY, etc.)
✅ Stocks (individual stocks, indices)
✅ Futures (oil, gold, etc.)
```
Works on any market with price and volume data.
---
## 📋 Disclaimer
### ⚠️ Important Notice
This indicator is for **educational and informational purposes only**.
```
❌ NOT investment advice
❌ Does NOT guarantee profits
❌ Past results do NOT guarantee future performance
```
### Risk Warning
```
⚠️ Trading involves substantial risk
⚠️ Only trade with funds you can afford to lose
⚠️ Practice extensively on demo account before live trading
⚠️ Make your own informed decisions and act at your own risk
```
---
## 📞 Support
### Feedback & Questions
Feel free to ask questions in TradingView comments section.
### Bug Reports
Please report with specific details (timeframe, symbol, screenshots).
---
**Author**: rasukaru666
**License**: Mozilla Public License 2.0
**Last Updated**: December 2025
**Version**: Latest
---
**Thank you for using Trend Gazer!**
**Happy Trading! 📈**
---------------
X FP Imbalancesprovides advanced volume profile analysis by isolating and visualizing market aggression at a granular price level. It is a powerful tool for short-term and intraday traders seeking objective confirmation of supply and demand dynamics, primarily used to identify high-probability reversal or continuation points based on order flow principles.
Key Functionality and Methodology
The indicator operates by transforming standard time-based candle data into a Volume-at-Price footprint, focusing specifically on aggressive market activity.
Granular Aggression Measurement (Delta)
The script dynamically segments the price range into discrete price levels (tickAmount). This granularity is controlled either by a user-defined fixed tick count or automatically adjusted using the Average True Range (ATR) to adapt the box size to current market volatility.
The script uses lower timeframe data (e.g., 1-minute bars) to accurately distribute the total volume into each price level, distinguishing between aggressive buying (Up Volume) and aggressive selling (Down Volume).
The core output is Delta, which is the net difference between aggressive buying and aggressive selling at each price level.
Stacked Imbalance Identification
The indicator identifies an imbalance when the volume from one side (e.g., aggressive buyers) overwhelms the total volume at that level by a user-defined percentage (imbalanceP).
A single price level where the Delta percentage exceeds the threshold is defined as an Imbalance.
The Stacked Imbalance is the primary signal, triggered when the imbalance is detected on a user-defined number of consecutive price levels (stacked) in the same direction (e.g., 3 consecutive levels of aggressive buying). This signals a high-conviction structural break or strong rejection.
Stacked imbalances are visually highlighted and can trigger real-time alerts upon bar close.
Strategic Applications
This indicator is invaluable for traders who integrate order flow concepts into their decision-making process.
One-Sided Stack (Supply/Demand Zone): Aggressive selling (Red Stack) at a high price, followed by price reversal, identifies a Structural Supply Zone (Resistance). The level is where sellers aggressively rejected demand, leaving an untested area of supply.
Overlapping Stacks (Climax Reversal): Consecutive Buy Stacks followed immediately by Sell Stacks in a tight range signals Buyer Exhaustion and an immediate Climax Reversal. The buying power was absorbed and instantly overwhelmed by waiting supply.
Absence of Stack: When price moves sharply through a level without creating any Stacked Imbalances, it suggests an Orderly Move or Liquidity Void. The absence of resistance means the market move is structurally weak and often vulnerable to a retest.
The choice between a Fixed Tick Distance (for micro-pattern precision) and ATR-based sizing (for volatility-adjusted analysis) allows the user to tailor the indicator to specific asset classes and trading styles.





















