Elliott Wave / NeoWave Rule Engine – v6.9This script functions as a "rule engine" that automatically identifies significant price swings and then tests them against a comprehensive set of Elliott Wave rules and guidelines.
The goal is to filter out low-probability setups and identify valid motive (impulse and diagonal) waves by applying user-defined tolerances. The script plots swings on the chart and can display a real-time dashboard that shows which rules are passing or failing. When a valid motive wave is detected, it can generate buy or sell signals.
User Settings
The script's behavior is controlled by a set of user inputs, organized into four main groups.
Swing / ZigZag Detection
These settings control how the script identifies the price swings that form the basis of the wave patterns.
Pivot Left Bars & Pivot Right Bars: These two values determine the sensitivity of the swing detection. A pivot point (a high or low) is only identified if it is the highest or lowest price within the specified number of bars to its left and right. Increasing these numbers will result in fewer, larger swings.
Minimum swing % (filter micro noise): This is a crucial filter. It ignores swings that are too small to be considered significant, helping to clean up the chart and prevent the engine from analyzing "noise." For example, a value of 0.3 means any swing that is less than 0.3% of the price range will be ignored.
Rule Engine Tolerances
This group allows you to define how strict the validation rules are.
Fibonacci tolerance (±%): This sets the acceptable margin of error for Fibonacci relationships (e.g., a 0.618 retracement). A value of 0.001 means a retracement between 0.617 and 0.619 will be considered a valid match.
Same-degree TIME proportion max (x): This sets the maximum time difference allowed between waves of the same degree (e.g., Wave 1 and Wave 3) to still be considered "proportional." A value of 1 means Wave 3's duration can be up to 1 time longer than Wave 1's duration, and vice-versa.
Same-degree PRICE proportion max (x): Similar to the time tolerance, this sets the maximum price difference allowed between waves of the same degree to still be considered proportional.
Alternation slope ratio threshold: This is a key NeoWave guideline. It checks if Wave 2 and Wave 4 have different "sharpness" (price change per bar). A higher value makes the alternation rule stricter.
Min guideline passes for motive validation (0–7): This is the gating feature. Even if a pattern passes all the hard Elliott Wave rules (e.g., no overlap, Wave 3 isn't the shortest), you can still require it to pass a minimum number of guidelines (like Fibonacci relationships, alternation, etc.) before a signal is generated. A value of 7 means every guideline must be met.
Momentum / Volume Guidelines
These are additional checks for pattern validation.
Momentum length: This setting controls a proxy for momentum, which is calculated based on the speed of price movement.
Use volume checks: This is a placeholder for future functionality. It does not currently affect the script's behavior.
UI / Debug
These settings control the visual aspects of the script on your chart.
Max swings to keep/evaluate: This determines how far back the script looks to find and analyze swings. A larger number will analyze more historical patterns but may impact performance.
Show detected labels: Toggles the display of numerical (1-2-3-4-5) and letter (A-B-C) labels on the detected waves.
Show rule PASS/FAIL dashboard: Toggles the on-chart table that provides a detailed breakdown of which rules and guidelines are met.
Table Position: Controls where the rule dashboard is located on your chart.
Print debug info to Data Window: If you are a developer or want to see the underlying data, this will print information to TradingView's Data Window.
Show Buy/Sell Signals: Toggles the display of Buy/Sell signals. These signals are only generated when a pattern passes all the hard rules and your minimum guideline pass requirement.
チャートパターン
Futures - Risk CalculatorWelcome to the Futures - Risk Calculator.
You traders inspired me to create a simple indicator for FUTURES, with all of your positive feedback from my "Lot Size Calculator - " indicator. Which is also available for FOREX and was the base for this indicator.
I don't think there's a Futures indicator out there which is this simple and easy to use. This indicator knows what symbol you have open on your chart, therefore you don't need to input manually (like most indicators). You also don't need to switch between MICRO & MINI contracts as this indicator has everything running in the background. It knows the tick value for the contract symbol on your chart.
Which Futures Contracts can i trade?
⚪️ Currency: 6A, 6B, 6C, 6E, 6J, 6N, 6S, E7, J7, M6A, M6B, MCD, M6E, MJY, MSF.
⚪️ Index: YM, MYM, ES, MES, NQ, MNQ, RTY, M2K, FDAX, FDXS, FDXM.
⚪️ Metal: GC, QO, MGC, SI, QI, SIL.
⚪️ Crypto: BTC, MBT, ETH, MET.
⚪️ Energy: CL, QM, MCL, NG, QG.
How does this indicator work?
⚪️ Simply add this indicator to your chart.
⚪️ Ensure you are on a FUTURES Contract symbol.
⚪️ Select the amount of Contracts you wish to risk.
⚪️ Select the amount of ticks SL you wish to have.
⚪️ You will then be shown the risk on the table.
What does this indicator display?
⚪️ Futures symbol on chart.
⚪️ Tick size & Tick value.
⚪️ Number of contracts at risk.
⚪️ Number of ticks at risk.
⚪️ Shows you your risk amount in $.
Features?
⚪️ Choice of 3 different layouts for your preference.
⚪️ Choice of 9 different positions to place the table on your chart.
⚪️ Choice of 4 table sizes to suit your needs, smaller for your phone or bigger for desktop.
⚪️ Options for colour customisation for the calculator table.
I hope you guys enjoy this indicator, also i hope it helps traders out there. All i ask is that you give these indicators a BOOST (if they're useful). To get them seen to more people out there who could benefit from them.
I have been working on two other Lot Size Calculators which will be Premium indicators. Stay tuned for them. 🚀
3*n 1.0IPDA Range display
ICT Hidden levels
give you special levels to trade from.
Supper support and resistance levels
DWM*OHLC Levels*Plots the previous Day, Week, and Month OHLC levels on any chart timeframe. Levels are locked for the entire current period (day/week/month) and update only when a new period begins—so they won’t shift when you zoom or load more history.
Ovi v3 – ADX + STO + RSI DivThis indicator gates signals through trend, momentum, and divergence. BUY prints only when Stochastic < 20 and ADX > 40 and a bullish RSI(14) divergence (regular/hidden, 1–2 bar lookback) occurs. SELL triggers when ADX is falling (N bars) while Stochastic K is rising (N bars) and a bearish RSI divergence aligns. Inputs let you pick divergence type (Regular/Hidden/Any), ADX DI & smoothing lengths, and optional labels/background. Works on any market/timeframe; for Larry Williams’ style use Weekly with ADX . Alerts included. Overlay. Not financial advice.
Find Wall GunThis indicator is designed to detect traces of the activities of large players (market makers) who place significant limit orders, creating support or resistance levels on the chart.
The indicator analyzes the behavior of price and volume to find the moments when the market for several candles in a row (at least 2-3) rests on the same price level, but cannot break it. This is a classic sign that there is a large limit order ("wall") at this level, which is "held" — that is, it is not removed at the first touch of the price.
What does this give the trader?
+ **Visualization of power:** Helps you see not just a level from the past, but the active presence of a major player in real time.
+ **Identification of key levels:** These levels become important decision points. A rebound from such a "wall" can serve as a signal to enter a trade, and its breakdown can indicate a change in market sentiment.
+ **Understanding the Auction:** Shows where major market participants Accumulate or Distribute positions.
The indicator highlights the prices on the chart, where the "whales" have placed their large orders, and by their action they show that they seriously intend to defend this level.
Astro by Trading caps🚀 Precision Entries & Exits – Identifies high-probability Buy/Sell zones with exact SL & TP.
🪐 Astro Timing Advantage – Uses planetary cycles & Hora hours to catch explosive market moves.
📊 Multi-Asset Support – Works on Forex, Gold, Crypto, and Indices.
AlphaBeta Edge — VPA Volume Angles📘 How the Indicator Works — User Guide
1. Volume Pressure (VPA Logic)
The indicator reads volume activity and matches it with the candle direction.
If volume supports bullish candles → it highlights buying pressure.
If volume supports bearish candles → it highlights selling pressure.
✅ How to use: You don’t need to activate this, it runs automatically. Look at the color signals on the chart (green = buying, red = selling).
2. Angle Measurement (Alpha & Beta)
Two angles (α and β) are drawn between swing points (A–B–C).
Steeper angles mean stronger market moves.
Softer angles mean weakening momentum.
✅ How to use: Angles are visible as lines on the chart. You can check them visually or set alerts when they become too steep (potential breakout).
3. Dynamic Trendlines
The indicator automatically draws support and resistance lines connecting swing highs and lows.
These trendlines update as the market creates new swings.
✅ How to use: No setup required. Watch for price touching or breaking these lines — they often signal continuation or reversal zones.
4. Alerts
Built-in alerts notify you when:
Buying pressure is detected.
Selling pressure is detected.
Angles (α or β) reach critical levels.
✅ How to activate:
Right-click on the chart → “Add alert”.
Choose this indicator → select the condition (e.g., “Buying Pressure Detected”).
Customize the notification (pop-up, email, or app alert).
5. Color Coding
Green signals = bullish pressure.
Red signals = bearish pressure.
Neutral or indecision areas may show another color.
✅ How to use: Colors update automatically; you don’t need to configure them. Simply follow the visual bias.
6. Custom Settings (Inputs Panel)
You can personalize how sensitive the indicator is:
Swing Length → Controls how far back the indicator looks for A–B–C points. Longer = fewer but stronger signals. Shorter = more frequent but noisier signals.
Volume Sensitivity → Adjusts how much volume is required to confirm pressure.
Alerts Toggle → You can enable or disable different alerts.
✅ How to activate/deactivate:
Go to the indicator settings (⚙️ icon in TradingView).
Adjust parameters to fit your trading style (scalping, swing, or long-term).
⚠️ Disclaimer
This indicator is for educational purposes only.
It is not financial advice and does not guarantee profits.
Always apply proper risk management and confirm with your own analysis.
MACD Classic MT5 Style (2 Lines + Histogram)MACD เหมือน MT5 นะจ๊ะ
MACD Line (Green) = Difference between Fast EMA and Slow EMA
Signal Line (Red) = EMA of the MACD Line
Histogram = Distance between MACD Line and Signal Line (or in MT5 style, just MACD Line itself)
Multi-Timeframe FVG-Deepak kakkarFVG Indicator created for different timeframes , following are settings:
1) Choose your own timeframe or as per chart
2) Customize FVG length and limit
3) remove FVG when touched or closed !
[TRIX] Vertical Timeframe LinesSelect which higher timeframes vertical lines to show with optional day of week labels at top of chart. User can adjust line types and colors. User can also show +1 future timeframe vertical line divider.
[TRIX] Multi VWAPIndicator has 4 options on VWAP's to display. Daily VWAP (time can be adjusted) and each session with times adjustable: New York, Asia, and London. Each VWAP has the option to show up to 3 standard deviation bands. All line types and colors are user adjustable.
[TRIX] MacrosAutomatically labels out the economic macro events and timeframe they are happening above candles. Allows user to be trade inside high volatility timeframes or avoid them.
[TRIX] HTF Candles + TimeSelect which HTF candles to show on LTF charts. Change colors of candles and location of candles. Shows time below each candle, location can be adjusted. Shows countdown timer, location can be adjusted. Options to show last candle H/L, range H/L, and range mid.
X-BERG by LogicatX-BERG — MTF Sniper Entry Analyzer
A precision, rules-driven, multi-timeframe tool that stacks structure from higher TFs and times entries with lower-TF confirmation.
Three-tier mapping:
Daily SEG zones (primary bias).
H4 SEG zones in the same direction and contained within the active Daily zone.
H1 SEGF “flip” boxes (buy/sell zones) formed inside H4 zones.
Entry timing (15m): prints Buy/Sell when fulfilling strict criteria.
Spam-free signals: each H1 SEGF box (or overlapping group) can fire once signal to give high rate accuracy.
Visuals that matter: clean, color-coded boxes for Daily/H4/H1; optional SEG bar coloring on the chart; H1 boxes can auto-extend N bars.
Alerts included: Buy/Sell alerts fire exactly when the label is placed, matching the on-chart logic.
Performance-minded: capped box counts, safe array handling, and non-repainting HTF queries (no lookahead).
Use it to: anchor bias on Daily, refine participation levels on H4, and execute with H1 zones + 15m momentum confirmation—clear, disciplined, and automated.
SNR Trend Analyzer Raden (DCMS)Scalping (1M-15M): Use SNR breakout alerts for quick entries, confirming with bullish/bearish trends from the background/labels.
Swing Trading (1H-D): Use SNR as stop-loss/take-profit targets, combined with EMA crossovers.
Backtesting: Test on assets like BTCUSD, ETHUSD, or stocks on TradingView to optimize parameters.
Combination: Add price action confirmation (e.g., pinbars on SNR) for greater accuracy.
Observe:
- Green lines (S1, S2, ...): Support levels.
- Red lines (R1, R2, ...): Resistance levels.
- Background: Green (bullish), red (bearish), gray (neutral).
- Trend labels: Bullish/Bearish/Neutral above the candlesticks.
Bulkowski Top 5 Patterns (v5)Top five Bulkowski patterns detected:
Double Top (DT) – two highs at roughly the same level.
Double Bottom (DB) – two lows at roughly the same level.
Rectangle – repeated highs and lows forming a box-shaped consolidation.
Ascending Triangle (AscTri) – flat top with rising lows.
Descending Triangle (DescTri) – flat bottom with falling highs.
Visual Features
Labels for patterns:
Double Tops/Bottoms: red/green labels with text “DT” or “DB.”
Triangles: blue/purple labels with “AscTri” or “DescTri.”
Boxes for rectangles:
Orange semi-transparent boxes highlight rectangle patterns.
Automatic placement:
Labels are placed at the pivot points.
Boxes are drawn using the exact highs and lows from the detected pivots.
EMA Slopes Table (10/20/50/200)Gives you a box of 10,20,50 and 200 ema and indicates its sloping nature. If its in uptrend or downtrend.
1. Look for reversals when 200 is flat. Applies for both bearishness and bullishness
2. Look for 10,20 and 50 to be in sync always for powerful moves
MCL - Real Price (KRW/USD) - PUBLICThis indicator was developed by the chart analysis specialist team at the YouTube channel Money Copy Lab.
This indicator reflects the exchange rate between the US dollar and the South Korean won, enabling you to view domestic stock and domestic stock index charts correctly from an American investor's perspective.
As foreign investors, particularly American investors, participate heavily in domestic stocks, such exchange rate-reflected charts are highly significant.
Price Difference Between Two Correlated Symbols//@version=5
indicator("Price Difference Between Two Symbols", overlay=true)
// === User Inputs ===
symbol1 = input.symbol("Pepperstone:US500", "Symbol 1")
symbol2 = input.symbol("CME_MINI:ES1!", "Symbol 2")
tf = input.timeframe("", "Resolution (leave blank to use chart TF)")
// === Price Feeds ===
price1 = request.security(symbol1, tf == "" ? timeframe.period : tf, close)
price2 = request.security(symbol2, tf == "" ? timeframe.period : tf, close)
// === Difference Calculation ===
difference = price1 - price2
// === Plotting ===
plot(difference, title="Price Difference", color=color.new(color.teal, 0), linewidth=2)
hline(0, "Zero Line", color=color.gray, linestyle=hline.style_dotted)
// === Debug Info (Optional) ===
// label.new(bar_index, na, text="Price1: " + str.tostring(price1) + " Price2: " + str.tostring(price2), style=label.style_label_left, yloc=yloc.abovebar)
Day Label-WeeklyProfile-AdrianFx94This indicator is designed for Daily charts.
It writes a small label (like “L, M, G, V”) inside each candle’s body, exactly in the middle between the open and close.
Each label tells you which weekday closed that candle:
L → Monday
M → Tuesday
M/ME → Wednesday
G → Thursday
V → Friday
(Saturday and Sunday aren’t marked.)
Why it’s useful
It gives you a quick visual map of the week’s progression, day by day.
You immediately see the sequence of daily closes inside a week.
You can spot when the market trended cleanly through the week (labels step up or down neatly).
You notice when there’s choppy or balanced behavior (labels are mixed, up and down).
You can identify which day was the turning point or initiative day (a single label much higher or lower than the rest).
It’s a simple way to read the weekly profile of price action without having to remember which candle is which day.
Controls you have
You can change the letters (for example, instead of “L” you could write “Mo”).
You can change the text size, color, and add a background.
You can choose to show:
All weeks
Only this week
Only last week
That helps when you want to focus on a single week’s structure.
Important notes
It only works on Daily charts. On smaller timeframes it will just warn you.
The label sticks to the candle’s body, so even if you zoom or pan, it stays anchored where that day closed.
It’s not a volume profile or TPO — it’s purely about the closing position of each day.
👉 In short: this indicator is like a weekly diary on your chart — each candle is marked with the day of the week, so you can quickly analyze how the market behaved across past weeks, which days carried strength, and where momentum shifted.
This indicator shows a short label for each weekday directly inside the daily candle.
The nice part is: you can choose the letters yourself.
For example, if you are Italian, you might want:
Monday → L (Lunedì)
Tuesday → M (Martedì)
Wednesday → ME (Mercoledì)
Thursday → G (Giovedì)
Friday → V (Venerdì)
If you prefer English, you could set:
Monday → M
Tuesday → T
Wednesday → W
Thursday → Th
Friday → F
If you want very short codes, you could just write 1, 2, 3, 4, 5.
So the indicator is language-neutral — you adapt it to your country, your style, or even your personal system of marks.
3Signal Strategy+// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// Script combining Support Resistance Strategy and Buy/Sell Filter with 3 Moving Averages 3Signal Strategy+ by InteliCryptos
//@version=6
indicator("3Signal Strategy+", overlay=true, max_lines_count=500)
// ====== Inputs Section ======
// HHLL Strategy Inputs
lb = input.int(3, title="Support HL", minval=1)
rb = input.int(4, title="Resistance LH", minval=1)
showsupres = input.bool(true, title="Support/Resistance", inline="srcol")
supcol = input.color(color.red, title="", inline="srcol")
rescol = input.color(color.lime, title="", inline="srcol")
srlinestyle = input.string("solid", title="Line Style", options= , inline="style")
srlinewidth = input.int(1, title="Line Width", minval=1, maxval=5, inline="style")
changebarcol = input.bool(true, title="Change Bar Color", inline="bcol")
bcolup = input.color(color.yellow, title="", inline="bcol")
bcoldn = input.color(color.black, title="", inline="bcol")
// Twin Range Filter Inputs
source = input(close, title="Source")
per1 = input.int(27, minval=1, title="Fast Period")
mult1 = input.float(1.6, minval=0.1, title="Fast Range")
per2 = input.int(55, minval=1, title="Slow Period")
mult2 = input.float(2, minval=0.1, title="Slow Range")
// Moving Average Inputs
ma_type1 = input.string("EMA", "MA 1 Type (Fast)", options= , group="Moving Averages")
ma_length1 = input.int(12, "MA 1 Length", minval=1, group="Moving Averages")
ma_color1 = input.color(color.blue, "MA 1 Color", group="Moving Averages")
ma_type2 = input.string("EMA", "MA 2 Type (Medium)", options= , group="Moving Averages")
ma_length2 = input.int(50, "MA 2 Length", minval=1, group="Moving Averages")
ma_color2 = input.color(color.yellow, "MA 2 Color", group="Moving Averages")
ma_type3 = input.string("EMA", "MA 3 Type (Slow)", options= , group="Moving Averages")
ma_length3 = input.int(200, "MA 3 Length", minval=1, group="Moving Averages")
ma_color3 = input.color(color.purple, "MA 3 Color", group="Moving Averages")
ma_timeframe = input.string("", "MA Timeframe (e.g., 1m, 5m, 1H, D)", group="Moving Averages")
// ====== HHLL Strategy Logic ======
ph = ta.pivothigh(lb, rb)
pl = ta.pivotlow(lb, rb)
hl = not na(ph) ? 1 : not na(pl) ? -1 : na
zz = not na(ph) ? ph : not na(pl) ? pl : na
// Boolean conditions for ta.valuewhen
is_hl_minus1 = hl == -1
is_hl_plus1 = hl == 1
is_zz_valid = not na(zz)
prev_hl = ta.valuewhen(is_hl_minus1 or is_hl_plus1, hl, 1)
prev_zz = ta.valuewhen(is_zz_valid, zz, 1)
zz := not na(pl) and hl == -1 and prev_hl == -1 and pl > prev_zz ? na : zz
zz := not na(ph) and hl == 1 and prev_hl == 1 and ph < prev_zz ? na : zz
hl := hl == -1 and prev_hl == 1 and zz > prev_zz ? na : hl
hl := hl == 1 and prev_hl == -1 and zz < prev_zz ? na : hl
zz := na(hl) ? na : zz
findprevious() =>
ehl = hl == 1 ? -1 : 1
loc1 = 0.0, loc2 = 0.0, loc3 = 0.0, loc4 = 0.0
xx = 0
for x = 1 to 1000
if hl == ehl and not na(zz )
loc1 := zz
xx := x + 1
break
ehl := hl
for x = xx to 1000
if hl == ehl and not na(zz )
loc2 := zz
xx := x + 1
break
ehl := hl == 1 ? -1 : 1
for x = xx to 1000
if hl == ehl and not na(zz )
loc3 := zz
xx := x + 1
break
ehl := hl
for x = xx to 1000
if hl == ehl and not na(zz )
loc4 := zz
break
// Calling findprevious on each bar
= findprevious()
var float a = na
var float b = na
var float c = na
var float d = na
var float e = na
if not na(hl)
a := zz
b := loc1
c := loc2
d := loc3
e := loc4
// ====== Twin Range Filter Logic ======
smoothrng(x, t, m) =>
wper = t * 2 - 1
avrng = ta.ema(math.abs(x - x ), t)
smoothrng = ta.ema(avrng, wper) * m
smoothrng
smrng1 = smoothrng(source, per1, mult1)
smrng2 = smoothrng(source, per2, mult2)
smrng = (smrng1 + smrng2) / 2
rngfilt(x, r) =>
var float rngfilt = x
rngfilt := x > nz(rngfilt ) ? (x - r < nz(rngfilt ) ? nz(rngfilt ) : x - r) :
(x + r > nz(rngfilt ) ? nz(rngfilt ) : x + r)
rngfilt
filt = rngfilt(source, smrng)
var float upward = 0.0
var float downward = 0.0
upward := filt > filt ? nz(upward ) + 1 : filt < filt ? 0 : nz(upward )
downward := filt < filt ? nz(downward ) + 1 : filt > filt ? 0 : nz(downward )
// ====== Moving Average Logic ======
ma_source = ma_timeframe == "" ? close : request.security(syminfo.tickerid, ma_timeframe, close, lookahead=barmerge.lookahead_on)
ma1 = ma_type1 == "EMA" ? ta.ema(ma_source, ma_length1) :
ma_type1 == "SMA" ? ta.sma(ma_source, ma_length1) :
ta.wma(ma_source, ma_length1)
ma2 = ma_type2 == "EMA" ? ta.ema(ma_source, ma_length2) :
ma_type2 == "SMA" ? ta.sma(ma_source, ma_length2) :
ta.wma(ma_source, ma_length2)
ma3 = ma_type3 == "EMA" ? ta.ema(ma_source, ma_length3) :
ma_type3 == "SMA" ? ta.sma(ma_source, ma_length3) :
ta.wma(ma_source, ma_length3)
// ====== Combined Strategy Conditions ======
_hh = not na(zz) and (a > b and a > c and c > b and c > d)
_ll = not na(zz) and (a < b and a < c and c < b and c < d)
_hl = not na(zz) and ((a >= c and (b > c and b > d and d > c and d > e)) or (a < b and a > c and b < d))
_lh = not na(zz) and ((a <= c and (b < c and b < d and d < c and d < e)) or (a > b and a < c and b > d))
hband = filt + smrng
lband = filt - smrng
longCond = source > filt and source > source and upward > 0 or source > filt and source < source and upward > 0
shortCond = source < filt and source < source and downward > 0 or source < filt and source > source and downward > 0
var int CondIni = 0
CondIni := longCond ? 1 : shortCond ? -1 : nz(CondIni )
long = longCond and CondIni == -1
short = shortCond and CondIni == 1
// ====== Plotting Section ======
var float res = na
var float sup = na
res := _lh ? zz : res
sup := _hl ? zz : sup
var int trend = na
trend := close > res ? 1 : close < sup ? -1 : nz(trend )
res := (trend == 1 and _hh) or (trend == -1 and _lh) ? zz : res
sup := (trend == 1 and _hl) or (trend == -1 and _ll) ? zz : sup
rechange = res != res
suchange = sup != sup
var line resline = na
var line supline = na
if showsupres
if rechange
line.set_x2(resline, bar_index)
line.set_extend(id=resline, extend=extend.none)
resline := line.new(bar_index - rb, res, bar_index, res, color=rescol, extend=extend.right, style=srlinestyle == "solid" ? line.style_solid : srlinestyle == "dashed" ? line.style_dashed : line.style_dotted, width=srlinewidth)
if suchange
line.set_x2(supline, bar_index)
line.set_extend(id=supline, extend=extend.none)
supline := line.new(bar_index - rb, sup, bar_index, sup, color=supcol, extend=extend.right, style=srlinestyle == "solid" ? line.style_solid : srlinestyle == "dashed" ? line.style_dashed : line.style_dotted, width=srlinewidth)
// Plot HHLL signals
plotshape(_hl, text="HL", title="Higher Low", style=shape.labelup, color=color.lime, textcolor=color.black, location=location.belowbar, offset=-rb)
plotshape(_hh, text="HH", title="Higher High", style=shape.labeldown, color=color.lime, textcolor=color.black, location=location.abovebar, offset=-rb)
plotshape(_ll, text="LL", title="Lower Low", style=shape.labelup, color=color.red, textcolor=color.white, location=location.belowbar, offset=-rb)
plotshape(_lh, text="LH", title="Lower High", style=shape.labeldown, color=color.red, textcolor=color.white, location=location.abovebar, offset=-rb)
// Plot Range Filter signals
plotshape(long, title="Long", text="Long", style=shape.labelup, textcolor=color.black, size=size.tiny, location=location.belowbar, color=color.new(color.lime, 0))
plotshape(short, title="Short", text="Short", style=shape.labeldown, textcolor=color.white, size=size.tiny, location=location.abovebar, color=color.new(color.red, 0))
// Plot Moving Averages
plot(ma1, title="MA Fast (12)", color=ma_color1, linewidth=2)
plot(ma2, title="MA Medium (50)", color=ma_color2, linewidth=2)
plot(ma3, title="MA Slow (200)", color=ma_color3, linewidth=2)
barcolor(changebarcol ? (trend == 1 ? bcolup : bcoldn) : na)
// ====== Alerts Section ======
alertcondition(long, title="Long", message="Long")
alertcondition(short, title="Short", message="Short")