Multi-Pattern Candlestick Entry IndicatorKey Features:
Bullish Patterns Detected:
Hammer
Inverted Hammer
Bullish Engulfing
Morning Star
Piercing Pattern
Dragonfly Doji
Bearish Patterns Detected:
Hanging Man
Shooting Star
Bearish Engulfing
Evening Star
Dark Cloud Cover
Gravestone Doji
Alert System:
Bullish Entry Alert: Triggers when any bullish pattern is detected
Bearish Entry Alert: Triggers when any bearish pattern is detected
Customizable alert messages with pattern name and price level
Visual Features:
Green triangles below bars for bullish signals
Red triangles above bars for bearish signals
Pattern name labels on chart
Background highlighting for confirmed entries
Status table showing which patterns are enabled
Customization Options:
Enable/disable individual patterns
Toggle visual elements (labels, shapes)
Control alert preferences
Pattern-specific on/off switches
차트 패턴
Support & resistance gapsThis script will draw support and resistance gaps on the price chart.
It is heavily influenced by Nick Drendel . You can learn more about support and resistance gaps and how he draws them in the following video on youtube: The Secret Weapon Traders Ignore: Mastering Unfilled Gaps
The following settings are available:
Untested gaps background color and border color (default gray)
Support gaps background color and border color (default green)
Resistance gaps background color and border color (default red)
Number of days to look back (default one year)
Option to include the current day during market hours (default true)
Tristan's Star: 15m Shooting Star DetectorThis script is designed to be used on the 1-minute chart , but it analyzes the market as if you were watching the 15-minute candles.
Every cluster of 15 one-minute candles is grouped together and treated as a single 15-minute candle.
When that 15-minute “synthetic” candle looks like a shooting star pattern (small body near the low, long upper wick, short lower wick, bearish bias), the script triggers a signal.
At the close of that 15-minute cluster, the script will:
Plot a single “Sell” label on the last 1-minute bar of the group.
Draw a horizontal line across the 15 bars at the high, showing the level that created the shooting star.
Optionally display a table cell in the corner with the word “SELL.”
This lets you stay on the 1-minute timeframe for precision entries and exits, while still being alerted when the higher-timeframe (15-minute) shows a bearish reversal pattern.
Multi Timeframe BOS & rBOSThis is the same Multi-Timeframe Break of Structure and Market Structure Shift posted by Lenny_Kiruthu. However, the only difference is the naming of Market Structure Shift to rBOS (Break of Structure Reverse). To me, they are all break of structures when previous peaks or valleys are violated. The only difference is in sequence. Once a sequence of BOS reverses, then a new sequence begins. To me, this simplifies the various terminology incorporated by different systems such as ICT or SMT which adds unnecessary complexity.
eT
Liquidity + FVG + OB Markings (Fixed v6)This indicator is built for price-action traders.
It automatically finds and plots three key structures on your chart:
Liquidity Levels – swing highs & lows that often get targeted by price.
Fair-Value Gaps (FVG) – inefficient price gaps between candles.
Order-Blocks (OB) – zones created by strong, high-volume impulsive candles.
It also provides alerts and a small information table so you can quickly gauge the current market context.
Adaptive Heikin Ashi [CHE]Adaptive Heikin Ashi — volatility-aware HA with fewer fake flips
Summary
Adaptive Heikin Ashi is a volatility-aware reinterpretation of classic Heikin Ashi that continuously adjusts its internal smoothing based on the current ATR regime, which means that in quiet markets the indicator reacts more quickly to genuine directional changes, while in turbulent phases it deliberately increases its smoothing to suppress jitter and color whipsaws, thereby reducing “noise” and cutting down on fake flips without resorting to heavy fixed smoothing that would lag everywhere.
Motivation: why adapt at all?
Classic Heikin Ashi replaces raw OHLC candles with a smoothed construction that averages price and blends each new candle with the previous HA state, which typically cleans up trends and improves visual coherence, yet its fixed smoothing amount treats calm and violent markets the same, leading to the usual dilemma where a setting that looks crisp in a narrow range becomes too nervous in a spike, and a setting that tames high volatility feels unnecessarily sluggish as soon as conditions normalize; by allowing the smoothing weight to expand and contract with volatility, Adaptive HA aims to keep candles readable across shifting regimes without constant manual retuning.
What is different from normal Heikin Ashi?
Fixed vs. adaptive blend:
Classic HA implicitly uses a fixed 50/50 blend for the open update (`HA_open_t = 0.5 HA_open_{t-1} + 0.5 HA_close_{t-1}`), while this script replaces the constant 0.5 with a dynamic weight `w_t` that oscillates around 0.5 as a function of observed volatility, which turns the open update into an EMA-like filter whose “alpha” automatically changes with market conditions.
Volatility as the steering signal:
The script measures volatility via ATR and compares it to a rolling baseline (SMA of ATR over the same length), producing a normalized deviation that is scaled by sensitivity, clamped to ±1 for stability, and then mapped to a bounded weight interval ` `, so the adaptation is strong enough to matter but never runs away.
Outcome that matters to traders:
In high volatility, the weight shifts upward toward the prior HA open, which strengthens smoothing exactly where classic HA tends to “chatter,” while in low volatility the weight shifts downward toward the most recent HA close, which speeds up reaction so quiet trends do not feel artificially delayed; this is the practical mechanism by which noise and fake signals are reduced without accepting blanket lag.
How it works
1. HA close matches classic HA:
`HA_close_t = (Open_t + High_t + Low_t + Close_t) / 4`
2. Volatility normalization:
`ATR_t` is computed over `atr_length`, its baseline is `ATR_SMA_t = SMA(ATR, atr_length)`, and the raw deviation is `(ATR_t / ATR_SMA_t − 1)`, which is then scaled by `adapt_sensitivity` and clamped to ` ` to obtain `v_t`, ensuring that pathological spikes cannot destabilize the weighting.
3. Adaptive weight around 0.5:
`w_t = 0.5 + oscillation_range v_t`, giving `w_t ∈ `, so with a default `range = 0.20` the weight stays between 0.30 and 0.70, which is wide enough to matter but narrow enough to preserve HA identity.
4. EMA-like open update:
On the very first bar the open is seeded from a stable combination of the raw open and close, and thereafter the update is
`HA_open_t = w_t HA_open_{t−1} + (1 − w_t) HA_close_{t−1}`,
which is equivalent to an EMA where higher `w_t` means heavier inertia (more smoothing) and lower `w_t` means stronger pull to the latest price information (more responsiveness).
5. High and low follow classic HA composition:
`HA_high_t = max(High_t, max(HA_open_t, HA_close_t))`,
`HA_low_t = min(Low_t, min(HA_open_t, HA_close_t))`,
thereby keeping visual semantics consistent with standard HA so that your existing reading of bodies, wicks, and transitions still applies.
Why this reduces noise and fake signals in practice
Fake flips in HA typically occur when a fixed blending rule is forced to process candles during a volatility surge, producing rapid alternations around pivots or within wide intrabar ranges; by increasing smoothing exactly when ATR jumps relative to its baseline, the adaptive open stabilizes the candle body progression and suppresses transient color changes, while in the opposite scenario of compressed ranges, the reduced smoothing allows small but persistent directional pressure to reflect in candle color earlier, which reduces the tendency to enter late after multiple slow transitions.
Parameter guide (what each input really does)
ATR Length (default 14): controls both the ATR and its baseline window, where longer values dampen the adaptation by making the baseline slower and the deviation smaller, which is helpful for noisy lower timeframes, while shorter values make the regime detector more reactive.
Oscillation Range (default 0.20): sets the maximum distance from 0.5 that the weight may travel, so increasing it towards 0.25–0.30 yields stronger smoothing in turbulence and faster response in calm periods, whereas decreasing it to 0.10–0.15 keeps the behavior closer to classical HA and is useful if your strategy already includes heavy downstream smoothing.
Adapt Sensitivity (default 6.0): multiplies the normalized ATR deviation before clamping, such that higher sensitivity accelerates adaptation to regime shifts, while lower sensitivity produces gradual transitions; negative values intentionally invert the mapping (higher vol → less smoothing) and are generally not recommended unless you are testing a counter-intuitive hypothesis.
Reading the candles and the optional diagnostic
You interpret colors and bodies just like with normal HA, but you can additionally enable the Adaptive Weight diagnostic plot to see the regime in real time, where values drifting up toward the upper bound indicate a turbulent context that is being deliberately smoothed, and values gliding down toward the lower bound indicate a calm environment in which the indicator chooses to move faster, which can be valuable for discretionary confirmation when deciding whether a fresh color shift is likely to stick.
Practical workflows and combinations
Trend-following entries: use color continuity and body expansion as usual, but expect fewer spurious alternations around news spikes or into liquidity gaps; pairing with structure (swing highs/lows, breaks of internal ranges) keeps entries disciplined.
Exit management: when the diagnostic weight remains elevated for an extended period, you can be stricter with exit triggers because flips are less likely to be accidental noise; conversely, when the weight is depressed, consider earlier partials since the indicator is intentionally more nimble.
Multi-asset, multi-TF: the adaptation is especially helpful if you rotate instruments with very different vol profiles or hop across timeframes, since you will not need to retune a fixed smoothing parameter every time conditions change.
Behavior, constraints, and performance
The script does not repaint historical bars and uses only past information on closed candles, yet just like any candle-based visualization the current live bar will update until it closes, so you should avoid acting on mid-bar flips without a rule that accounts for bar close; there are no `security()` calls or higher-timeframe lookups, which keeps performance light and execution deterministic, and the clamping of the volatility signal ensures numerical stability even during extreme ATR spikes.
Sensible defaults and quick tuning
Start with the defaults (`ATR 14`, `Range 0.20`, `Sensitivity 6.0`) and observe the weight plot across a few volatile events; if you still see too many flips in turbulence, either raise `Range` to 0.25 or trim `Sensitivity` to 4–5 so that the weight can move high but does not overreact, and if the indicator feels too slow in quiet markets, lower `Range` toward 0.15 or raise `Sensitivity` to 7–8 to bias the weight a bit more aggressively downward when conditions compress.
What this indicator is—and is not
Adaptive Heikin Ashi is a context-aware visualization layer that improves the signal-to-noise ratio and reduces fake flips by modulating smoothing with volatility, but it is not a complete trading system, it does not predict the future, and it should be combined with structure, risk controls, and position management that fit your market and timeframe; always forward-test on your instruments, and remember that even adaptive smoothing can delay recognition at sharp turning points when volatility remains elevated.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Best regards and happy trading
Chervolino
TF-Gated CCI x MA + ConsCount + Vol S/R — Signal (v2.6)This is a strategy based on 3 indicators with a view of predicting price of the market in the next 1.5-7.5 minutes depending on the chart you are using. it is best suitable to use with brokers like Tickz.
SMC Volatility Liquidity Prothis one’s a confluence signaler. it fires “BUY CALL” / “BUY PUT” labels only when four things line up at once: trend, volatility squeeze, a liquidity sweep, and MACD momentum. quick breakdown:
what each block does
Trend filter (context)
ema50 > ema200 ⇒ trendUp
ema50 < ema200 ⇒ trendDn
Plots both EMAs for visual context.
Volatility compression (setup)
20-period Bollinger Bands (stdev 2).
bb_squeeze is true when current band width < its 20-SMA ⇒ price is compressed (potential energy building).
Liquidity sweep (trigger)
Tracks 20-bar swing high/low.
Long sweep: high > swingHigh ⇒ price just poked above the prior 20-bar high (took buy-side liquidity).
Short sweep: low < swingLow ⇒ price just poked below the prior 20-bar low (took sell-side liquidity).
MACD momentum (confirmation)
Standard MACD(12,26,9) histogram.
Bullish: hist > 0 and rising versus previous bar.
Bearish: hist < 0 and falling.
the actual entry signals
LongEntry = trendUp AND bb_squeeze AND liquiditySweepLong AND macdBullish
→ prints a green “BUY CALL” label below the bar.
ShortEntry = trendDn AND bb_squeeze AND liquiditySweepShort AND macdBearish
→ prints a red “BUY PUT” label above the bar.
alerts & dashboard
Alerts: fires when those long/short conditions hit so you can set TradingView alerts on them.
On-chart dashboard (bottom-right):
Trend (Bullish/Bearish/Neutral)
Squeeze (Yes/No)
Liquidity (Long/Short/None)
Momentum (Bullish/Bearish/Neutral)
Current Signal (BUY CALL / BUY PUT / WAIT)
(btw the comment says “2 columns × 5 rows” but the table is actually 5 columns × 2 rows—values under each label across the row.)
what it’s trying to capture (in plain english)
Trade with the higher-timeframe bias (EMA 50 over 200).
Enter as volatility compresses (bands tight) and a sweep grabs stops beyond a 20-bar extreme.
Only pull the trigger when momentum agrees (MACD hist direction & side of zero).
caveats / tips
It’s an indicator, not a strategy—no entries/exits/backtests baked in.
Signals are strict (4 filters), so you’ll get fewer but “cleaner” prints; still not magical.
The liquidity-sweep check uses the prior bar’s 20-bar high/low ( ), so on bar close it won’t repaint; intrabar alerts may feel jumpy if you alert “on every tick.”
Consider adding:
Exit logic (e.g., ATR stop + take-profit, or opposite signal).
Minimum squeeze duration (e.g., bb_squeeze true for N bars) to avoid one-bar dips in width.
Cool-down after a signal to prevent clustering.
Session/time or volume filter if you only want liquid hours.
if you want, I can convert this into a backtestable strategy() version with ATR-based stops/targets and a few toggles, so you can see stats right away.
UpDownBow + BullBear ZoneUpDownBow + BullBear UpDownBow + BullBear ZoneUpDoUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZonewnBow + BullBear ZoneUpDownBow + BullBear UpDownBow + BullBear ZoneUpDoUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZonewnBow + BullBear ZoneUpDownBow + BullBear UpDownBow + BullBear ZoneUpDoUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZonewnBow + BullBear ZoneUpDownBow + BullBear UpDownBow + BullBear ZoneUpDoUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZonewnBow + BullBear ZoneUpDownBow + BullBear UpDownBow + BullBear ZoneUpDoUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZonewnBow + BullBear ZoneUpDownBow + BullBear UpDownBow + BullBear ZoneUpDoUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZonewnBow + BullBear ZoneUpDownBow + BullBear UpDownBow + BullBear ZoneUpDoUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZonewnBow + BullBear ZoneUpDownBow + BullBear UpDownBow + BullBear ZoneUpDoUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZoneUpDownBow + BullBear ZonewnBow + BullBear Zone
Swing S/R Bounce ScreenerStep 1: Identify Swing Highs & Lows on 1 minute timeframe
- price bars that stand out from the 5 bars on each side (left and right). A swing high is a bar whose high is higher than the 5 bars before and after it. A swing low is a bar whose low is lower than the 5 bars before and after it.
Step 2: Draw Horizontal Lines
When a swing high/low is identified, the scanner draws a horizontal line from that point extending to the right of the chart.
Step 3: Monitor Price Returns
The scanner continuously watches for price to return to these horizontal lines. When price approaches and touches the line:
* Resistance: Price touches from below and closes below the line
* Support: Price touches from above and closes above the line
LibbyThis script is a refined chopzone index script with additional functionalities.
it produce buy and sell signals as directed by chopzone
How to use:
BUY: Look for buy signal on the chart and proceed to place buy or long orders
SELL: Look for sell on the chart and proceed to place sell or short orders.
NOTE: i recommend you set alerts and make it activate on bar close to avoid fadeouts and sideways.
expect sideways market and multiple opposite signals within a short time during news or when economic data are released.
as always, no indicator is failproof, it is recommended to always pair more than 1 indicator for more clarity and practice safe trading.
H/L Swings/pivots detectorThis indicator detects and labels swing highs and swing lows using pivot logic.
It highlights market structure shifts by identifying:
- Higher Highs (HH) and Lower Highs (LH)
- Lower Lows (LL) and Higher Lows (HL)
Traders often use these levels to analyze trends, reversals, and key support/resistance zones.
The script also plots pivot markers above highs and below lows for visual clarity.
This tool is designed for educational and analytical purposes, and it does not provide financial advice or guaranteed results.
📂 Categories (choose when publishing)
Type of script → Indicator
Category → Trend Analysis (fits best for HH/LL pivots)
Optionally → Support/Resistance (if you emphasize pivots as zones)
swing high
swing low
pivot points
market structure
trend analysis
higher high
lower low
support resistance
Optimized Candlestick Entry Indicator1. Conflict Prevention System:
Pattern Strength Scoring: Each pattern gets a strength score (0-1) based on how well it matches ideal characteristics
Context Filtering: Patterns only trigger in appropriate market conditions (uptrend/downtrend)
Signal Prioritization: When multiple patterns occur, only the strongest one triggers
Mutual Exclusion: Prevents simultaneous buy/sell signals on the same candle
2. Enhanced Pattern Recognition:
Minimum Strength Threshold: Configurable minimum pattern strength (default 60%)
Trend Context Awareness: Hammer/Inverted Hammer only in downtrends, Hanging Man/Shooting Star only in uptrends
Improved Ratios: Better body-to-wick ratio calculations
Volume Consideration: Patterns require meaningful price ranges
3. Smart Decision Logic:
Pattern Counting: Counts active bullish vs bearish patterns
Conflict Resolution: If both signals exist, chooses the stronger one
Final Signal Generation: Only one signal type per candle
4. Advanced Features:
Trend Filter: Optional MA-based trend filter (20-period default)
Strength Display: Shows pattern strength percentage in labels
Context Information: Alerts include trend direction
Visual Enhancements: Larger, clearer signals with strength indicators
5. Configuration Options:
Trend Filter Toggle: Enable/disable trend-based filtering
Minimum Pattern Strength: Adjust sensitivity (0.3-1.0)
Individual Pattern Control: Enable/disable specific patterns
Visual Customization: Control labels, shapes, and alerts
How It Prevents Conflicts:
Context Separation: Bullish patterns only trigger in bearish contexts and vice versa
Strength Comparison: When conflicts arise, only the strongest pattern signals
Pattern Validation: Each pattern must meet strict strength criteria
Final Decision Layer: A final logic layer ensures only one signal type per bar
This optimized version will give you clear, non-conflicting entry signals with much higher accuracy and reliability!Retry
OR Box + Full Key Levels (Cash Hours • Strict v5)This is the final working script, just choose from the drop down to adjkust for Europeon / US markets
LT's RSI Invalidation Targets//@version=5
indicator("Triple RSI Divergence", overlay=true)
// === INPUTS ===
rsiLength = input.int(14, title="RSI Length")
src = input.source(close, "Source")
lookback = input.int(50, title="Lookback Period")
// === RSI ===
rsi = ta.rsi(src, rsiLength)
// === Find local peaks and troughs ===
isTop = ta.pivothigh(rsi, 5, 5)
isBottom = ta.pivotlow(rsi, 5, 5)
var float rsiTroughs = array.new_float()
var float priceTroughs = array.new_float()
var int rsiTroughBars = array.new_int()
if isBottom
array.unshift(rsiTroughs, rsi )
array.unshift(priceTroughs, low )
array.unshift(rsiTroughBars, bar_index )
if array.size(rsiTroughs) > 3
array.pop(rsiTroughs)
array.pop(priceTroughs)
array.pop(rsiTroughBars)
// === Check for triple bullish divergence ===
bullDiv = false
if array.size(rsiTroughs) == 3
r1 = array.get(rsiTroughs, 2)
r2 = array.get(rsiTroughs, 1)
r3 = array.get(rsiTroughs, 0)
p1 = array.get(priceTroughs, 2)
p2 = array.get(priceTroughs, 1)
p3 = array.get(priceTroughs, 0)
// Price: Lower lows, RSI: Higher lows
if p1 > p2 and p2 > p3 and r1 < r2 and r2 < r3
bullDiv := true
label.new(array.get(rsiTroughBars, 0), low, "Triple Bullish Divergence", style=label.style_label_up, color=color.green, textcolor=color.white)
// === Same for triple bearish divergence ===
var float rsiPeaks = array.new_float()
var float pricePeaks = array.new_float()
var int rsiPeakBars = array.new_int()
if isTop
array.unshift(rsiPeaks, rsi )
array.unshift(pricePeaks, high )
array.unshift(rsiPeakBars, bar_index )
if array.size(rsiPeaks) > 3
array.pop(rsiPeaks)
array.pop(pricePeaks)
array.pop(rsiPeakBars)
bearDiv = false
if array.size(rsiPeaks) == 3
r1 = array.get(rsiPeaks, 2)
r2 = array.get(rsiPeaks, 1)
r3 = array.get(rsiPeaks, 0)
p1 = array.get(pricePeaks, 2)
p2 = array.get(pricePeaks, 1)
p3 = array.get(pricePeaks, 0)
// Price: Higher highs, RSI: Lower highs
if p1 < p2 and p2 < p3 and r1 > r2 and r2 > r3
bearDiv := true
label.new(array.get(rsiPeakBars, 0), high, "Triple Bearish Divergence", style=label.style_label_down, color=color.red, textcolor=color.white)
30m stratDefine a time range, and the indicator will highlight it with a shaded area
This indicator lets you visualize higher timeframe levels while viewing a lower timeframe chart.
Multi-Timeframe MACD Score(customizable)this is a momentum based indcator to know the direction of the market
MACD COM PONTOS//@version=5
indicator(title="MACD COM PONTOS", shorttitle="MACD COM PONTOS")
//Plot Inputs
res = input.timeframe("", "Indicator TimeFrame")
fast_length = input.int(title="Fast Length", defval=12)
slow_length = input.int(title="Slow Length", defval=26)
src = input.source(title="Source", defval=close)
signal_length = input.int(title="Signal Smoothing", minval = 1, maxval = 999, defval = 9)
sma_source = input.string(title="Oscillator MA Type", defval="EMA", options= )
sma_signal = input.string(title="Signal Line MA Type", defval="EMA", options= )
// Show Plots T/F
show_macd = input.bool(true, title="Show MACD Lines", group="Show Plots?", inline="SP10")
show_macd_LW = input.int(3, minval=0, maxval=5, title = "MACD Width", group="Show Plots?", inline="SP11")
show_signal_LW= input.int(2, minval=0, maxval=5, title = "Signal Width", group="Show Plots?", inline="SP11")
show_Hist = input.bool(true, title="Show Histogram", group="Show Plots?", inline="SP20")
show_hist_LW = input.int(5, minval=0, maxval=5, title = "-- Width", group="Show Plots?", inline="SP20")
show_trend = input.bool(true, title = "Show MACD Lines w/ Trend Color", group="Show Plots?", inline="SP30")
show_HB = input.bool(false, title="Show Highlight Price Bars", group="Show Plots?", inline="SP40")
show_cross = input.bool(false, title = "Show BackGround on Cross", group="Show Plots?", inline="SP50")
show_dots = input.bool(true, title = "Show Circle on Cross", group="Show Plots?", inline="SP60")
show_dots_LW = input.int(5, minval=0, maxval=5, title = "-- Width", group="Show Plots?", inline="SP60")
//show_trend = input(true, title = "Colors MACD Lines w/ Trend Color", group="Show Plots?", inline="SP5")
// MACD Lines colors
col_macd = input.color(#FF6D00, "MACD Line ", group="Color Settings", inline="CS1")
col_signal = input.color(#2962FF, "Signal Line ", group="Color Settings", inline="CS1")
col_trnd_Up = input.color(#4BAF4F, "Trend Up ", group="Color Settings", inline="CS2")
col_trnd_Dn = input.color(#B71D1C, "Trend Down ", group="Color Settings", inline="CS2")
// Histogram Colors
col_grow_above = input.color(#26A69A, "Above Grow", group="Histogram Colors", inline="Hist10")
col_fall_above = input.color(#B2DFDB, "Fall", group="Histogram Colors", inline="Hist10")
col_grow_below = input.color(#FF5252, "Below Grow", group="Histogram Colors",inline="Hist20")
col_fall_below = input.color(#FFCDD2, "Fall", group="Histogram Colors", inline="Hist20")
// Alerts T/F Inputs
alert_Long = input.bool(true, title = "MACD Cross Up", group = "Alerts", inline="Alert10")
alert_Short = input.bool(true, title = "MACD Cross Dn", group = "Alerts", inline="Alert10")
alert_Long_A = input.bool(false, title = "MACD Cross Up & > 0", group = "Alerts", inline="Alert20")
alert_Short_B = input.bool(false, title = "MACD Cross Dn & < 0", group = "Alerts", inline="Alert20")
// Calculating
fast_ma = request.security(syminfo.tickerid, res, sma_source == "SMA" ? ta.sma(src, fast_length) : ta.ema(src, fast_length))
slow_ma = request.security(syminfo.tickerid, res, sma_source == "SMA" ? ta.sma(src, slow_length) : ta.ema(src, slow_length))
macd = fast_ma - slow_ma
signal = request.security(syminfo.tickerid, res, sma_signal == "SMA" ? ta.sma(macd, signal_length) : ta.ema(macd, signal_length))
hist = macd - signal
// MACD Trend and Cross Up/Down conditions
trend_up = macd > signal
trend_dn = macd < signal
cross_UP = signal >= macd and signal < macd
cross_DN = signal <= macd and signal > macd
cross_UP_A = (signal >= macd and signal < macd) and macd > 0
cross_DN_B = (signal <= macd and signal > macd) and macd < 0
// Condition that changes Color of MACD Line if Show Trend is turned on..
trend_col = show_trend and trend_up ? col_trnd_Up : trend_up ? col_macd : show_trend and trend_dn ? col_trnd_Dn: trend_dn ? col_macd : na
//Var Statements for Histogram Color Change
var bool histA_IsUp = false
var bool histA_IsDown = false
var bool histB_IsDown = false
var bool histB_IsUp = false
histA_IsUp := hist == hist ? histA_IsUp : hist > hist and hist > 0
histA_IsDown := hist == hist ? histA_IsDown : hist < hist and hist > 0
histB_IsDown := hist == hist ? histB_IsDown : hist < hist and hist <= 0
histB_IsUp := hist == hist ? histB_IsUp : hist > hist and hist <= 0
hist_col = histA_IsUp ? col_grow_above : histA_IsDown ? col_fall_above : histB_IsDown ? col_grow_below : histB_IsUp ? col_fall_below :color.silver
// Plot Statements
//Background Color
bgcolor(show_cross and cross_UP ? col_trnd_Up : na, editable=false)
bgcolor(show_cross and cross_DN ? col_trnd_Dn : na, editable=false)
//Highlight Price Bars
barcolor(show_HB and trend_up ? col_trnd_Up : na, title="Trend Up", offset = 0, editable=false)
barcolor(show_HB and trend_dn ? col_trnd_Dn : na, title="Trend Dn", offset = 0, editable=false)
//Regular Plots
plot(show_Hist and hist ? hist : na, title="Histogram", style=plot.style_columns, color=color.new(hist_col ,0),linewidth=show_hist_LW)
plot(show_macd and signal ? signal : na, title="Signal", color=color.new(col_signal, 0), style=plot.style_line ,linewidth=show_signal_LW)
plot(show_macd and macd ? macd : na, title="MACD", color=color.new(trend_col, 0), style=plot.style_line ,linewidth=show_macd_LW)
hline(0, title="0 Line", color=color.new(color.gray, 0), linestyle=hline.style_dashed, linewidth=1, editable=false)
plot(show_dots and cross_UP ? macd : na, title="Dots", color=color.new(trend_col ,0), style=plot.style_circles, linewidth=show_dots_LW, editable=false)
plot(show_dots and cross_DN ? macd : na, title="Dots", color=color.new(trend_col ,0), style=plot.style_circles, linewidth=show_dots_LW, editable=false)
//Alerts
if alert_Long and cross_UP
alert("Symbol = (" + syminfo.tickerid + ") TimeFrame = (" + timeframe.period + ") Current Price (" + str.tostring(close) + ") MACD Crosses Up.", alert.freq_once_per_bar_close)
if alert_Short and cross_DN
alert("Symbol = (" + syminfo.tickerid + ") TimeFrame = (" + timeframe.period + ") Current Price (" + str.tostring(close) + ") MACD Crosses Down.", alert.freq_once_per_bar_close)
//Alerts - Stricter Condition - Only Alerts When MACD Crosses UP & MACD > 0 -- Crosses Down & MACD < 0
if alert_Long_A and cross_UP_A
alert("Symbol = (" + syminfo.tickerid + ") TimeFrame = (" + timeframe.period + ") Current Price (" + str.tostring(close) + ") MACD > 0 And Crosses Up.", alert.freq_once_per_bar_close)
if alert_Short_B and cross_DN_B
alert("Symbol = (" + syminfo.tickerid + ") TimeFrame = (" + timeframe.period + ") Current Price (" + str.tostring(close) + ") MACD < 0 And Crosses Down.", alert.freq_once_per_bar_close)
//End Code
TF-Gated CCI+ConsCount+Vol S/R —Signal (v2.6-cci-ascdesc)This scrip take trade on turning of cci after considering valet of CM_Total consec and volume based S/R
By Gadirov BEST Reversal Strategy By Gadirov Reversal Strategy - RSI + Stoch + Bollinger (3m expiry)
Opening ATR + High Momentum (10/30/60)this is a custom momentum indicator using atr
A fixed, compiling Pine v5 script is below with the three issues corrected: no plots in local scope, a ≤10-character shorttitle, and cleaned ternaries/formatting that remove the “end of line without line continuation” error.
Liquidity+FVG+OB Strategy (v6)How the strategy works (summary)
Entry Long when a Bullish FVG is detected (optionally requires a recent Bullish OB).
Entry Short when a Bearish FVG is detected (optionally requires a recent Bearish OB).
Stop Loss and Take Profit are placed using ATR multiples (configurable).
Position sizing is fixed contract/lot size (configurable).
You can require OB confirmation (within ob_confirm_window bars).
Alerts still exist and visuals are preserved.