Pine Dienstprogramme
N Order EMAThe exponential moving average is one of the most fundamental tools in technical analysis, but its implementation is almost always locked to a single mathematical approach. I've always wanted to extend the EMA into an n-order filter, and after some time working through the digital signal processing mathematics, I finally managed to do it. This indicator takes the familiar EMA concept and opens it up to four different discretization methods, each representing a valid way to transform a continuous-time exponential smoother into a discrete-time recursive filter. On top of that, it includes adjustable filter order, which fundamentally changes the frequency response characteristics in ways that simply changing the period length cannot achieve.
The four discretization styles are impulse-matched, all-pole, matched z-transform, and bilinear (Tustin). The all-pole version is exactly like stacking multiple EMAs together but implemented in a single function with proper coefficient calculation. It uses a canonical form where you get one gain coefficient and the rest are zeros, with the feedback coefficients derived from the binomial expansion of the pole polynomial. The other three methods are attempts at making generalizations of the EMA in different ways. Impulse-matched creates the filter by matching the discrete-time impulse response to what the continuous EMA would produce. Matched z-transform directly maps the continuous poles to the z-domain using the exponential relationship. Bilinear uses the Tustin transformation with frequency prewarping to ensure the cutoff frequency is preserved despite the inherent warping of the mapping.
Honestly, they're all mostly the same in practice, which is exactly what you'd expect since they're all valid discretizations of the same underlying filter. The differences show up in subtle ways during volatile market conditions or in the exact phase characteristics, but for most trading applications the outputs will track each other closely. That said, the bilinear version works particularly well at low periods like 2, where other methods can sometimes produce numerical artifacts. I personally like the z-match for its clean frequency-domain properties, but the real point here is demonstrating that you can tackle the same problem from multiple mathematical angles and end up with slightly different but equally valid implementations.
The order parameter is where things get interesting. A first-order EMA is the standard single-pole recursive filter everyone knows. When you move to second-order, you're essentially cascading two filter sections, which steepens the roll-off in the frequency domain and changes how the filter responds to sudden price movements. Higher orders continue this progression. The all-pole style makes this particularly clear since it's literally stacking EMA operations, but all four discretization methods support arbitrary order. This gives you control over the aggressiveness of the smoothing that goes beyond just adjusting the period length.
On top of the core EMA calculation, I've included all the standard variants that people use for reducing lag. DEMA applies the EMA twice and combines the results to get faster response. TEMA takes it further with three applications. HEMA uses a Hull-style calculation with fractional periods, applying the EMA to the difference between a half-period EMA and a full-period EMA, then smoothing that result with the square root of the period. These are all implemented using whichever discretization method you select, so you're not mixing different mathematical approaches. Everything stays consistent within the chosen framework.
The practical upside of this indicator is flexibility for people building trading systems. If you need a moving average with specific frequency response characteristics, you can tune the order parameter instead of hunting for the right period length. If you want to test whether different discretization methods affect your strategy's performance, you can swap between them without changing any other code. For most users, the impulse-matched style at order 1 will behave almost identically to a standard EMA, which gives you a familiar baseline to work from. From there you can experiment with higher orders or different styles to see if they provide any edge in your particular market or timeframe.
What this really highlights is that even something as seemingly simple as an exponential moving average involves mathematical choices that usually stay hidden. The standard EMA formula you see in textbooks is already a discretized version of a continuous exponential decay, and there are multiple valid ways to perform that discretization. By exposing these options, this indicator lets you explore a parameter space that most traders never even know exists. Whether that exploration leads to better trading results is an empirical question that depends on your strategy and market, but at minimum it's a useful reminder that the tools we take for granted are built on arbitrary but reasonable mathematical decisions.
[PDR] Daily Rebalance█ OVERVIEW
This indicator is a powerful portfolio backtesting tool designed to simulate the performance of a static-weight, daily rebalancing strategy. It allows you to define a portfolio of up to 10 assets, set their target weights, and track its cumulative return against a user-defined benchmark and a risk-free rate.
The core of the script is its daily rebalancing logic, which calculates and logs every trade needed to bring the portfolio back to its target allocations at the close of each day. This provides a transparent and detailed view of how a static portfolio would have performed historically, including the impact of trading costs.
█ KEY FEATURES
Daily Rebalancing: Simulates a portfolio that is rebalanced at the close of every day to maintain target asset allocations.
Customizable Portfolio: Configure up to 10 different assets with specific weights. If all weights are left at 0, the script automatically creates an equal-weight portfolio from the selected assets.
Performance Comparison: Plots the portfolio's equity curve against a user-defined benchmark (e.g., SET:SET50 ) and a risk-free return, allowing for easy relative performance analysis.
Realistic Simulation: Accounts for trading costs like broker commission and minimum lot sizes for more accurate and grounded backtesting results.
Detailed Performance Metrics: An on-chart table displays real-time statistics, including Current Drawdown, Max Drawdown, and Total Return for both your portfolio and the benchmark.
Trade-by-Trade Logs: For full transparency, every rebalancing trade (BUY/SELL), including shares, price, notional value, and fees, is logged in the Pine Logs panel.
█ HOW TO USE
**Apply to a Daily Chart:** This script is designed to work exclusively on the daily ( 1D ) timeframe. Applying it to any other timeframe will result in a runtime error.
**Configure Settings:** Open the indicator's settings. Set your `Initial Capital`, `Start Time`, and the `Benchmark` symbol you wish to compare against.
**Define Your Assets:** In the 'Assets' group, check the box to enable each asset you want to include, select the symbol, and define its target `Weight (%)`.
**Set Trading Costs:** Adjust the `Broker Commission (%)` and `Minimal Buyable Lot` to match your expected trading conditions.
**Analyze the Results:** The performance curves are plotted in the indicator pane below your main chart. The key metrics table is displayed on the bottom-right of your chart.
**View Rebalancing Trades:** This is a crucial step for understanding the simulation. To see the detailed daily trades, you **must** open the **Pine Logs**. You can find this panel at the bottom of your TradingView window, next to the "Pine Editor" and "Strategy Tester" tabs. The logs provide a complete breakdown of every rebalancing action.
█ DISCLAIMER
This is a backtesting and simulation tool, not a trading signal generator. Its purpose is for research and performance analysis. Past performance is not indicative of future results. Always conduct your own research before making any investment decisions.
NY Session Range Box with Labeled Time MarkersShows opening time ny session by timing with lines to inform traders to avoid 11:30am to 1:30pm for choppy sessions and mark early and power hour .
Fibonacci Trend [Abu-sarah]Fibonacci Trend Abu-sarah V2
is a dynamic Fibonacci retracement indicator that automatically adapts to market conditions by combining SuperTrend-based trend detection with auto-plotted Fibonacci structures.
Unlike the manual Fibonacci tool, this script continuously updates levels whenever the trend changes, ensuring traders always see the latest retracement zones without manual redrawing.
🔹 How it works
**Trend Detection**
- Uses the built-in ta.supertrend(4, 25) to detect bullish/bearish trend shifts.
- A trend flip automatically resets the Fibonacci structure.
**Anchor Points (Highs and Lows)**
- On trend change, the script identifies the latest swing high and low.
- These act as anchors for the Fibonacci retracement.
- Price labels are placed on both anchors for clarity.
**Fibonacci Levels**
- Levels 0, 0.236, 0.382, 0.5, 0.618, 0.786, and 1 are drawn automatically.
- The 0.5 line is dotted and semi-transparent for emphasis.
- Each level includes a label with the exact price.
**Forward Projection**
- Lines extend into the future (default 15 bars) using the Extend input.
- This provides clear projections of retracement levels for upcoming candles.
**ATR Buffering**
- A 200-period ATR adjusts anchor levels slightly.
- This avoids false redraws from small price noise and ensures stability.
**Diagonal Swing Line**
- A dashed line connects the high and low anchors.
- It provides visual confirmation of swing direction and is auto-removed if invalid.
**Highlight Zones**
- Shaded regions emphasize reversal zones:
- Between 0.618 and 0.786.
- Between 0.5 and 0.786.
- Fill color is customizable in the settings.
---
🔹 Inputs
- Extend: Number of bars to project lines (default 15).
- Fill Area Color: Customize shading between retracement levels.
- Fib Levels: Adjustable ratios (0.236, 0.382, 0.618, 0.786).
---
🔹 Features
- Fully automatic swing detection.
- Continuous recalculation on SuperTrend direction changes.
- Customizable colors and labels.
- Forward-projected levels for future action zones.
- Real-time price labels on each Fibonacci line.
- Shaded reversal areas for better visualization.
- More adaptive and practical than static manual tools.
---
🔹 Use Cases
- Identify potential reversal areas within trends.
- Confirm continuation levels during retracements.
- Highlight confluence zones with support/resistance.
- Provide intraday traders with real-time adaptive levels.
---
🔹 Why it’s unique
Many Fibonacci tools exist, but most are manual or static.
This script is unique because it:
- Integrates SuperTrend as a recalculation trigger.
- Automatically adapts to new market swings.
- Adds visual fills for high-probability reversal areas.
- Displays real-time price labels at every level.
This makes it a practical and original tool, providing value beyond open-source Fibonacci scripts.
Channel for Analysis & Updates
Follow my Telegram channel for t.me/Abu_sarah_us
Direct Support
For personal support and inquiries: t.me/i_2169
⚔️ SPX S/R | BY ABU-SARAHAn advanced indicator that automatically plots dynamic Support & Resistance levels on the chart.
It uses pivot highs and lows combined with strength detection to highlight the most reliable levels respected by price.
✨ Features:
🔹 Automatic drawing of Support & Resistance zones (no manual work).
🔹 Extended levels across the chart for clear targets.
🔹 Auto coloring: Red for Resistances – Green for Supports.
🔹 Clear price labels displayed next to each level (without clutter).
🔹 Filters levels based on pivot strength and frequency.
🔹 Full customization:
Pivot Period.
Max number of pivots to track.
Max number of S/R levels to show.
Line style (Solid, Dotted, Dashed) & thickness.
🔹 Built-in alerts for:
Resistance Breakouts.
Support Breakdowns.
Any major S/R level breach.
📊 Usage:
Perfect for SPX / NASDAQ / Forex / Crypto traders.
Helps identify reversals & breakout zones accurately.
Excellent tool for confirming entry & exit levels.
Trendlines AI Radar | By Abu-sarahTrendlines AI Radar | By Abu-sarah – v6 (Official Release)
The Trendlines AI Radar is a professional tool built to automatically detect swing highs and lows and dynamically draw uptrend and downtrend lines with exceptional accuracy.
This indicator filters out market noise by displaying only the most recent active trendlines, ensuring clarity and focus on the true price direction.
It combines advanced computational methods for slope calculation: ATR, Standard Deviation, and Linear Regression, making it suitable for both intraday traders and swing traders.
🚀 Key Features:
Automatic detection of dynamic trendlines.
Shows only the most recent active uptrend & downtrend (no clutter).
Multiple slope calculation methods (ATR / Stdev / LinReg).
Real-time alerts on breakout and breakdown events.
Full customization of colors and extended lines.
Designed for high accuracy, clarity, and speed in technical analysis.
__________________________________________________________________________________
Trendlines AI Radar | By Abu-sarah – الإصدار v6 (رسمي)
مؤشر Trendlines AI Radar هو أداة احترافية تقوم تلقائيًا باكتشاف القمم والقيعان ورسم الترندات الصاعدة والهابطة بدقة استثنائية.
يعتمد على الذكاء الحسابي لإظهار آخر ترند فعال فقط، مما يقلل الضوضاء ويوضح الاتجاه الحقيقي للسعر.
يرتكز على أساليب رياضية متقدمة لحساب الميل: ATR، الانحراف المعياري (Stdev)، و الانحدار الخطي (LinReg)، مما يجعله مناسبًا للمضارب اليومي وللمتداول المتوسط المدى.
🔥 الميزات الأساسية:
اكتشاف تلقائي للترندات الديناميكية.
إظهار آخر ترند صاعد وآخر ترند هابط فقط (بدون ازدحام).
طرق متعددة لحساب الميل (ATR / Stdev / LinReg).
تنبيهات فورية عند الاختراق أو الكسر.
تخصيص كامل للألوان وخطوط الترند الممتدة.
دقة عالية وسرعة في التحليل الفني، مصمم للمتداولين الباحثين عن الوضوح والقوة في الاتجاه.
#TradingView
#Trendlines
#AI
#Breakout
#SmartIndicator
#Forex
#Stocks
#Crypto
#DayTrading
#PriceAction
#AbuSarah
t.me/Radar_Spx
Support Resistance Interactive [MODIFIED]Title: Support & Resistance Interactive PRO
Description:
This indicator allows traders to easily plot and customize up to 10 Support & Resistance levels with full flexibility.
Features include:
Choose between Zone or Line mode for each level.
Adjustable Zone Size (%) to control the width of each area.
Custom labels & names for every level (e.g., Call Entry, Bot Target, Take Profit).
Automatic price display on each level for better clarity.
Highlighted zones/lines with shadows for a more visual and professional charting experience.
This tool is designed for daily market analysis, making it easier to identify reaction levels, breakout points, and trading zones. Perfect for traders who want a clean, customizable, and visually attractive chart.
✍️ الوصف بالعربية (Arabic)
العنوان: مؤشر الدعم والمقاومة التفاعلي PRO
الوصف:
هذا المؤشر يساعد المتداولين على رسم وتخصيص حتى 10 مستويات دعم ومقاومة بكل سهولة ومرونة.
أهم الميزات:
إمكانية التبديل بين عرض المناطق (Zone) أو الخطوط (Line).
التحكم في حجم المنطقة (Zone Size %) لتكبير أو تصغير نطاق كل مستوى.
تخصيص أسماء لكل مستوى (مثل: نقطة دخول كول، هدف بوت، جني ربح).
عرض السعر تلقائيًا على كل مستوى لزيادة الوضوح.
مناطق وخطوط مميزة مع ظل بصري لزيادة احترافية الشارت.
هذا المؤشر مصمم من أجل التحليل اليومي للسوق، لمساعدة المتداول على تحديد مناطق الارتداد، الاختراقات، وأهم المستويات الفعّالة بشكل واضح ومرن.
Buyside & Sellside LiquidityThe Liquidity Zones Indicator is built to automatically identify and visualize one of the core foundations of smart money trading: liquidity pools and levels.
These are areas on the chart where clusters of orders are typically positioned – such as stop losses above highs (buyside) or below lows (sellside). Recognizing these levels can help traders anticipate where price might gravitate to, reverse, or continue its movement.
SETTINGS
Liquidity Levels
Detection Length: Number of candles used to scan and define swing points.
Margin: Adjusts how sensitive the script is when confirming a liquidity level.
Liquidity Zones
Buyside Liquidity: Activates zones above repeated highs.
Sellside Liquidity: Activates zones below repeated lows.
Margin & Colors: Fully customizable width and color display for both buyside and sellside areas.
Liquidity Voids
Option to highlight imbalances (FVGs) both bullish and bearish.
Labels can be enabled to clearly tag voids for quick recognition.
Display Options
Mode: Choose between Present (last 500 bars focus) or Historical (full chart scan).
Visible Levels: Control how many liquidity areas are shown at once.
HOW IT WORKS
Liquidity, in simple terms, is the presence of pending orders at certain price levels.
Buyside Liquidity (BLIQ): typically above swing highs, where short sellers’ stops rest.
Sellside Liquidity (SLIQ): typically under swing lows, where long traders’ stops are placed.
When price sweeps through these pools, two common reactions occur:
Reversal: Price clears liquidity then snaps back in the opposite direction.
Continuation: Price breaks through, retests, and extends further in the same direction.
Additionally, Liquidity Voids (imbalances) appear as strong displacement candles with little to no wicks, signaling inefficient trading ranges. Such gaps are often revisited and filled later by price action.
DETAILS
Helps traders spot stop hunts & fakeouts.
Shows where institutions & smart money are likely targeting orders.
Zones can double as support/resistance and provide setups for entries/exits.
Fully customizable visuals for better chart readability.
تم تصميم هذا المؤشر ليكشف بشكل تلقائي ويعرض أحد أهم مفاهيم التداول بالمال الذكي: مناطق السيولة (Liquidity Pools & Levels).
هذه المناطق تمثل تجمعات أوامر السوق المخفية، مثل أوامر إيقاف الخسارة (Stops) المتمركزة غالبًا فوق القمم (سيولة شرائية) أو تحت القيعان (سيولة بيعية). معرفة أماكنها تمنح المتداول ميزة في توقّع الأماكن التي قد ينجذب إليها السعر ويحدث عندها اختراق أو ارتداد قوي.
الإعدادات
مستويات السيولة
طول الكشف (Detection Length): عدد الشموع المستخدمة لمسح وتحديد القمم والقيعان.
الهامش (Margin): يحدد مدى حساسية المؤشر عند تأكيد المستوى.
مناطق السيولة (Liquidity Zones)
سيولة شرائية (Buyside): تفعل إظهار المناطق أعلى القمم المتكررة.
سيولة بيعية (Sellside): تفعل إظهار المناطق أسفل القيعان المتكررة.
الهامش والألوان: تحكم كامل في عرض الحدود ولون المناطق.
فجوات السيولة (Liquidity Voids)
خيار تفعيل كشف الفجوات السعرية غير المتوازنة (FVG) الصاعدة والهابطة.
إمكانية إظهار ملصق (Label) لتوضيح أماكن الفجوات بشكل مباشر.
خيارات العرض
الوضع (Mode):
الحالي (Present): يركز على آخر 500 شمعة.
التاريخي (Historical): يفحص كامل البيانات المتوفرة على الشارت.
عدد المستويات المرئية: لتحديد كم منطقة سيولة تظهر على الرسم.
آلية عمل المؤشر
ببساطة، السيولة تعني وجود أوامر معلقة عند مستويات سعرية محددة.
سيولة شرائية (Buyside): غالبًا فوق القمم حيث يتمركز ستوبات البائعين.
سيولة بيعية (Sellside): غالبًا تحت القيعان حيث يتمركز ستوبات المشترين.
عند ضرب السعر لهذه المستويات قد يحدث:
انعكاس (Reversal): السعر يخترق المنطقة سريعًا ثم ينعكس بالاتجاه المعاكس.
استمرار (Continuation): المنطقة تنكسر ويعيد السعر اختبارها ثم يكمل بنفس الاتجاه.
أما فجوات السيولة (Voids/FVGs) فتظهر كشموع قوية متتالية دون ذيول واضحة، مما يشير إلى حركة غير متوازنة غالبًا يعود إليها السعر لاحقًا لملئها.
التفاصيل
يساعد على رصد الاختراقات الوهمية (Stop Hunt).
يكشف مناطق تجميع أو توزيع المؤسسات والبنوك.
المناطق المرسومة يمكن أن تعمل كـ دعم/مقاومة ذكية.
قابل للتخصيص من حيث الشكل والألوان لتوضيح القراءة على الشارت.
التنبيهات
يمكن ضبط المؤشر لإرسال تنبيه عند:
اكتشاف/تحديث مستوى سيولة جديد.
اختراق أو كسر منطقة سيولة قائمة.
للمزيد من الشروحات والتحديثات اليومية:
Radar Channel
هاشتاقات:
#السيولة #التداول #الفوليوم #المؤسسات #SMC #الفوركس #الاسهم #الكريبتو #Options #ICT #Radar
نص برمجي محمي
تم نشر هذا النص البرمجي كمصدر مغلق. ومع ذلك، يمكنك استخدامه بحرية ودون أي قيود - تعرف على المزيد هنا.
abu-Sarah
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو
Previous Day & Week High/Low LevelsPrevious Day & Week High/Low Levels is a precision tool designed to help traders easily identify the most relevant price levels that often act as strong support or resistance areas in the market. It automatically plots the previous day’s and week’s highs and lows, as well as the current day’s developing internal high and low. These levels are crucial reference points for intraday, swing, and even position traders who rely on price action and liquidity behavior.
Key Features
Previous Day High/Low:
The indicator automatically draws horizontal lines marking the highest and lowest prices from the previous trading day.
These levels are widely recognized as potential zones where the market may react again — either rejecting or breaking through them.
Previous Week High/Low:
The script also tracks and displays the high and low from the last completed trading week.
Weekly levels tend to represent stronger liquidity pools and broader institutional zones, which makes them especially important when aligning higher timeframe context with lower timeframe entries.
Internal Daily High/Low (Real-Time Tracking):
While the day progresses, the indicator dynamically updates the current day’s internal high and low.
This allows traders to visualize developing market structure, identify intraday ranges, and anticipate potential breakouts or liquidity sweeps.
Multi-Timeframe Consistency:
All levels — daily and weekly — remain visible across any chart timeframe, from 1 minute to 1 day or higher.
This ensures traders can maintain perspective and avoid losing track of key zones when switching views.
Customizable Visuals:
The colors, line thickness, and label visibility can be easily adjusted to match personal charting preferences.
This makes the indicator adaptable to any trading style or layout, whether minimalistic or detailed.
How to Use
Identify Key Reaction Zones:
Observe how price interacts with the previous day and week levels. Rejections, consolidations, or clean breakouts around these lines often signal strong liquidity areas or potential directional moves.
Combine with Market Structure or Liquidity Concepts:
The indicator works perfectly with supply and demand analysis, liquidity sweeps, order block strategies, or simply classic support/resistance techniques.
Scalping and Intraday Trading:
On lower timeframes (1m–15m), the daily levels help identify intraday turning points.
On higher timeframes (1h–4h or daily), the weekly levels provide broader context and directional bias.
Risk Management and Planning:
Using these levels as reference points allows for more precise stop placement, target setting, and overall trade management.
Why This Indicator Helps
Markets often react strongly around previous highs and lows because these zones contain trapped liquidity, pending orders, or institutional decision points.
By having these areas automatically mapped out, traders gain a clear and objective view of where price is likely to respond — without needing to manually draw lines every day or week.
Whether you’re a beginner still learning about price structure, or an advanced trader refining entries within liquidity zones, this tool simplifies the process and keeps your charts clean, consistent, and data-driven.
Smart Weekly Lines — Clean & Scroll-Proof (Pine v6)Because your chart deserves structure. Elegant weekly dividers that stay aligned, scroll smoothly, and project future weeks using your wished UTC offset.
Smart Weekly Lines draws precise, full-height vertical lines marking each new week — perfectly aligned to your local UTC offset. It stays clean, smooth, and consistent no matter how far you scroll.
Features
• Accurate weekly boundaries based on your local UTC offset (supports half-hour zones like India +5.5)
• Clean, full-height lines that never cut off with zoom or scroll
• Adjustable color, opacity, width, and style (solid, dashed, dotted)
• Future week projection for planning and alignment
• Optional visibility: show only on Daily and Intraday charts
Works with any market — stocks, crypto, forex, or futures.
Built for traders who value clarity, structure, and precision.
Developed collaboratively with the assistance of ChatGPT under my direction and testing.
USCBBS-WDTGAL-RRPONTSYDThis is the U.S. Financial Market Net Liquidity.
The calculation method is to subtract the U.S. Treasury General Account balance (WDTGAL) and then the Overnight Reverse Repo balance (RRPONTSYD) from the Federal Reserve's balance sheet total (USCBBS).
ATR Trailing Stop Without tradepanel Open✅ Only plots ATR trailing stop line
✅ Only colors candles
✅ No trades / entries
✅ No “Strategy Tester” panel
✅ No arrows, markers, or trade lists
Metallic Retracement LevelsThere's something that's always bothered me about how traders use Fibonacci retracements. Everyone treats the golden ratio like it's the only game in town, but mathematically speaking, it's completely arbitrary. The golden ratio is just the first member of an infinite family of metallic means, and there's no particular reason why 1.618 should be special for markets when we have the silver ratio at 2.414, the bronze ratio at 3.303, and literally every other metallic mean extending to infinity. We just picked one and decided it was magical.
The metallic means are a sequence of mathematical constants that generalize the golden ratio. They're defined by the equation x² = kx + 1, where k is any positive integer. When k equals 1, you get the golden ratio. When k equals 2, you get the silver ratio. When k equals 3, you get bronze, and so on forever. Each metallic mean generates its own set of ratios through successive powers, just like how the golden ratio gives you 0.618, 0.382, 0.236 and so forth. The silver ratio produces a completely different set of retracement levels, as does bronze, as does any arbitrary metallic number you want to choose.
This indicator calculates these metallic means using the standard alpha and beta formulas. For any metallic number k, alpha equals (k + sqrt(k² + 4)) / 2, and we generate retracement ratios by raising alpha to various negative powers. The script algorithmically generates these levels instead of hardcoding them, which is how it should have been done from the start. It's genuinely silly that most fib tools just hardcode the ratios when the math to generate them is straightforward. Even worse, traditional fib retracements use 0.5 as a level, which isn't even a fibonacci ratio. It's just thrown in there because it seems like it should be important.
The indicator works by first detecting swing points using the Sylvain Zig-Zag . The zig-zag identifies significant price swings by combining percentage change with ATR adjustments, filtering out noise and connecting major pivot points. This is what drives the retracement levels. Once a new swing is confirmed, the script calculates the range between the last two pivot points and generates metallic retracement levels from the most recent swing low or high.
You can adjust which metallic number to use (golden, silver, bronze, or any positive integer), control how many power ratios to display above and below the 1.0 level, and set how many complete retracement cycles you want drawn. The levels extend from the swing point and show you where price might react based on whichever metallic mean you've selected. The zig-zag settings let you tune the sensitivity of swing detection through ATR period, ATR multiplier, percentage reversal, and additional absolute or tick-based reversal values.
What this really demonstrates is that retracement analysis is more flexible than most traders realize. There's no mathematical law that says markets must respect the golden ratio over any other metallic mean. They're all valid mathematical constructs with the same kind of recursive properties. By making this tool, I wanted to highlight that using fibonacci retracements involves an arbitrary choice, and maybe that choice should be more deliberate or at least tested against alternatives. You can experiment with different metallic numbers and see which ones seem to work better for your particular market or timeframe, or just use this to understand that the standard fib levels everyone uses aren't as fundamental as they appear.
RPT Position Sizer🎯 Purpose
This indicator is a position sizing and stop-loss calculator designed to help traders instantly determine:
How many shares/contracts to buy,
How much risk (₹) they are taking per trade,
How much capital will be deployed, and
The precise stop-loss price level based on user-defined parameters.
It displays all key values in a compact on-chart table (bottom-left corner) for quick trade planning.
💡 Use Case
Perfect for discretionary swing traders, systematic position traders, and risk managers who want instant visual feedback of trade sizing metrics directly on the chart — eliminating manual calculations and improving discipline.
⚙️ Key Features
Dynamic Inputs
Trading Capital (₹) — total available capital for trading.
RPT % — risk-per-trade as a percentage of total capital.
SL % — stop-loss distance in percent below CMP (Current Market Price).
CMP Source — can be linked to close, hl2, etc.
Rounding Style — round position size to Nearest, Floor, or Ceil.
Decimals Show — control number formatting precision in the table.
Core Calculations
SL Points: CMP × SL%
SL Price: CMP − SL Points
Risk Amount (₹): Capital × RPT%
Position Size: Risk ÷ SL Points
Capital Used: Position Size × CMP
Clean On-Chart Table Display
Displays:
Trading Capital
RPT %
Risk Amount (₹)
Position Size (shares/contracts)
Capital Required (₹)
Stop-Loss % & SL Price
The table uses a minimalistic white-on-black design with clear labeling and rupee formatting for quick reference.
Data Window Integration
Plots hidden values (Position Size, Risk Amount, SL Points, Capital Used) for use in TradingView’s Data Window—ideal for strategy testing and exporting values.
Volatilidad Multi-TF📊 Multi-Timeframe Volatility (ATR%)
Description
Indicator that displays the current asset's volatility across multiple timeframes simultaneously. It uses the ATR (Average True Range) normalized as a percentage of price, allowing for objective volatility comparison across different timeframes.
✨ Key Features
- Multi-Timeframe Analysis: Visualize volatility across 5 different timeframes (1H, 4H, D, W, M)
- Normalized Volatility: ATR expressed as a percentage of price for accurate comparison
- Compact Table: Clean and easy-to-read interface in the corner of your chart
- Auto-Update: Automatically adapts to the asset you're viewing
- No Additional Plots: Only displays essential information in table format
🎯 How to Use
1. Add the indicator to your chart
2. The table will automatically display the current asset's volatility
3. Percentage values allow you to quickly identify:
- Which timeframe has higher/lower volatility
- Divergences between timeframes
- High or low volatility zones to adjust your strategies
⚙️ Configurable Parameters
- ATR Period: Default 14, adjust according to your strategy
📈 Practical Applications
- Risk Management: Adjust position sizing based on current volatility
- Asset Selection: Identify assets with suitable volatility for your profile
- Entry Timing: Detect volatility expansions/contractions
- Timeframe Analysis: Compare volatility across different time periods
💡 Technical Notes
- Normalized ATR allows volatility comparison between assets with different prices
- Useful for both intraday trading (1H, 4H) and swing/positional trading (D, W, M)
- Compatible with any market: cryptocurrencies, forex, stocks, indices
⚠️ Disclaimer
This indicator is a technical analysis tool. It does not constitute financial advice. Conduct your own analysis and risk management before trading.
Last Candle of Hour Highlighter (M1 + M5)Highlights the last candle of every hour on 1-minute (M1) and 5-minute (M5) charts, making it easier to spot session closes, breakouts, and end-of-hour price action at a glance.
Detailed Description / How to Use:
This indicator automatically detects the last candle of each hour and changes its colour for quick visual reference. It’s designed for traders who use short-term timeframes (M1, M5) and want a clean visual cue for hourly closes.
Features:
• Automatically detects M1 and M5 timeframes.
• Highlights the last candle of each hour with a customisable colour.
• Optional Bull/Bear mode: colour changes depending on candle direction.
• Simple and lightweight — does not affect chart performance.
Inputs / Settings:
1. Color by Bull/Bear – Toggle on to automatically colour the last candle green (bullish) or red (bearish) based on its close relative to the open.
2. Highlight Colour – Choose a single colour if Bull/Bear mode is off.
3. Bullish Colour – Choose the colour for bullish last candles.
4. Bearish Colour – Choose the colour for bearish last candles.
Usage Tips:
• Works best on 1-minute and 5-minute charts.
• Ideal for spotting end-of-hour reversals, breakout candles, and momentum shifts.
• Can be combined with other indicators like support/resistance or moving averages for more advanced strategies.
Premarket Gapper Swing Filter (Long) – v6here’s a plug-and-play Pine Script v5 “screener” you can drop on any chart to flag pre-market gainers that also meet swing-friendly trend/liquidity filters. It works as a chart-level scanner (since Pine can’t screen the whole market by itself): add it to a watchlist; symbols that qualify will light up and you can set alerts to ping you right at the opening bell.
Event Marking [zidaniee]This is not a technical analysis indicator, but a visual tool designed to mark important global events using vertical lines on your chart.
By placing a single marker at the exact time an event occurred, you can compare how different assets reacted to that global event — before, during, and after it happened.
In the example provided, the marking corresponds to the moment when U.S. President Donald Trump announced a 100% tariff on goods from China, which was immediately reflected in market reactions worldwide.
The indicator includes full customization features for:
• Event label text
• Label size and position
• Line color, style, and width
Enjoy
SMC POI Entry System HUDEntry, RR, Exit, of supply and demand zones taught in smart money trading. 12 types of zones and setups around Flips, Order Blocks, High Probability, and Extreme Demand Zones. Includes Checklist for Entry, Exit Rules, Take Profit Targets, Stop Loss spots, and Context