Black Belt cloudThe EMA Cloud indicator highlights market trend direction by filling the space between multiple exponential moving averages with dynamic color-coded clouds.
When the market is in a bullish alignment, the cloud turns green, signaling strong upward momentum.
When the market shifts into a bearish alignment, the cloud turns red, warning of downside pressure.
During periods of mixed or uncertain conditions, the cloud appears gray to indicate potential consolidation or indecision.
The indicator also includes alerts that trigger only on trend changes, helping traders react quickly when momentum shifts.
This tool makes it easy to:
Visualize trend strength at a glance
Avoid choppy, sideways market conditions
Combine with entry/exit strategies for improved decision-making
Chỉ báo và chiến lược
RSI Breakout/Breakdown vs Highest/Lowest(N)RSI Breakout/Breakdown vs Highest/Lowest(N)
موشر rsi
RSI Breakout/Breakdown vs Highest/Lowest (N) Bars
This TradingView indicator compares the current RSI value with the highest and lowest RSI values over the past N bars (excluding the current bar).
Breakout (RSI↑):
A green upward triangle is plotted below the bar when the RSI closes above the highest RSI value of the previous N bars.
→ This signals momentum strength and a potential bullish breakout.
Breakdown (RSI↓):
A red downward triangle is plotted above the bar when the RSI closes below the lowest RSI value of the previous N bars.
→ This signals momentum weakness and a potential bearish breakdown.
Alerts:
The script includes two separate alerts:
RSI Breakout Alert → triggers when RSI closes above the highest N-bar value.
RSI Breakdown Alert → triggers when RSI closes below the lowest N-bar value.
Inputs:
RSI Length → Default is 14.
Lookback Bars (N) → Default is 100 (can be adjusted).
Source → Default is Close price.
This indicator works on any timeframe (hourly, daily, etc.). The logic triggers only once per bar close to avoid false signals during live bar formation.
ICT Largest Midnight–00:30 FVG (NY, 1 per day) — FIXEDmarks out the first and largest fvg on the 1 min chart from midnight open until 12:30 am est
Continuous Partial Buying Signals v7.1🇬🇧 English Description: Continuous Partial Buying Signals v7.1
This indicator is built on a long-term accumulation philosophy , not a traditional buy-sell strategy. Its main purpose is to systematically increase your position in an asset you believe in by identifying significant price drops as buying opportunities. It is a tool designed for long-term investors who want to automate the "buy the dip" or "Dollar Cost Averaging (DCA)" mindset.
How It Works
The logic follows a simple but powerful cycle: Find a Peak -> Wait for a Drop -> Signal a Buy -> Wait for a New Peak.
1. Identifies a Significant Peak: Instead of reacting to minor price spikes, the indicator looks back over a user-defined period (e.g., the last 200 candles) to find the highest price. This stable peak (marked with an orange circle) becomes the reference point for the current cycle.
2. Waits for a Pullback: The indicator then calculates the percentage drop from this locked-in peak.
3. Generates Buy Signals: When the price drops by the percentages you define (e.g., -5% and -10%), it plots a "BUY" signal on the chart. It will only signal once per level within the same cycle.
4. Resets the Cycle: This is the key. If the price recovers and establishes a new significant peak higher than the previous one, the entire cycle resets. The new peak becomes the new reference, and the buy signals are re-armed, allowing the indicator to perpetually find new buying opportunities in a rising market.
How to Get the Most Out of This Indicator
* Timeframe: It is highly recommended to use this on higher timeframes (4H, Daily, Weekly) to align with its long-term accumulation philosophy.
* Peak Lookback Period:
* Higher values (200, 300): Create more stable and less frequent signals. Ideal for long-term, patient investors.
* Lower values (50, 100): More sensitive to recent price action, resulting in more frequent cycles.
* Drop Percentages: Adjust these based on the asset's volatility.
* Volatile assets (Crypto): Consider larger percentages like 10%, 20%.
* Less volatile assets (Stocks, Indices): Smaller percentages like 3%, 5%, 8% might be more appropriate.
This indicator is a tool for disciplined, emotion-free accumulation. It does not provide sell signals.
HIFI Altcoin Season Index (Total3 vs BTC)This indicator helps you determine whether the crypto market is in an "altcoin season" or a "bitcoin season." It doesn't compare every single altcoin to Bitcoin individually; instead, it uses a more efficient approach.
Methodology
The index calculates the difference in price performance over a selected period (default 90 days) between the total market capitalization of altcoins without Ethereum (TOTAL3) and Bitcoin (BTC).
Interpretation
Value above 75: TOTAL3 is showing significantly stronger growth than BTC, indicating an ALTCOIN SEASON. 🚀
Value below 25: BTC is outperforming TOTAL3, indicating a BITCOIN SEASON. 👑
Value between 25 and 75: The market is in a mixed or neutral phase. 🤷
Benefits
This method avoids the technical limitations of Pine Script when requesting data for a large number of symbols, making the indicator stable and reliable.
Disclaimer: This indicator is a tool for market analysis and should not be considered financial advice.
Tape Pressure Proxy — Signals (CVD + Imbalance + VWAP/EMA) v1.1Tape reading: The stack approximates aggressor flow using CVD (cumulative signed volume) and a Z-score “imbalance” of that signed volume. This captures speed/side bias you’d look for on the tape.
Open Interest OverlayOpen Interest Overlay
Overview
This indicator displays Open Interest (OI) data directly on your price chart as an overlay, eliminating the need for separate panes while preserving authentic OI movement patterns. Perfect for traders who want to analyze OI correlations without sacrificing chart real estate.
Key Features
📊 Smart Price Scaling
• Automatically maps Open Interest values to fit within your chart's price range
• Preserves all directional movements, timing, and relative magnitude relationships
• Uses official TradingView Open Interest feed for accuracy
🎨 Full Customization
• Custom Colors: Choose your own colors for rising/falling OI (defaults: teal/red)
• Line Style: Toggle between step-line (traditional) or smooth line display
• Optional Fill: Shade area between OI line and mid-price for better visual reference
• Smoothing Options: Apply moving average smoothing to reduce noise
⚙️ Intelligent Settings
• Normalization Window: 300-bar lookback (customizable) for scaling calculations
• Auto Timeframe: Uses daily data for intraday charts on traditional assets, chart timeframe for crypto
• Real Value Display: Shows actual (unscaled) OI value on the last bar
How It Works
The indicator performs proportional mapping of Open Interest data:
1. Calculates OI range (high/low) over the lookback period
2. Maps this range to your chart's price range during the same period
3. Displays OI movements that maintain authentic patterns and timing
Perfect For
✅ Correlation Analysis - See how OI moves with price in real-time
✅ Divergence Spotting - Identify when OI and price trends diverge
✅ Clean Charts - No need for separate panes or window splitting
✅ Pattern Recognition - Spot OI building/declining during key price levels
✅ Cross-Market Analysis - View any symbol's OI overlay on your current chart (e.g., Bitcoin OI while viewing Ethereum prices)
What You Get vs Traditional OI Indicators
Advantages:
• Authentic OI movement patterns preserved
• Direct visual correlation with price action
• No chart real estate sacrifice
• Immediate trend and divergence recognition
Trade-offs:
• Shows relative OI changes rather than absolute values
• Scaling is relative to the selected lookback period
Ideal For
• Day traders monitoring intraday OI flow
• Swing traders analyzing OI trends with price movements
• Futures traders tracking institutional interest
• Anyone wanting clean, correlation-focused OI analysis
Compatible With
• Futures contracts with Open Interest data
• Any timeframe (auto-adjusts for optimal data)
• All TradingView-supported OI symbols
Hilly's Reversal Scalping Strategy - 5 Min CandlesHow to Use
Copy the Code: Copy the script above.
Paste in TradingView: Open TradingView, go to the Pine Editor (bottom of the chart), paste the code, and click “Add to Chart.”
Set Timeframe: Ensure the chart is set to 5-minute candles (TradingView: right-click chart > Timeframe > 5 Minutes).
Check for Errors: Verify no errors appear in the Pine Editor console.
Apply to Chart: Use a liquid crypto pair (e.g., BTC/USDT, ETH/USDT on Binance or Coinbase).
Verify Signals:
Green “BUY” labels and triangle-up arrows for bullish reversals (e.g., bullish engulfing, hammer, doji, morning star, three white soldiers, double bottom in a downtrend).
Red “SELL” labels and triangle-down arrows for bearish reversals (e.g., bearish engulfing, shooting star, doji, evening star, three black crows, double top in an uptrend).
Green/red background highlights for signal candles.
Backtest: Use TradingView’s Strategy Tester to evaluate performance over 1–3 months, checking Net Profit, Win Rate, and Drawdown.
Demo Test: Run on a demo account to confirm signal visibility and performance before trading with real funds.
Troubleshooting
If Errors Occur: If any errors appear in TradingView’s Pine Editor console (e.g., “Syntax error” or “Invalid argument”), please share the exact error messages to diagnose environment-specific issues.
Signal Overload: If too many signals appear, increase patternLookback to 15 or set volFilter = volume > volMa * 2.0.
Missed Signals: If signals are too rare, set useVolumeFilter=false or reduce patternLookback to 5.
Additional Features: If you need alerts, other indicators (e.g., EMA, RSI), or dynamic arrow sizing, please specify. Note that dynamic sizing caused errors previously, so I’ve kept size=size.normal.
ATR STOPLOSS FINDER 📌 English Explanation
This script is an ATR (Average True Range) Stop Loss Finder with a 5-bar maximum marker.
Purpose:
Helps traders visualize dynamic stop loss levels based on ATR, and highlights the most recent maximum stop value within a given lookback period.
Key Features:
1. ATR Calculation:
- Calculates ATR using the selected smoothing method (RMA, SMA, EMA, WMA).
- Multiplied by a user-defined multiplier (default: ×1.01).
2. Long Stop Line:
- A trailing stop is drawn below the candle’s low (Low – ATR × Multiplier).
3. All Stop Dots:
- Small wine-colored dots are plotted along the stop line.
4. 5-bar MAX Dots:
- Within the last 5 bars (customizable), the highest stop value is highlighted with larger, brighter dots.
5. Label:
- The most recent 5-bar maximum stop is displayed with a label above the bar, pointing downward so it doesn’t block the candle.
6. Customization:
- Inputs allow adjustments for ATR length, smoothing type, multiplier, and lookback window.
Usage:
This indicator is useful for setting stop losses dynamically in trending markets. It visually tracks where your ATR-based stop should be and shows the strongest recent level.
📌 한글 설명
이 스크립트는 ATR(평균 진폭 지표) 기반 스탑로스 찾기 + 최근 5봉 최고 스탑 표시기입니다.
목적:
트레이더가 ATR 기반으로 변동성에 맞춘 동적 스탑로스를 설정하고,
최근 구간 중 가장 강력한 스탑 레벨을 시각적으로 확인할 수 있게 해줍니다.
핵심 기능:
1. ATR 계산:
- 선택한 이동평균 방식(RMA, SMA, EMA, WMA)으로 ATR을 계산.
- 사용자 지정 배수(기본 1.01배)를 곱함.
2. 롱 스탑 라인:
- 각 봉의 저가에서 (ATR × 배수)를 뺀 값으로 스탑 라인 생성.
3. 모든 스탑 점:
- 스탑 라인 위에 작은 와인색 점을 찍어 시각적으로 확인.
4. 최근 5봉 MAX 점:
- 최근 5봉(조정 가능) 동안의 최고 스탑 값을 더 진하고 크게 표시.
5. 라벨 표시:
- 최신 5봉 최고 스탑 값은 봉 위에 라벨로 표시되며, 꼭지는 아래로 향해 봉을 가리킴 → 봉을 가리지 않음.
6. 사용자 설정:
- ATR 길이, 이동평균 방식, 배수, 룩백 기간 등을 자유롭게 조정 가능.
활용법:
추세장에서 변동성에 맞춘 손절 라인을 자동으로 그려주므로 진입 후 스탑로스를 관리하는 데 유용합니다.
최근 최고 스탑 지점을 강조해주어 리스크 관리에 도움을 줍니다.
ATR Future Movement Range Projection
The "ATR Future Movement Range Projection" is a custom TradingView Pine Script indicator designed to forecast potential price ranges for a stock (or any asset) over short-term (1-month) and medium-term (3-month) horizons. It leverages the Average True Range (ATR) as a measure of volatility to estimate how far the price might move, while incorporating recent momentum bias based on the proportion of bullish (green) vs. bearish (red) candles. This creates asymmetric projections: in bullish periods, the upside range is larger than the downside, and vice versa.
The indicator is overlaid on the chart, plotting horizontal lines for the projected high and low prices for both timeframes. Additionally, it displays a small table in the top-right corner summarizing the projected prices and the percentage change required from the current close to reach them. This makes it useful for traders assessing potential targets, risk-reward ratios, or option strategies, as it combines volatility forecasting with directional sentiment.
Key features:
- **Volatility Basis**: Uses weekly ATR to derive a stable daily volatility estimate, avoiding noise from shorter timeframes.
- **Momentum Adjustment**: Analyzes recent candle colors to tilt projections toward the prevailing trend (e.g., more upside if more green candles).
- **Time Horizons**: Fixed at 1 month (21 trading days) and 3 months (63 trading days), assuming ~21 trading days per month (excluding weekends/holidays).
- **User Adjustable**: The ATR length/lookback (default 50) can be tweaked via inputs.
- **Visuals**: Green/lime lines for highs, red/orange for lows; a semi-transparent table for quick reference.
- **Limitations**: This is a probabilistic projection based on historical volatility and momentum—it doesn't predict direction with certainty and assumes volatility persists. It ignores external factors like news, earnings, or market regimes. Best used on daily charts for stocks/ETFs.
The indicator doesn't generate buy/sell signals but helps visualize "expected" ranges, similar to how implied volatility informs option pricing.
### How It Works Step-by-Step
The script executes on each bar update (typically daily timeframe) and follows this logic:
1. **Input Configuration**:
- ATR Length (Lookback): Default 50 bars. This controls both the ATR calculation period and the candle count window. You can adjust it in the indicator settings.
2. **Calculate Weekly ATR**:
- Fetches the ATR from the weekly timeframe using `request.security` with a length of 50 weeks.
- ATR measures average price range (high-low, adjusted for gaps), representing volatility.
3. **Derive Daily ATR**:
- Divides the weekly ATR by 5 (approximating 5 trading days per week) to get an equivalent daily volatility estimate.
- Example: If weekly ATR is $5, daily ATR ≈ $1.
4. **Define Projection Periods**:
- 1 Month: 21 trading days.
- 3 Months: 63 trading days (21 × 3).
- These are hardcoded but based on standard trading calendar assumptions.
5. **Compute Base Projections**:
- Base projection = Daily ATR × Days in period.
- This gives the total expected movement (range) without direction: e.g., for 3 months, $1 daily ATR × 63 = $63 total range.
6. **Analyze Candle Momentum (Win Rate)**:
- Counts green candles (close > open) and red candles (close < open) over the last 50 bars (ignores dojis where close == open).
- Total colored candles = green + red.
- Win rate = green / total colored (as a fraction, e.g., 0.7 for 70%). Defaults to 0.5 if no colored candles.
- This acts as a simple momentum proxy: higher win rate implies bullish bias.
7. **Adjust Projections Asymmetrically**:
- Upside projection = Base projection × Win rate.
- Downside projection = Base projection × (1 - Win rate).
- This skews the range: e.g., 70% win rate means 70% of the total range allocated to upside, 30% to downside.
8. **Calculate Projected Prices**:
- High = Current close + Upside projection.
- Low = Current close - Downside projection.
- Done separately for 1M and 3M.
9. **Plot Lines**:
- 3M High: Solid green line.
- 3M Low: Solid red line.
- 1M High: Dashed lime line.
- 1M Low: Dashed orange line.
- Lines extend horizontally from the current bar onward.
10. **Display Table**:
- A 3-column table (Projection, Price, % Change) in the top-right.
- Rows for 1M High/Low and 3M High/Low, color-coded.
- % Change = ((Projected price - Close) / Close) × 100.
- Updates dynamically with new data.
The entire process repeats on each new bar, so projections evolve as volatility and momentum change.
### Examples
Here are two hypothetical examples using the indicator on a daily chart. Assume it's applied to a stock like AAPL, but with made-up data for illustration. (In TradingView, you'd add the script to see real outputs.)
#### Example 1: Bullish Scenario (High Win Rate)
- Current Close: $150.
- Weekly ATR (50 periods): $10 → Daily ATR: $10 / 5 = $2.
- Last 50 Candles: 35 green, 15 red → Total colored: 50 → Win Rate: 35/50 = 0.7 (70%).
- Base Projections:
- 1M: $2 × 21 = $42.
- 3M: $2 × 63 = $126.
- Adjusted Projections:
- 1M Upside: $42 × 0.7 = $29.4 → High: $150 + $29.4 = $179.4 (+19.6%).
- 1M Downside: $42 × 0.3 = $12.6 → Low: $150 - $12.6 = $137.4 (-8.4%).
- 3M Upside: $126 × 0.7 = $88.2 → High: $150 + $88.2 = $238.2 (+58.8%).
- 3M Downside: $126 × 0.3 = $37.8 → Low: $150 - $37.8 = $112.2 (-25.2%).
- On the Chart: Green/lime lines skewed higher; table shows bullish % changes (e.g., +58.8% for 3M high).
- Interpretation: Suggests stronger potential upside due to recent bullish momentum; useful for call options or long positions.
#### Example 2: Bearish Scenario (Low Win Rate)
- Current Close: $50.
- Weekly ATR (50 periods): $3 → Daily ATR: $3 / 5 = $0.6.
- Last 50 Candles: 20 green, 30 red → Total colored: 50 → Win Rate: 20/50 = 0.4 (40%).
- Base Projections:
- 1M: $0.6 × 21 = $12.6.
- 3M: $0.6 × 63 = $37.8.
- Adjusted Projections:
- 1M Upside: $12.6 × 0.4 = $5.04 → High: $50 + $5.04 = $55.04 (+10.1%).
- 1M Downside: $12.6 × 0.6 = $7.56 → Low: $50 - $7.56 = $42.44 (-15.1%).
- 3M Upside: $37.8 × 0.4 = $15.12 → High: $50 + $15.12 = $65.12 (+30.2%).
- 3M Downside: $37.8 × 0.6 = $22.68 → Low: $50 - $22.68 = $27.32 (-45.4%).
- On the Chart: Red/orange lines skewed lower; table highlights larger downside % (e.g., -45.4% for 3M low).
- Interpretation: Indicates bearish risk; might prompt protective puts or short strategies.
#### Example 3: Neutral Scenario (Balanced Win Rate)
- Current Close: $100.
- Weekly ATR: $5 → Daily ATR: $1.
- Last 50 Candles: 25 green, 25 red → Win Rate: 0.5 (50%).
- Projections become symmetric:
- 1M: Base $21 → Upside/Downside $10.5 each → High $110.5 (+10.5%), Low $89.5 (-10.5%).
- 3M: Base $63 → Upside/Downside $31.5 each → High $131.5 (+31.5%), Low $68.5 (-31.5%).
- Interpretation: Pure volatility-based range, no directional bias—ideal for straddle options or range trading.
In real use, test on historical data: e.g., if past projections captured actual moves ~68% of the time (1 standard deviation for ATR), it validates the volatility assumption. Adjust the lookback for different assets (shorter for volatile cryptos, longer for stable blue-chips).
1-Month RS histogramOriginal idea: x.com
I would recommend to pair it with 3-Month Weighted RS to visualize both short-term and medium-term RS for the ticker.
Definition: Takes the direct price ratio = close / SPY close.
Tracks that ratio over a rolling lookback (default = 26 trading days ≈ 1 month).
Computes the percentile rank of today’s RS relative to the last N bars.
Shows it as a blue-colored histogram.
Interpretation: If percentile is high, the stock has been stronger than SPY over that lookback window; if low, weaker.
Assumption: All days in the lookback have equal weight → recent vs older returns treated the same.
Majority of code and indicator idea is taken from an old post likely by @ChartsLector. I couldn't find the actual post.
さくらんぼーい//@version=6
indicator("さくらんぼーい", overlay=true, max_labels_count=500, max_lines_count=500)
//==================== Inputs ====================//
// ---- Anchor (shared) ----
grpA = "Anchor (shared)"
anchorMode = input.string("Time", "Anchor Mode", options= , group=grpA)
anchorTime = input.time(timestamp("2025-06-24T20:31:00"), "Anchor Time (exchange)", group=grpA)
anchorBarsAgo = input.int(100, "Anchor Bars Ago", minval=1, group=grpA)
anchorPriceMode = input.string("Close", "Anchor Price", options= , group=grpA)
anchorPriceManual = input.float(0.0, "Manual Anchor Price (0=auto)", step=0.0001, group=grpA)
// ---- Light-Cone ----
grpLC = "Light-Cone ATR"
atrLen = input.int(14, "ATR Length", minval=1, group=grpLC)
atrTF = input.timeframe("", "ATR Timeframe (blank=same)", group=grpLC)
projBars = input.int(60, "Projection Horizon (bars)", minval=1, group=grpLC)
coneMode = input.string("Diffusive √n", "Cone Growth Mode", options= , group=grpLC)
mult = input.float(1.0, "ATR Multiplier (σ-ish)", step=0.1, minval=0.0, group=grpLC)
wickMode = input.string("Close", "Height uses", options= , group=grpLC)
coneFillCol= input.color(color.new(color.teal, 90), "Cone Fill", group=grpLC)
coneLineCol= input.color(color.new(color.aqua, 40), "Cone Edge", group=grpLC)
// ---- Light-Cone guide lines ----
grpFan = "Light-Cone Guides (0.5c / 1.5c)"
showFan = input.bool(true, "Show 0.5c & 1.5c guide lines", group=grpFan)
fan05Color = input.color(color.new(color.aqua, 75), "0.5c line", group=grpFan)
fan15Color = input.color(color.new(color.aqua, 60), "1.5c line", group=grpFan)
fanWidth = input.int(1, "Guide line width", minval=1, maxval=3, group=grpFan)
// ---- √n Stripes ----
grpZ = "Convergence (√n stripes)"
stepBars = input.int(20, "Base Step (bars)", minval=1, group=grpZ)
maxOrderM = input.int(8, "Max Order M (m²)", minval=1, maxval=50, group=grpZ)
halfWindow = input.int(2, "Stripe Half-Width (bars)", minval=0, group=grpZ)
stripeColor = input.color(color.new(color.fuchsia, 86), "Stripe Color", group=grpZ)
showCenters = input.bool(false, "Draw Stripe Center Lines", group=grpZ)
// ---- Fractal ----
grpF = "Fractal (Pivot) Detector"
leftP = input.int(2, "Left bars (L)", minval=1, group=grpF)
rightP = input.int(2, "Right bars (R)", minval=1, group=grpF)
hitColHi = input.color(color.new(color.lime, 0), "Pivot High Mark", group=grpF)
hitColLo = input.color(color.new(color.red, 0), "Pivot Low Mark", group=grpF)
// ---- Display / Limits ----
grpO = "Display / Limits"
showHitTable = input.bool(true, "Show m² Hit Table", group=grpO)
limitScreen = input.bool(true, "Reduce drawing near screen", group=grpO)
screenPastBars = input.int(5000, "Screen past window (bars)", minval=100, group=grpO)
futureLimitBars= input.int(500, "FUTURE draw limit (TV max 500)", minval=0, maxval=500, group=grpO)
// ---- Bias Panel ----
grpB = "Bias Panel"
showBiasPanel = input.bool(true, "Show Bias Panel", group=grpB)
biasTf = input.timeframe("15", "HTF timeframe", group=grpB)
emaFast = input.int(20, "HTF EMA fast", minval=1, group=grpB)
emaSlow = input.int(50, "HTF EMA slow", minval=2, group=grpB)
zThresh = input.float(0.30, "Z threshold (±)", step=0.05, group=grpB)
railLookback = input.int(20, "Rail lookback bars", minval=5, group=grpB)
railPct = input.float(0.40, "Rail touch ratio (0–1)", minval=0.1, maxval=0.9, step=0.05, group=grpB)
// ---- Positions (NEW) ----
panelCorner = input.string("Top-Right", "Bias Panel Position",
options= , group=grpB)
hitsCorner = input.string("Top-Left", "Hits Table Position",
options= , group=grpO)
// ---- Helpers: table positions ----
f_pos(s) =>
p = position.top_left
if s == "Top-Right"
p := position.top_right
else if s == "Bottom-Left"
p := position.bottom_left
else if s == "Bottom-Right"
p := position.bottom_right
p
//==================== Anchor Resolve ====================//
var int anchorBar = na
var float anchorPrice = na
var label anchorLbl = na
// 初バー保護付きタイム検索
f_find_anchor_bar_by_time(_t) =>
ta.valuewhen(nz(time , time ) < _t and time >= _t, bar_index, 0)
if anchorMode == "Time"
anchorBar := f_find_anchor_bar_by_time(anchorTime)
else
// バッファ下限保護
anchorBar := math.max(0, bar_index - anchorBarsAgo)
// アンカー価格(安全取得)
f_price_at_anchor(_bar) =>
float _v = na
if anchorPriceMode == "Close"
_v := ta.valuewhen(bar_index == _bar, close, 0)
else if anchorPriceMode == "High"
_v := ta.valuewhen(bar_index == _bar, high, 0)
else if anchorPriceMode == "Low"
_v := ta.valuewhen(bar_index == _bar, low, 0)
else if anchorPriceMode == "Open"
_v := ta.valuewhen(bar_index == _bar, open, 0)
_v
float autoPrice = na
if not na(anchorBar) and anchorBar <= bar_index
autoPrice := f_price_at_anchor(anchorBar)
anchorPrice := (anchorPriceMode == "Manual" and anchorPriceManual != 0.0) ? anchorPriceManual : autoPrice
bool anchorOK = not na(anchorBar) and anchorBar >= 0 and anchorBar <= bar_index + futureLimitBars and not na(anchorPrice)
// ラベル
if anchorOK
if na(anchorLbl)
anchorLbl := label.new(anchorBar, anchorPrice, "Anchor", xloc=xloc.bar_index, yloc=yloc.price, style=label.style_label_down, textcolor=color.black, color=color.yellow, size=size.tiny)
else
label.set_x(anchorLbl, anchorBar), label.set_y(anchorLbl, anchorPrice)
//==================== Light-Cone (ATR-based) ====================//
float atrSame = ta.atr(atrLen)
float atrOther = request.security(syminfo.tickerid, atrTF, ta.atr(atrLen), gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
float baseATR = (na(atrTF) or atrTF == "") ? atrSame : atrOther
float c_main = mult * baseATR
int horizon = math.min(projBars, futureLimitBars)
var line upL = na
var line dnL = na
var line up05 = na
var line dn05 = na
var line up15 = na
var line dn15 = na
var linefill coneFill = na
f_growth(_n) =>
coneMode == "Linear n" ? _n : math.sqrt(_n)
if anchorOK
if not na(coneFill)
linefill.delete(coneFill)
if not na(upL)
line.delete(upL)
if not na(dnL)
line.delete(dnL)
if not na(up05)
line.delete(up05)
if not na(dn05)
line.delete(dn05)
if not na(up15)
line.delete(up15)
if not na(dn15)
line.delete(dn15)
int x1 = anchorBar + horizon
float dyPer= (wickMode == "Wick (High/Low)") ? c_main * 0.5 : c_main
float grow = f_growth(horizon)
float upY = anchorPrice + dyPer * grow
float dnY = anchorPrice - dyPer * grow
float upY05 = anchorPrice + (dyPer * 0.5) * grow
float dnY05 = anchorPrice - (dyPer * 0.5) * grow
float upY15 = anchorPrice + (dyPer * 1.5) * grow
float dnY15 = anchorPrice - (dyPer * 1.5) * grow
upL := line.new(anchorBar, anchorPrice, x1, upY, xloc=xloc.bar_index, extend=extend.none, color=coneLineCol, width=2)
dnL := line.new(anchorBar, anchorPrice, x1, dnY, xloc=xloc.bar_index, extend=extend.none, color=coneLineCol, width=2)
coneFill := linefill.new(upL, dnL, color=coneFillCol)
if showFan
up05 := line.new(anchorBar, anchorPrice, x1, upY05, xloc=xloc.bar_index, extend=extend.none, color=fan05Color, width=fanWidth)
dn05 := line.new(anchorBar, anchorPrice, x1, dnY05, xloc=xloc.bar_index, extend=extend.none, color=fan05Color, width=fanWidth)
up15 := line.new(anchorBar, anchorPrice, x1, upY15, xloc=xloc.bar_index, extend=extend.none, color=fan15Color, width=fanWidth)
dn15 := line.new(anchorBar, anchorPrice, x1, dnY15, xloc=xloc.bar_index, extend=extend.none, color=fan15Color, width=fanWidth)
//==================== √n Stripes ====================//
var array centers = array.new_int()
array.clear(centers)
if not na(anchorBar)
for m = 1 to maxOrderM
array.push(centers, anchorBar + stepBars * m * m)
f_in_any_stripe(_bi) =>
sz = array.size(centers)
if sz == 0
false
else
bool hit = false
for i = 0 to sz - 1
int c0 = array.get(centers, i)
if _bi >= c0 - halfWindow and _bi <= c0 + halfWindow
hit := true
hit
// どの m² ストライプか(なければ na)
f_stripe_index(_bi) =>
int mFound = na
if array.size(centers) > 0
for m = 1 to maxOrderM
int cCenter = array.get(centers, m - 1)
if _bi >= cCenter - halfWindow and _bi <= cCenter + halfWindow
mFound := m
mFound
bgcolor(f_in_any_stripe(bar_index) ? stripeColor : na)
if showCenters and array.size(centers) > 0
for i = 0 to array.size(centers) - 1
int c0 = array.get(centers, i)
bool withinFutureLimit = c0 <= bar_index + futureLimitBars
bool nearScreen = not limitScreen or (c0 >= bar_index - screenPastBars and c0 <= bar_index + futureLimitBars)
if withinFutureLimit and nearScreen
line.new(c0, high, c0, low, xloc=xloc.bar_index, extend=extend.both, color=color.new(color.white, 70), width=1)
//==================== Fractal Detection ====================//
isPH = not na(ta.pivothigh(high, leftP, rightP))
isPL = not na(ta.pivotlow (low , leftP, rightP))
int pivotCenter = bar_index - rightP
hitPH = isPH and f_in_any_stripe(pivotCenter)
hitPL = isPL and f_in_any_stripe(pivotCenter)
//==================== m² Hit Table (robust) ====================//
var table tbHits = na
var hitsHi = array.new_int()
var hitsLo = array.new_int()
f_sync_len_int(_arr, _n, _fill) =>
while array.size(_arr) < _n
array.push(_arr, _fill)
while array.size(_arr) > _n
array.pop(_arr)
_arr
f_safe_get_int(_arr, _idx) =>
(_idx >= 0 and _idx < array.size(_arr)) ? array.get(_arr, _idx) : 0
// 毎バー長さ同期
f_sync_len_int(hitsHi, maxOrderM, 0)
f_sync_len_int(hitsLo, maxOrderM, 0)
// 集計
if (hitPH or hitPL) and array.size(centers) > 0
int nC = array.size(centers)
int nM = math.min(maxOrderM, nC)
for m = 1 to nM
int c0 = array.get(centers, m - 1)
if pivotCenter >= c0 - halfWindow and pivotCenter <= c0 + halfWindow
if hitPH
array.set(hitsHi, m - 1, f_safe_get_int(hitsHi, m - 1) + 1)
if hitPL
array.set(hitsLo, m - 1, f_safe_get_int(hitsLo, m - 1) + 1)
// 表示
if showHitTable and barstate.islast
if na(tbHits)
tbHits := table.new(f_pos(hitsCorner), 3, maxOrderM + 1, border_width=1)
table.cell(tbHits, 0, 0, "m²", bgcolor=color.new(color.blue, 20), text_color=color.white)
table.cell(tbHits, 1, 0, "PH▲", bgcolor=color.new(color.green,10), text_color=color.white)
table.cell(tbHits, 2, 0, "PL▼", bgcolor=color.new(color.red, 10), text_color=color.white)
int rows = array.size(hitsHi)
int nRow = math.min(maxOrderM, rows)
for m = 1 to nRow
table.cell(tbHits, 0, m, str.tostring(m) + "²")
table.cell(tbHits, 1, m, str.tostring(f_safe_get_int(hitsHi, m - 1)))
table.cell(tbHits, 2, m, str.tostring(f_safe_get_int(hitsLo, m - 1)))
//==================== Bias Components ====================//
// 1) HTF trend
bool htfBull = request.security(syminfo.tickerid, biasTf, ta.ema(close, emaFast) > ta.ema(close, emaSlow), gaps=barmerge.gaps_off)
bool htfBear = request.security(syminfo.tickerid, biasTf, ta.ema(close, emaFast) < ta.ema(close, emaSlow), gaps=barmerge.gaps_off)
int scHTF = htfBull ? 1 : (htfBear ? -1 : 0)
string stHTF = htfBull ? "Bull" : (htfBear ? "Bear" : "—")
// 2) Cone Z
float z = 0.0
if anchorOK
int barsFromAnchor = math.max(1, bar_index - anchorBar)
float dyPerNow = (wickMode == "Wick (High/Low)") ? (mult * baseATR * 0.5) : (mult * baseATR)
float growNow = f_growth(math.min(barsFromAnchor, horizon))
float denom = dyPerNow * growNow
z := denom != 0 ? (close - anchorPrice) / denom : 0.0
int scZ = z > zThresh ? 1 : (z < -zThresh ? -1 : 0)
string stZ = anchorOK ? ("z=" + str.tostring(z, "#.00")) : "no anchor"
// 3) Rail-hug(0.5c〜1.0c帯を High/Low の“タッチ”で判定)
// ← 初期バー安全:参照本数を bar_index にクリップ
int effLookback = math.min(railLookback, bar_index) // bar_index 本目までは 0..bar_index しか参照不可
int upTouch = 0, dnTouch = 0
if anchorOK and effLookback > 0
for i = 0 to effLookback - 1
int barsFA = math.max(1, (bar_index - i) - anchorBar)
float growI = f_growth(math.min(barsFA, horizon))
float dyPerI = (wickMode == "Wick (High/Low)") ? (mult * baseATR * 0.5) : (mult * baseATR)
float up05I = anchorPrice + dyPerI * 0.5 * growI
float up10I = anchorPrice + dyPerI * 1.0 * growI
float dn05I = anchorPrice - dyPerI * 0.5 * growI
float dn10I = anchorPrice - dyPerI * 1.0 * growI
upTouch += (high >= up05I and low <= up10I) ? 1 : 0
dnTouch += (low <= dn05I and high >= dn10I) ? 1 : 0
float upRatio = effLookback > 0 ? (upTouch * 1.0) / effLookback : 0.0
float dnRatio = effLookback > 0 ? (dnTouch * 1.0) / effLookback : 0.0
bool railUp = upRatio > railPct
bool railDn = dnRatio > railPct
int scRail = railUp ? 1 : (railDn ? -1 : 0)
string stRail = anchorOK ? (railUp ? ("Up " + str.tostring(upRatio*100, "#") + "%") : (railDn ? ("Dn " + str.tostring(dnRatio*100, "#") + "%") : "—")) : "no anchor"
// 4) Stripe entry → 最初のフラクタル(帯を出た後確定も拾う)
var bool stripeIn = false
var int stripeIdxActive = na
var int stripeEnterBar = na
var int stripeLastStart = na
var int stripeLastEnd = na
var int stripeLastIdx = na
var string firstFrac = "" // "PL" or "PH" or ""
int nowIdx = f_stripe_index(bar_index)
bool nowInStripe = not na(nowIdx)
if nowInStripe and not stripeIn
stripeIn := true
stripeIdxActive := nowIdx
stripeEnterBar := bar_index
firstFrac := ""
else if not nowInStripe and stripeIn
stripeIn := false
stripeLastStart := stripeEnterBar
stripeLastEnd := bar_index - 1
stripeLastIdx := stripeIdxActive
if (isPH or isPL)
int pc = pivotCenter
int pcIdx = f_stripe_index(pc)
bool inActive = stripeIn and not na(stripeIdxActive) and pcIdx == stripeIdxActive and pc >= nz(stripeEnterBar, pc)
bool inClosed = (not stripeIn) and not na(stripeLastIdx) and pcIdx == stripeLastIdx and pc >= nz(stripeLastStart, pc) and pc <= nz(stripeLastEnd, pc)
if firstFrac == "" and (inActive or inClosed)
firstFrac := isPL ? "PL" : (isPH ? "PH" : "")
int scFrac = firstFrac == "PL" ? 1 : (firstFrac == "PH" ? -1 : 0)
string stFrac = firstFrac == "" ? "—" : ("1st " + firstFrac + (not stripeIn and not na(stripeLastIdx) ? " @m=" + str.tostring(stripeLastIdx) : (not na(stripeIdxActive) ? " @m=" + str.tostring(stripeIdxActive) : "")))
// 5) Structure break(簡易)
var float lastPH = na
var float lastPL = na
float ph = ta.pivothigh(high, 2, 2)
float pl = ta.pivotlow (low , 2, 2)
if not na(ph)
lastPH := ph
if not na(pl)
lastPL := pl
bool bullBreak = not na(lastPH) and close > lastPH
bool bearBreak = not na(lastPL) and close < lastPL
int scStruct = bullBreak ? 1 : (bearBreak ? -1 : 0)
string stStruct = bullBreak ? "Break ↑" : (bearBreak ? "Break ↓" : "—")
// ---- Total ----
int biasScore = scHTF + scZ + scRail + scFrac + scStruct
string biasDir = biasScore >= 3 ? "UP" : (biasScore <= -3 ? "DOWN" : "NEUTRAL")
//==================== Bias Panel (table, corner selectable) ====================//
var table tbBias = na
color colG = color.new(color.green, 10)
color colR = color.new(color.red, 10)
color colN = color.new(color.gray, 70)
f_col(v) =>
v > 0 ? colG : (v < 0 ? colR : colN)
if showBiasPanel and barstate.islast
if na(tbBias)
tbBias := table.new(f_pos(panelCorner), 3, 8, border_width=1)
table.cell(tbBias, 0, 0, "Bias Panel", text_color=color.white, bgcolor=color.new(color.blue, 20), text_halign=text.align_center)
table.merge_cells(tbBias, 0, 0, 2, 0)
table.cell(tbBias, 0, 1, "Card", text_halign=text.align_center)
table.cell(tbBias, 1, 1, "State", text_halign=text.align_center)
table.cell(tbBias, 2, 1, "±1", text_halign=text.align_center)
// rows
table.cell(tbBias, 0, 2, "HTF ("+biasTf+")")
table.cell(tbBias, 1, 2, stHTF)
table.cell(tbBias, 2, 2, str.tostring(scHTF), bgcolor=f_col(scHTF), text_halign=text.align_center)
table.cell(tbBias, 0, 3, "Cone z")
table.cell(tbBias, 1, 3, stZ)
table.cell(tbBias, 2, 3, str.tostring(scZ), bgcolor=f_col(scZ), text_halign=text.align_center)
table.cell(tbBias, 0, 4, "Rail 0.5c")
table.cell(tbBias, 1, 4, stRail)
table.cell(tbBias, 2, 4, str.tostring(scRail), bgcolor=f_col(scRail), text_halign=text.align_center)
table.cell(tbBias, 0, 5, "Fractal")
table.cell(tbBias, 1, 5, stFrac)
table.cell(tbBias, 2, 5, str.tostring(scFrac), bgcolor=f_col(scFrac), text_halign=text.align_center)
table.cell(tbBias, 0, 6, "Structure")
table.cell(tbBias, 1, 6, stStruct)
table.cell(tbBias, 2, 6, str.tostring(scStruct), bgcolor=f_col(scStruct), text_halign=text.align_center)
color totCol = biasScore>=3?colG:(biasScore<=-3?colR:colN)
table.cell(tbBias, 0, 7, "TOTAL", bgcolor=color.new(color.black, 0), text_color=color.white, text_halign=text.align_center)
table.cell(tbBias, 1, 7, biasDir, bgcolor=totCol, text_color=color.white, text_halign=text.align_center)
table.cell(tbBias, 2, 7, str.tostring(biasScore), bgcolor=totCol, text_color=color.white, text_halign=text.align_center)
//==================== Alerts ====================//
alertcondition(biasScore >= 3, "Bias UP", "Bias score >= +3")
alertcondition(biasScore <= -3, "Bias DOWN", "Bias score <= -3")
alertcondition(hitPH, "Fractal High in Convergence", "Pivot High detected inside √n convergence stripe.")
alertcondition(hitPL, "Fractal Low in Convergence", "Pivot Low detected inside √n convergence stripe.")
Premarket Hi/Lo + Prior Day O/C LevelsPremarket Hi/Lo + Prior Day O/C (today only) shows four clear reference levels for the current regular trading session: the Premarket High and Premarket Low (taken from a user-defined premarket window, 04:00–09:30 by default) and Yesterday’s 09:30 Open and 15:59 Close (sourced from the 1-minute feed for accuracy). The premarket levels “lock” at the opening bell so they don’t move for the rest of the day. All four lines are displayed only during today’s regular hours to keep the chart focused. Small right-edge labels and an optional top-right mini-table show the exact values at a glance.
This indicator is designed to give immediate context without technical jargon. The premarket high/low summarize where price traveled before the bell; the prior-day open/close summarize where the last session began and ended. Checking whether price is above or below these markers helps you quickly judge strength or weakness and anticipate where price may pause, bounce, or break. Typical uses include watching for a clean break and hold above Premarket High (often bullish), a break and hold below Premarket Low (often bearish), drift back toward Prior Day Close after a gap (a common “magnet”), and flips around Prior Day Open that can lead to continuation.
Setup: Turn on Extended Hours in TradingView so premarket bars are visible (Chart Settings → Symbol → Extended Hours). Apply the indicator to any intraday timeframe. In Inputs, you can change the premarket window to match your market, adjust colors and line widths, and toggle the floating labels and the mini-table. Times use the chart’s exchange time (for US stocks, Eastern Time).
Notes and limits: Lines show only for today’s session (default 09:30–16:00). The script looks at the previous calendar day for “prior day,” so values may be empty after weekends or holidays when markets were closed. If your instrument uses different regular hours or you trade futures/crypto, adjust the premarket session in Inputs and—if needed—edit the regular-hours window in code to match. If your data source does not include premarket, the premarket lines will be blank.
Best practice: The first 15–30 minutes after the open are where these levels have the most impact. Reactions are more meaningful when a line aligns with another tool you use (e.g., VWAP or your opening range). If price does not react clearly at a line, avoid forcing a trade.
Open Interest Suite [Aggregated] - By Leviathan - EXTENDEDBased on @LeviathanCapital Open Interest Suite - By Leviathan
Exchanges added -
Bybit
OKX
Original Script -
Modified - Pivot Points Standard with Daily H/L/CThis indicator plots Pivot Points Standard with six calculation methods (Traditional, Fibonacci, Woodie, Classic, DM, Camarilla) and flexible anchors (Auto/D/W/M/Q/Y and multi-year). You can restrict pivots to the current day/week/month, choose daily-based data (uses higher-timeframe OHLC; futures use settlement close) or intraday aggregation, and independently style pivots versus previous-period lines with solid/dashed/dotted types and custom widths. Per-level colors are provided (PP/R/S), with R4/R5 and S4/S5 off by default, plus optional labels showing prices positioned left or right. It also draws the previous Day/Week/Month High, Low, and Close across the current period using completed higher-timeframe values (lookahead_off with ), ensuring they always reflect the prior session/period. Rendering is optimized by limiting historical pivot sets and auto-cleaning old lines for smooth performance on any timeframe.
Margin Cost Calculator Screener - Taylor V1.2# Leverage Position Cost Calculator & Stop Lose Cost Screener #
Designed to provide traders with crucial insights into their leveraged positions directly on the TradingView chart.
Key Features:
> Dynamic Display: Choose to view only the estimated entry cost, or a comprehensive overview including potential losses at specific stop-loss levels, and a custom remark.
> Contract Size Input: Easily specify the contract size for your trades.
> Leverage Level Input: Set your desired leverage level, with helpful tooltips explaining the margin requirements for various leverage ratios (e.g., 25x, 10x, 5x) and an included fee estimate.
> Cost Calculation: Accurately calculates the estimated entry cost for your position based on the current market price, contract size, and leverage.
> Stop-Loss Projections: It projects potential losses for stop-loss orders set at 3% and 5% below the entry price, helping you manage risk effectively.
> Clear Table Visualization: All calculated data is presented in a clean, organized table anchored to the bottom-left of your chart, making it easy to reference at a glance.
> Symbol Identification: Automatically displays the short ticker symbol for the asset you are analyzing.
This tool is invaluable for traders who utilize leverage and need a quick, visual way to understand their financial exposure and potential outcomes before entering or managing a trade.
Fractal FU//@version=5
indicator("Fractal FU", shorttitle="Fractal FU", overlay=true, max_labels_count=500)
// ===== Inputs
showBull = input.bool(true, "Show aligned bullish balls")
showBear = input.bool(true, "Show aligned bearish balls")
bullCol = input.color(color.blue, "Bull ball color")
bearCol = input.color(color.red, "Bear ball color")
ballSize = input.string("small", "Ball size", options= )
gateTo15 = input.bool(true, "Gate to 15m close (clean, fewer signals)")
showDebug = input.bool(false, "Show per-timeframe debug dots")
// ===== Helpers
// one-liner you asked for:
f_sig(res) => request.security(syminfo.tickerid, res, (high > high and low < low ) ? (close > open ? 1 : close < open ? -1 : 0) : 0, barmerge.gaps_off, barmerge.lookahead_off)
// Pull confirmed signals from each TF
sig1 = f_sig("1")
sig5 = f_sig("5")
sig10 = f_sig("10")
sig15 = f_sig("15")
// Alignment (all four agree)
bullAll = showBull and (sig1 == 1 and sig5 == 1 and sig10 == 1 and sig15 == 1)
bearAll = showBear and (sig1 == -1 and sig5 == -1 and sig10 == -1 and sig15 == -1)
// Emit control
emit15 = ta.change(time("15"))
emit = gateTo15 ? emit15 : barstate.isconfirmed // if not gated, show wherever alignment is true
// ===== Debug (tiny dots at bar to verify which TFs are firing)
plotshape(showDebug and sig1 == 1, title="1m bull", style=shape.circle, size=size.tiny, color=color.new(color.blue, 0), location=location.bottom)
plotshape(showDebug and sig5 == 1, title="5m bull", style=shape.circle, size=size.tiny, color=color.new(color.aqua, 0), location=location.bottom)
plotshape(showDebug and sig10 == 1, title="10m bull", style=shape.circle, size=size.tiny, color=color.new(color.teal, 0), location=location.bottom)
plotshape(showDebug and sig15 == 1, title="15m bull", style=shape.circle, size=size.tiny, color=color.new(color.navy, 0), location=location.bottom)
plotshape(showDebug and sig1 == -1, title="1m bear", style=shape.circle, size=size.tiny, color=color.new(color.red, 0), location=location.top)
plotshape(showDebug and sig5 == -1, title="5m bear", style=shape.circle, size=size.tiny, color=color.new(color.orange, 0), location=location.top)
plotshape(showDebug and sig10 == -1, title="10m bear", style=shape.circle, size=size.tiny, color=color.new(color.maroon, 0), location=location.top)
plotshape(showDebug and sig15 == -1, title="15m bear", style=shape.circle, size=size.tiny, color=color.new(color.purple, 0), location=location.top)
// ===== Markers (size must be const → gate each size)
off = gateTo15 ? -1 : 0 // when gated, place on the just-closed 15m bar
// ── Marker offset control stays the same ──
off2 = gateTo15 ? -1 : 0
// ── Bullish balls exactly at LOW ──
plot(bullAll and emit and ballSize == "tiny" ? low : na, title="Bullish tiny", style=plot.style_circles, color=bullCol, linewidth=1, offset=off2)
plot(bullAll and emit and ballSize == "small" ? low : na, title="Bullish small", style=plot.style_circles, color=bullCol, linewidth=2, offset=off2)
plot(bullAll and emit and ballSize == "normal" ? low : na, title="Bullish normal", style=plot.style_circles, color=bullCol, linewidth=3, offset=off2)
plot(bullAll and emit and ballSize == "large" ? low : na, title="Bullish large", style=plot.style_circles, color=bullCol, linewidth=4, offset=off2)
plot(bullAll and emit and ballSize == "huge" ? low : na, title="Bullish huge", style=plot.style_circles, color=bullCol, linewidth=5, offset=off2)
// ── Bearish balls exactly at HIGH ──
plot(bearAll and emit and ballSize == "tiny" ? high : na, title="Bearish tiny", style=plot.style_circles, color=bearCol, linewidth=1, offset=off2)
plot(bearAll and emit and ballSize == "small" ? high : na, title="Bearish small", style=plot.style_circles, color=bearCol, linewidth=2, offset=off2)
plot(bearAll and emit and ballSize == "normal" ? high : na, title="Bearish normal", style=plot.style_circles, color=bearCol, linewidth=3, offset=off2)
plot(bearAll and emit and ballSize == "large" ? high : na, title="Bearish large", style=plot.style_circles, color=bearCol, linewidth=4, offset=off2)
plot(bearAll and emit and ballSize == "huge" ? high : na, title="Bearish huge", style=plot.style_circles, color=bearCol, linewidth=5, offset=off2)
// Alerts
alertcondition(bullAll and emit, title="Aligned Bullish Outside (1/5/10/15)", message="Aligned bullish outside bar on 1/5/10/15m")
alertcondition(bearAll and emit, title="Aligned Bearish Outside (1/5/10/15)", message="Aligned bearish outside bar on 1/5/10/15m")
alertcondition((bullAll or bearAll) and emit, title="Aligned Any (1/5/10/15)", message="Aligned outside bar (bull or bear) on 1/5/10/15m")
مؤشر الدعم/المقاومة + أهداف + ملصقات//@version=5
indicator("مؤشر الدعم/المقاومة + أهداف + ملصقات", overlay=true)
// === الإعدادات ===
length = input.int(20, "عدد الشموع لحساب الدعم/المقاومة")
numTargets = input.int(3, "عدد الأهداف", minval=1, maxval=5)
// === حساب الدعم والمقاومة ===
resistance = ta.highest(high, length)
support = ta.lowest(low, length)
dist = resistance - support
// === خطوط الدعم والمقاومة ===
var line resLine = na
var line supLine = na
var label resLbl = na
var label supLbl = na
if barstate.isfirst
resLine := line.new(bar_index, resistance, bar_index+1, resistance, extend=extend.right, color=color.yellow, width=2)
supLine := line.new(bar_index, support, bar_index+1, support, extend=extend.right, color=color.yellow, width=2)
resLbl := label.new(bar_index, resistance, "مقاومة / دخول كول", style=label.style_label_down, color=color.green, textcolor=color.white)
supLbl := label.new(bar_index, support, "دعم / دخول بوت", style=label.style_label_up, color=color.red, textcolor=color.white)
else
line.set_xy1(resLine, bar_index, resistance)
line.set_xy2(resLine, bar_index+1, resistance)
line.set_xy1(supLine, bar_index, support)
line.set_xy2(supLine, bar_index+1, support)
label.set_x(resLbl, bar_index)
label.set_y(resLbl, resistance)
label.set_text(resLbl, "مقاومة / دخول كول " + str.tostring(resistance, format.mintick))
label.set_x(supLbl, bar_index)
label.set_y(supLbl, support)
label.set_text(supLbl, "دعم / دخول بوت " + str.tostring(support, format.mintick))
// === أهداف فوق المقاومة (كول) ===
var line longTargets = array.new_line()
var label longLabels = array.new_label()
if barstate.isfirst
for i = 1 to numTargets
tLine = line.new(bar_index, na, bar_index+1, na, extend=extend.right, color=color.green)
tLbl = label.new(bar_index, na, "", style=label.style_label_left, color=color.green, textcolor=color.white)
array.push(longTargets, tLine)
array.push(longLabels, tLbl)
for i = 0 to array.size(longTargets)-1
t = resistance + dist * (i+1)
l = array.get(longTargets, i)
lb = array.get(longLabels, i)
line.set_xy1(l, bar_index, t)
line.set_xy2(l, bar_index+1, t)
label.set_x(lb, bar_index)
label.set_y(lb, t)
label.set_text(lb, "هدف " + str.tostring(i+1) + " " + str.tostring(t, format.mintick))
// === أهداف تحت الدعم (بوت) ===
var line shortTargets = array.new_line()
var label shortLabels = array.new_label()
if barstate.isfirst
for i = 1 to numTargets
tLine = line.new(bar_index, na, bar_index+1, na, extend=extend.right, color=color.red)
tLbl = label.new(bar_index, na, "", style=label.style_label_left, color=color.red, textcolor=color.white)
array.push(shortTargets, tLine)
array.push(shortLabels, tLbl)
for i = 0 to array.size(shortTargets)-1
t = support - dist * (i+1)
l = array.get(shortTargets, i)
lb = array.get(shortLabels, i)
line.set_xy1(l, bar_index, t)
line.set_xy2(l, bar_index+1, t)
label.set_x(lb, bar_index)
label.set_y(lb, t)
label.set_text(lb, "هدف " + str.tostring(i+1) + " " + str.tostring(t, format.mintick))
Profit booking Indicatorell signal when RSI < 40, MACD crosses zero or signal line downward in negative zone, close below 50 EMA, candle bearish.
Strong sell signal confirmed on 5-minute higher timeframe with same conditions.
Square off half/full signals as defined.
Target lines drawn bold based on previous swing lows and extended as described.
Blue candle color when RSI below 30.
One sell and one full square off per cycle, blocking repeated sells until full square off.
Volume SMA with Multiple Overlays in Separate PaneVolume plays a pivotal role in our trading. Stock market price movements are randam until and unless same is supported by volume. Voulme is the only leding indicator and can track instituitional activity.
This indicator analyses volume to indentify unsual volumes in the market. it draws there sma lines of last 1200 barrs as follows:
1. sma of 1200 bars represented by blue
2. sma of 1200 bars multiplied by 15, represented by red
3. sma of 1200 bars multiplied by 20, represented by black.
The clor codes and line width can be modified.
VPT-style Close-to-Close Indicator📈Cumulative momentum (close-to-close × rel. volume) | MA & Donchian optional | ⚡ Alerts
Key Features:
- Tracks cumulative price momentum using close-to-close changes weighted by relative volume.
- Optional smoothed line (SMA/EMA) to identify trend direction.
- Optional Donchian channels to detect potential breakouts and breakdowns.
- Includes alerts for:
- Moving average crosses (bullish/bearish)
- Local maxima/minima in cumulative momentum
- Donchian upper/lower channel breakouts
- Customizable inputs: smoothing length, channel lengths, scaling factor, and visibility toggles.
- Visual cues: line colors indicate momentum direction (green = up, red = down).
- Use Case: Quickly spot momentum shifts, trend direction, and breakout opportunities with clear alerts and visual cues.
ROAD200K Wickrange BarLaa umnuh laanii wick dotor haagdval
wick nii range ni uuruu sonirholiin bus bolj huvirdag