BIF ASK WITH TREND Price Trend with PercentageBID ASK WITH TREND Price Trend with Percentage SHOW MARKET TREND AND MARKET VOLLUME
Indicadores e estratégias
Market Bias (CEREBR)Market Bias (CEREBR) — quick read of who’s in control
What it does, in one line:
It builds a clean, smoothed Heikin-Ashi view (optionally from a higher timeframe) and an oscillator that says: bullish, bearish, or cooling off. You use it to decide directional bias and to avoid trading against that bias.
What you see on the chart
Smoothed HA candles (optional): green = bullish bias, red = bearish bias.
A soft fill band around the HA body:
Brighter = bias is strengthening.
Faded = bias is weakening.
(In Data Window) “Bias High / Low / Average” = the smoothed HA range and midline.
If you only look at one thing: green means look for longs, red means look for shorts. Faded color = be picky or trim.
How to use it (simple playbook)
Pick your higher timeframe (HTF) for the bias.
On a 4H chart, try HTF = 12H or 1D.
Rule: HTF must be equal to or higher than your chart TF.
Trade with the bias at real levels.
Longs only when the bias is green.
Shorts only when the bias is red.
Take entries at location: Volume Profile v3.2 levels (VAH/VAL/POC/LVNs) or Anchored VWAP.
Quality check (optional but strong):
Before clicking, glance at CVDv1.
Green bias + CVD Alignment OK and no Absorption = better odds.
If CVD shows Absorption against you, skip or wait for a retest.
When to pass:
Color flips every other bar (chop) → do less.
Color is fading (weakening) into your entry → size down or wait.
Timeframe guidance
Scalps (1–5m): HTF = 15m/30m. Use bias to filter direction; enter on pullbacks at AVWAP/VA edges.
Intraday (15m–1H): HTF = 4H. Buy dips in green / sell pops in red at VP levels.
Swing (2H–4H): HTF = 12H/1D. First pullback after a fresh flip is usually the best.
Position (1D–1W): HTF = 1W. Hold while color stays consistent; reduce on weakening near HVNs.
Entries, exits, and stops
Entry with trend:
Bias green, price pulls back to AVWAP / VAL / prior HA mid, then holds.
Click the long. Reverse for shorts in red.
Exit / reduce:
When “Trend Weakens” alert fires, or color fades while hitting your POC/HVN target.
Hard exit on opposite flip (green→red or red→green) if your idea was pure trend-follow.
Stops:
Behind structure/level (not just on color).
If the next bar flips bias against you and CVD also disagrees, cut it early.
Inputs that matter (keep these simple)
Timeframe (HA Market Bias): your HTF. Must be ≥ chart TF.
Period (default 100): smoothing for the base OHLC. Higher = steadier.
Smoothing (default 100): extra smoothing for the HA feed. Higher = fewer flips.
Oscillator Period (default 7): affects how fast strengthening/weakening shows in the fill color. Lower = quicker.
Tip: If you see too many flips, raise Period/Smoothing or pick a higher HTF. If it feels slow, lower them one notch.
Alerts (plain meaning)
Bullish Trend Switch: bias turned bearish → bullish.
Bullish Trend Strengthens / Weakens: same direction, momentum building / cooling.
Bearish Trend Switch: bullish → bearish.
Bearish Trend Strengthens / Weakens: same idea for shorts.
Use “Switch” to prepare for new setups; use “Strengthens/Weakens” to add/trim or tighten risk.
How it works (one paragraph, no math)
The script smooths price, builds Heikin-Ashi values on your chosen HTF, smooths those again, and doesn’t repaint on closed bars. From the HA open/close difference it creates a simple bias oscillator: above zero = bullish, below zero = bearish. The fill brightness tells you if that bias is getting stronger or weaker right now.
Good combos (optional, but recommended)
Volume Profile v3.2 : use VAH/VAL/POC/LVNs as your battleground.
Anchored VWAP : use reclaims/rejections for timing.
CVDv1 : sanity-check flow quality before entry.
FAQ (quick)
Does it repaint?
No on closed bars. HTF values are requested with a safe offset.
Best starting setup?
4H chart, HTF = 1D, Period/Smoothing 100/100, Oscillator 7.
Can I hide the HA candles?
Yes—toggle “Show HA Candles.” Keep only the bias fill if you want a cleaner price chart.
Short disclaimer
Educational tool, not advice. Markets carry risk. Test first, size small, and trade with your plan.
Kairi Relative Index Upgrated v1Kairi Relative Index Upgraded v1 — how far from “fair” are we, right now?
Most oscillators mash together price and momentum in ways that are hard to explain to a new trader. KRI is refreshingly simple: it measures how far price is from its moving average, as a percent of that average.
KRI = 100 × (Price − SMA) / SMA
Above 0 → price is above its average (stretched up).
Below 0 → price is below its average (stretched down).
The farther from 0, the more stretched we are from the mean.
This upgraded version keeps the pane clean (zero line, colored KRI, optional guide rails at +Line Above / Line Below) so you can read extension, reversion pressure, and reclaims at a glance—on any timeframe.
(If you add screenshots: image #1 should label the zero line and ± threshold lines; image #2 should show a textbook “overshoot at VAH/VAL + KRI extreme → rotate back to POC.”)
What you’re seeing (and how to read it fast)
KRI line
Green when KRI ≥ 0 (price above SMA)
Red when KRI < 0 (price below SMA)
Zero line = the moving average itself (no stretch).
Guide lines (default +10/−10) = “This is pretty far for this setting.” Treat these as review-and-decide zones, not auto-trade signals.
Three quick reads:
Magnitude: how far from the mean (size of KRI).
Direction: above/below zero (which side of the mean).
Turn: KRI curling back toward zero (reversion starting) or accelerating away (trend impulse continuing).
What KRI really measures (plain-English)
The SMA(length) is your “fair value” line for this indicator.
KRI tells you the percentage deviation from that fair value—normalized, so you can compare across assets/timeframes with the same length.
Because it’s a pure distance metric, KRI excels at:
spotting over-extensions into VP edges (VAH/VAL) and AVWAP,
timing mean-reversion back to POC/AVWAP in balance,
confirming reclaims (KRI crossing back through zero at a level),
framing pullbacks in trend (healthy dips usually avoid deep negative KRI in strong uptrends).
Using KRI on any timeframe
The workflow is always Location → Flow → KRI:
Location: a real level (Volume Profile v3.2’s VAH/VAL/POC/LVNs or Anchored VWAP).
Flow quality: check CVDv1 (Alignment OK? Absorption not red?).
KRI: are we stretched into/away from the level, and is KRI turning?
Scalping (1–5m)
Fade the stretch (balance): At VAH/VAL or Session AVWAP, an extreme KRI that rolls back toward zero = quick rotation to the middle (POC/AVWAP).
Don’t fade if bands are expanding and flow is strong (CVDv1 says go) — big KRI can stay big in expansion.
Intraday (15m–1H)
Continuation after pullback: In uptrends, look for shallow negative KRI at support (VAL/AVWAP) that turns up → join trend.
Failed breakout tell: Price pokes above VAH but KRI barely increases or rolls over quickly → likely a reclaim back inside value.
Swing (2H–4H)
Edge-to-mean rotations: At composite VAH/VAL, KRI extremes are great context: fade back to POC/HVNs if flow doesn’t confirm a breakout.
Reclaim confirmation: After a flush below Weekly AVWAP, KRI crossing back up through zero on the reclaim bar is a clean green light.
Position (1D–1W)
Regime posture: Multi-day runs with sustained positive KRI (and shallow dips) = constructive; mirror for downtrends. Use KRI pullbacks to ~0 at Weekly AVWAP for adds.
Entries, exits, and risk (simple rules)
Mean-reversion entry: At VAH/VAL or AVWAP, wait for KRI extreme at/through your guide line and a turn back toward zero.
Stop: just beyond the level; Target: POC/HVN or the zero line on KRI.
Trend-continuation entry: In a trend, take pullbacks where KRI stays modest (doesn’t blow through your lower/upper guide) and turns back with the trend at the level.
Avoid: chasing breakouts where KRI is already extreme and still climbing unless CVDv1 says Alignment OK + no Absorption and you have a clean retest.
Settings that matter (and how to tune them)
Length (default 50): defines the moving average “fair value.”
Shorter (20–34): faster, more signals, more noise—good for intraday.
Longer (50–100): steadier, better for swings/position.
Source (default close): keep it simple; hlc3 or close both work.
Line Above / Below (defaults +10/−10): your review zones. Tune them to the asset/timeframe:
Scroll back 6–12 months and eyeball typical |KRI| spikes. Set your lines around the 80th–90th percentile of |KRI| for that market and length.
Majors often need smaller thresholds than thin alts on the same timeframe.
Tip: If your KRI is always beyond the lines, increase length or widen the thresholds. If it never touches them, shorten length or tighten thresholds.
What to look for (pattern cheat sheet)
Stretch into level → curl: KRI tags an extreme right at VAH/VAL/AVWAP, then turns back → classic rotation.
Shallow pullback in trend: KRI dips toward zero but doesn’t hit your lower guide, then turns up at support → continuation.
No-juice break: New price high with weaker KRI (smaller positive % vs prior leg) → breakout lacks extension; plan for retest or reclaim.
Zero-line reclaims: After a washout, KRI crosses zero as price reclaims AVWAP/VAL → clean confirmation.
Combining KRI with other tools
Cumulative Volume Delta v1 (CVDv1):
Use KRI for stretch/turn, CVDv1 for quality.
A KRI extreme at VAH with CVDv1 Absorption (red) is a do-not-chase; look for the fail/reclaim.
A KRI pullback toward zero at VAL with Alignment OK + strong Imbalance + no Absorption = high-quality continuation.
Volume Profile v3.2:
KRI’s best signals happen at VAH/VAL/POC/LVNs.
LVN traversals with rising KRI often run quickly to the next HVN—use VP for targets.
Anchored VWAP :
Treat AVWAP as fair-value rails. KRI zero cross on an AVWAP reclaim is your green flag; KRI extreme + failure to accept beyond AVWAP warns of a fake break.
Common pitfalls KRI helps you avoid
Buying high into a tired move: KRI already very positive at VAH and rolling over = likely rotation; wait.
Fading true expansion: In strong trends with confirmed flow, KRI can remain extreme; don’t automatically fade just because it’s “far.”
Wrong thresholds: Copy-pasting ±10 to every market/timeframe can mislead. Calibrate to the market you trade.
Practical defaults to start with
Length: 50
Lines: +10 / −10 as placeholders—calibrate later.
Timeframes: great out of the box on 15m–4H; for 1–5m try Length 34 and tighter lines; for daily swings try Length 100 and broader lines.
Process: Level → CVDv1 quality → KRI stretch/turn. If any of the three disagree, wait for the retest.
Disclaimer & Licensing
This indicator and its description are provided for educational purposes only and do not constitute financial or investment advice. Trading involves risk, including the possible loss of capital. makes no warranties and assumes no responsibility for any decisions or outcomes resulting from the use of this script. Past performance is not indicative of future results. Use at your own risk.
Licensing & Attribution:
Copyright (c) 2018–present, Alex Orekhov (everget). Modified and upgraded by .
The original “Kairi Relative Index” is released under the MIT License, and this derivative is distributed under the MIT License as well. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files to deal in the Software without restriction, subject to the conditions of the MIT License, including the above copyright notice and this permission notice. The Software is provided “AS IS,” without warranty of any kind, express or implied.
EMA 20+50 + MACD Strateji ( omerprıme)EASY BUY-SELL basitçe al -sat yapabileceğiniz macd indikatörü ve ema kullanılmış bir indikatördür unutmayın ki ne kadar basit o kadar verimli.
Moving Averages) to generate trading signals and trend confirmation.
Trend Identification with EMA
Two EMAs are used to determine the overall market trend (commonly a short-term EMA and a long-term EMA).
When the short EMA crosses above the long EMA, it indicates an uptrend.
When the short EMA crosses below the long EMA, it signals a downtrend.
Signal Confirmation with MACD
The MACD line and Signal line are analyzed to detect momentum shifts.
A bullish signal occurs when the MACD line crosses above the Signal line, especially if the EMAs confirm an uptrend.
A bearish signal occurs when the MACD line crosses below the Signal line, especially if the EMAs confirm a downtrend.
Trading Logic
Buy signals appear only when both the EMA trend is bullish and the MACD confirms momentum to the upside.
Sell signals appear only when both the EMA trend is bearish and the MACD confirms momentum to the downside.
PSP [ANAY]PSP and TPD with ES NQ and YM. When NQ closoes up and ES closes down that marked uot a TPD
X Pax ORThis indicator captures and visualizes the first 30 seconds of price action starting at 9:30 AM New York time and projects its influence throughout the trading day. Inspired by Pax's open range and level analysis, it provides a structured framework for observing how markets interact with an initial volatility burst.
Core Features
Opening 30s Range Box
At the 9:30:00–9:30:30 window, the indicator records the high and low of that short-lived but impactful moment. A translucent blue box is drawn from this range and extends to 4:00 PM, clearly defining the market’s first key battleground.
User-Defined Extension Levels
From the Opening Range High, upward extensions are projected in user-defined step sizes and counts.
From the Opening Range Low, downward extensions are projected using the same configurable step settings.
These levels adapt to your market and trading style, serving as volatility-based expansion markers to track order flow clustering and potential turning points.
Historical Preservation
Each day’s range box and extension lines are stored, allowing you to review prior sessions for pattern recognition.
Independent toggles let you display or hide historical boxes and historical extensions, keeping the chart clean when needed while retaining analytical depth when desired.
Real-Time Updates
Unlike delayed higher-timeframe methods, this indicator anchors directly to intraday action as it unfolds, ensuring levels are available in real time rather than only after candle closure.
Practical Use
Spot early breakouts or failed retests of the Opening 30s range.
Use extension levels as reference points for intraday trend continuation or reversal setups.
Compare current session levels vs. prior sessions to identify recurring order flow behavior.
Design Notes
Step size, extension count, color transparency, and historical storage are fully configurable.
Clean, minimalist presentation keeps focus on price interaction with levels rather than clutter.
Built for traders who value precision and structure in intraday analysis.
Elliott Wave Oscillator [JopAlgo]Elliott Wave Oscillator — a simple impulse meter that tells you when the move has “real push”
If price is the story, impulse is the emotion behind each chapter. The Elliott Wave Oscillator (EWO) is a clean way to see that emotion: it’s just the difference between a fast and a slow moving average. When the fast MA pulls away from the slow MA, the histogram grows; when they come back together, it shrinks. Above zero = bullish impulse; below zero = bearish impulse.
EWO keeps the math honest and the read effortless:
Choose SMA, EMA, or a volume-weighted average for each side (the “VWAP” option here uses a rolling VWMA over the chosen length).
A zero line anchors the read (bull vs bear).
Bars color by slope: rising = building momentum, falling = momentum fading.
(For screenshots: image #1 label the zero line, rising/falling bars, and a zero cross. Image #2 show a strong impulse leg hugging one side of zero, then fading into a pullback.)
What you’re seeing (and how it’s built)
Short MA (default 5) and Long MA (default 35) are computed using your selected MA Type (SMA, EMA, or rolling volume-weighted).
EWO = Short MA − Long MA.
EWO > 0: fast MA above slow → bullish impulse.
EWO < 0: fast MA below slow → bearish impulse.
Histogram colors:
Green bar: EWO increasing vs previous bar (momentum building).
Red bar: EWO decreasing (momentum waning).
Alerts: fire when EWO crosses the zero line (bullish or bearish “trend shift” heads-up).
New to this? Think of EWO as a throttle: above zero the engine is pushing forward; below zero it’s pushing backward. The height shows how hard it’s pushing; the color shows if that push is growing or fading right now.
How to use EWO on any timeframe
Same framework everywhere—what changes is your location and targets (from your other tools).
Scalping (1–5m)
Breakout confirmation: Only chase a micro-break if EWO flips above zero and grows green as price leaves a level (VAL/LVN/AVWAP). If it flips then immediately shrinks red, that’s your “don’t chase” warning.
Pullback timing: In a quick trend, wait for EWO to dip but stay above zero, then turn green again. That flip is often your pullback end.
Intraday (15m–1H)
Continuation filter: After a level break, ride as long as EWO stays on your side of zero. The first red bar while still above zero is a cue to partial or tighten stops.
Failed break tell: A poke through VAH/VAL with EWO still near zero (no expansion) is often a trap. Prefer retest/reclaim trades.
Swing (2H–4H)
Impulse leg ID: Strong trends show an EWO “bulge” (wide, mostly green bars above zero for longs). When that bulge shrinks back toward zero, look for mean-reversion to AVWAP/POC before the next leg.
Divergence (lightweight): Price makes a higher high, but EWO tops at a lower peak → impulse is weaker; plan for retrace to value.
Position (1D–1W)
Regime bias: Weeks where EWO lives above zero are net constructive; below zero are net distributive. Use that as a backdrop for adds/reductions at your higher-TF levels (Weekly AVWAP, composite VAL/VAH).
Entries, exits, and risk (simple rules)
Entry: At your level (from VP/AVWAP), take the side where EWO is on the correct side of zero and turning green (for longs) or red→green below zero for shorts? Careful—below zero, red means waning bear impulse. For shorts, you want EWO < 0 and increasing in magnitude (i.e., more negative) which still paints red in this script? Here’s the practical translation:
Longs: EWO > 0 and rising (green bar).
Shorts: EWO < 0 and falling (more negative vs prior bar). In this script, that also paints red—which is correct for building bearish impulse.
Manage: If your long was driven by EWO above zero, consider reducing when bars turn red repeatedly or EWO rolls back toward zero at your target node.
Invalidation: A zero cross against you after entry is a hard warning—tighten or exit unless higher-TF context strongly favors holding.
Stops: Place beyond the price level/structure you used, not on an EWO flip alone.
Settings that actually matter (and how to tune them)
MA Type (SMA / EMA / VWAP):
EMA: most responsive; great for scalping/fast intraday.
SMA: smoother; better for swings where you want fewer false wiggles.
VWAP (rolling VWMA): weights price by volume over your length—nice on pairs where volume behavior matters. (Note: this is a rolling VWMA, not an anchored session VWAP.)
Short/Long Lengths (default 5/35):
Shorter/faster (e.g., 4/20) → earlier flips, more noise.
Longer/slower (e.g., 8/50) → fewer but stronger signals.
Keep the ratio—something like 1:4 to 1:6—so the “bulge” is meaningful.
Zero-cross alerts: leave them on but treat as heads-up, not entries in isolation. You still want location + flow.
What to look for (pattern cheatsheet)
Impulse bulge: Wide, consecutive bars above zero (mostly green) → trend leg in progress. Expect shallow pullbacks only.
Pullback reset: After a leg, EWO shrinks but stays above zero, then flips green again → pullback likely done.
No-juice breakout: Price pokes the level but EWO stays near zero / flips red quickly → skip the chase; look for reclaim setups.
Divergence at extremes: New price high with lower EWO peak → risk of fade to value (POC/AVWAP).
Combining EWO with other tools
Cumulative Volume Delta v1 (CVDv1):
Use EWO for impulse, CVDv1 for quality. Best trades line up as:
EWO > 0 and increasing + CVDv1 ALIGN = OK + Imbalance strong + Absorption ≠ red → take the breakout/retest.
If EWO says “go” but CVDv1 flags Absorption, don’t chase.
Volume Profile v3.2:
Use VAH/VAL/LVNs/POC as where. EWO tells you if the push has fuel to leave/enter value.
Example: VAL retest with EWO turning up → rotate to POC/HVN.
Anchored VWAP:
Reclaims are higher quality when EWO flips above zero on the reclaim bar and holds green on the first pullback.
(Optional mention in screenshots: show a VAH break where EWO bulges and CVDv1 shows Alignment OK—clean continuation.)
Common pitfalls EWO helps you avoid
Buying a break with no impulse: Zero-line hugs and shrinking bars tell you the fast MA isn’t pulling away—skip.
Fading a real leg: Wide, persistent bars on one side of zero = don’t fight; use pullbacks to value instead.
Confusing volume-weighted vs anchored VWAP: The “VWAP” choice here is a rolling VWMA over the lookback, not a session/event AVWAP. Use Anchored VWAP when you need the true event-anchored line.
Practical defaults to start with
MA Type: EMA
Short/Long: 5 / 35
Timeframes: works out of the box on 15m–4H; for 1–5m try 4/20; for daily swings try 8/50.
Keep zero-cross alerts on as an attention ping; still require location + flow.
Alerts (what they mean)
Bullish EWO Signal: EWO crossed above zero → bullish impulse engaged. Look for a retest at your level with CVDv1 quality before entry.
Bearish EWO Signal: EWO crossed below zero → bearish impulse.
Open source & disclaimer
This indicator is published open source so traders can study it, tweak it, and build rules they trust. Tools inform decisions, but risk management decides outcomes.
Disclaimer — Not Financial Advice.
The “Elliott Wave Oscillator ” indicator and this description are provided for educational purposes only and do not constitute financial or investment advice. Trading involves risk, including possible loss of capital. makes no warranties and assumes no responsibility for any trading decisions or outcomes resulting from the use of this script. Past performance is not indicative of future results.
Use EWO to judge when there’s real push, Volume Profile v3.2 and Anchored VWAP for where to act, and CVDv1 to verify who’s actually pushing. That trio keeps you selective on any timeframe.
Live Position SizerThis position calculator locks onto the live price in real time and calculates your lot and quantity size for you. Best for scalping if you don't want to open a limit order. You input all the necessary data (Account size, risk, SL placement, LONG/SHORT position, etc...) It also has a nifty feature of allowing you the ability to see TP brackets (+1R, +2R, +3R).
The best way I have used it is seeing where my potential SL will go before I consider opening a position and inputting that. Then when I'm ready to open a position, I already have it calculated for me.
MARA / mNAV=1 (x)What it does
This script overlays two signals on the MARA chart:
mNAV=1 fair-value line — the MARA price implied by Bitcoin NAV:
mNAV1 = (BTC price × BTC holdings) / MARA shares
Premium/Discount ratio — how far MARA trades vs. its NAV fair value:
Ratio = Close / mNAV1 (1.00 = fair; >1 = premium; <1 = discount)
Inputs
Shares outstanding (default: 370,460,000)
BTC holdings (official or estimated; you can roll forward +25 BTC/day if you want)
BTC symbol used for pricing (e.g., BTCUSD, BTCUSDT, BTCUSDTPERP)
How to use
When Price < mNAV=1 and Ratio < 1.00 → MARA trades at a discount to BTC NAV (potential mean-reversion if BTC is stable).
When Price > mNAV=1 and Ratio > 1.00 → premium (premium often compresses during BTC chop/weakness).
Rule of thumb (with ~53k BTC and 370.46M shares): +$1,000 BTC ≈ +$0.14 on the mNAV=1 line.
Visuals
Blue line = mNAV=1 (fair value) plotted directly on the MARA chart.
Purple line = Ratio (×) on a separate right-hand scale centered around 1.00.
Optional shading: green when Ratio > 1.05 (+5% premium), red when Ratio < 0.95 (−5% discount).
Alerts (suggested)
Premium > +5%: Ratio > 1.05
Discount < −5%: Ratio < 0.95
Notes
This is a proxy for NAV parity; it assumes your BTC holdings input is correct (official last report or your estimate).
Choice of BTC symbol matters; use the feed that best matches your workflow (spot, perp, or index).
The ratio is most informative when BTC is range-bound; during fast BTC moves MARA can overshoot temporarily.
5/20 SMA Trade Signal//@version=5
indicator("5/20 SMA Trade Signal", overlay=true)
// Inputs (editable if you want to tweak later)
fastLen = input.int(5, "Fast SMA (default 5)", minval=1)
slowLen = input.int(20, "Slow SMA (default 20)", minval=1)
// Calculate SMAs
fastSMA = ta.sma(close, fastLen)
slowSMA = ta.sma(close, slowLen)
// Plot SMAs
plot(fastSMA, title="Fast SMA", color=color.orange, linewidth=2)
plot(slowSMA, title="Slow SMA", color=color.blue, linewidth=2)
// Signals (use bar close confirmation to avoid intrabar repaint)
bullCross = ta.crossover(fastSMA, slowSMA) and barstate.isconfirmed // 5 SMA closes ABOVE 20 SMA
bearCross = ta.crossunder(fastSMA, slowSMA) and barstate.isconfirmed // 5 SMA closes BELOW 20 SMA
// Label both as "TRADE SIGNAL"
plotshape(bullCross, title="TRADE SIGNAL (5 > 20)", style=shape.labelup, location=location.belowbar,
text="TRADE SIGNAL", color=color.new(color.green, 0), textcolor=color.white, size=size.tiny)
plotshape(bearCross, title="TRADE SIGNAL (5 < 20)", style=shape.labeldown, location=location.abovebar,
text="TRADE SIGNAL", color=color.new(color.red, 0), textcolor=color.white, size=size.tiny)
// Optional alerts for automation/webhooks
alertcondition(bullCross, title="5 SMA crossed ABOVE 20 SMA",
message="TRADE SIGNAL: 5 SMA crossed ABOVE 20 SMA on {{ticker}} @ {{close}}")
alertcondition(bearCross, title="5 SMA crossed BELOW 20 SMA",
message="TRADE SIGNAL: 5 SMA crossed BELOW 20 SMA on {{ticker}} @ {{close}}")
Stoch + RSI DashboardIndicator Description
MTF Stochastic + RSI Dashboard FLEX with STRONG Alerts
A compact, multi-timeframe dashboard that shows Stochastic %K/%D, RSI and signal states across user-defined timeframes. Columns can be toggled on/off to keep the panel as small as you need. Signal texts and colors are fully customizable. The table can be placed in any chart corner, and the background color & opacity are adjustable for perfect readability.
What it shows
• For each selected timeframe: %K, %D, a signal cell (Bullish/Bearish/Strong), RSI value, and RSI state (Overbought/Oversold/Neutral).
• Timeframes are displayed as friendly labels (e.g., 60 → 1h, W → 1w, 3D → 3d).
Signals & logic
• Bullish/Bearish when %K and %D show a sufficient gap (or an optional confirmed cross).
• Strong Bullish when both %K and %D are below the “Strong Bullish max” threshold.
• Strong Bearish when both %K and %D are above the “Strong Bearish min” threshold.
• Optional confirmation: RSI < 30 for Strong Bullish, RSI > 70 for Strong Bearish.
Alerts
• Global alerts for any selected timeframes when a STRONG BULLISH or STRONG BEARISH event occurs.
Key options
• Column visibility toggles (TF, %K, %D, Signal, RSI, RSI Status).
• Custom signal texts & colors.
• Dashboard position: top-left / top-right / bottom-left / bottom-right.
• Table background color + opacity (0 = opaque, 100 = fully transparent).
• Sensitivity (minimum %K–%D gap) and optional “cross-only” mode.
• Customizable timeframes for display and for alerts.
Default settings
• Stochastic: K=5, D=3, SmoothK=3
• RSI length: 14
• Decimals: 1
• Strong Bullish max: 20
• Strong Bearish min: 80
• Default TFs & alerts: 3m, 15m, 1h, 3h, 6h, 12h, 1d, 3d, 1w
Trend Candle CounterComplete Tutorial: Trend Candle Counter Pine ScriptTable of Contents
Installation Guide
Understanding the Indicator
How It Works
Customization Options
Trading Strategies
Setting Up Alerts
Troubleshooting
1. Installation Guide {#installation}Step-by-Step Installation:Step 1: Open TradingView
Go to www.tradingview.com
Log in to your account
Step 2: Access Pine Editor
Click on "Pine Editor" tab at the bottom of the chart
Or press Alt + E (Windows) or Option + E (Mac)
Step 3: Create New Indicator
Click "Open" → "New blank indicator"
Delete any default code
Step 4: Paste the Script
Copy the entire Trend Candle Counter script
Paste it into the editor
Step 5: Save and Apply
Click "Save" (or Ctrl + S)
Give it a name: "Trend Candle Counter"
Click "Add to Chart"
✅ Done! The indicator should now appear on your chart.2. Understanding the Indicator {#understanding}What Does It Do?This indicator numbers each candle based on the current trend: {scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;} ::-webkit-scrollbar{display:none}Trend TypeNumberingVisualUptrend+1, +2, +3, +4...🟢 Green labelsDowntrend-1, -2, -3, -4...🔴 Red labelsTrend ChangeResets to ±1Label color switchesVisual Components:
Candle Labels - Numbers above each candle
Trend Line (EMA) - Green (up) / Red (down)
Background Shading - Light green/red tint
Info Table - Top-right corner showing:
Current trend direction
Current candle number
Current price
3. How It Works {#how-it-works}Trend Detection Logic:IF Close > EMA → UPTREND (positive counting)
IF Close < EMA → DOWNTREND (negative counting)
Counting Mechanism:Example Uptrend:Candle 1: Close > EMA → Label: +1
Candle 2: Close > EMA → Label: +2
Candle 3: Close > EMA → Label: +3
Candle 4: Close < EMA → Label: -1 (trend changed!)
Example Downtrend:Candle 1: Close < EMA → Label: -1
Candle 2: Close < EMA → Label: -2
Candle 3: Close < EMA → Label: -3
Candle 4: Close > EMA → Label: +1 (trend changed!)
Key Insight:The higher the absolute number, the longer the trend has been running!4. Customization Options {#customization}Accessing Settings:
Click the gear icon ⚙️ next to the indicator name
Go to "Inputs" tab
Available Parameters: {scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;} ::-webkit-scrollbar{display:none}ParameterDefaultDescriptionRecommendationTrend Detection Length14EMA period for trend5-10: Scalping14-20: Day trading50-200: Swing tradingShow Candle Numbers✅ YesDisplay labelsDisable for cleaner chartLabel SizeSmallSize of numbersTiny: Multi-timeframeLarge: Focus on one chartUptrend ColorGreenPositive number colorCustomize to preferenceDowntrend ColorRedNegative number colorCustomize to preferenceOptimization by Trading Style:For Scalpers (1m - 5m charts):Trend Detection Length: 5-10
Label Size: Tiny
Show Labels: Optional (can be cluttered)
For Day Traders (15m - 1h charts):Trend Detection Length: 14-20
Label Size: Small
Show Labels: Yes
For Swing Traders (4h - Daily charts):Trend Detection Length: 50-100
Label Size: Normal
Show Labels: Yes
5. Trading Strategies {#strategies}Strategy 1: Trend Reversal TradingEntry Signals:
Buy: When counter changes from negative to +1
Sell: When counter changes from positive to -1
Confirmation:
Wait for +2 or -2 to confirm trend strength
Use additional indicators (RSI, MACD) for validation
Example:Candle: -5, -6, -7, -8, +1, +2 ← BUY HERE
Stop Loss: Below the -8 candle low
Target: When counter reaches +8 to +10
Strategy 2: Trend Continuation TradingEntry Signals:
Buy: Enter on pullbacks during uptrend (e.g., at +3, +5, +7)
Sell: Enter on bounces during downtrend (e.g., at -3, -5, -7)
Risk Management:
Avoid entering at high numbers (+15, -15) - trend may be exhausted
Example:Candle: +1, +2, +3 ← Small pullback, BUY
Continue: +4, +5, +6, +7
Exit: When counter resets to -1
Strategy 3: Trend Exhaustion DetectionWarning Signs:
Counter reaches +10 or higher → Uptrend may be overextended
Counter reaches -10 or lower → Downtrend may be overextended
Action:
Tighten stop losses
Take partial profits
Watch for reversal patterns (doji, engulfing)
Strategy 4: Multi-Timeframe AnalysisSetup:
Add indicator to 3 timeframes (e.g., 15m, 1h, 4h)
Look for alignment
Best Trades:15m: +1 (new uptrend)
1h: +5 (established uptrend)
4h: +3 (strong uptrend)
→ HIGH PROBABILITY BUY
6. Setting Up Alerts {#alerts}Built-in Alert Conditions:The script includes 2 automatic alerts:
"Uptrend Started" - Triggers when counter = +1
"Downtrend Started" - Triggers when counter = -1
How to Set Up Alerts:Step 1: Right-click on chart
Select "Add Alert"
Step 2: Configure Alert
Condition: Select "Trend Candle Counter"
Choose: "Uptrend Started" or "Downtrend Started"
Options:
Once per bar close (recommended)
Webhook URL (for automation)
Step 3: Notification Settings
✅ Popup
✅ Send email
✅ Push notification (mobile app)
✅ Play sound
Step 4: Create Alert
Click "Create"
Custom Alert Ideas:Alert for Specific Candle Numbers:
Notify when counter reaches +5 or -5
Notify when counter exceeds +10 or -10 (exhaustion)
7. Troubleshooting {#troubleshooting}Common Issues & Solutions:Issue 1: Labels are too cluttered
Solution:
Disable "Show Candle Numbers" in settings
Use larger timeframe
Reduce label size to "tiny"
Issue 2: Too many false signals
Solution:
Increase "Trend Detection Length" (e.g., 20, 50)
Wait for +2 or -2 confirmation
Combine with other indicators
Issue 3: Trend line doesn't match price action
Solution:
Adjust EMA length to match your trading style
Consider using different trend detection (SMA, HMA)
Issue 4: Indicator not showing on chart
Solution:
Check if it's in a separate pane - move to main chart
Refresh the page
Re-add the indicator
Issue 5: Counter seems delayed
Solution:
This is normal - indicator confirms on candle close
For faster signals, use lower timeframe
Reduce EMA length (but expect more noise)
8. Advanced Tips 💡Combining with Other Indicators:Best Combinations:
RSI + Trend Candle Counter
Buy at +1 when RSI > 50
Sell at -1 when RSI < 50
MACD + Trend Candle Counter
Confirm +1 with MACD bullish crossover
Confirm -1 with MACD bearish crossover
Volume + Trend Candle Counter
Strong trends (+1) should have increasing volume
Low volume at high numbers (+10) = exhaustion
Reading Market Psychology: {scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;} ::-webkit-scrollbar{display:none}Counter ValueMarket Psychology+1 to +3Early adopters entering+4 to +7Momentum building+8 to +12FOMO phase+13+Extreme greed - caution!-1 to -3Early sellers-4 to -7Panic building-8 to -12Capitulation-13+Extreme fear - reversal likely9. Real Trading Example 📊Scenario: BTC/USD 1H ChartTime | Counter | Action
--------|---------|----------------------------------
10:00 | -8 | Downtrend established
11:00 | -9 | Still falling
12:00 | -10 | Exhaustion zone - watch closely
13:00 | +1 | ✅ BUY SIGNAL - Trend reversal!
14:00 | +2 | Confirmation - trend valid
15:00 | +3 | Hold position
16:00 | +4 | Add to position (optional)
17:00 | +5 | Move stop loss to breakeven
...
22:00 | +11 | Take partial profits
23:00 | +12 | Tighten stop loss
00:00 | -1 | ❌ EXIT - Trend reversed
Not Your Daddy's EMA CrossoverNot Your Daddy's EMA Crossover - Quick Guide
What It Does
This isn't your typical 50/200 EMA crossover. It uses academically-proven, optimized EMA periods specifically backtested for crypto markets. Instead of generic settings, it adapts to different trading styles with research-backed parameter combinations that have demonstrated real returns.
Core Logic
Enters when fast EMA crosses slow EMA in the trend direction (confirmed by 200 SMA filter)
Exits either on opposite EMA cross (trend-following) or at fixed profit targets (scalping)
Uses a 200 SMA to filter trades - only longs above it, only shorts below it
Key Settings & Toggles
1. Trading Style (Auto-adjusts EMA periods):
"15 Min Scalping": 9/21 EMA - Fast-paced, frequent signals
"1 Hour Swing": 13/48 EMA - For swing trading
"Daily Trend": 15/150 MA - Captured +97.87% in bull runs
2. Entry Method:
"Crossover Entry": Enters immediately on EMA cross
"Pullback to EMA Entry": Waits for first pullback to slow EMA (better risk/reward)
3. Exit Method:
"EMA Cross Exit": Trend-following, lets winners run until EMAs reverse
"Fixed % Target (Scalping)": Quick 0.5-1% profits with tight stops
4. Optional Features:
MACD Confirmation: Adds 6-15-1 MACD filter for higher-probability setups
Periodic Compounding: Compounds every 30 hours (research shows 1-30 hour compounding is optimal)
Recommended Timeframes
📊 Match your chart to your selection:
Select "15 Min Scalping" → Use 15-minute chart
Select "1 Hour Swing" → Use 1-hour chart
Select "Daily Trend" → Use daily chart
I personally like this on the daily, which coincidentally is printing a long signal today on Bitcoin.
Enjoy!
MTF EMA200 Dashboard (No Trend Column)Show ema200 position on multiple timeframe, so that in run time we can see price strength and weekness
Howard Intraday Edge (JH Edge) - (VWAP + EMA9/EMA21 + RSI)Howard Intraday Edge (JH Edge)
A disciplined intraday trading system by J. Howard.
Uses VWAP, EMA 9/21, RSI, and Optional EMA 200 to confirm trends and momentum.
Automatically plots Clean stop-loss and take profit levels. Built for SPY 0DTE-5DTE options, but works on other liquid tickers.
Focus: 1-3 high probability trades/day with tight risk control.
Best used on 1 or 3 minute timeframes.
Commodity Channel Index (CCI)An indicator with increased convenience and customization options. Effective for scalping.
Market Mode Risk IndicatorMarket Mode Risk Indicator v1.1
This custom indicator helps traders gauge market risk sentiment by monitoring Exponential Moving Average (EMA) or Simple Moving Average (SMA) crossovers on key indices like BIST 100 (for Turkish markets), NASDAQ Composite (tech-focused US), or Dow Jones Industrial Average (industrial US). It dynamically categorizes the market into three actionable modes based on the index's position relative to layered MAs, providing a quick visual snapshot without cluttering your chart.
Risk Modes Explained:
RISK OFF (Red): Index closes below the Long MA (default 50 periods) – signals bearish caution; time to tighten stops or reduce exposure.
RISK TEST (Orange): Index above Medium MA1 (21 periods) and Extra Long MA (55 periods), but below Short MA (10 periods) and above Long MA – a transitional "test" phase; watch for confirmation before entering.
RISK ON (Green): Index above all MAs (Short, Medium, Long, Extra Long) – bullish green light; favorable for longs or momentum plays.
How It Works:
The core logic uses boolean checks on the index's close price against user-defined MA lengths. For example:
It pulls live data from your selected index via request.security.
Computes MAs with ternary operators for EMA (ta.ema) or SMA (ta.sma) based on your choice.
Mode detection relies on AND/OR conditions (e.g., aboveShort and aboveMed1 and aboveLong and aboveExtraLong for RISK ON) to filter noise and focus on meaningful shifts.
No lookahead bias – all calculations are historical and real-time compatible. Defaults (10/21/50/55) are inspired by common Fibonacci-inspired periods for balanced sensitivity.
Alerts fire only on mode transitions (e.g., from RISK OFF to ON) to prevent spam, using alertcondition with dynamic messages including price and ticker.
Customization Options:
Index & MA Settings: Switch EMA/SMA; tweak lengths (min 1 period) for your timeframe (e.g., shorter for intraday).
Display: Position the table (top/bottom, left/right); toggle MA values on/off.
Looks: Background/border/text colors, transparency (0-100%) for theme matching.
Built in Pine Script v5 for efficiency – lightweight, no repaints.
Usage Tips:
Add to any stock chart (e.g., GARAN for BIST analysis).
Select your index in settings; refresh chart if switching MA type.
Use on daily/4H timeframes for swing trading; alerts via email/SMS for hands-free monitoring.
Pro Tip: Combine with volume or RSI for confirmation – RISK ON + rising volume = stronger buy signal.
Quarterly Theory Cycles + Alerts (Weekly/Daily/90-Minute Cycles)Quarterly Theory Cycles (90m • Daily • Weekly)
Purpose
Built for Quarterly Theory. This indicator maps repeating quarters across three rhythms—90-minute, Daily, and Weekly (18:00 NY → 18:00 NY)—so you can track where price is within the current quarter and how it reacts to the previous quarter’s high/low.
Quarter Structure
90-Minute Quarters
Labels:Q1 / Q2 / Q3 / Q4
Sessions: Asia, London, NY, PM (each split into four 90-minute quarters).
Daily Quarters
Labels: [D-Q1 / D-Q2 / D-Q3 / D-Q4
Windows (America/New_York):
D-Q1: 18:00–00:00
D-Q2: 00:00–06:00
D-Q3: 06:00–12:00
D-Q4: 12:00–18:00
Weekly Quarters
Labels: W-Q1 / W-Q2 / W-Q3 / W-Q4
Trading days defined 18:00 NY → 18:00 NY (DST-aware).
W-Q1 = Monday, W-Q2 = Tuesday, W-Q3 = Wednesday, W-Q4 = Thursday
Friday intentionally excluded (no W-Q5) to preserve theory behavior.
Use for higher-timeframe context and weekly narrative (e.g., expansion vs. distribution days).
What It Draws
Live, extending range boxes for the active quarter (H/L updates in real time).
Stored previous quarter’s high/low for each rhythm (90m, Daily, Weekly).
Alerts (Quarterly Theory-friendly )
Fires when price first breaks the previous quarter’s high/low:
90m: “Previous 90min cycle (…) high/low broken”
Daily: “Previous daily cycle (…) high/low broken”
Weekly: “Previous weekly cycle (…) high/low broken”
One alert per side per new quarter—clean signals for liquidity grabs or SSMTs.
Customization
Master Toggles: Show/hide Asia, London, NY, PM, Daily, Weekly blocks fast.
Independent Transparencies: Separate opacity sliders for 90m vs Daily vs Weekly.
Per-Quarter Controls: Toggle range, edit label (defaults already set to Q1 / D-Q1 / W-Q1 formats), and color.
Styling: Optional outlines and labels for minimal or annotated charts.
Time Zones: Use exchange time or a custom UTC offset for session windows. Weekly boundaries always use America/New_York at 18:00.
Notes
Designed for theory workflows: prior-quarter liquidity, session rotation, and narrative alignment, SSMTS.
Friday is excluded from Weekly quarters by design.
Indicator draws ranges and triggers alerts; it does not place trades.
aaa sibilio 5.5 New Tre## **The Fundamental Characteristics of Moving Averages: Theoretical Principles and Strategic Applications**
### **The Non-Parallelism Principle: Mathematical Foundation**
The first fundamental principle governing moving averages establishes that **any moving average can never be parallel to its linear regression**. This is not coincidental or anomalous, but a direct consequence of the mathematical nature of moving averages.
**Theoretical explanation:** A moving average is a low-pass filter that removes high-frequency components from price data, while a linear regression represents the optimal linear trend over the considered period. Since the moving average maintains trace of oscillations around the trend (albeit attenuated), while the regression completely eliminates these oscillations to provide only the general direction, the two curves can never be identical or parallel.
**Crucial implication:** This characteristic certifies that **moving averages always have a curvilinear pattern** relative to their regression. The curvature is not an imperfection in the calculation, but the manifestation of the intrinsic dynamics of market data filtered through the moving average.
### **System Energy: Derivation from Curvature**
It is precisely this curvilinear characteristic that allows us to determine fundamental parameters such as **system energy**.
**Physical basis:** In physics, the potential energy of a curvilinear system is proportional to the deviation from the equilibrium trajectory (represented by the linear regression). In our context:
- **Potential energy** = Distance between moving average and its regression
- **Kinetic energy** = Speed of approach or separation between the two curves
- **Total system energy** = Sum of potential and kinetic energy
**Practical application:** When the moving average moves away from its regression, it accumulates potential energy that must be released. When it approaches rapidly, it manifests kinetic energy that can lead to overshooting the equilibrium point.
### **The Hierarchical Rolling Principle**
The second fundamental principle establishes that **curves roll around each other starting from longer periods toward shorter ones**. This phenomenon has deep roots in dynamical systems theory.
**Theoretical explanation:** Moving averages with longer periods have greater inertia and resistance to change (analogous to mass in physics). When a trend change occurs, it propagates first in long-period averages (which represent the dominant forces of the system), then progressively diffuses toward shorter-period averages.
**Propagation mechanism:**
1. **Macro level** (long averages): Change in direction of principal forces
2. **Medium level** (intermediate averages): Signal transmission
3. **Micro level** (short averages): Final manifestation of the change
### **Derived Strategic Formations**
This hierarchical rolling allows us to identify **important formations** for the strategy:
**Rolling Confluence:** When multiple averages of different periods simultaneously begin the rolling process, a high-probability reversal zone is created.
**Alignment Cascade:** The temporal sequence with which averages roll provides information about the strength and persistence of the imminent movement.
**Dynamic Resistance Zones:** Points where rolling encounters resistance indicate critical levels where opposing forces temporarily balance.
### **Strategic Implications**
These theoretical principles translate into concrete operational advantages:
1. **Energy predictability:** We can quantify the energy accumulated in the system and predict the strength of future movements
2. **Entry timing:** Hierarchical rolling provides a temporal sequence to optimize entry points
3. **Risk management:** Understanding system energy allows proper position sizing
The combination of these two principles - non-parallelism and hierarchical rolling - transforms moving averages from simple trend indicators into sophisticated tools for energetic and dynamic analysis of financial markets.
Horizontal Lines [White]The Horizontal Lines indicator is a simple yet powerful visual tool designed for traders in forex, options, and other financial markets. It allows users to mark and track key price levels directly on their chart with clear, bright yellow lines.
mZigzagLibrary "mZigzag"
Matrix implementation of zigzag to allow further possibilities.
Main advantage of this library over previous zigzag methods is that you can attach any number of indicator/oscillator information to zigzag
calculate(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots, supertrendLength)
calculates zigzag and related information
Parameters:
length (simple int) : is zigzag length
ohlc (array) : array of OHLC values to be used for zigzag calculation
indicatorHigh (array) : Array of indicator values calculated based on high price of OHLC
indicatorLow (array) : Array of indicators values calculated based on low price of OHLC
numberOfPivots (simple int) : Number of pivots to be returned
supertrendLength (simple int) : is number of pivot history to calculate supertrend
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionMatrix Matrix containing direction of price and indicator values at pivots
ratioMatrix Matrix containing ratios of price and indicator values at pivots
divergenceMatrix matrix containing divergence details for each indicators
doubleDivergenceMatrix matrix containing double divergence details for each indicators
barArray Array containing pivot bars
supertrendDir is direction of zigzag based supertrend
supertrend is supertrend value of zigzag based supertrend
newZG is true if a new pivot is added to array
doubleZG is true if last calculation returned two new pivots (Happens on extreme price change)
calculateplain(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots, offset)
calculates zigzag and related information uses shift/unshift rather than pop and push. Also does not calculate divergence and ratios.
Parameters:
length (simple int) : is zigzag length
ohlc (array) : array of OHLC values to be used for zigzag calculation
indicatorHigh (array) : Array of indicator values calculated based on high price of OHLC
indicatorLow (array) : Array of indicators values calculated based on low price of OHLC
numberOfPivots (simple int) : Number of pivots to be returned
offset (simple int)
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionArray Matrix containing direction of price and indicator values at pivots
barArray Array containing pivot bars
newZG is true if a new pivot is added to array
doubleZG is true if last calculation returned two new pivots (Happens on extreme price change)
draw(valueMatrix, directionMatrix, ratioMatrix, divergenceMatrix, doubleDivergenceMatrix, barArray, newZG, doubleZG, indicatorLabels, lineColor, lineWidth, lineStyle, showLabel, showIndicators)
draws zigzag and related information based on preprocessed values
Parameters:
valueMatrix (matrix) : is matrix containing values of price and indicators
directionMatrix (matrix) : is matrix containing direction of price and indicators
ratioMatrix (matrix) : is matrix containing retracement ratios of price and indicators
divergenceMatrix (matrix)
doubleDivergenceMatrix (matrix)
barArray (array) : is array of pivot bars
newZG (bool) : is bool which tells whether new zigzag pivot is formed or not
doubleZG (bool) : is bool which teels us if the bar has both high and low zigzag
indicatorLabels (array)
lineColor (color) : zigzag line color. set to blue by default
lineWidth (int) : zigzag line width. set to 1 by default
lineStyle (string) : zigzag line style. set to line.style_solid by default
showLabel (bool) : Show pivot label
showIndicators (bool) : Include indicators in labels. If set to false, indicators are shown as tooltips
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionMatrix Matrix containing direction of price and indicator values at pivots
ratioMatrix Matrix containing ratios of price and indicator values at pivots
divergenceMatrix matrix containing divergence details for each indicators
doubleDivergenceMatrix matrix containing double divergence details for each indicators
barArray Array containing pivot bars
zigzaglines array of zigzag lines
zigzaglabels array of zigzag labels
draw(length, ohlc, indicatorLabels, indicatorHigh, indicatorLow, numberOfPivots, lineColor, lineWidth, lineStyle, showLabel, showIndicators)
draws zigzag and related information
Parameters:
length (simple int) : is zigzag length
ohlc (array) : array of OHLC values to be used for zigzag calculation
indicatorLabels (array) : Array of name of indicators passed
indicatorHigh (array) : Array of indicator values calculated based on high price of OHLC
indicatorLow (array) : Array of indicators values calculated based on low price of OHLC
numberOfPivots (simple int) : Number of pivots to be returned
lineColor (color) : zigzag line color. set to blue by default
lineWidth (int) : zigzag line width. set to 1 by default
lineStyle (string) : zigzag line style. set to line.style_solid by default
showLabel (bool) : Show pivot label
showIndicators (bool) : Include indicators in labels. If set to false, indicators are shown as tooltips
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionMatrix Matrix containing direction of price and indicator values at pivots
ratioMatrix Matrix containing ratios of price and indicator values at pivots
divergenceMatrix matrix containing divergence details for each indicators
doubleDivergenceMatrix matrix containing double divergence details for each indicators
barArray Array containing pivot bars
zigzaglines array of zigzag lines
zigzaglabels array of zigzag labels