First Candle RuleThis indicator automates a popular "first candle / first range" breakout strategy and adds advanced confirmation and risk-management features.
How it works:
Defines the first 30-minute range of the trading day (09:30–10:00 ET by default).
Signals trades only inside the chosen trading window (default 10:00–16:00 ET).
Detects valid long/short entries using Fair Value Gaps (FVG) or optional Engulfing (SMP) confirmations.
Supports uniform candle filtering (A, B, C same direction) and extra gating (require wick inside range, breakout sweep checks, C close rules, etc.).
Tracks whether the breakout occurred first on the high or low side.
Risk & Targets:
Choose between fixed R-multiple targets (default R=1.0) or ATR-based TP/SL (configurable multipliers).
Optional Stop at Candle B or ATR stop logic.
Visual plots: entry, stop, and TP dots (configurable).
Alerts:
Flexible alert system with Early (intrabar), Confirmed (bar close), or Both.
Built-in “Any Signal Triggered” alert so you only need one TradingView alert rule.
Customization:
Switch between ET-anchored sessions (via SPY) or chart timezone.
Limit to one signal per day if desired.
Adjustable label offsets, marker visibility, and session handling.
Notes:
Early (intrabar) signals may repaint—use Confirmed mode for backtests and higher confidence.
Works best on US equities/ETFs during RTH (09:30–16:00 ET).
指標和策略
CUBE V14Nasdaq Futures (NQ) Trading | Scalping & Strategy - CUBE’s X indicator
🤝 Beta Testing Opportunity
I’m still in the beta testing phase of my Cube indicator — and right now you can join my discord for free.
👉 This is your chance to test it out before I make it more official in the future.
👉 Join the Discord here: discord.gg
👉 Trading view link: www.tradingview.com
📊 Live NQ Trading with the Cube System
This is my personal framework, developed and refined through real market experience.
🎯 Important:
This is for educational purposes only.
Nothing shared here is financial advice — always do your own research and trade responsibly.
#futures #nq #daytrading #livetrading #educational
📦 How to Trade the Purple 6pm Box and Yellow 9:30 Box
The purple 6:00 pm box (5-minute candle high/low at 18:00 NY) marks the evening reset range. The yellow 9:30 am box (1-minute candle high/low at 09:30 NY) defines the New York opening impulse range. Both extend rightward and act as intraday balance zones where price either rejects, reclaims, or trends away from the edges.
🎯 Core Play
The main play is the fake-out and reversion (fade). When price spikes outside either box but quickly fails back inside, watch for a divergence cluster (💣) or other exhaustion signals on that side. The entry is taken on the re-entry into the box, aiming toward the opposite edge. Stops are kept just a few ticks outside the failed side. First target is the box midline, second target is the opposite boundary. If OBV or Smart Cube confirms during the move, trail partials.
🔄 Box Interactions
If the yellow box is entirely above the purple → bullish bias. Favor holds of the yellow top for continuation long plays.
If the yellow is entirely below the purple → bearish bias. Favor holds of the yellow bottom for continuation shorts.
If the two overlap significantly → expect chop until one side breaks cleanly. Wait for decisive moves outside the shared edges before committing.
📝 Quick Checklist
For Longs
Above purple box or just reclaimed purple top
Broke/held above yellow 9:30 top (or reclaimed it)
Trend bullish (inverted logic handled), not stuck in Careful
Cube Buy ++ / LC / LC++ / Smart / Golden nearby
No fresh 4+ top-side divergence cluster or ⭐ red blocker
For Shorts
Below purple box or just rejected purple bottom
Broke/held below yellow 9:30 bottom (or failed reclaim)
Trend bearish, not stuck in Careful
Cube Sell ++ / LC / LC++ / Smart / Golden nearby
No fresh 4+ bottom-side divergence cluster or ⭐ green blocker
🎨 Cube V12 — Color & Label Legend
Background key:
🟢 Buy trend | 🔴 Sell trend | 🔵 Wrong-Trend Buy | 🟠 Wrong-Trend Sell | ⚪ Grey Quick-Scalp | ⚫🟨 Golden
A) Core Cube family
Incoming (Cube) — not a buy/sell by itself
🟢/🔴 Base trigger (with trend) → 3/10
🔵/🟠 Wrong-Trend trigger → 2/10
⚪ Grey Quick-Scalp → 1/10
Cube’s Buy ++ / Sell ++
🟢/🔴 Stronger confirmation after Cube → 7/10
🔵/🟠 Wrong-Trend ++ → 6/10
⚪ Grey Quick-Scalp ++ → 3/10
Incoming (Last Chance) — not a buy/sell by itself
🟢/🔴 Recovery entry after Cube → 3/10
🔵/🟠 Wrong-Trend LC → 2/10
⚪ Grey Quick-Scalp LC → 1/10
Last Chance ++
🟢/🔴 Extra push after Incoming → 8/10
🔵/🟠 Wrong-Trend LC ++ → 6/10
⚪ Grey Quick-Scalp LC ++ → 4/10
Smart Cube (Buy/Sell)
🟢/🔴 Stronger cluster confirmation → 6/10
🔵/🟠 Wrong-Trend Smart Cube → 3/10
⚪ Grey Quick-Scalp Smart Cube → 1/10
B) Golden ecosystem
✨ Golden Buy / Golden Sell
⚫ + 🟨 Strong-conviction Golden entry → 9/10
⚪ + 🟨 Quick-Scalp Golden entry → 5/10
Target mindset: always hunt ~10 points on NQ. Better labels = higher odds of hitting 10 points, not bigger targets.
C) Divergence “Bombs” 💣 — Visual tiers (per bar)
Weak boost → 💣 or 💣💣 (0–2 bombs)
Solid boost → 💣💣💣 (3 bombs)
Strong boost → 💣💣💣💣... (4–6 bombs)
Max boost → 💣 ×7–10 (very strong)
⭐ Star pairing: a ⭐ on the same bar adds an extra 💣💣💣 worth of strength.
D) Sparkles ✨ — Cluster strength (same bar or within a few bars)
normal boost → ✨ (single sparkle)
Medium boost → ✨✨
Strong boost → ✨✨✨ (dense cluster; momentum building)
Tip: The tighter the sparkle cluster, the bigger the follow-through tends to be.
How the labels work (bombs, stars, cubes)
Think of every label on the chart—💣 bombs, ⭐ stars, and the Cube family (Cube / Cube++ / Last Chance / LC++ / Smart)—as meta-signals built from normal indicators (RSI, MACD, volume, VWAP, Fibs, etc. i have over 50 of them in my script).
Each underlying indicator runs its own calculation; when it agrees with the label’s direction, it contributes a “bomb” = one vote for that direction.
Examples: MACD bullish cross = +1💣, RSI bullish divergence = +1💣, volume thrust = +1💣…
Cube family labels add their own strength
On any bar, we sum the bombs (plus any ⭐ bonus and Cube strength) to form a confidence score. A high-quality print is usually:
How I set the weights (why some votes matter more)
I backtest each component (MACD, RSI, volume, Fibs, Cube types, ⭐, sparkle clusters) to see how much it increases the chance of price moving in the label’s direction (e.g., hitting +10 points on NQ).
Components that lift the probability get higher weight; weak/no-lift ones get lower or zero weight.
Tuning is done on a training period, then checked out-of-sample to avoid overfitting.
Absolute Volume & Value in Crore by vikram dayalabsolute volume and value in crore made by vikram dayal
same is created for easy knowledge of volume price action
CUBE V14: Invert Trend ModeNasdaq Futures (NQ) Trading | Scalping & Strategy - CUBE’s X indicator
🤝 Beta Testing Opportunity
I’m still in the beta testing phase of my Cube indicator — and right now you can join my discord for free.
👉 This is your chance to test it out before I make it more official in the future.
👉 Join the Discord here: discord.gg
👉 Trading view link: www.tradingview.com
📊 Live NQ Trading with the Cube System
This is my personal framework, developed and refined through real market experience.
🎯 Important:
This is for educational purposes only.
Nothing shared here is financial advice — always do your own research and trade responsibly.
#futures #nq #daytrading #livetrading #educational
📦 How to Trade the Purple 6pm Box and Yellow 9:30 Box
The purple 6:00 pm box (5-minute candle high/low at 18:00 NY) marks the evening reset range. The yellow 9:30 am box (1-minute candle high/low at 09:30 NY) defines the New York opening impulse range. Both extend rightward and act as intraday balance zones where price either rejects, reclaims, or trends away from the edges.
🎯 Core Play
The main play is the fake-out and reversion (fade). When price spikes outside either box but quickly fails back inside, watch for a divergence cluster (💣) or other exhaustion signals on that side. The entry is taken on the re-entry into the box, aiming toward the opposite edge. Stops are kept just a few ticks outside the failed side. First target is the box midline, second target is the opposite boundary. If OBV or Smart Cube confirms during the move, trail partials.
🔄 Box Interactions
If the yellow box is entirely above the purple → bullish bias. Favor holds of the yellow top for continuation long plays.
If the yellow is entirely below the purple → bearish bias. Favor holds of the yellow bottom for continuation shorts.
If the two overlap significantly → expect chop until one side breaks cleanly. Wait for decisive moves outside the shared edges before committing.
📝 Quick Checklist
For Longs
Above purple box or just reclaimed purple top
Broke/held above yellow 9:30 top (or reclaimed it)
Trend bullish (inverted logic handled), not stuck in Careful
Cube Buy ++ / LC / LC++ / Smart / Golden nearby
No fresh 4+ top-side divergence cluster or ⭐ red blocker
For Shorts
Below purple box or just rejected purple bottom
Broke/held below yellow 9:30 bottom (or failed reclaim)
Trend bearish, not stuck in Careful
Cube Sell ++ / LC / LC++ / Smart / Golden nearby
No fresh 4+ bottom-side divergence cluster or ⭐ green blocker
🎨 Cube V12 — Color & Label Legend
Background key:
🟢 Buy trend | 🔴 Sell trend | 🔵 Wrong-Trend Buy | 🟠 Wrong-Trend Sell | ⚪ Grey Quick-Scalp | ⚫🟨 Golden
A) Core Cube family
Incoming (Cube) — not a buy/sell by itself
🟢/🔴 Base trigger (with trend) → 3/10
🔵/🟠 Wrong-Trend trigger → 2/10
⚪ Grey Quick-Scalp → 1/10
Cube’s Buy ++ / Sell ++
🟢/🔴 Stronger confirmation after Cube → 7/10
🔵/🟠 Wrong-Trend ++ → 6/10
⚪ Grey Quick-Scalp ++ → 3/10
Incoming (Last Chance) — not a buy/sell by itself
🟢/🔴 Recovery entry after Cube → 3/10
🔵/🟠 Wrong-Trend LC → 2/10
⚪ Grey Quick-Scalp LC → 1/10
Last Chance ++
🟢/🔴 Extra push after Incoming → 8/10
🔵/🟠 Wrong-Trend LC ++ → 6/10
⚪ Grey Quick-Scalp LC ++ → 4/10
Smart Cube (Buy/Sell)
🟢/🔴 Stronger cluster confirmation → 6/10
🔵/🟠 Wrong-Trend Smart Cube → 3/10
⚪ Grey Quick-Scalp Smart Cube → 1/10
B) Golden ecosystem
✨ Golden Buy / Golden Sell
⚫ + 🟨 Strong-conviction Golden entry → 9/10
⚪ + 🟨 Quick-Scalp Golden entry → 5/10
Target mindset: always hunt ~10 points on NQ. Better labels = higher odds of hitting 10 points, not bigger targets.
C) Divergence “Bombs” 💣 — Visual tiers (per bar)
Weak boost → 💣 or 💣💣 (0–2 bombs)
Solid boost → 💣💣💣 (3 bombs)
Strong boost → 💣💣💣💣... (4–6 bombs)
Max boost → 💣 ×7–10 (very strong)
⭐ Star pairing: a ⭐ on the same bar adds an extra 💣💣💣 worth of strength.
D) Sparkles ✨ — Cluster strength (same bar or within a few bars)
normal boost → ✨ (single sparkle)
Medium boost → ✨✨
Strong boost → ✨✨✨ (dense cluster; momentum building)
Tip: The tighter the sparkle cluster, the bigger the follow-through tends to be.
How the labels work (bombs, stars, cubes)
Think of every label on the chart—💣 bombs, ⭐ stars, and the Cube family (Cube / Cube++ / Last Chance / LC++ / Smart)—as meta-signals built from normal indicators (RSI, MACD, volume, VWAP, Fibs, etc. i have over 50 of them in my script).
Each underlying indicator runs its own calculation; when it agrees with the label’s direction, it contributes a “bomb” = one vote for that direction.
Examples: MACD bullish cross = +1💣, RSI bullish divergence = +1💣, volume thrust = +1💣…
Cube family labels add their own strength
On any bar, we sum the bombs (plus any ⭐ bonus and Cube strength) to form a confidence score. A high-quality print is usually:
How I set the weights (why some votes matter more)
I backtest each component (MACD, RSI, volume, Fibs, Cube types, ⭐, sparkle clusters) to see how much it increases the chance of price moving in the label’s direction (e.g., hitting +10 points on NQ).
Components that lift the probability get higher weight; weak/no-lift ones get lower or zero weight.
Tuning is done on a training period, then checked out-of-sample to avoid overfitting.
MILLION MEN — Momentum Power🇸🇦 الوصف بالعربية:
💥 MILLION MEN — Momentum Power
مؤشر بصري لقياس الزخم اللحظي، يُظهر الفرق بين السعر الحالي وسعر 34 شمعة مضت (أو حسب المدة التي تحددها).
يعتمد على طريقتين للعرض:
📊 أعمدة لونية (Histogram): تمثل الزخم الصاعد باللون الأخضر، والهابط بالفوشي.
📈 خط أصفر: يعطي نظرة ناعمة ومستمرة على تدفق الزخم.
📌 طريقة الاستخدام:
✅ الأعمدة الخضراء تعني زخم صاعد قوي.
❌ الأعمدة الفوشية تعني زخم هابط متسارع.
🟡 الخط الصفر هو المحور: كلما قطع المؤشر هذا الخط صعودًا أو هبوطًا، تكون هناك إشارة بانعكاس الزخم.
↕️ كل ما زادت المسافة عن خط الصفر، زادت قوة الدفع (Momentum Force).
✳️ يُستخدم كمؤشر تأكيدي للدخول، ويفضّل دمجه مع أدوات مثل:
VWAP – RSI – مناطق S/R – Price Action
🛎️ التنبيهات المتوفرة:
📈 Momentum Cross Up: عند كسر خط الصفر للأعلى (تحوّل زخم إيجابي).
📉 Momentum Cross Down: عند كسر خط الصفر للأسفل (زخم سلبي).
اختر “Once per bar close” عند إعداد التنبيه لتقليل الإشعارات العشوائية أثناء حركة السعر.
🇺🇸 Description in English:
💥 MILLION MEN — Momentum Power
A clean and powerful visual momentum indicator. It calculates the difference between the current price and the price from N bars ago (default: 34), and plots the result as:
📊 Histogram bars — Green (bullish), Fuchsia (bearish)
📈 Smooth yellow line — Highlights momentum flow direction
📌 How to Use:
✅ Green bars = strong upward momentum.
❌ Fuchsia bars = downward pressure.
⚠️ The zero line is key:
– Crossing it upward = positive shift
– Crossing downward = negative momentum
↕️ The farther the distance from zero, the stronger the push.
Use it as a confirmation indicator with tools like:
VWAP – RSI – Support/Resistance – Price Action zones
🛎️ Alerts Included:
Momentum Cross Up: Bullish shift (crossing above zero)
Momentum Cross Down: Bearish shift (crossing below zero)
We recommend “Once per bar close” when setting up alerts.
DMIクロス📌 Indicator Description: DMI Cross (with EMA smoothing)
This indicator is a variation of the classic Directional Movement Index (DMI) with added EMA smoothing and clear cross signals.
It is designed to highlight trend changes more visually and provide straightforward BUY/SELL signals.
🔹 Features
+DI / -DI Calculation: Based on the standard DMI formula (Directional Movement).
EMA Smoothing: Both +DI and -DI are smoothed with an adjustable EMA (default: 20).
Cross Signals:
BUY (Bullish) when +DI EMA20 crosses above -DI EMA20.
SELL (Bearish) when +DI EMA20 crosses below -DI EMA20.
ADX Reference: Plotted lightly as a guide to overall trend strength.
Optional raw +DI / -DI plot for those who want to compare the base values.
Background Tinting: Green on bullish cross, red on bearish cross (toggleable).
Alerts Included: For both BUY and SELL cross signals.
🔹 How to Use
Add the indicator to any chart and select your preferred timeframe.
Watch for crossovers of the smoothed +DI and -DI lines.
A green “BUY” triangle at the bottom of the panel signals bullish momentum.
A red “SELL” triangle at the top signals bearish momentum.
Use ADX as confirmation: higher ADX values = stronger trend.
Combine with other indicators or price action for best results.
⚠️ Notes
This is not a standalone trading system.
Works best when combined with trend-following tools (e.g., EMAs on price, SuperTrend, ATR-based systems).
Always backtest and confirm with your own strategy before live trading.
👉 This script is designed for traders who want a clear and simplified DMI crossover system with EMA filtering, removing noise while keeping the essential momentum signals.
Would you like me to also write a short tagline (1–2 lines, catchy, for the script title section) that fits TradingView’s “Public Library” style?
RSI NEMAS – Adaptive Relative Strength IndexThe RSI NEMAS is an original variation of the traditional RSI, developed using NEMAS (Nucleus of Smoothed Adaptive Moving Averages) instead of the standard RSI calculation.
🔹 What makes it unique
Unlike the traditional RSI, which is often noisy, the RSI NEMAS applies adaptive NEMAS smoothing. This approach reduces false signals and provides a cleaner reading of momentum. In addition, the overbought and oversold zones use completely different values, adapted to the NEMAS framework.
🔹 How it works
The indicator calculates relative strength using NEMAS instead of classic averages.
Readings are smoother, filtering out short-term volatility.
Overbought and oversold zones can be interpreted similarly to RSI, but with adjusted thresholds.
🔹 How to use it
The RSI NEMAS can be applied in the same way as the standard RSI:
Overbought/oversold zones may indicate potential reversals.
Divergences with price can signal weakening or strengthening momentum.
Works well as a complement to trend-following indicators.
🔹 Important note
This is a technical analysis tool and should not be used in isolation for investment decisions. Always combine it with other indicators, risk management, and fundamental analysis.
Long Wicks Alertes [Elykia]Main Function
The indicator detects long wicks (greater than a user-defined threshold in points or ticks) on candlesticks and marks them with a symbol (circle or triangle).
⚙️ Parameters
Threshold (points or ticks): minimum wick length to be considered “long.”
Display: choose the marker size.
Filters:
“Previous only” filter
A long lower wick must be at least the threshold lower than the previous candle’s low.
A long upper wick must be at least the threshold higher than the previous candle’s high.
➝ Highlights simple local breakouts.
“Previous & next” (confirmed) filter
The wick of the previous candle must be at least the threshold lower (or higher) than the lows/highs of both the surrounding candles.
The signal is drawn on the validated candle with offset = -1 (pivot confirmation, no repaint).
➝ Highlights reliable market pivots.
📍 Display
Green below the candle: long lower wick.
Red above the candle: long upper wick.
Confirmed signals (previous & next) are plotted on the validated bar, slightly shifted.
🔔 Alerts
One global alert: triggers on any detected long wick.
Two specific alerts: one for lower wicks, one for upper wicks.
🎯 Trading Use Cases
Detect price rejections (long lower wick = bearish rejection/absorbed selling; long upper wick = bullish rejection/absorbed buying).
Spot liquidity grabs where price hunts stops before reversing.
Identify market pivots: with the “previous & next” filter, the indicator highlights points where a trend may reverse.
Automate alerting to catch these setups without constant chart watching.
👉 In short: this indicator isolates significant wicks and qualifies them (simple breakout vs. confirmed pivot) to help read market structure and anticipate reversals.
Dual Best MA Strategy AnalyzerDual Best MA Strategy Analyzer (Lookback Window)
What it does
This indicator scans a range of moving-average lengths and finds the single best MA for long crossovers and the single best MA for short crossunders over a fixed lookback window. It then plots those two “winner” MAs on your chart:
Best Long MA (green): The MA length that would have made the highest total profit using a simple “price crosses above MA → long; exit on cross back below” logic.
Best Short MA (red): The MA length that would have made the highest total profit using “price crosses below MA → short; exit on cross back above.”
You can switch between SMA and EMA, set the min/max length, choose a step size, and define the lookback window used for evaluation.
How it works (brief)
For each candidate MA length between Min MA Length and Max MA Length (stepping by Step Size), the script:
Builds the MA (SMA or EMA).
Simulates a naïve crossover strategy over the last Lookback Window candles:
Long model: enter on crossover, exit on crossunder.
Short model: enter on crossunder, exit on crossover.
Sums simple P&L in price units (no compounding, no fees/slippage).
Picks the best long and best short lengths by total P&L and plots those two MAs.
Note: Long and short are evaluated independently. The script plots MAs only; it doesn’t open positions.
Inputs
Min MA Length / Max MA Length – Bounds for MA search.
Step Size – Spacing between tested lengths (e.g., 10 tests 10, 20, 30…).
Use EMA instead of SMA – Toggle average type.
Lookback Window (candles) – Number of bars used to score each MA. Needs enough history to be meaningful.
What the plots mean
Best Long MA (green): If price crosses above this line (historically), that MA length produced the best long-side results over the lookback.
Best Short MA (red): If price crosses below this line (historically), that MA length produced the best short-side results.
These lines can change over time as new bars enter the lookback window. Think of them as adaptive “what worked best recently” guides, not fixed signals.
Practical tips
Timeframe matters: Run it on the timeframe you trade; the “best” length on 1h won’t match 1m or 1D.
Step size trade-off: Smaller steps = more precision but heavier compute. Larger steps = faster scans, coarser choices.
Use with confirmation: Combine with structure, volume, or volatility filters. This is a single-factor tester.
Normalization: P&L is in raw price units. For cross-symbol comparison, consider using one symbol at a time (or adapt the script to percent P&L).
Limitations & assumptions
No fees, funding, slippage, or position sizing.
Simple “in/out” on the next crossover; no stops/targets/filters.
Results rely on lookback choice and will repaint historically as the “best” length is re-selected with new data (the plot is adaptive, not forward-fixed).
The script tests up to ~101 candidates internally (bounded by your min/max/step).
Good uses
Quickly discover a recently effective MA length for trend following.
Compare SMA vs EMA performance on your market/timeframe.
Build a playbook: note which lengths tend to win in certain regimes (trending vs choppy).
Not included (by design)
Alerts, entries/exits, or a full strategy report. It’s an analyzer/overlay.
If you want alerts, you can add simple conditions like:
ta.crossover(close, plotLongMA) for potential long interest
ta.crossunder(close, plotShortMA) for potential short interest
Changelog / Notes
v1: Initial release. Array-based scanner, SMA/EMA toggle, adaptive long/short best MA plots, user-set lookback.
Disclaimer
This is educational tooling, not financial advice. Test thoroughly and use proper risk management.
MACD NEMAS – Adaptive Moving Average Convergence DivergenceThe MACD NEMAS is an original variation of the traditional MACD, developed using NEMAS (Nucleus of Smoothed Adaptive Moving Averages) instead of standard EMAs.
🔹 What makes it unique
Unlike the traditional MACD that relies on exponential moving averages, the MACD NEMAS applies NEMAS calculations, which adapt more smoothly to price changes. This approach reduces noise and can provide earlier or cleaner trend signals in certain market conditions.
🔹 How it works
The histogram shows the difference between the NEMAS used.
The signal lines (fast and slow NEMAS) help identify potential trend shifts.
Histogram colors highlight acceleration or deceleration of momentum.
🔹 How to use it
The MACD NEMAS can be applied in the same way as the standard MACD:
Line crossovers may indicate trend reversals.
Positive/negative histogram reflects bullish or bearish momentum.
Price divergences with the indicator may signal potential reversals.
🔹 Important note
This is a technical analysis tool and should not be used in isolation for investment decisions. Always combine it with other tools and consider fundamentals and macroeconomic context before making trading or investment decisions.
STOP HUNT StrategyFutures strategy for /MES that hunts stop-runs of recent lows and buys the bullish reclaim with trend/volume filters. Fixed SL/TP, optional trailing and time-stop, and dynamic 1–2 contracts when trend slope is strong. Initial capital: $10,000 (editable).
This is a strategy (not an indicator). It does not place real orders or provide financial advice.
What it does
• Watches a rolling window (lookback) to “lock” a recent swing low (lockedLow).
• A long setup “arms” when price sweeps below that level (potential stop hunt) and then prints a bullish candle that:
– Opens and closes above the lockedLow, closes > open,
– Lows test at/through the lockedLow by a tolerance,
– Closes above trend SMA and volume > its average.
• If risk/reward meets the minimum and distance from lockedLow is sufficient, the strategy enters LONG at bar close.
Trend & position sizing
• A trend SMA and its slope act as a “strong trend” filter: in strong up-slope the position size increases from 1 to 2 contracts; otherwise 1.
Risk management (built-in)
• Fixed SL/TP as percentages from entry.
• Trailing stop that activates after price advances a user-defined % and trails by a user-defined %.
• Time-stop: optional auto-close after N bars in trade.
• Visuals: entry/SL/TP/trailing plots and an open-bars counter label.
Inputs (high-level)
• Lookback for candidate low, TP/SL %, tolerance, min risk/reward.
• Trend SMA length and strong-slope threshold; volume average length.
• Trailing start % and trail %; max bars in trade toggle.
• Initial capital, commission per order, and other backtest properties are editable in the strategy settings.
Notes
• Designed for /MES, but can be applied to related ES charts. Parameters are exposed so you can adapt to volatility/regime changes.
• Optional ATR/ADX values are computed for alert payloads only; they do not alter signals.
Backtest assumptions (defaults in code)
• Initial capital: $10,000; Commission: $1.42 per order.
• Orders evaluated at bar close on confirmed signals; no lookahead.
• “Backtest fill limits assumption” enabled.
Disclaimer
Educational use only. Backtests are hypothetical and not indicative of future results.
----------------------------------------------------------------------------------------------------------------------
Estrategia (no indicador).
• Observa una ventana móvil (lookback) para “bloquear” un mínimo reciente (lockedLow).
• El set-up de largos se arma cuando el precio barre por debajo de ese nivel (posible stop hunt) y luego imprime una vela alcista que:
– Abre y cierra por encima del lockedLow, cierra > abre,
– Mínimo prueba el lockedLow con una tolerancia,
– Cierra sobre la SMA de tendencia y con volumen > promedio.
• Si cumple distancia mínima al soporte, relación riesgo/beneficio mínima y demás filtros, entra en LARGO al cierre de la vela.
Tendencia y tamaño de posición
• Una SMA de tendencia y su pendiente definen “pendiente fuerte”: en ese caso, el tamaño sube de 1 a 2 contratos; de lo contrario 1.
Gestión de riesgo (incluida)
• SL/TP fijos como % desde la entrada.
• Trailing stop que se activa tras un avance % y persigue por un % configurable.
• Time-stop: cierre opcional tras N velas en la operación.
• Visuales: traza entrada/SL/TP/trailing y etiqueta con conteo de velas abiertas.
Entradas (resumen)
• Lookback para mínimo candidato, TP/SL %, tolerancia, R/R mínimo.
• Longitud de SMA de tendencia y umbral de pendiente fuerte; media de volumen.
• % de activación y % de seguimiento del trailing; máximo de velas en trade.
• Capital inicial, comisión por orden y demás propiedades de backtest editables en ajustes.
Notas
• Diseñada para /MES; puede usarse en ES relacionados ajustando parámetros.
• ATR/ADX se calculan para payloads de alerta; no modifican las señales.
Supuestos de backtest (por defecto)
• Capital inicial: $10,000; Comisión: $1.42 por orden.
• Señales evaluadas al cierre de vela; sin lookahead.
• “Backtest fill limits assumption” activado.
Mony Strategy with TP1/TP2/SL V2//@version=5
strategy("Mony Strategy with TP1/TP2/SL", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=2, initial_capital=10000)
// ===== TAKE PROFIT & STOP LOSS SETTINGS =====
tp_sl_group = "Take Profit & Stop Loss"
enable_tp_sl = input.bool(true, "Enable TP/SL", group=tp_sl_group)
tp1_multiplier = input.float(1.0, "TP1 Multiplier (x ATR)", minval=0.1, maxval=10.0, step=0.1, group=tp_sl_group)
tp2_multiplier = input.float(2.0, "TP2 Multiplier (x ATR)", minval=0.1, maxval=20.0, step=0.1, group=tp_sl_group)
sl_multiplier = input.float(1.5, "Stop Loss Multiplier (x ATR)", minval=0.1, maxval=10.0, step=0.1, group=tp_sl_group)
show_tp_sl_lines = input.bool(true, "Show TP/SL Lines", group=tp_sl_group)
show_rr_ratio = input.bool(true, "Show Risk:Reward Ratio", group=tp_sl_group)
// portion allocation to TP1 and TP2 (must sum to 100)
tp1_pct = input.int(50, "TP1 % of position", minval=1, maxval=100, group=tp_sl_group)
tp2_pct = input.int(50, "TP2 % of position", minval=1, maxval=100, group=tp_sl_group)
// normalize if sum != 100
_tp_sum = tp1_pct + tp2_pct
if _tp_sum != 100
tp1_pct := math.round(tp1_pct * 100.0 / _tp_sum)
tp2_pct := 100 - tp1_pct
// TP/SL Colors
tp_color = input.color(color.new(color.green, 20), "Take Profit Color", group=tp_sl_group)
sl_color = input.color(color.new(color.red, 20), "Stop Loss Color", group=tp_sl_group)
// ===== ORIGINAL NIFTY MAGNET SETTINGS (kept mostly intact) =====
const bool DEBUG = false
const float epsilon = 0.02 / 100.0
const int showLastXPivots = 50
// Auto Trendline
var int TYPE_UP = 1
var int TYPE_DOWN = -1
var string LINE_WIDTH1_STR = "Width 1"
var string LINE_WIDTH2_STR = "Width 2"
_get_width(string str_input) =>
switch str_input
LINE_WIDTH1_STR => 1
LINE_WIDTH2_STR => 2
var string GROUP_FRACT = "Fractals"
var color col_hl = input.color(color.blue, title="Plot:", inline="plot_low", group=GROUP_FRACT)
var bool show_hl = input.bool(true, title="HL", inline="plot_low", group=GROUP_FRACT)
var color col_ll = input.color(color.gray, title=", Plot:", inline="plot_low", group=GROUP_FRACT)
var bool show_ll = input.bool(false, title="LL", inline="plot_low", group=GROUP_FRACT)
var color col_lh = input.color(color.red, title="Plot:", inline="plot_high", group=GROUP_FRACT)
var bool show_lh = input.bool(false, title="LH", inline="plot_high", group=GROUP_FRACT)
var color col_hh = input.color(color.gray, title=", Plot:", inline="plot_high", group=GROUP_FRACT)
var bool show_hh = input.bool(false, title="HH", inline="plot_high", group=GROUP_FRACT)
var string GROUP_ATL = "Auto trendlines"
var string subgroup1 = "recent line"
var color ln_col_recent = input.color(color.new(color.purple, 0), title="Latest Trendline", group=GROUP_ATL, inline=subgroup1)
var int lnwidth_recent = _get_width(input.string(LINE_WIDTH1_STR, options= , title="", inline=subgroup1, group=GROUP_ATL))
var string subgroup2 = "historical line"
var color ln_col_prev = input.color(color.new(color.gray, 50), title="Historical Trendline", group=GROUP_ATL, inline=subgroup2)
var int lnwidth_prev = _get_width(input.string(LINE_WIDTH1_STR, options= , title="", inline=subgroup2, group=GROUP_ATL))
var bool show_historical = input.bool(false, title="Show Historical Lines", group=GROUP_ATL)
var int max_tl = input.int(1, title="Max pair of lines", maxval=250, minval=1, group=GROUP_ATL)*2
var string _str_extend = input.string("Right", options= , title="Which way to extend lines", group=GROUP_ATL)
var string str_extend = _str_extend == "Both ways" ? extend.both : extend.right
var bool show_crosses = input.bool(false, title="Show crosses", tooltip="Instances when closing price of a bar has crossed lower/upper trendlines", group=GROUP_ATL)
// ===== TP/SL VARIABLES =====
var float call_entry = na
var float put_entry = na
// ===== FRACTAL TYPE DEFINITION =====
type fractal
int up_or_down = na
int xloc = na
float yloc = na
int xloc_parent = na
float yloc_parent = na
var fractal arr_fract = array.new()
var line arr_ln_up = array.new_line()
var line arr_ln_dn = array.new_line()
// ===== FRACTAL FUNCTIONS =====
init_fractal(int fract_type, int xloc, float yloc, int xparent, float yparent)=>
f = fractal.new()
f.up_or_down := fract_type
f.xloc := xloc
f.yloc := yloc
f.xloc_parent := xparent
f.yloc_parent := yparent
ln = line.new(xloc, yloc, xparent, yparent, xloc.bar_index, str_extend, color=ln_col_recent, style=line.style_dashed, width=lnwidth_recent)
if f.up_or_down == TYPE_UP
array.unshift(arr_ln_up, ln)
else if f.up_or_down == TYPE_DOWN
array.unshift(arr_ln_dn, ln)
array.unshift(arr_fract, f)
f
drop_and_roll(fractal f) =>
arr_ln = f.up_or_down == TYPE_UP ? arr_ln_up : f.up_or_down == TYPE_DOWN ? arr_ln_dn : na
if array.size(arr_ln) > 1
if show_historical
line.set_color(array.get(arr_ln, 1), ln_col_prev)
line.set_width(array.get(arr_ln, 1), lnwidth_prev)
else
line.delete(array.get(arr_ln, 1))
while array.size(arr_ln) > math.floor(max_tl/2)
line.delete(array.pop(arr_ln))
draw_trendline(fract_type, x2, y2, x1, y1) =>
f = init_fractal(fract_type, x2, y2, x1, y1)
drop_and_roll(f)
// ===== PIVOT CALCULATIONS =====
float ph = ta.pivothigh(10, 10)
bool upfract = not na(ph)
float pl = ta.pivotlow(10, 10)
bool downfract = not na(pl)
// ===== VOLATILITY FILTER =====
data_source = close
filter_length = 20
range_factor = 3.5
vol_range(input_data, multiplier, period) =>
window_size = period * 2 - 1
vol_avg = ta.ema(math.abs(input_data - input_data ), period)
adjusted_vol = ta.ema(vol_avg, window_size) * multiplier
adjusted_vol
vol_filter(input_data, range_val, period) =>
v_range = range_val
var v_filtered = array.new_float(2, input_data)
array.set(v_filtered, 1, array.get(v_filtered, 0))
if input_data - v_range > array.get(v_filtered, 1)
array.set(v_filtered, 0, input_data - v_range)
if input_data + v_range < array.get(v_filtered, 1)
array.set(v_filtered, 0, input_data + v_range)
filtered_val = array.get(v_filtered, 0)
upper_band = filtered_val + v_range
lower_band = filtered_val - v_range
// Calculate current ATR for TP/SL
current_atr = ta.atr(14)
// Volatility Filter Values
= vol_filter(data_source, vol_range(data_source, range_factor, filter_length), filter_length)
// Direction Conditions
var float trend_dir = 0.0
trend_dir := filtered_data > filtered_data ? 1 : filtered_data < filtered_data ? -1 : trend_dir
bull_trend = trend_dir == 1 ? 1 : 0
bear_trend = trend_dir == -1 ? 1 : 0
// Trading Conditions
buy_condition = (data_source > filtered_data and data_source > data_source and bull_trend > 0) or (data_source > filtered_data and data_source < data_source and bull_trend > 0)
sell_condition = (data_source < filtered_data and data_source < data_source and bear_trend > 0) or (data_source < filtered_data and data_source > data_source and bear_trend > 0)
var int state_trend = 0
state_trend := buy_condition ? 1 : sell_condition ? -1 : nz(state_trend , 0)
entry_buy = buy_condition and nz(state_trend , 0) == -1
entry_sell = sell_condition and nz(state_trend , 0) == 1
// ===== STRATEGY ENTRY + TP/SL LOGIC =====
// We'll use strategy.entry for entries and strategy.exit for TP1 and TP2 (each with qty_percent).
// Calculate TP/SL prices based on the price at signal (we use close at the signal bar).
var float last_long_entry_price = na
var float last_short_entry_price = na
if entry_buy
// place a long entry (full size)
strategy.entry("Long", strategy.long)
if enable_tp_sl
last_long_entry_price := close
if entry_sell
strategy.entry("Short", strategy.short)
if enable_tp_sl
last_short_entry_price := close
// When we have an entry price, create two exits: TP1 (partial) and TP2 (remaining).
// Both exits include the same stop (SL) so the remaining is protected if SL hit.
if enable_tp_sl
// LONG exits
if not na(last_long_entry_price)
long_tp1 = last_long_entry_price + tp1_multiplier * current_atr
long_tp2 = last_long_entry_price + tp2_multiplier * current_atr
long_sl = last_long_entry_price - sl_multiplier * current_atr
// create (or update) exits for long
// TP1: partial take-profit
strategy.exit(id="Long TP1", from_entry="Long", limit=long_tp1, stop=long_sl, qty_percent=tp1_pct)
// TP2: remainder take-profit
strategy.exit(id="Long TP2", from_entry="Long", limit=long_tp2, stop=long_sl, qty_percent=tp2_pct)
// Plot lines/labels for clarity (only visible while active)
if show_tp_sl_lines and strategy.position_size > 0
line.new(bar_index , long_tp1, bar_index, long_tp1, xloc=xloc.bar_index, extend=extend.right, color=tp_color, style=line.style_dotted, width=1)
line.new(bar_index , long_tp2, bar_index, long_tp2, xloc=xloc.bar_index, extend=extend.right, color=tp_color, style=line.style_solid, width=1)
line.new(bar_index , long_sl, bar_index, long_sl, xloc=xloc.bar_index, extend=extend.right, color=sl_color, style=line.style_dashed, width=1)
// show label of R:R
if show_rr_ratio
rr1 = (long_tp1 - last_long_entry_price) / (last_long_entry_price - long_sl)
rr2 = (long_tp2 - last_long_entry_price) / (last_long_entry_price - long_sl)
label.new(bar_index, long_tp2, text="RR1: " + str.tostring(rr1, format.percent) + " RR2: " + str.tostring(rr2, format.percent), style=label.style_label_left, color=color.new(color.black, 80), textcolor=color.white, size=size.tiny)
// SHORT exits
if not na(last_short_entry_price)
short_tp1 = last_short_entry_price - tp1_multiplier * current_atr
short_tp2 = last_short_entry_price - tp2_multiplier * current_atr
short_sl = last_short_entry_price + sl_multiplier * current_atr
strategy.exit(id="Short TP1", from_entry="Short", limit=short_tp1, stop=short_sl, qty_percent=tp1_pct)
strategy.exit(id="Short TP2", from_entry="Short", limit=short_tp2, stop=short_sl, qty_percent=tp2_pct)
if show_tp_sl_lines and strategy.position_size < 0
line.new(bar_index , short_tp1, bar_index, short_tp1, xloc=xloc.bar_index, extend=extend.right, color=tp_color, style=line.style_dotted, width=1)
line.new(bar_index , short_tp2, bar_index, short_tp2, xloc=xloc.bar_index, extend=extend.right, color=tp_color, style=line.style_solid, width=1)
line.new(bar_index , short_sl, bar_index, short_sl, xloc=xloc.bar_index, extend=extend.right, color=sl_color, style=line.style_dashed, width=1)
if show_rr_ratio
srr1 = (last_short_entry_price - short_tp1) / (short_sl - last_short_entry_price)
srr2 = (last_short_entry_price - short_tp2) / (short_sl - last_short_entry_price)
label.new(bar_index, short_tp2, text="RR1: " + str.tostring(srr1, format.percent) + " RR2: " + str.tostring(srr2, format.percent), style=label.style_label_left, color=color.new(color.black, 80), textcolor=color.white, size=size.tiny)
// Reset recorded entry prices when no position
if strategy.position_size == 0
last_long_entry_price := na
last_short_entry_price := na
// ===== TP/SL HIT VISUAL NOTIFICATIONS (labels on the bar where fills happen) =====
// Detect if exits happened this bar by inspecting strategy.closedtrades or position change
// Simple approach: check last bar's position change vs current to label TP/SL hits is not bulletproof but useful.
long_closed = strategy.closedtrades > 0 and strategy.position_size > 0 and strategy.position_size == 0
short_closed = strategy.closedtrades > 0 and strategy.position_size < 0 and strategy.position_size == 0
// Use builtin trade info to label: iterate last closed trade not directly available per-bar in strategy — keep this simple and place a generic label when a position is closed
if long_closed
label.new(bar_index, high, "Closed Long", style=label.style_label_down, color=color.new(color.blue, 0), textcolor=color.white)
if short_closed
label.new(bar_index, low, "Closed Short", style=label.style_label_up, color=color.new(color.orange, 0), textcolor=color.white)
// ===== FRACTAL TRACKING (trendline drawing preserved) =====
var float recent_dn1 = na
var int i_recent_dn1 = na
var float recent_up1 = na
var int i_recent_up1 = na
var float recent_dn2 = na
var int i_recent_dn2 = na
var float recent_up2 = na
var int i_recent_up2 = na
if downfract
recent_dn2 := recent_dn1
i_recent_dn2 := i_recent_dn1
recent_dn1 := low
i_recent_dn1 := bar_index-11
draw_trendline(TYPE_DOWN, i_recent_dn2, recent_dn2, i_recent_dn1, recent_dn1)
if upfract
recent_up2 := recent_up1
i_recent_up2 := i_recent_up1
recent_up1 := high
i_recent_up1 := bar_index-11
draw_trendline(TYPE_UP, i_recent_up2, recent_up2, i_recent_up1, recent_up1)
// ===== COLORS AND FILTER PLOT =====
filter_color = bull_trend ? #05ff9b : bear_trend ? #ff0583 : #cccccc
// Filter Plot
plot(filtered_data, color=filter_color, linewidth=3, title='Volatility Filter')
// ===== BUY/SELL SIGNALS (visual only) =====
plotshape(entry_buy, title='Call Signal', text='BUY', textcolor=color.rgb(9, 233, 110),
style=shape.labelup, size=size.normal, location=location.belowbar, color=color.new(color.green, 0))
plotshape(entry_sell, title='Put Signal', text='SELL', textcolor=color.rgb(228, 10, 21),
style=shape.labeldown, size=size.normal, location=location.abovebar, color=color.new(color.red, 0))
// ===== ALERTS (kept) =====
CB Charts - ESZ2025/MESZ2025 GEX*DISCLAIMER: Only intended for ESZ2025/MESZ2025 charts.
ES Gamma Exposure Levels, weighted by SPX options.
When and what to use:
- Most respected levels come from 1DTE, EoW and EoM.
- 0DTE is included for when this script becomes intraday updated. (CURRENTLY NOT UPDATED INTRADAY)
- Next Week setting is best used only for Friday and Sunday trading
- Next Month setting is best for weeks close to the end of the current month
Powered by the Camels of Wallstreet
Super RSIDescription:
It analyzes the closing trend of the previous candlestick to generate a forward-looking arrow, accurately predicting the direction of the current new candlestick, helping traders clearly capture short-term opportunities.
Key Features:
Forward-Looking Arrows: Displays arrows at the next candle open, providing an early indication of potential direction.
Clear Visualization: Multi-colored arrows differentiate long and short signals for intuitive decision-making.
Multi-Timeframe Compatible: Works on 1-minute to 1-hour charts, suitable for short-term, event contract, or intraday trading strategies.
Non-Repainting: Historical signals remain fixed, ensuring reliability for backtesting and live trading.
📌 Usage Recommendations
Signals are for reference only; combine with proper risk management, stop-loss, and position sizing.
Best used in trending or high-volatility markets.
Compatible with TradingView alerts to receive real-time notifications when a signal appears.
Applicable across multiple asset types: futures, crypto, stocks, etc.
✅ Core Advantages
Close-confirmed → High reliability
Next candle arrows → Forward-looking guidance
Non-repainting → Historical signals fixed
Alerts compatible → Automatic entry notifications
Crypto zonniemarket direction indicator. it uses mathmetical calculations based on real time sell and buy paid prices put in a trent line that is forward looking by calculated past paid prices of any stock or crypto or etf or commoditie.
Z-Score For Loop | MisinkoMasterThe Z-Score For Loop is a new trend following oscillator designed to catch reversals ahead of anyone else, providing users with top tier signals.
It works like so:
1. Calculate the Z-score of the source (like close, open etc.)
The formula is the following
(current value - mean)/Standard Deviation
For mean there is the option to use different types of averages, this allows for more flexibility, but the recommendation is using mainly SMA/EMA, maybe WMA, because the other ones might cause too much noise.
This itself is pretty noisy, so we now need to filter it a bit, which is where the next step comes in
2. Add the For Loop Logic
Basicly, what this means is that we compare the current Z-score value to the previous values, rewarding it for every previous score it beats, and punishing it for every previous score it is lower than.
This comes in handy, because using other filtering methods like the median, Average (e.g. MA) or even mode did smooth it, but made it suffer a lot of speed. The For Loop balanced the speed & noise really well, which lead to it being fast & accurate.
The idea of using the For Loop was that the Z-score was anything but lagging on its own - which is good if you want speed, but the falses it gave was unforgivable.
Adding a bit of lag to it smoothed it and made it acceptable noise wise, and really good speed wise.
The For Loops work really well as trend Following tools, and the Z-score is a concept I never saw being used in a For Loop before (correct me if I am wrong), which lead to this being quite a convenient choice for indicator and publishing
Adaptive Median Heikin-Ashi (AMHA) + EMA 21/50/100/200 Adaptive Median Heikin-Ashi (AMHA) vs. Standard Heikin-Ashi:
The AMHA indicator uses the median instead of the average for candle close values and calculates the open adaptively based on market volatility (ATR). High and low values are partially volume-weighted, making candle size more realistic. Bullish candles are displayed clearly in white, bearish candles in orange, including wick and border. Extremely small candles are automatically set to a minimum body size, ensuring trends are immediately visible. Compared to standard Heikin-Ashi, AMHA reacts faster to market movements, filters outliers more effectively, and displays trend directions more clearly.
Mony with TP/SL
//@version=5
indicator("Mony with TP/SL", overlay=true, max_bars_back=5000, max_labels_count=500, max_lines_count=500)
// ===== TAKE PROFIT & STOP LOSS SETTINGS =====
tp_sl_group = "Take Profit & Stop Loss"
enable_tp_sl = input.bool(true, "Enable TP/SL", group=tp_sl_group)
tp_multiplier = input.float(2.0, "Take Profit Multiplier (x ATR)", minval=0.5, maxval=10.0, step=0.1, group=tp_sl_group)
sl_multiplier = input.float(1.5, "Stop Loss Multiplier (x ATR)", minval=0.5, maxval=5.0, step=0.1, group=tp_sl_group)
show_tp_sl_lines = input.bool(true, "Show TP/SL Lines", group=tp_sl_group)
show_rr_ratio = input.bool(true, "Show Risk:Reward Ratio", group=tp_sl_group)
// TP/SL Colors
tp_color = input.color(color.new(color.green, 20), "Take Profit Color", group=tp_sl_group)
sl_color = input.color(color.new(color.red, 20), "Stop Loss Color", group=tp_sl_group)
// ===== ORIGINAL NIFTY MAGNET SETTINGS =====
const bool DEBUG = false
const float epsilon = 0.02 / 100.0
const int showLastXPivots = 50
// Auto Trendline
var int TYPE_UP = 1
var int TYPE_DOWN = -1
var string LINE_WIDTH1_STR = "Width 1"
var string LINE_WIDTH2_STR = "Width 2"
_get_width(string str_input) =>
switch str_input
LINE_WIDTH1_STR => 1
LINE_WIDTH2_STR => 2
var string GROUP_FRACT = "Fractals"
var color col_hl = input.color(color.blue, title="Plot:", inline="plot_low", group=GROUP_FRACT)
var bool show_hl = input.bool(true, title="HL", inline="plot_low", group=GROUP_FRACT)
var color col_ll = input.color(color.gray, title=", Plot:", inline="plot_low", group=GROUP_FRACT)
var bool show_ll = input.bool(false, title="LL", inline="plot_low", group=GROUP_FRACT)
var color col_lh = input.color(color.red, title="Plot:", inline="plot_high", group=GROUP_FRACT)
var bool show_lh = input.bool(false, title="LH", inline="plot_high", group=GROUP_FRACT)
var color col_hh = input.color(color.gray, title=", Plot:", inline="plot_high", group=GROUP_FRACT)
var bool show_hh = input.bool(false, title="HH", inline="plot_high", group=GROUP_FRACT)
var string GROUP_ATL = "Auto trendlines"
var string subgroup1 = "recent line"
var color ln_col_recent = input.color(color.new(color.purple, 0), title="Latest Trendline", group=GROUP_ATL, inline=subgroup1)
var int lnwidth_recent = _get_width(input.string(LINE_WIDTH1_STR, options= , title="", inline=subgroup1, group=GROUP_ATL))
var string subgroup2 = "historical line"
var color ln_col_prev = input.color(color.new(color.gray, 50), title="Historical Trendline", group=GROUP_ATL, inline=subgroup2)
var int lnwidth_prev = _get_width(input.string(LINE_WIDTH1_STR, options= , title="", inline=subgroup2, group=GROUP_ATL))
var bool show_historical = input.bool(false, title="Show Historical Lines", group=GROUP_ATL)
var int max_tl = input.int(1, title="Max pair of lines", maxval=250, minval=1, group=GROUP_ATL)*2
var string _str_extend = input.string("Right", options= , title="Which way to extend lines", group=GROUP_ATL)
var string str_extend = _str_extend == "Both ways" ? extend.both : extend.right
var bool show_crosses = input.bool(false, title="Show crosses", tooltip="Instances when closing price of a bar has crossed lower/upper trendlines", group=GROUP_ATL)
// ===== TP/SL VARIABLES =====
var float call_entry = na
var float call_tp = na
var float call_sl = na
var float put_entry = na
var float put_tp = na
var float put_sl = na
var line call_tp_line = na
var line call_sl_line = na
var line put_tp_line = na
var line put_sl_line = na
var label call_tp_label = na
var label call_sl_label = na
var label put_tp_label = na
var label put_sl_label = na
// ===== FRACTAL TYPE DEFINITION =====
type fractal
int up_or_down = na
int xloc = na
float yloc = na
int xloc_parent = na
float yloc_parent = na
var fractal arr_fract = array.new()
var line arr_ln_up = array.new_line()
var line arr_ln_dn = array.new_line()
// ===== FRACTAL FUNCTIONS =====
init_fractal(int fract_type, int xloc, float yloc, int xparent, float yparent)=>
f = fractal.new()
f.up_or_down := fract_type
f.xloc := xloc
f.yloc := yloc
f.xloc_parent := xparent
f.yloc_parent := yparent
ln = line.new(xloc, yloc, xparent, yparent, xloc.bar_index, str_extend, color=ln_col_recent, style=line.style_dashed, width=lnwidth_recent)
if f.up_or_down == TYPE_UP
array.unshift(arr_ln_up, ln)
else if f.up_or_down == TYPE_DOWN
array.unshift(arr_ln_dn, ln)
array.unshift(arr_fract, f)
f
drop_and_roll(fractal f) =>
arr_ln = f.up_or_down == TYPE_UP ? arr_ln_up : f.up_or_down == TYPE_DOWN ? arr_ln_dn : na
if array.size(arr_ln) > 1
if show_historical
line.set_color(array.get(arr_ln, 1), ln_col_prev)
line.set_width(array.get(arr_ln, 1), lnwidth_prev)
else
line.delete(array.get(arr_ln, 1))
while array.size(arr_ln) > math.floor(max_tl/2)
line.delete(array.pop(arr_ln))
draw_trendline(fract_type, x2, y2, x1, y1) =>
f = init_fractal(fract_type, x2, y2, x1, y1)
drop_and_roll(f)
// ===== PIVOT CALCULATIONS =====
float ph = ta.pivothigh(10, 10)
bool upfract = not na(ph)
float pl = ta.pivotlow(10, 10)
bool downfract = not na(pl)
// ===== VOLATILITY FILTER =====
data_source = close
filter_length = 20
range_factor = 3.5
vol_range(input_data, multiplier, period) =>
window_size = period * 2 - 1
vol_avg = ta.ema(math.abs(input_data - input_data ), period)
adjusted_vol = ta.ema(vol_avg, window_size) * multiplier
vol_range = adjusted_vol
vol_filter(input_data, range_val, period) =>
v_range = range_val
var v_filtered = array.new_float(2, input_data)
array.set(v_filtered, 1, array.get(v_filtered, 0))
if input_data - v_range > array.get(v_filtered, 1)
array.set(v_filtered, 0, input_data - v_range)
if input_data + v_range < array.get(v_filtered, 1)
array.set(v_filtered, 0, input_data + v_range)
filtered_val = array.get(v_filtered, 0)
upper_band = filtered_val + v_range
lower_band = filtered_val - v_range
vol_filter = filtered_val
// Calculate current ATR for TP/SL
current_atr = ta.atr(14)
// Volatility Filter Values
= vol_filter(data_source, vol_range(data_source, range_factor, filter_length), filter_length)
// Direction Conditions
var trend_dir = 0.0
trend_dir := filtered_data > filtered_data ? 1 : filtered_data < filtered_data ? -1 : trend_dir
bull_trend = trend_dir == 1 ? 1 : 0
bear_trend = trend_dir == -1 ? 1 : 0
// Trading Conditions
buy_condition = data_source > filtered_data and data_source > data_source and bull_trend > 0 or data_source > filtered_data and data_source < data_source and bull_trend > 0
sell_condition = data_source < filtered_data and data_source < data_source and bear_trend > 0 or data_source < filtered_data and data_source > data_source and bear_trend > 0
state_trend = 0
state_trend := buy_condition ? 1 : sell_condition ? -1 : state_trend
entry_buy = buy_condition and state_trend == -1
entry_sell = sell_condition and state_trend == 1
// ===== TP/SL CALCULATION FUNCTION =====
// ===== CALL SIGNAL WITH TP/SL =====
if entry_buy and enable_tp_sl
call_entry := close
// ===== PUT SIGNAL WITH TP/SL =====
if entry_sell and enable_tp_sl
put_entry := close
// ===== TP/SL HIT DETECTION =====
if not na(call_tp) and (high >= call_tp or low <= call_sl)
if high >= call_tp
// TP Hit
label.new(bar_index, high, "✅ TP HIT", color=color.new(color.green, 0),
textcolor=color.white, style=label.style_label_down, size=size.normal)
if low <= call_sl
// SL Hit
label.new(bar_index, low, "❌ SL HIT", color=color.new(color.red, 0),
textcolor=color.white, style=label.style_label_up, size=size.normal)
// Reset levels
call_tp := na
call_sl := na
if not na(put_tp) and (low <= put_tp or high >= put_sl)
if low <= put_tp
// TP Hit
label.new(bar_index, low, "✅ TP HIT", color=color.new(color.green, 0),
textcolor=color.white, style=label.style_label_up, size=size.normal)
if high >= put_sl
// SL Hit
label.new(bar_index, high, "❌ SL HIT", color=color.new(color.red, 0),
textcolor=color.white, style=label.style_label_down, size=size.normal)
// Reset levels
put_tp := na
put_sl := na
// ===== FRACTAL TRACKING =====
var float recent_dn1 = na
var int i_recent_dn1 = na
var float recent_up1 = na
var int i_recent_up1 = na
var float recent_dn2 = na
var int i_recent_dn2 = na
var float recent_up2 = na
var int i_recent_up2 = na
if downfract
recent_dn2 := recent_dn1
i_recent_dn2 := i_recent_dn1
recent_dn1 := low
i_recent_dn1 := bar_index-11
draw_trendline(TYPE_DOWN, i_recent_dn2, recent_dn2, i_recent_dn1, recent_dn1)
if upfract
recent_up2 := recent_up1
i_recent_up2 := i_recent_up1
recent_up1 := high
i_recent_up1 := bar_index-11
draw_trendline(TYPE_UP, i_recent_up2, recent_up2, i_recent_up1, recent_up1)
// ===== COLORS AND FILTER PLOT =====
filter_color = bull_trend ? #05ff9b : bear_trend ? #ff0583 : #cccccc
// Filter Plot
filter_line = plot(filtered_data, color=filter_color, linewidth=3, title='Volatility Filter')
// ===== BUY/SELL SIGNALS =====
plotshape(entry_buy, title='Call Signal', text='BUY', textcolor=color.rgb(9, 233, 110),
style=shape.labelup, size=size.normal, location=location.belowbar, color=color.new(color.green, 0))
plotshape(entry_sell, title='Put Signal', text='SELL', textcolor=color.rgb(228, 10, 21),
style=shape.labeldown, size=size.normal, location=location.abovebar, color=color.new(color.red, 0))
// ===== ENHANCED ALERTS WITH TP/SL =====
alertcondition(entry_buy and enable_tp_sl, title='CALL with TP/SL',
message='CALL Entry: {{close}} | TP: {{plot("Call TP")}} | SL: {{plot("Call SL")}}')
alertcondition(entry_sell and enable_tp_sl, title='PUT with TP/SL',
message='PUT Entry: {{close}} | TP: {{plot("Put TP")}} | SL: {{plot("Put SL")}}')
// Regular alerts without TP/SL
alertcondition(entry_buy, title='Call Alert', message='CALL')
alertcondition(entry_sell, title='Put Alert', message='PUT')
alertcondition(not na(ph) or not na(pl), title="New trendline formed", message="New trendline formed")
// ===== INVISIBLE PLOTS FOR ALERT MESSAGES =====
plot(call_tp, title="Call TP", display=display.none)
plot(call_sl, title="Call SL", display=display.none)
plot(put_tp, title="Put TP", display=display.none)
plot(put_sl, title="Put SL", display=display.none)
[Stoxello] Pattern
Pattern — Multi-Zigzag Pattern Scanner + Fib Heatmap + Regression Channel
Overview
This indicator blends robust geometric pattern detection with a visual Fibonacci “heatmap” and a statistical linear-regression channel—so you can spot channels, wedges, and triangles across multiple swing scales, then frame those setups with context from Fib zones and trend strength (R²).
What it does
* Multi-scale swings (1–4 ZigZags): Independent Length/Depth per pass to capture different pivot granularities.
* Geometric pattern recognition:
• Channels: Ascending / Descending / Ranging
• Wedges: Rising (Expanding/Contracting), Falling (Expanding/Contracting)
• Triangles: Converging, Diverging, Ascending (Expanding/Contracting), Descending (Expanding/Contracting)
* Directional & structural filters: Rising / Falling / Flat and Expanding / Contracting / Parallel.
* Last-pivot direction filters: Global (up/down/both) or per-pattern via “Custom.”
* Overlap & repaint control: Avoid Overlap keeps drawings clean; Repaint (off by default) allows real-time bar use.
* Visual management: Theme-aware colors (or custom palette), pivot labels, optional zigzag, and Max Patterns cap.
* Context layers:
• Fibonacci Heatmap: Shades 0/0.236/0.382/0.5/0.618/0.764/1 across a user-set lookback.
• Linear Regression Channel: Midline with ±Deviations and a Correlation/R² label.
Key Inputs
* Source: open/high/low/close for zigzag & patterns.
* ZigZag 1–4: Enable, set Length & Depth per pass.
* Scanning: Number of Pivots (5 or 6), Error Threshold %, Flat Threshold %, Verify Bar Ratio, Avoid Overlap, Repaint, Last Pivot Direction (or Custom).
* Pattern Groups: Channels / Wedge / Triangle; Direction: Rising/Falling/Flat; Dynamics: Expanding/Contracting/Parallel; per-pattern last-pivot direction (when Custom).
* Display: Theme, line width, labels, zigzag color, Max Patterns.
* Fibonacci: Lookback length for the heatmap.
* Regression: Trend Period, Deviation(s), Estimator (Biased/Unbiased), Extend (Right/Segment).
How it works
1. Build OHLC stream from the chosen source.
2. For each enabled ZigZag, compute pivots.
3. Slide a 5- or 6-pivot window and check geometric fits using Error/Flat thresholds (and optional bar-ratio).
4. Apply group/direction/dynamics and last-pivot filters.
5. Draw pattern lines/labels; prune older drawings beyond Max Patterns.
Alerts
Create an Any alert() function call alert on this indicator to receive a “ New Pattern Alert ” whenever a valid structure is found.
Tips
* Use multiple ZigZag passes for a “multi-timeframe” feel (short & long swings together).
* Turn Repaint off for confirmed-bar backtesting.
* Tighten selectivity by lowering Error Threshold; loosen by raising it.
* Keep Verify Bar Ratio on for more classical symmetry.
Notes & limitations
Pattern detection is geometric and context-driven—it is not a standalone trade signal. Pivot shapes depend on ZigZag settings. Heavy drawing: reduce Max Patterns on lower-end machines.
License & credits
Pine Script® under MPL-2.0. © Stoxello. Built on Trendoscope libraries: utils, ohlc, LineWrapper, ZigzagLite, abstractchartpatterns, basechartpatterns.
Quick start
1. Enable ZigZag 1 and set Length/Depth.
2. Select pattern families and dynamics you care about.
3. (Optional) Set Last Pivot Direction = Custom and tune per-pattern filters.
4. Keep Fib Heatmap & Regression on for context.
5. Add an Any alert() call alert to get notified on new patterns.
VWAP (D,W,M,Q,Y) & Custom AVWAP - T.RMulti-Anchor AVWAP — What it is and how it helps
Multi-Anchor AVWAP plots a full VWAP stack on your chart and lets you add up to 12 custom Anchored VWAPs. It’s designed to give you a clean roadmap of dynamic support/resistance across Day, Week, Month, Quarter, Year, plus any key event you choose (earnings gap, swing high/low, CPI day, etc.).
It works on all timeframes—from 1-minute scalps to weekly swing charts.
How it works
Periodic VWAPs (auto-reset):
The indicator calculates VWAP from intrabar price × volume, and resets automatically at each period boundary:
Daily VWAP (resets at the start of each session/day)
Weekly VWAP (new week)
Monthly VWAP (new month)
Quarterly VWAP (every 3 months)
Yearly VWAP (calendar year)
Custom Anchors (AVWAP):
Enable any of the 12 slots, set an exact timestamp (e.g., “2025-01-10 09:30”), and the AVWAP starts from that bar forward. Use these to frame event-driven levels that matter to your chart.
Under the hood, the script is symbol-safe (handles ticker changes cleanly), and uses robust period detection so the lines don’t “drift” as you pan/zoom. Plots and lines are updated in real time.
Why traders like it
Dynamic S/R: VWAPs act as moving equilibrium levels. Price often reacts on first touch, retest, or reclaim.
Confluence = conviction: When Daily aligns with Weekly/Monthly or a Custom anchor, you get high-quality zones for entries, adds, and take-profits.
Multi-horizon context:
Daily for intraday bias and scalps
Weekly/Monthly for swing structure
Quarterly/Yearly for big picture magnets and mean-reversion targets
Targeted risk management: Place stops just beyond a VWAP cluster or use break/reclaim logic for invalidation.
How to use it (quick start)
Price Source: Use (H+L+C)/3 (Typical Price / hlc3) for a balanced VWAP (default).
Turn on the stacks you need (D/W/M/Q/Y).
Add Custom AVWAPs at meaningful events (gap days, earnings, major highs/lows).
Trade the interaction:
Bounce/Reversal: First touch rejects from a higher-TF VWAP.
Break & Hold: Close above a VWAP, then successful retest from above → long continuation (inverse for shorts).
Mean Reversion: Extended move snaps back into a major VWAP (great for partials).
Alerts: Optional cross-up/cross-down alerts help you automate signal tracking.
Inputs & styling
Line style/width/transparency per group (Periodic vs Custom).
Custom Anchors: 12 slots, each with its own color & exact start time.
Labels/Track Price: You can show price bubbles on the scale for quick reading.
Scaling tip: Keep the indicator on a single price scale (e.g., Right Scale) so lines and labels line up with price.
Best practices
Confluence over single signals: The more VWAPs agree at a level, the better the R:R.
Timeframe alignment: Plan on higher TF (Weekly/Monthly), trigger on lower TF (5m/15m/1h).
News & sessions: Daily VWAP behavior changes around opens, closes, and catalysts—expect higher reaction quality there.
Stops/TPs: Use the other side of the VWAP band/cluster for stops; scale out into the next major VWAP above/below.
This indicator gives you a structured, multi-timeframe VWAP “map” plus precise anchored VWAPs for events you care about, so you can define support/resistance zones, execute more targeted entries/exits, and manage risk with higher confidence on any timeframe.
LockedEye V7 FREEMIUMA precision trading system built for clarity, discipline, and flow.
Core Features
• 4 Hidden Veils: Spark, Flow, Gate, Crown — control the market rhythm from quick scalps to major swings.
• Filtered Cross Signals: Only clean, confirmed crosses. Weak moves are cut out.
• Auto Playbook: Smart labels and limit lines show long, short, false, or cancel.
• Pattern Detection: Engulfing candles, Head & Shoulders, Double/Triple Tops & Bottoms — all tracked.
• One Master Alert: One clear alert per bar with every signal listed.
• Minimal & Sharp: Background filters, clean bar colors, uncluttered view.
Why it’s different
It keeps Philakone’s flow spirit but upgrades it with stricter filters, smarter cancels, and deeper structure awareness.
MASTER ALERTS and custom MA's will be only available in subscription based
EMAs (9, 20, 50, 200) + VWAPConfluence trading: When the short-term EMAs (9 & 20) cross above the 50 EMA and the price is above both VWAP and 200 EMA, it provides a high-probability long setup.
Trend confirmation: If the stock is trading above VWAP and the 50/200 EMAs, it shows alignment of intraday strength with broader market trend.
Risk management: The EMAs and VWAP also act as dynamic stop-loss or trailing levels, making it easier to manage risk.