Daily ATR SL/TP Labels on ChartATR-Based Stop Loss & Take Profit Calculator
This script calculates 20% of the Average True Range (ATR) to determine optimal Stop Loss and Take Profit levels. Designed to assist traders in setting precise risk parameters when placing Buy/Sell orders based on daily market volatility.
Key Features:
Computes 20% of ATR value for proportional risk management
Provides dynamic SL/TP levels aligned to current market conditions
Optimised for Daily timeframe analysis to capture full trading day range
Recommended Usage:
Apply on Daily (1D) timeframe for most accurate results, as this captures the complete intraday price movement and provides reliable volatility measurements for position sizing and risk management decisions.
基本面分析
Hourly High Low Short LinesDraws short horizontal lines at the previous hour’s high and low, aligned perfectly with the candle’s top and bottom.
It’s concise, clear, and fits well for the public script description box.
Session High and Lowmarks out previous NY session high/low, asian and london session high/low and updates automatically. Perfect indicator for overnight liquidity.
4/8/15 EMA + Classic & Camarilla PivotsEssentially this is what you can get on TOS but everything included in one chart.
EMA 9/15/45 + MACD Confirm + SupertrendThis indicator uses EMA 9, 15, 45 days along with combination of MACD and Supertrend
PE Fair ValueIn short, it’s an automated fair value estimator based on the price-to-earnings model, with full manual control if TradingView’s fundamental data is missing.
Summary:
1. Lets the user choose the EPS source – either automatically from TradingView fundamentals (EPS TTM) or a manual value.
2. Attempts to fetch the stock’s P/E ratio (TTM) automatically; if unavailable, it uses a manual fallback P/E.
3. Calculates:
Actual P/E = current price ÷ EPS
Fair Value = EPS × chosen (auto/manual) P/E
Percentage difference between market price and fair value
4. Plots the fair-value line on the chart for visual comparison.
5. Displays a table in the top-right corner showing:
EPS used
Target P/E
Actual P/E
Fair value
Current price
Difference vs fair value (colored green or red)
6. Creates alerts when the stock is trading above or below the calculated fair value.
7. Also plots the current closing price for reference.
X62 Stock Rating Tool股票评分系统
功能概述
这是一个自定义的股票综合评分系统,允许用户从基本面和技术面两个维度对股票进行评分。系统支持灵活的权重配置和项目自定义,并可根据需要选择显示不同类型的评分。
主要特性
· 分离显示选项 - 可选择单独显示基本面、技术面或综合评分
· 可自定义项目 - 6个基本面项目和6个技术面项目的标题均可自定义
· 权重评分系统 - 使用1-3级重要性权重和1-5分评分标准
· 可视化展示 - 在图表上显示评分趋势线和实时评分表格
· 智能评级 - 根据得分自动给出优秀、良好、一般、较差的评级建议
使用说明
1. 在"显示选项"中选择要查看的评分类型
2. 在"基本面设置"和"技术面设置"中自定义项目名称
3. 为每个项目设置1-5分的评分和1-3级的权重
4. 系统自动计算加权平均分并显示在图表和表格中
---
Stock Scoring System - Separable Display
Overview
This is a custom stock comprehensive scoring system that allows users to evaluate stocks from both fundamental and technical perspectives. The system supports flexible weight configuration and item customization, with options to display different types of scores as needed.
Key Features
· Separable Display Options - Choose to display fundamental, technical, or overall scores individually
· Customizable Items - All 6 fundamental items and 6 technical items can be renamed
· Weighted Scoring System - Uses 1-3 level importance weights and 1-5 point scoring scale
· Visual Presentation - Displays score trend lines on chart and real-time score table
· Smart Rating - Automatically provides Excellent, Good, Average, or Poor ratings based on scores
Usage Instructions
1. Select the score types to view in "Display Options"
2. Customize item names in "Fundamental Settings" and "Technical Settings"
3. Set 1-5 point scores and 1-3 level weights for each item
4. System automatically calculates weighted average scores and displays them on chart and table
---
核心参数对照 Core Parameters
基本面评分 Fundamental Score 基于财务和业务指标的评分
技术面评分 Technical Score 基于价格和交易量指标的评分
综合评分 Overall Score 基本面和技术面的加权平均分
权重 Weight 项目重要性级别 (1-3级)
评分 Score 项目表现评分 (1-5分)
优秀 Excellent 得分 ≥ 80
良好 Good 得分 60-79
一般 Average 得分 40-59
较差 Poor 得分 < 40
---
应用场景 Application Scenarios
· 股票筛选 - 快速评估多只股票的综合质量
· 投资决策 - 为买入/持有/卖出决策提供量化依据
· 组合管理 - 监控持仓股票的评分变化趋势
· 研究分析 - 自定义评分标准以适应不同的投资策略
· Stock Screening - Quickly evaluate the comprehensive quality of multiple stocks
· Investment Decisions - Provide quantitative basis for buy/hold/sell decisions
· Portfolio Management - Monitor score trends of held stocks
· Research Analysis - Customize scoring criteria to adapt to different investment strategies
EPS Trendline (Fundamentals Insight by Mazhar Karimi)Overview
This indicator visualizes a company’s Earnings Per Share (EPS) data directly on the chart—pulled from TradingView’s fundamental database—and applies a dynamic linear regression trendline to highlight the long-term direction of earnings growth or decline.
It’s designed to help investors and quantitative traders quickly see how the company’s profitability (EPS) has evolved over time and whether it’s trending upward (growth), flat (stagnant), or downward (decline).
How it Works
Uses request.financial() to fetch EPS data (Diluted or Basic).
You can select whether to use TTM (Trailing Twelve Months), FQ (Fiscal Quarter), or FY (Fiscal Year) data.
The script fits a regression line (using ta.linreg) over a configurable window to visualize the underlying EPS trend.
Updates automatically when new financial data is released.
Inputs
EPS Period: Choose between FQ / FY / TTM
Use Diluted EPS: Toggle to compare Diluted vs. Basic EPS
Regression Window: Adjust how many bars are used to fit the trendline
Interpretation Tips
A rising trendline indicates earnings momentum and potential investor confidence.
A flat or declining trendline may warn of profitability slowdowns.
Combine with price action or valuation ratios (like P/E) for deeper analysis.
Works best on stocks or ETFs with fundamental data (not available for crypto or FX).
Suggestions / Use Cases
Pair with Price/Earnings ratio indicators to evaluate valuation vs. fundamentals.
Use in conjunction with earnings release events for context.
Ideal for long-term investors, swing traders, or fundamental quants tracking financial health trends.
Future Enhancements (Planned Ideas)
🔹 Option to display multiple regression lines (short-term and long-term)
🔹 Support for comparing multiple tickers’ EPS in the same pane
🔹 Integration with Net Income, Revenue, or Free Cash Flow trends
🔹 Add a “Rate of Change” signal for momentum-based EPS analysis
Performance (Improved + Position & Size) This indicator displays a performance heat-table on the chart, showing percentage returns for multiple timeframes such as 1W, 1M, 3M, 6M, 9M, 1Y and To-Date periods (MTD / QTD / YTD style).
The goal is to quickly visualize how the current symbol has performed across different timeframes in a compact and readable format.
Direction LineThis is a simplified indicator for the TradingView platform, intended for beginner traders. It draws a line that follows the candle's closing price, coloring it green on an uptick (close > open) and red on a downtick. The indicator helps visualize the market impulse direction based on the basic concept of pivot levels, without unnecessary elements such as labels, alerts, or additional levels. Ideal for those who want to quickly understand the trend without data overload.
Trend Strength Benchmark (TSB)This indicator helps you gauge trend strength by combining multi-timeframe EMAs, VWAP, and optional ADX filters. It tracks the EMA high, low, and close from your chosen primary timeframe, and can also pull corresponding levels from higher timeframes for added confirmation.
The shaded EMA band on the chart gives you a quick visual of the trend zone. VWAP from the same timeframe adds an anchor point to judge momentum.
For signals, the script fires a BUY when the candle’s low stays above all selected benchmark lines, and a SELL when the candle’s high stays below them. Only one type of signal is allowed at a time, preventing back-to-back buys or sells and keeping the flow clean. An optional ADX filter lets you allow signals only when the trend has enough strength.
Everything is customizable — EMA length, timeframes, signal direction, and ADX settings — making it a flexible tool for momentum and trend-based strategies.
Earnings Lines Vertical – All Grey This provides a vertical grey line for prior earnings dates and also for any confirmed (not estimated) future earnings date
EPS Estimate Profile [SS]This is the EPS Estimate Profile indicator.
What it does
This indicator
Collects all EPS estimates over the course of a lookback and BINS them (sorts them into 10 equal sized categories).
Analyzes the returns from earnings releases based on the EPS estimate and the reaction.
Calculates the number of bullish vs bearish responses that transpired based on the EPS estimate profile.
Calculates the expected Open to High and Open to Low ATR based on the EPS estimate using regression.
Toggle to actual EPS release to compare once earnings results are released.
How to Use it
This indicator can be used to gain insight into whether an earnings release will be received bullishly or bearishly based on the company's EPS estimate.
The indicator allows you to see all historic estimates and how the market generally responded to those estimates, as well as a breakdown of how many times estimates in those ranges produced a bullish response or a bearish response to earnings.
Examples
Let's look at some examples:
Here is MSFT. MSFT's last EPS estimate was 3.672.
If we consult the table, we can see the average return associated with this estimate range is -4%.
Now let's flip to the Daily timeframe and take a look:
MSFT ended the day red and continued to sell into the coming days.
Let's look at another example:
MCDs. Last earnings estimate was 3.327, putting it at the top of the range with an average positive return of 4%.
Let's look on the daily:
We can see that the earnings had a huge, bullish effect on MCD, despite them coming in below their estimates.
If we toggle the indicator to "Actual" EPS release, to see the profile of Actual earnings releases vs response, we get this:
Since MCD under-performed, they were still at the top of the profile; but, we can see that the expected returns are more muted now, though still positive. And indeed, the reaction was still positive.
Distinguishing % Bullish/Bearish to Avg Returns
You will see the profile table displays both the average returns and the percent of bullish/bearish responses. In some cases, you will see that, despite a negative return, the profile reveals more bullish reactions than bearish.
What does this mean?
It means, despite there being more bullish responses, when bearish responses happen they tend to be more severe and profound, vs bullish responses likely are muted.
This can alert you to potential downside risk and help you manage risk accordingly should you elect to trade the earnings release.
ATR Prediction
You will notice in the bottom right corner of the screen a secondary table that lists the predicted open to high ATR and open to low ATR.
This is done using RAW EPS estimates (or raw ACTUAL estimates depending on which you select) and performing a regression to determine the expected ATR.
This is only for reference, the analysis should focus around the historic profile of return estimates and actual return values.
IMPORTANT NOTE: You MUST be on the Monthly timeframe to use this. Otherwise, you will get an error. If, on certain tickers with a huge history, such as MSFT and XOM or OXY, you get an error, you can simply reduce the lookback length to 80 and this will resolve the issue.
Conclusion
And that's the indicator!
A blend of some light math and fundamentals! A real joy honestly.
Hope you enjoy it!
Ben's BTC Macro Fair Value OscillatorBen's BTC Macro Fair Value Oscillator
Overview
The **BTC Macro Fair Value Oscillator** is a non-crypto fair value framework that uses macro asset relationships (equities, dollar, gold) to estimate Bitcoin's "macro-driven fair value" and identify mean-reversion opportunities.
"Is BTC cheap or expensive right now?" on the 4 Hour Timeframe ONLY
### Key Features
✅ **Macro-driven**: Uses QQQ, DXY, XAUUSD instead of on-chain or crypto metrics
✅ **Dynamic weighting**: Assets weighted by rolling correlation strength
✅ **Mean-reversion signals**: Identifies when BTC is cheap/expensive vs macro
✅ **Validated parameters**: Optimized through 5-year backtest (Sharpe 6.7-9.9)
✅ **Visual transparency**: Live correlation panel, fair value bands, statistics
✅ **Non-repainting**: All calculations use confirmed historical data only
### What This Indicator Does
- Builds a **synthetic macro composite** from traditional assets
- Runs a **rolling regression** to predict BTC price from macro
- Calculates **deviation z-score** (how far BTC is from macro fair value)
- Generates **entry signals** when BTC is extremely cheap vs macro (dev < -2)
- Generates **exit signals** when BTC returns to fair value (dev > 0)
### What This Indicator Is NOT
❌ Not a high-frequency trading system (sparse signals by design)
❌ Not optimized for absolute returns (optimized for Sharpe ratio)
❌ Not suitable as standalone trading system (best as overlay/confirmation)
❌ Not predictive of short-term price movements (mean-reversion timeframe: days to weeks)
---
## Core Concept
### The Premise
Bitcoin doesn't trade in a vacuum. It's influenced by:
- **Risk appetite** (equities: QQQ, SPX)
- **Dollar strength** (DXY - inverse to risk assets)
- **Safe haven flows** (Gold: XAUUSD)
When macro conditions are "good for BTC" (risk-on, weak dollar, strong equities), BTC should trade higher. When macro conditions turn against it, BTC should trade lower.
### The Innovation
Instead of looking at BTC in isolation, this indicator:
1. **Measures how strongly** BTC currently correlates with each macro asset
2. **Builds a weighted composite** of those macro returns (the "D" driver)
3. **Regresses BTC price on D** to estimate "macro fair value"
4. **Tracks the deviation** between actual price and fair value
5. **Signals mean reversion** when deviation becomes extreme
### The Edge
The validated edge comes from:
- **Extreme deviations predict future returns** (dev < -2 → +1.67% over 12 bars)
- **Monotonic relationship** (more negative dev → higher forward returns)
- **Works out-of-sample** (test Sharpe +83-87% better than training)
- **Low correlation with buy & hold** (provides diversification value)
---
## Methodology
### Step 1: Macro Composite Driver D(t)
The indicator builds a weighted composite of macro asset returns:
**Process:**
1. Calculate **log returns** for BTC and each macro reference (QQQ, DXY, XAUUSD)
2. Compute **rolling correlation** between BTC and each reference over `corrLen` bars
3. **Weight each asset** by `|correlation|` if above `minCorrAbs` threshold, else 0
4. **Sign-adjust** weights (+1 for positive corr, -1 for negative) to handle inverse relationships
5. **Z-score normalize** each reference's returns over `fvWindow`
6. **Composite D(t)** = weighted sum of sign-adjusted z-scores
**Formula:**
```
For each reference i:
corr_i = correlation(BTC_returns, ref_i_returns, corrLen)
weight_i = |corr_i| if |corr_i| >= minCorrAbs else 0
sign_i = +1 if corr_i >= 0 else -1
z_i = (ref_i_returns - mean) / std
contrib_i = sign_i * z_i * weight_i
D(t) = sum(contrib_i) / sum(weight_i)
```
**Key Insight:** D(t) represents "how good macro conditions are for BTC right now" in a normalized, correlation-weighted way.
---
### Step 2: Fair Value Regression
Uses rolling linear regression to predict BTC price from D(t):
**Model:**
```
BTC_price(t) = α + β * D(t)
```
**Calculation (Pine Script approach):**
```
corr_CD = correlation(BTC_price, D, fvWindow)
sd_price = stdev(BTC_price, fvWindow)
sd_D = stdev(D, fvWindow)
cov = corr_CD * sd_price * sd_D
var_D = variance(D, fvWindow)
β = cov / var_D
α = mean(BTC_price) - β * mean(D)
fair_value(t) = α + β * D(t)
```
**Result:** A time-varying "macro fair value" line that adapts as correlations change.
---
### Step 3: Deviation Oscillator
Measures how far BTC price has deviated from fair value:
**Calculation:**
```
residual(t) = BTC_price(t) - fair_value(t)
residual_std = stdev(residual, normWindow)
deviation(t) = residual(t) / residual_std
```
**Interpretation:**
- `dev = 0` → BTC at fair value
- `dev = -2` → BTC is 2 standard deviations **cheap** vs macro
- `dev = +2` → BTC is 2 standard deviations **rich** vs macro
---
### Step 4: Signal Generation
**Long Entry:** `dev` crosses below `-2.0` (BTC extremely cheap vs macro)
**Long Exit:** `dev` crosses above `0.0` (BTC returns to fair value)
**No shorting** in default config (risk management choice - crypto volatility)
---
## How It Works
### Visual Components
#### 1. Price Chart (Main Panel)
**Fair Value Line (Orange):**
- The estimated "macro-driven fair value" for BTC
- Calculated from rolling regression on macro composite
**Fair Value Bands:**
- **±1σ** (light): 68% confidence zone
- **±2σ** (medium): 95% confidence zone
- **±3σ** (dark, dots): 99.7% confidence zone
**Entry/Exit Markers:**
- **Green "LONG" label** below bar: Entry signal (dev < -2)
- **Red "EXIT" label** above bar: Exit signal (dev > 0)
#### 2. Deviation Oscillator (Separate Pane)
**Line plot:**
- Shows current deviation z-score
- **Green** when dev < -2 (cheap)
- **Red** when dev > +2 (rich)
- **Gray** when neutral
**Histogram:**
- Visual representation of deviation magnitude
- Green bars = negative deviation (cheap)
- Red bars = positive deviation (rich)
**Threshold lines:**
- **Green dashed at -2.0**: Entry threshold
- **Red dashed at 0.0**: Exit threshold
- **Gray solid at 0**: Fair value line
#### 3. Correlation Panel (Top-Right)
Shows live correlation and weighting for each macro asset:
| Asset | Corr | Weight |
|-------|------|--------|
| QQQ | +0.45 | 0.45 |
| DXY | -0.32 | 0.32 |
| XAUUSD | +0.15 | 0.00 |
| Avg \|Corr\| | 0.31 | 0.77 |
**Reading:**
- **Corr**: Current rolling correlation with BTC (-1 to +1)
- **Weight**: How much this asset contributes to fair value (0 = excluded)
- **Avg |Corr|**: Average correlation strength (should be > 0.2 for reliable signals)
**Colors:**
- Green/Red corr = positive/negative correlation
- White weight = asset included, Gray = excluded (below minCorrAbs)
#### 4. Statistics Label (Bottom-Right)
```
━━━ BTC Macro FV ━━━
Dev: -2.34
Price: $103,192
FV: $110,500
Status: CHEAP ⬇
β: 103.52
```
**Fields:**
- **Dev**: Current deviation z-score
- **Price**: Current BTC close price
- **FV**: Current macro fair value estimate
- **Status**: CHEAP (< -2), RICH (> +2), or FAIR
- **β**: Current regression beta (sensitivity to macro)
---
## Installation & Setup
### TradingView Setup
1. Open TradingView and navigate to any **BTC chart** (BTCUSD, BTCUSDT, etc.)
2. Open **Pine Editor** (bottom panel)
3. Click **"+ New"** → **"Blank indicator"**
4. **Delete** all default code
5. **Copy** the entire Pine Script from `GHPT_optimized.pine`
6. **Paste** into the editor
7. Click **"Save"** and name it "BTC Macro Fair Value Oscillator"
8. Click **"Add to Chart"**
### Recommended Chart Settings
**Timeframe:** 4h (validated timeframe)
**Chart Type:** Candlestick or Heikin Ashi
**Overlay:** Yes (indicator plots on price chart + separate pane)
**Alternative Timeframes:**
- Daily: Works but slower signals
- 1h-2h: May work but not validated
- < 1h: Not recommended (too noisy)
### Symbol Requirements
**Primary:** BTC/USD or BTC/USDT on any exchange
**Macro References:** Automatically fetched
- QQQ (Nasdaq 100 ETF)
- DXY (US Dollar Index)
- XAUUSD (Gold spot)
**Data Requirements:**
- At least **90 bars** of history (warmup period)
- Premium TradingView recommended for full historical data
---
## Reading the Indicator
### Identifying Signals
#### Strong Long Signal (High Conviction)
- ✅ Deviation < -2.0 (extreme undervaluation)
- ✅ Avg |Corr| > 0.3 (strong macro relationships)
- ✅ Price touching or below -2σ band
- ✅ "LONG" label appears below bar
**Interpretation:** BTC is extremely cheap relative to macro conditions. Historical data shows +1.67% average return over next 12 bars (48 hours at 4h timeframe).
#### Moderate Long Signal (Lower Conviction)
- ⚠️ Deviation between -1.5 and -2.0
- ⚠️ Avg |Corr| between 0.2-0.3
- ⚠️ Price approaching -2σ band
**Interpretation:** BTC is cheap but not extreme. Consider as confirmation for other signals.
#### Exit Signal
- 🔴 Deviation crosses above 0 (returns to fair value)
- 🔴 "EXIT" label appears above bar
**Interpretation:** Mean reversion complete. Close long positions.
#### Strong Short/Avoid Signal
- 🔴 Deviation > +2.0 (extreme overvaluation)
- 🔴 Avg |Corr| > 0.3
- 🔴 Price touching or above +2σ band
**Interpretation:** BTC is expensive vs macro. Historical data shows -1.79% average return over next 12 bars. Consider exiting longs or reducing exposure.
### Regime Detection
**Strong Regime (Reliable Signals):**
- Avg |Corr| > 0.3
- Multiple assets weighted > 0
- Fair value line tracking price reasonably well
**Weak Regime (Unreliable Signals):**
- Avg |Corr| < 0.2
- Most weights = 0 (grayed out)
- Fair value line diverging wildly from price
- **Action:** Ignore signals until correlations strengthen
A+ Trade Checklist (Bullish + Bearish Mode + Alerts) – Fixed v61. Trend direction (EMA alignment)
2. Relative Strength vs SPY (is your stock stronger than the market?)
3. Volume confirmation
4. RSI strength
5. Candle momentum
Seasonality Range Marker For better Seasonality Analysation. To see Seasionality patterns in the chart.
EMAs 4/8/15 + Classic Pivots (clean v5)Here is a clean code for people to use, hope it works well for you. 4/8/15 are key indicators. You first got to be on the right side or upside of the 15 and then you need to see a detachment from the 4/8. You will see that is when upward movement happens. for shorting, you need to be below the 4/8 and usually on the under of 15.
Stablecoin to BTC Market Cap RatioThis indicator calculates the ratio of the combined market capitalization of USDT and USDC stablecoins to the market capitalization of BTC. Data is updated daily from TradingView's CRYPTOCAP sources. It is displayed as a line in a separate panel, allowing analysis of stablecoin liquidity dynamics relative to BTC.
How to Use
Add the indicator to any asset chart in TradingView. It is useful for assessing the potential buying power of stablecoins in the cryptocurrency market. High ratio values may signal accumulation of liquidity in stablecoins, often preceding growth in BTC or altcoins (bullish signal). Low values indicate a decrease in the role of stablecoins, which may be bearish. It is recommended to combine with other indicators, such as RSI or volumes, to confirm trends.
Adjustable ORB Indicator [V.4]A customizable opening range indicator.
Adjust the following using this indicator;
~ Sessions
~ OR time settings
~ Colors
~ And more to come.
Adjustable ORB Indicator [V.4]A customizable opening range indicator.
Adjust the following using this indicator;
~ Sessions
~ OR time settings
~ Colors
~ And more to come.
WM & HS Radar (Block-Free)The W/M + H&S Radar automatically scans for double-top/double-bottom (M and W) and head-and-shoulders style reversal structures across any timeframe.
How it works:
Detects repeating pivot formations that resemble W (double bottom) or M (double top) structures.
Draws neckline levels for each pattern and highlights potential breakout points.
Confirms breakout validity when price closes beyond the neckline (optionally requiring a 1.2× volume surge).
Generates alerts when a valid W Long or M Short trigger occurs.
Best used on: 15m, 1h, or 4h charts to identify medium-term reversal entries.
Recommended companion: Orion Daily HL + Volume indicator for higher-timeframe context.
Alert Options:
“W Long Trigger” → Bullish reversal breakout.
“M Short Trigger” → Bearish reversal breakout.
Usage Tip:
Combine with your support/resistance zones and ATR-based stop sizing from your Money Momentum Tracker to validate A-setups only.






















