Adaptive Supertrend [PRO]A complete TradingView system — easy to learn, effortless to trade.?
How to use:
Observe the main chart trend: Blue indicates bullish, red indicates bearish.
Wait for arrow signals:
When the main chart trend is bullish (blue), only go long and wait for the buy arrow.
When the main chart trend is bearish (red), only go short and wait for the sell arrow.
It's that simple — follow the trend + arrow signals.
Core Advantages:
No repainting, no future predictions, stable signals without drift
Intuitive clarity, effortlessly follow trends
Volatility Indicators (displayed as letters on main chart):
H (High Volatility)
M (Medium Volatility)
L (Low Volatility)
Indicators and strategies
Smart Trendline [Pro]Features alerts and multi-timeframe display.
Usage: Refer to the main chart for current trend direction—blue indicates long positions, red indicates short positions.
No repainting, no future projections, and stable signals without drift.
Best ORB - Opening Range Breakout (for Indian and global Market)i have seen many opening range breakout , i borrowed an idea, and have added and cusomized with options like , wick consideration , or body consideration only . Also choice of lines. etc. I think this will help traders in many ways, Overall, i have added options that whenever bars crosses above or crosses below, A clear makr of breakout will be available for traders.
EMA 200 MultiTF G/R + Cross Alerts by LifeHack Trader1. Indicator Setup
The script starts by defining the version of Pine Script (v5) and creating an indicator called "EMA 200 MultiTF G/R + Cross Alerts by LifeHack Trader."
The overlay=true parameter ensures that the indicator is plotted directly on the price chart.
2. Function to Get EMA200
A custom function getEma200 is defined to retrieve the 200-period Exponential Moving Average (EMA) for a specified timeframe (tf).
This function uses the request.security function to fetch the close price's EMA from different timeframes.
3. Calculate EMA200 for Multiple Timeframes
The script calculates the EMA200 for four timeframes: 15 minutes ("15"), 1 hour ("60"), 4 hours ("240"), and 1 day ("D").
These values are stored in variables (ema15, ema1h, ema4h, ema1d) and represent the EMA for each timeframe.
4. Determine Price Above or Below EMA200 (G/R)
For each timeframe, the script checks whether the closing price is above or below the EMA200.
It uses boolean checks to determine if the price is above the EMA200, assigning the status "G" (Green) for above and "R" (Red) for below.
5. Cross Signal Detection (Up/Down)
The script detects crossovers and crossunders between the price and EMA200 for each timeframe.
A crossover signal is detected when the price crosses above the EMA200 (bullish), and a crossunder signal is detected when the price crosses below the EMA200 (bearish).
These signals are stored in separate variables (crossUp, crossDown).
6. Display a Table with G/R Status and Cross Alerts
A table is created and displayed in the top-right corner of the chart. The table shows the status (G or R) for each timeframe and the cross signal (▲ for crossover, ▼ for crossunder, or - for no cross event).
The table is updated with the respective values for each timeframe every time a new bar is formed.
7. Alert Conditions
The script defines alert conditions based on the crossovers and crossunders.
When a price crosses above the EMA200 (cross-up), an alert is triggered for a potential buy opportunity. When the price crosses below the EMA200 (cross-down), an alert is triggered for a potential sell opportunity.
Alerts are configured for each timeframe (15 minutes, 1 hour, 4 hours, and 1 day).
This script provides a comprehensive system for monitoring price action relative to the EMA200 on multiple timeframes, highlighting crossovers, and delivering visual feedback and alerts based on the price's relationship with the EMA.
ZigZag Swing High/Low (v6) - theamisoftThis indicator draws the swing high and swing low. Helps to identify swing high and low.
Sumit_RanaThis Indicator Work Only on NIFTY 50 INDEX.
This indicator is for Educational Purpose only.
I am not sebi registered Analyst.
.
Trend following swing Strategy: Trend-Following Swing (波段)
This strategy is designed to identify and capitalize on potential swing movements within a prevailing trend. It combines multiple technical indicators to generate entry signals with an emphasis on momentum, trend strength, and a defined trading window.
Core Logic:
Momentum Identification (RMI): A custom Relative Momentum Index (RMI) is calculated by averaging a standard RSI and the Money Flow Index (MFI). This hybrid oscillator aims to gauge momentum strength more robustly.
A Long (Buy) signal is generated when the RMI crosses above a user-defined upper threshold (e.g., 66) while also being above a lower threshold and accompanied by a rising short-term EMA.
A Short (Sell) signal is generated when the RMI is below a user-defined lower threshold (e.g., 30) accompanied by a declining short-term EMA.
Trend Strength Filter (ADX): To ensure entries align with stronger trends, signals are only executed if the Average Directional Index (ADX) is above a specified level (e.g., 25), indicating a non-range-bound market.
Time Filter: Trading is restricted to a specific session window each day (e.g., 09:30 to 16:00) to focus on the most active or favorable market hours and potentially avoid off-hours volatility.
Dynamic Position Sizing & Visualization: The strategy incorporates a unique volatility-based band (Band) calculated from the Average True Range (ATR). This band, along with a Range-Weighted Moving Average (RWMA), is plotted on the chart. The visual fills and candle colors change (e.g., Bullish: Cyan, Bearish: Red) based on the active signal, providing a clear graphical representation of the current market bias and expected price range.
Risk Management - Auto-Exit: All open positions are automatically closed at a specified time each day (e.g., 16:10), enforcing a disciplined exit and preventing overnight risk.
In summary, this is a systematic trend-following swing trading strategy that uses momentum confirmation (RMI), trend strength filtering (ADX), time-based execution, and automated session-end risk closure. 本策略是一个旨在捕捉市场趋势中的波段机会的自动化交易系统。它通过结合动量指标、趋势强度过滤器和时间窗口管理,来识别高概率的交易入场点,并辅以独特的可视化工具和严格的日内风险控制。
核心逻辑与组成部分:
动量信号生成 (核心):
使用一个自定义的相对动量指数 (RMI),该指数由标准RSI和资金流量指数 (MFI) 平均计算而成,能更全面地衡量市场动量。
做多信号 (Buy): 当RMI从下方穿越用户设定的上限(默认66)且高于下限,同时短期EMA均线开始上扬时产生。
做空信号 (Sell): 当RMI低于用户设定的下限(默认30)且短期EMA均线开始下降时产生。
趋势强度过滤 (ADX过滤器):
引入了平均方向指数 (ADX) 作为趋势强度的过滤器。
只有当ADX值高于预设水平(默认25)时,产生的交易信号才会被执行。这确保了策略只在市场趋势明确、有足够力度的环境中开仓,有效避免在震荡市中频繁交易。
交易时间窗口:
策略可以限定在每天的特定时间段内进行交易(例如默认:09:30 - 16:00)。这有助于聚焦于市场流动性最强、趋势最明显的时段,规避开盘初期和盘后的异常波动。
动态波段与可视化:
策略基于平均真实波幅 (ATR) 计算出一个动态的波动率带宽 (Band)。
结合范围加权移动平均线 (RWMA),在主图上绘制出可视化的通道区域。该通道会根据当前信号方向(多头/空头)改变颜色(默认多头为青色,空头为红色),直观地展示当前的趋势方向、预期波动范围以及持仓状态。
风险管理与自动离场:
策略内置严格的定时平仓机制。所有持仓会在每个交易日的指定时间(例如16:10)被自动平仓,强制实现日内了结,有效规避隔夜跳空风险,符合波段交易的纪律性要求。
策略总结:
该“趋势跟随波段策略”是一个集信号生成、趋势过滤、时间管理和可视化于一体的综合性交易系统。它通过多条件确认来提高信号质量,并强调严格的日内风险控制,旨在通过跟随市场主流趋势进行波段操作,实现稳健的收益。
Trend Bars with Okuninushi Line Filter# Trend Bars with Okuninushi Line Filter: A Powerful Trading Indicator
## Introduction
The **Trend Bars with Okuninushi Line Filter** is an innovative technical indicator that combines two powerful concepts: trend bar analysis and the Okuninushi Line filter. This indicator helps traders identify high-quality trending moves by analyzing candle body strength relative to the overall price range while ensuring the price action aligns with the dominant market structure.
## What Are Trend Bars?
Trend bars are candles where the body (distance between open and close) represents a significant portion of the total price range (high to low). These bars indicate strong directional momentum with minimal indecision, making them valuable signals for trend continuation.
### Key Characteristics:
- **Strong directional movement**: Large body relative to total range
- **Minimal upper/lower shadows**: Shows sustained pressure in one direction
- **High conviction**: Represents decisive market action
## The Okuninushi Line Filter
The Okuninushi Line, also known as the Kijun Line in Ichimoku analysis, is calculated as the midpoint of the highest high and lowest low over a specified period (default: 52 periods).
**Formula**: `(Highest High + Lowest Low) / 2`
This line acts as a dynamic support/resistance level and trend filter, helping to:
- Identify the overall market bias
- Filter out counter-trend signals
- Provide confluence for trade entries
## How the Indicator Works
The indicator combines these two concepts with the following logic:
### Bull Trend Bars (Green)
A candle is colored **green** when ALL conditions are met:
1. **Bullish candle**: Close > Open
2. **Strong body**: |Close - Open| ≥ Threshold × (High - Low)
3. **Above trend filter**: Close > Okuninushi Line
### Bear Trend Bars (Red)
A candle is colored **red** when ALL conditions are met:
1. **Bearish candle**: Close < Open
2. **Strong body**: |Close - Open| ≥ Threshold × (High - Low)
3. **Below trend filter**: Close < Okuninushi Line
### Neutral Bars (Gray)
All other candles that don't meet the complete criteria are colored **gray**.
## Customizable Parameters
### Trend Bar Threshold
- **Range**: 10% to 100%
- **Default**: 75%
- **Purpose**: Controls how "strong" a candle must be to qualify as a trend bar
**Threshold Effects:**
- **Low (10-30%)**: More sensitive, catches smaller trending moves
- **Medium (50-75%)**: Balanced approach, filters out most noise
- **High (80-100%)**: Very selective, only captures the strongest moves
### Okuninushi Line Length
- **Default**: 52 periods
- **Purpose**: Determines the lookback period for calculating the midpoint
- **Common Settings**:
- 26 periods: More responsive to recent price action
- 52 periods: Standard setting, good balance
- 104 periods: Longer-term trend perspective
## Trading Applications
### 1. Trend Continuation Signals
- **Green bars**: Look for bullish continuation opportunities
- **Red bars**: Consider bearish continuation setups
- **Gray bars**: Exercise caution, mixed signals
### 2. Market Structure Analysis
- Clusters of same-colored bars indicate strong trends
- Alternating colors suggest choppy, indecisive markets
- Transition from red to green (or vice versa) may signal trend changes
### 3. Entry Timing
- Use colored bars as confirmation for existing trade setups
- Wait for color alignment with your market bias
- Avoid trading during predominantly gray periods
### 4. Risk Management
- Gray bars can serve as early warning signs of weakening trends
- Color changes might indicate appropriate exit points
- Use in conjunction with other risk management tools
## Advantages
1. **Dual Filtering**: Combines momentum (trend bars) with trend direction (Okuninushi Line)
2. **Visual Clarity**: Immediate visual feedback through candle coloring
3. **Customizable**: Adjustable parameters for different trading styles
4. **Versatile**: Works across multiple timeframes and instruments
5. **Objective**: Rule-based system reduces subjective interpretation
## Limitations
1. **Lagging Nature**: Based on historical price data
2. **False Signals**: Can produce whipsaws in choppy markets
3. **Parameter Sensitivity**: Requires optimization for different instruments
4. **Market Conditions**: May be less effective in ranging markets
## Best Practices
### Optimization Tips:
- **Volatile Markets**: Use higher thresholds (80-90%)
- **Steady Trends**: Use moderate thresholds (60-75%)
- **Short-term Trading**: Shorter Okuninushi Line periods (26)
- **Long-term Analysis**: Longer Okuninushi Line periods (104+)
### Combination Strategies:
- Pair with volume indicators for confirmation
- Use alongside support/resistance levels
- Combine with other trend-following indicators
- Consider market context and overall trend direction
## Conclusion
The Trend Bars with Okuninushi Line Filter offers traders a sophisticated yet intuitive way to identify high-quality trending moves. By combining the momentum characteristics of trend bars with the directional filter of the Okuninushi Line, this indicator helps traders focus on the most promising opportunities while avoiding low-probability setups.
Remember that no single indicator should be used in isolation. Always consider market context, risk management, and other technical factors when making trading decisions. The true power of this indicator lies in its ability to quickly highlight periods of strong, aligned price action – exactly what trend traders are looking for.
---
*Disclaimer: This article is for educational purposes only and should not be considered as financial advice. Always conduct your own research and consider your risk tolerance before making any trading decisions.*
G.U.W.O.P — (Goodman.Unlocks.Wealth.Opportunity.Progression)A lightweight, point-and-click ⚓️ VWAP (AVWAP) indicator with up to ♾️🙏🏼 independent ⚓️'s. Each ⚓️ can be shown/hidden, colored, labeled, and alerted on—perfect for tracking multiple swing points, earnings gaps, or major sessions.
Why it’s different
• True bar-🔒⚓️: Click a candle once; the AVWAP starts exactly from that bar (within the chart’s loaded history).
• Per-⚓️ labeling: Name each AVWAP and style the text color and label background for clarity on busy charts.
• Built-in cross alerts: One-click alerts for price crossing above/below each ⚓️ VWAP.
Features
• ♾️ ⚓️'s (A–H) with independent:
• Show/Hide toggle
• Line color and width
• Custom label text
• Label text color and label background color
• Bar-🔒 AVWAP calculation (stays tied to the exact bar you clicked as long as that bar is within the loaded data).
• Right-edge labels that track the latest AVWAP value for quick identification.
• Alert conditions for each anchor: Cross ABOVE and Cross BELOW (pick them in the Alerts dialog).
How to Use
1. Add to chart → open the indicator settings.
2. For each anchor (A–H):
• Click “Anchor (click chart)”, then click the candle you want to anchor to.
• Set Label, Color/Width, Text Color, Label Background.
• Toggle Show Right Label if you want the name displayed at the right edge.
3. Create alerts:
• Click ⏰ Alerts → Create Alert
• Condition → choose this indicator → pick “Anchor X — Cross ABOVE/BELOW AVWAP”
• (Optional) Set Once per bar or Once per bar close.
Inputs (per ⚓️)
• Label — custom name (e.g., “Earnings Gap AVWAP”).
• Show — toggle line on/off.
• Color / Width — line styling.
• Text Color — label text color.
• Label Background — label background color (with your preferred opacity).
• Anchor (click chart) — click to set the exact start candle.
• Show Right Label — show the label at the right chart edge.
Best for: Multi-anchor workflows (swing highs/lows, gap days, news/earnings bars, session opens) where you want clear labels and fast alerts without clutter.
LUCEO 3ma Alert설명:
이 지표는 3개의 자유로운 이동평균선 설정을 기반으로, 가격 터치 알림과 추세의 시작을 알리는 정배열/역배열 진입 알림을 제공하는 강력한 올인원(All-in-One) 도구입니다. 단기적인 지지/저항 확인부터 장기적인 추세 전환 포착까지, 이 지표 하나로 다양한 매매 전략을 자동화할 수 있습니다.
주요 기능
1. 3개의 자유로운 이동평균선 설정
종류 선택: SMA, EMA, WMA, HMA, RMA 등 다양한 종류의 이평선을 선택할 수 있습니다.
기간/색상/On-Off: 각 이평선의 기간, 색상, 그리고 차트 표시 여부를 자유롭게 설정할 수 있습니다.
2. 강력한 듀얼 알림 시스템
가격 터치 알림 (즉시 발동): 가격이 설정된 이평선에 닿는 즉시 알림이 발생합니다. 중요한 지지/저항 구간을 놓치지 않도록 도와주며, 반복적인 알림을 방지하는 쿨다운 기능이 포함되어 있습니다.
정배열/역배열 진입 알림 (봉 마감 확정): 단기 > 중기 > 장기 순서의 정배열 또는 그 반대인 역배열 상태에 진입하는 순간을 봉 마감 후 확정하여 알려줍니다. 이는 추세의 시작을 알리는 신뢰도 높은 신호입니다.
3. 편리한 시각화
정배열 구간은 차트 배경이 연한 녹색, 역배열 구간은 연한 붉은색으로 표시되어 현재 추세 상태를 한눈에 파악할 수 있습니다.
4. 스마트 알림 메시지
와 같이 종목과 시간봉을 깔끔하게 표시하고, 가격 수준에 따라 소수점 자릿수가 자동 조절되어 가독성이 매우 높습니다.
활용 방법
추세 확인: 정배열/역배열 진입 알림으로 시장의 큰 흐름을 파악합니다.
진입/청산 타점: 큰 추세 방향에 맞춰, 가격이 단기 또는 중기 이평선에 닿을 때(눌림목/반등) '가격 터치 알림'을 활용하여 정밀한 진입 또는 청산 타점을 잡을 수 있습니다.
Description:
This is a powerful all-in-one indicator that provides two types of critical alerts based on three fully customizable moving averages: immediate price-touch notifications and confirmed trend arrangement signals. From identifying short-term support/resistance to capturing long-term trend shifts, this single indicator helps automate a wide range of trading strategies.
Key Features
1. Three Fully Customizable MAs
MA Type: Choose from various moving averages, including SMA, EMA, WMA, HMA, and RMA.
Period, Color & Visibility: Freely adjust the period, color, and on/off visibility for each of the three moving averages.
2. Powerful Dual Alert System
Price Touch Alerts (Immediate Trigger): Get instant notifications the moment the price touches any of the MAs, perfect for identifying potential support/resistance bounces. It includes a user-defined cooldown period to prevent alert spam.
Trend Arrangement Alerts (Bar Close Confirmation): Receive confirmed alerts for 'Golden Arrangements' (Short > Mid > Long MA) and 'Dead Arrangements' (Short < Mid < Long MA). These signals mark the definitive start of a new trend and are designed to avoid false signals by waiting for the bar to close for confirmation.
3. Intuitive Visualization
The chart background changes to a light green during a Golden Arrangement and a light red during a Dead Arrangement, giving you an at-a-glance view of the current trend state.
4. Smart Alert Formatting
Alert messages are clean and highly readable, showing a simplified ticker (e.g., 'BTC'), a formatted timeframe (e.g., '4h'), and a dynamically formatted price with adjusted decimal places.
How to Use
Identify the Trend: Use the Trend Arrangement alerts to understand the market's broader direction.
Time Your Entries/Exits: In alignment with the major trend, use the Price Touch alerts to pinpoint precise entry or exit points during pullbacks or bounces off the moving averages.
PinBar + 2B本指標結合 Pin Bar 形態 與 2B 吞沒回收形態,用於捕捉市場可能的反轉信號:
多頭訊號 (LONG):當第二根K線為下影線長、實體小的 Pin Bar,且之後出現 2B 底部回收時,於K線下方標記綠色 ▲。
空頭訊號 (SHORT):當第二根K線為上影線長、實體小的 Pin Bar,且之後出現 2B 頂部回收時,於K線上方標記紅色 ▼。
此工具適合用於短週期 (如5分鐘K) 做為反轉提示。建議搭配趨勢分析、支撐壓力位或成交量工具,以提高信號可靠度。
This indicator combines Pin Bar patterns with the 2B reversal pattern to identify potential market turning points:
Bullish Signal (LONG): Triggered when the second candle forms a bullish Pin Bar (long lower wick, small body) followed by a 2B bottom reversal. A green ▲ is plotted below the candle.
Bearish Signal (SHORT): Triggered when the second candle forms a bearish Pin Bar (long upper wick, small body) followed by a 2B top reversal. A red ▼ is plotted above the candle.
It is particularly useful on lower timeframes (e.g., 5-minute charts) as a reversal alert. For best results, combine it with trend analysis, support/resistance zones, or volume indicators to filter out false signals.
Earnings Season Highlighter (Jan/Apr/Jul/Oct)Purpose:
This indicator visually highlights the four “earnings season” months — January, April, July, and October — on any TradingView chart. It is designed for traders and investors who want a quick visual cue of when companies typically report quarterly earnings.
Features:
Highlights Jan, Apr, Jul, and Oct with a light blue background.
Works on any timeframe: intraday, daily, weekly, or monthly charts.
No dependency on price data — purely a time-based visual overlay.
Simple, lightweight, and easy to apply to any chart.
Usage:
Apply the indicator to your chart.
During the highlighted months, the background will turn light blue, signaling earnings season.
Ideal for planning trades, earnings plays, or simply monitoring market cycles.
NK-OS-1 (40/60)Fetches above 40 and 60 data of oscillator and gives you clear picture that where the actual momentum is going on across six timeframes . Two lines showing the oversold and over bought zone so that you can identify the market potential and trend. Saves time — no need to flip through multiple charts for overbought and oversold. Helps traders confirm trend direction quickly and use top-down confluence for entries/exits.
Originality → Transforms simple overbought and oversold zone into a multi-timeframe.
Usefulness → Provides clear, time-saving confluence signals for trend following and intraday scalping.
Transparency → Explains logic (oversold and overbought zone in all timeframes) without exposing private source code.
Compliance → Script uses a clean chart, no extra drawings, and is designed for easy interpretation.
NIFTY vs BANKNIFTY divergenceThis indicator plots BANKNIFTY normalized to NIFTY’s scale, allowing both indices to be compared directly in the same pane.
It highlights periods when NIFTY outperforms BANKNIFTY (green background) and when BANKNIFTY outperforms NIFTY (red background).
By normalizing values, it removes the raw price difference and focuses on relative strength between the two indices.
This can be useful for intermarket analysis, sector rotation insights, and spotting divergence opportunities between broader markets (NIFTY) and financials (BANKNIFTY).
Futures Forward Price [NeoButane]In futures markets, the theoretical value of a futures contract can be derived from its underlying price and cost of carry. By baking in the costs and potential yields, the theoretical forward price then be used in basis against futures prices in place of the underlying spot price.
Usage
The script creates plots on the main chart and a separate window pane. Both are meant to be used to visualize dislocations in the market.
By using a futures vs. forward basis instead of futures vs. spot basis, discounts in the market are clearer.
Last month, the gold futures market GCZ2025 traded >1% above forward price when tariffs were announced and fell back in line once the tariffs were verbally retracted.
View roll spreads over a back-adjusted continuous chart. I guess. I don't think spread traders only look at one chart. This is as educational for me as it is you.
Configuration
The underlying reference needs to be changed to match the futures contract you are using.
The Risk-Free Rate defaults to FRED:SOFR. I found the contract month matched 3-Month SOFR Futures to be the closest for forward price.
Risk-Free Rate: The interest rate source for forward price.
Constant Risk-Free Rate: a static interest rate that can be used in advance of future changes in risk-free rate.
Underlying Reference: spot or index price. Some examples include TVC:SPX, TVC:GOLD, CRYPTO:BTCUSD, TVC:USOIL.
Forward Price Compounding: determines which formula to use. They're similar and become closer as the contract matures.
Alternative Contract: enable and select a futures contract to use it on a chart different than the main.
Storage Cost and Yield: for use with commodities. I haven't found a proper use for them yet but enabling is simple if you are able to.
The following are meant to be used with the continuous formula as they are compounded. However the rate sources don't differ much for the purpose of futures prices.
3-Month CME SOFR Futures
3-Month ICEEUR SONIA Futures
3-Month Osaka TONA Futures
The other rate sources are either meant for futures contracts shorter than quarterly such as monthly crypto futures or were meant to help myself understand how different rates would align with futures prices, like inflation.
What this script does
It uses the cost of carry formula to output the forward price (red line). The underlying reference (green line) is plotted alongside and a futures-derived reference (blue line) can be displayed to see how it looks next to the real reference price.
The data pane displays either the nominal difference or percentage difference between the real futures price and the calculated forward price.
Further reading
www.investopedia.com
www.cmegroup.com
www.oxfordenergy.org
www-2.rotman.utoronto.ca
www.cmegroup.com
3-month rate futures
www.cmegroup.com
www.ice.com
www.bankofengland.co.uk
www.jpx.co.jp
Logarithmic Regression Up Trend Screener [BigBeluga]//@version=5
// This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
// creativecommons.org
// © BigBeluga
// Modified for screener to find all upward trends by Gemini
indicator("Logarithmic Regression Up Trend Screener ", "LogReg Up Trend Screener ", overlay=true)
// INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
int length = input.int(100, "Lookback Period", minval=1)
// }
// CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
// Function to compute logarithmic regression
f_log_regression(src, length) =>
float sumX = 0.0
float sumY = 0.0
float sumXSqr = 0.0
float sumXY = 0.0
for i = 0 to length - 1
val = math.log(src )
per = i + 1.0
sumX += per
sumY += val
sumXSqr += per * per
sumXY += val * per
slope = (length * sumXY - sumX * sumY) / (length * sumXSqr - sumX * sumX)
average = sumY / length
intercept = average - slope * sumX / length + slope
// Calculate slope and intercept
= f_log_regression(close, length)
float start = math.exp(intercept + slope * length)
float end = math.exp(intercept)
// Screener Condition: Channel is in an uptrend (this covers both "just turned up" and "already up")
bool isUptrend = end > start
// }
// PLOT FOR SCREENER ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
// Plot '1' if the channel is up, otherwise plot '0'.
// The screener can then filter for stocks where the value of "Uptrend Signal" is equal to 1.
plot(isUptrend ? 1 : 0, "Uptrend Signal", display=display.none)
// Optional: Display a visual signal on the chart for confirmation.
// The background will be green as long as the channel is in an uptrend.
bgcolor(isUptrend ? color.new(color.green, 90) : na)
// }
NIFTY Spot vs Futures Divergence indicator This indicator plots the spread (divergence) between NIFTY Futures (NIFTY1!) and the NIFTY spot index .
It highlights when futures are trading at a premium (green) or discount (red) relative to spot, with reference levels to gauge extremes.
Useful for tracking arbitrage opportunities, identifying market sentiment shifts, and spotting unusual futures–spot divergence.
Volume (standard) + Brightness by Intensity (Min–Max / MA)Volume Brightness Indicator
Quick Description
This indicator is an enhanced version of TradingView’s standard volume. The volume bars are colored just like the original (green/red or a single custom color), but with one key upgrade: brightness and transparency adjust automatically based on volume intensity.
High volume → bars appear more opaque and bright.
Low volume → bars appear more transparent and faded.
This makes it easier to spot which candles actually carry meaningful volume at a glance.
Features
Bar colors: by candle direction (green/red) or a single chosen color.
Volume moving average: optional, customizable (SMA or EMA).
Brightness methods:
Min–Max: compares volume against a historical window (with optional log scale).
MA-based: compares volume against its moving average, with an adjustable cap.
Custom transparency: define how opaque high-volume and low-volume bars appear.
How to Use
Copy the script into Pine Editor and save it.
Add it to your chart; it will display in its own panel, like the standard volume.
In Settings, choose your preferred brightness method and adjust transparency ranges.
Toggle the volume MA if you want a clear reference line.
Key Idea
The indicator does not add new data. It highlights volume intensity visually, making it easier to identify accumulation or spikes without losing the simplicity of the classic volume.
Portfolio Average Line - XDDThis indicator is used to compare a ticker to different portfolios.
You can use up to 10 tickers in a portfolio, and have up to 6 portfolios at a time.
There are 2 averaging methods:
1. Checked Box: each tickers percentage is added up, then the average is displayed
2. Unchecked Box: each tickers price is added up, then the average is displayed
Good luck trading!
TradingHub-Apex US30 Scalper🎯 Strategy Overview
The TradingHub-Apex US30 Scalper is a meticulously engineered trading system designed for the Dow Jones Industrial Average (US30). This strategy combines a robust trend-following core with advanced, automated risk management techniques to capture high-probability intraday moves. The result, as demonstrated in the initial backtest, is a period of flawless execution with a 100% win rate.
📊 Extraordinary Backtest Performance
✅ 100% Win Rate: 6 executed trades, 6 winners.
📈 291.26% Net Return: Achieved from a $100 initial capital stake.
⚖️ Exceptional Risk/Reward: A Sharpe Ratio of 1.054 and a phenomenal Sortino Ratio of 7992.858 highlight superior returns with minimal downside volatility.
💰 Profit Consistency: An average profit of $48.54 per trade with the largest winner at $61.81.
🛡️ Controlled Risk: Maximum drawdown was capped at 38.38%, demonstrating the effectiveness of the integrated safety mechanisms.
⚙️ Core Features
Advanced Risk Management: Features Breakeven Stops and Dynamic Trailing Stops that actively lock in profits and protect capital.
Smart Filtering: Includes a Session Time Filter to trade only during high-probability hours and a Volume Filter to confirm high-liquidity entries.
** disciplined Trade Management:** Limits to one trade per session, enforcing quality over quantity and preventing overtrading.
ℹ️ Important Disclaimer
PAST PERFORMANCE IS NOT NECESSARILY INDICATIVE OF FUTURE RESULTS.
The showcased 100% win rate is an extraordinary outcome from a specific market period and may result from curve-fitting. All strategies experience drawdowns and losing streaks. This should be considered a proof-of-concept showcasing a highly optimized setup, not a guarantee of future profits.
Intended Market: US30 (CAPITALCOM:US30)
Recommended Timeframe: 1 Minute
Style: Intraday Day Trading / Swing Trading
Ideal Session: London & US Overlap (07:50 - 17:05 GMT)