BTC Event Contract Signal Indicator# BTC Event Contract Signal Indicator
**Version**: V1.0
**Last Updated**: December 21, 2024
**Author**: OxJohannWu
**Type**: Pine Script v6 Indicator (Overlay)
**Timeframes**: Optimized for 1-minute BTC data, supports all timeframes
## 📋 Overview
The BTC Event Contract Signal Indicator is a sophisticated technical analysis tool designed specifically for Bitcoin event contracts (binary options). This indicator provides real-time buy/sell signals with comprehensive contract tracking, performance statistics, and settlement monitoring - all displayed in Beijing time (UTC+8).
### Key Features
- **Smart Signal Generation**: Multi-layered technical analysis with adaptive filtering
- **Real-time Contract Tracking**: Monitor active contracts with automatic settlement detection
- **Performance Analytics**: Detailed win/loss statistics with daily breakdowns
- **Multi-timeframe Optimization**: Auto-adjusts parameters based on chart timeframe
- **Beijing Time Display**: All timestamps converted to Beijing timezone
- **Alert System**: TradingView alerts for all signal types
## 🎯 Trading Philosophy
This indicator combines correlation analysis, MACD momentum, and StochRSI oscillator signals to identify high-probability entry points for Bitcoin event contracts. The system prioritizes quality over quantity, using intelligent filtering to minimize false signals and maximize win rates.
## ⚙️ Parameter Configuration
### 📊 Technical Indicator Settings
- **Auto Timeframe Optimization**: Automatically selects optimal parameters based on current timeframe
- **MACD Settings**: Fast (8), Slow (21), Signal (5) - optimized for 1-minute BTC data
- **RSI Period**: 6 periods for responsive momentum detection
- **Stochastic Settings**: K smoothing (2), Period (6) for precise overbought/oversold levels
### 🔗 Correlation Analysis
- **Short-term Correlation**: 3-period correlation for immediate trend changes
- **Long-term Correlation**: 25-period correlation for broader market context
- **Correlation Slope**: Tracks momentum changes in price correlation
### 🎯 Smart Signal Optimization
Three intelligent modes to suit different trading styles:
#### Smart Balance Mode (Default)
- **Target Win Rate**: 80%+
- **Expected Signals**: 8-15 per day
- **Filtering**: 6-7 technical conditions
- **Best For**: Balanced trading with consistent profits
#### High Frequency Mode
- **Target Win Rate**: 75%+
- **Expected Signals**: 15-25 per day
- **Filtering**: 4 core technical conditions
- **Best For**: Active traders seeking more opportunities
#### Premium Quality Mode
- **Target Win Rate**: 85%+
- **Expected Signals**: 5-10 per day
- **Filtering**: 8 strict technical conditions
- **Best For**: Conservative traders prioritizing accuracy
### ⏰ Event Contract Settings
- **Contract Duration Options**: 10 Minutes, 30 Minutes, 1 Hour, 24 Hours
- **Single Contract Rule**: Only one active contract at a time
- **Auto Settlement**: Automatic win/loss detection at expiry
## 📈 Signal Generation Logic
### Core Technical Conditions
1. **Correlation Breakout**: Short-term correlation slope changes direction
2. **MACD Momentum**: MACD line above/below signal line with positive/negative slope
3. **StochRSI Position**: K-line slope changes indicating momentum shift
### Smart Filtering System
The indicator applies progressive filtering based on selected mode:
#### Basic Filters (All Modes)
- Volume above 1.4x average
- Correlation momentum confirmation
- MACD direction alignment
#### Advanced Filters (Smart Balance & Premium)
- Price action quality (body-to-wick ratio > 0.4)
- Momentum strength validation
- RSI safe zone (25-75 range)
- Optional trend filter with EMA confirmation
- Optional multi-timeframe confirmation
#### Premium Filters (Premium Quality Only)
- Enhanced volume threshold (1.8x average)
- Stricter correlation momentum (>1.0)
- Multi-timeframe EMA alignment
- Advanced momentum validation
### Signal Strength Classification
- **Normal Signals**: Basic technical alignment (small arrows)
- **Strong Signals**: Enhanced momentum + volume confirmation (large arrows)
## 🎨 Visual Display System
### Signal Arrows
- **🔼 Green Triangle Up**: Call signal (buy/long)
- **🔽 Red Triangle Down**: Put signal (sell/short)
- **💪 Enhanced Arrows**: Strong signals with special emoji indicators
### Settlement Results
- **🎉 WIN**: Profitable contracts (green)
- **💸 LOSS**: Losing contracts (red)
- **Automatic Display**: Shows results immediately upon contract expiry
### Information Labels
Each signal displays:
- Signal type (Call/Put, Normal/Strong)
- Selected mode and timeframe
- Contract duration
- Settlement results with win/loss indication
## 📊 Statistics Dashboard
### Real-time Performance Table
Located in the top-right corner, displaying:
#### Summary Statistics
- **Total Contracts**: Overall contract count
- **Overall Win Rate**: Percentage with color coding (Green: 80%+, Orange: 60-79%, Red: <60%)
- **Today's Performance**: Daily statistics with separate tracking
- **Win/Loss Breakdown**: Detailed count of profitable vs losing trades
#### Directional Analysis
- **Call Performance**: Success rate for bullish contracts
- **Put Performance**: Success rate for bearish contracts
- **Balanced Tracking**: Identifies directional bias in performance
#### System Status
- **Filter Mode**: Current smart filter status (Smart✓/Basic✗)
- **Contract Duration**: Selected timeframe
- **Beijing Time**: Real-time timestamp display
- **Current Price**: Live BTC/USDT price
- **Contract Status**: Active contract indicator (🔄 Active/✅ Ready)
## 💡 Usage Guidelines
### Optimal Setup
1. **Recommended Timeframe**: 1-minute for maximum signal frequency
2. **Symbol**: BTCUSDT or BTCUSD perpetual futures
3. **Mode Selection**: Start with "Smart Balance" for consistent performance
4. **Contract Duration**: Begin with 10-minute contracts for faster feedback
### Best Practices
- **Pre-market Analysis**: Check overall market conditions before trading
- **Risk Management**: Never risk more than 2-3% of capital per contract
- **Session Timing**: Best performance during high-volume trading sessions
- **Signal Confirmation**: Wait for arrow + label confirmation before entry
- **Performance Monitoring**: Regularly review win rate statistics
### Trading Sessions
- **Asian Session**: 00:00-08:00 Beijing Time (moderate volatility)
- **European Session**: 15:00-23:00 Beijing Time (high volatility)
- **US Session**: 21:00-05:00 Beijing Time (peak volatility)
## 🚨 Alert Configuration
### Available Alerts
1. **BTC Call Signal**: Basic bullish signal alerts
2. **BTC Put Signal**: Basic bearish signal alerts
3. **BTC Strong Call Signal**: High-quality bullish signals
4. **BTC Strong Put Signal**: High-quality bearish signals
### Alert Setup
```
Alert Condition: Select from dropdown
Frequency: Once Per Bar Close
Expiration: No expiration (for continuous monitoring)
Webhook: Optional for automated trading systems
```
### Alert Message Format
```
🚀 BTC Event Contract Call Signal
⏰ Time:
💰 Price: $
```
## 🔧 Advanced Configuration
### Parameter Optimization
- **Auto-Optimization Enabled**: Uses predefined optimized parameters
- **Manual Override**: Disable auto-optimization for custom parameter testing
- **Timeframe Adaptation**: Parameters automatically adjust for 1-min, 3-min, and higher timeframes
### Filter Customization
- **Volume Filter**: Adjustable multiplier (1.1-2.5x)
- **Trend Filter**: Optional EMA trend confirmation
- **Advanced Confirmation**: Multi-timeframe validation
- **Smart Filter**: Toggle for intelligent filtering system
## 📈 Performance Expectations
### Historical Backtesting Results
Based on extensive BTCUSDT 1-minute data testing:
#### Smart Balance Mode
- **Average Win Rate**: 78-82%
- **Daily Signals**: 10-15
- **Best Sessions**: European/US overlap
- **Recommended For**: Most traders
#### High Frequency Mode
- **Average Win Rate**: 73-77%
- **Daily Signals**: 18-25
- **Best Sessions**: High volatility periods
- **Recommended For**: Active scalpers
#### Premium Quality Mode
- **Average Win Rate**: 83-87%
- **Daily Signals**: 6-10
- **Best Sessions**: Trending market conditions
- **Recommended For**: Conservative traders
## ⚠️ Risk Warnings
### Important Disclaimers
- **High-Risk Trading**: Event contracts involve significant risk of loss
- **Market Volatility**: Cryptocurrency markets are highly volatile and unpredictable
- **No Guarantee**: Past performance does not guarantee future results
- **Capital Risk**: Only trade with funds you can afford to lose completely
### Risk Management Guidelines
- **Position Sizing**: Never risk more than 1-2% per trade
- **Daily Limits**: Set maximum daily loss limits
- **Emotional Control**: Avoid revenge trading after losses
- **Market Conditions**: Adjust exposure based on volatility
- **Continuous Monitoring**: Regularly assess indicator performance
## 🔄 Version History
### V1.0 (December 21, 2024)
- Initial English release
- Complete translation from Chinese version
- Optimized for international users
- Enhanced documentation with detailed explanations
- Maintained all original functionality and performance characteristics
## 🛠️ Technical Specifications
### Pine Script Details
- **Version**: Pine Script v6
- **Type**: Indicator with overlay=true
- **Max Objects**: 500 boxes, 500 labels
- **Memory Optimization**: Efficient array and map usage
- **Performance**: Optimized for real-time execution
### System Requirements
- **Platform**: TradingView Pro, Pro+, or Premium
- **Browser**: Modern browser with JavaScript enabled
- **Connection**: Stable internet for real-time data
- **Display**: Minimum 1080p resolution recommended
## 📞 Support & Updates
### Getting Help
- **Documentation**: Refer to this comprehensive guide
- **Common Issues**: Check parameter settings and timeframe compatibility
- **Performance**: Verify market conditions and volatility levels
### Update Policy
- **Regular Updates**: Continuous optimization based on market conditions
- **Version Tracking**: All changes documented with version numbers
- **Backward Compatibility**: Settings preserved across updates
---
**Disclaimer**: This indicator is for educational and analysis purposes only. Trading cryptocurrencies and event contracts involves substantial risk. Always conduct your own research and consider your risk tolerance before trading. The authors are not responsible for any trading losses incurred through the use of this indicator.
Indicators and strategies
Percent Change of Range Candles - FullTHIS IS THE FINAL VERSION
Description of the Percent Change of Range Candles - Full Indicator
This indicator displays the percentage change relative to the price range (high-low) over a specified period and combines multiple timeframes to provide a more accurate view of market trends and momentum. The idea is to not rely solely on classic closing prices but also to consider the opening price, highest, and lowest values within the selected period, offering deeper insight into price movements.
What makes this indicator better than the previous two?
Combination of multiple timeframes and parameters — the indicator calculates not only one level of percentage change but also uses additional calculations for shorter periods (e.g., 25% of the main period length). This allows it to better track subtle changes and provide signals less prone to noise.
Visual representation with colors and horizontal levels — it clearly displays key percentage change levels and whether the current trend is positive or negative, making interpretation easier without additional analysis.
Candle visualization within the indicator (plotcandle) — unlike previous indicators that might display only lines, this one shows candles within the indicator window, allowing you to follow visual patterns that often add extra value.
Better adaptation to trend changes — the indicator dynamically adjusts input parameters depending on price direction (positive or negative change), making it more flexible and suitable for different market conditions.
How the indicator works
It first calculates the percentage change of the closing price relative to the high-low range over a chosen period (default 100 candles).
Then, it calculates the average change value from the previous five periods to smooth out sudden oscillations.
Additionally, it calculates values for a shorter period (25% of the total length), which are dynamically used as "high" or "low" values depending on the current trend (positive or negative).
Horizontal lines mark important percentage change levels (100%, 70%, 0%, -70%, -100%), serving as visual guides for trend strength and direction.
Candles inside the indicator further visualize the relationship between average and current values.
Purpose and application
This indicator is designed to track trend strength and market movements through percentage analysis of price ranges. It can be used for:
Detecting the start and end of trends,
Recognizing strong reversals or confirming trend continuation,
Complementary analysis alongside other technical indicators,
Facilitating decision-making in scalping and swing trading strategies.
What to watch out for
Like any indicator based on historical data, it does not guarantee success and should be used alongside other tools to confirm signals.
The length period (length) should be adjusted according to the market type and trading timeframe — longer periods provide more stable but slower signals, while shorter ones are more sensitive to noise.
Pay attention to the colors and levels on the indicator, as crossing horizontal lines may indicate potential trend reversals or strengthening.
Candles within the indicator window can help identify formations signaling entries or exits.
Nifty Futures vs ATM Options Signal//@version=5
indicator("Nifty Futures vs ATM Options Signal", overlay=true)
// === Input Symbols ===
// Use appropriate symbols available in your TradingView account
niftyFutSymbol = input.symbol("NSE:NIFTY1!", "Nifty Futures")
atmCallSymbol = input.symbol("NSE:NIFTY24JUN22400CE", "ATM Call Option")
atmPutSymbol = input.symbol("NSE:NIFTY24JUN22400PE", "ATM Put Option")
// === Fetch OHLC from 5-min candles for all symbols ===
niftyOpen = request.security(niftyFutSymbol, "5", open)
niftyClose = request.security(niftyFutSymbol, "5", close)
callOpen = request.security(atmCallSymbol, "5", open)
callClose = request.security(atmCallSymbol, "5", close)
putOpen = request.security(atmPutSymbol, "5", open)
putClose = request.security(atmPutSymbol, "5", close)
// === Condition 1: Buy Signal ===
// Nifty Futures RED candle and ATM Call Option GREEN candle
buySignal = (niftyClose < niftyOpen) and (callClose > callOpen)
// === Condition 2: Sell Signal ===
// Nifty Futures GREEN candle and ATM Put Option GREEN candle
sellSignal = (niftyClose > niftyOpen) and (putClose > putOpen)
// === Plot Buy/Sell Signals ===
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
bgcolor(buySignal ? color.new(color.green, 85) : na, title="Buy Background")
bgcolor(sellSignal ? color.new(color.red, 85) : na, title="Sell Background")
Multi MA 10 Lines PRO (Custom Label + Crossover Icon)Multi MA 10 Lines PRO – 10 Custom MAs, Dynamic Labels & Persistent Crossover Symbols
The ultimate professional Moving Average indicator — plot up to 10 fully customizable MAs (type, timeframe, color, width, style), display live price labels (value, % distance, or custom text), plus advanced ATR cross markers on every crossover (MA1/MA2).
NEW: All MA crossovers are marked with persistent symbols (choose icon, color, size) — instantly spot every golden/death cross in your backtest! Complete flexibility for scalpers, swing traders, and serious strategists.
Nifty Futures vs ATM Option Candle Mismatch//@version=5
indicator("Nifty Futures vs ATM Option Candle Mismatch", overlay=true)
// === Input symbols (modify these as needed) ===
niftySymbol = input.symbol("NSE:NIFTY1!", "Nifty Futures Symbol")
atmOptionSymbol = input.symbol("NSE:NIFTY24JUN22400CE", "ATM Option Symbol") // Replace with real ATM symbol dynamically
// === Get 5-min candles from both instruments ===
niftyClose = request.security(niftySymbol, "5", close)
niftyOpen = request.security(niftySymbol, "5", open)
optionClose = request.security(atmOptionSymbol, "5", close)
optionOpen = request.security(atmOptionSymbol, "5", open)
// === Determine candle color (green or red) ===
niftyGreen = niftyClose > niftyOpen
optionGreen = optionClose > optionOpen
// === Condition: Mismatch in candle direction ===
mismatch = (niftyGreen != optionGreen)
// === Plot an icon or background when mismatch occurs ===
plotshape(mismatch, title="Mismatch Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
bgcolor(mismatch ? color.new(color.red, 85) : na, title="Mismatch Background")
Momentum Trend Bands (MTB)📌 What Is the Momentum Trend Bands (MTB) Indicator?
The Momentum Trend Bands (MTB) is a custom-built trend detection indicator that blends momentum and volatility into a dynamic, visual system. Its core goal is to help traders identify the beginning and strength of a trend earlier than traditional tools like moving averages, while filtering out market noise.
🧠 What Is It Built On?
The indicator is built on two foundational concepts:
1. Rate of Change (ROC): This measures the speed at which the price is moving. We use a fast and a slow version of ROC and then calculate their difference. This difference gives us a momentum signal — it shows whether the price is gaining upward or downward strength.
2. Standard Deviation (Volatility): This shows how much the price fluctuates. By calculating it over a certain period, we can measure market noise and filter out weak, insignificant moves that might otherwise cause false signals.
Together, momentum shows direction, and volatility shows confidence.
🛠️ How Does It Work?
• The core of the indicator is a smoothed momentum signal, representing the net difference between fast and slow momentum.
• Around this signal, we build upper and lower bands — these are dynamic boundaries that expand or contract based on volatility.
• When the momentum breaks above or below these bands, it signals a strong directional move — suggesting the start or continuation of a trend.
The bands also serve a visual filter:
• If momentum stays within the bands, it implies the market is consolidating or ranging.
• When it exits the bands decisively, it implies strength in that direction.
📈 How to Use It?
1. Trend Entry:
o When the momentum signal rises above the upper band, it suggests a strong bullish trend may be starting.
o When the signal drops below the lower band, it indicates a bearish trend.
2. Stay Out of Chop:
o If the signal moves sideways within the bands, it’s best to avoid trading — the market is likely consolidating or ranging.
3. Visual Confirmation:
o The background color changes with the trend: green for bullish, red for bearish, gray for neutral. This makes it quick to read visually.
4. Signal Arrows:
o Small up or down arrows appear when trends begin, serving as early entry points.
⚙️ What Kind of Market Does It Work Best In?
• Trending Markets: MTB shines in markets with strong directional movement — whether up or down. It's designed to pick up momentum early and hold through trend continuation.
• Volatile Instruments: The built-in volatility filter helps in markets like crypto or commodities where price action is fast and erratic.
• Avoid Flat or Low-Volume Conditions: In sideways markets, MTB may stay gray or flip often — these are not ideal times to trade using this indicator alone.
💎 Why Is It Unique?
Unlike many indicators that react slowly (like moving averages) or trigger too often (like raw momentum), MTB balances early detection with reliability. Its unique combination of:
• ROC difference for directional intent,
• Smoothing for signal clarity,
• Bands scaled by volatility for robustness,
…makes it stand apart from commonly available indicators on platforms like TradingView.
21EMA Pullback (Simple)✅ Simplified 21EMA Pullback Screener (with Alert + Screener Output)
Criteria:
9EMA > 21EMA
21EMA > 50SMA
Price has either:
Touched the 21EMA (i.e., price's low ≤ 21EMA ≤ high), OR
Pierced and reclaimed (low < 21EMA and close > 21EMA)
JK's Inside DayEvaluates today’s candle only after it's closed
Keeps screener alignment and alerting accurate for daily after-hours workflows
NP Screener with Alerts For Nifty 50 [NITIN PADALE]//@version=6
indicator('NP Screener with Alerts For Nifty 50 ', overlay = true)
////////////
// INPUTS //
filter_enabled = input.bool(false, '', group = 'Filter', inline = 'Filter')
filter_column = input.string('Price', title = 'Column', options = , group = 'Filter', inline = 'Filter')
filter_from = input.float(-9999999, 'From', group = 'Filter', inline = 'Filter')
filter_to = input.float(9999999, 'To', group = 'Filter', inline = 'Filter')
// SMA
rsi_len = input.int(14, title = 'RSI Length', group = 'Indicators')
rsi_os = input.float(30, title = 'RSI Overbought', group = 'Indicators')
rsi_ob = input.float(70, title = 'RSI Oversold', group = 'Indicators')
// TSI
tsi_long_len = input.int(25, title = 'TSI Long Length', group = 'Indicators')
tsi_shrt_len = input.int(13, title = 'TSI Short Length', group = 'Indicators')
tsi_ob = input.float(30, title = 'TSI Overbought', group = 'Indicators')
tsi_os = input.float(-30, title = 'TSI Oversold', group = 'Indicators')
// ADX Params
adx_smooth = input.int(14, title = 'ADX Smoothing', group = 'Indicators')
adx_dilen = input.int(14, title = 'ADX DI Length', group = 'Indicators')
adx_level = input.float(40, title = 'ADX Level', group = 'Indicators')
// SuperTrend
sup_atr_len = input.int(10, 'Supertrend ATR Length', group = 'Indicators')
sup_factor = input.float(3.0, 'Supertrend Factor', group = 'Indicators')
/////////////
// SYMBOLS //
u01 = input.bool(true, title = '', group = 'Symbols', inline = 's01')
u02 = input.bool(true, title = '', group = 'Symbols', inline = 's02')
u03 = input.bool(true, title = '', group = 'Symbols', inline = 's03')
u04 = input.bool(true, title = '', group = 'Symbols', inline = 's04')
u05 = input.bool(true, title = '', group = 'Symbols', inline = 's05')
u06 = input.bool(true, title = '', group = 'Symbols', inline = 's06')
u07 = input.bool(true, title = '', group = 'Symbols', inline = 's07')
u08 = input.bool(true, title = '', group = 'Symbols', inline = 's08')
u09 = input.bool(true, title = '', group = 'Symbols', inline = 's09')
u10 = input.bool(true, title = '', group = 'Symbols', inline = 's10')
s01 = input.symbol('HDFCBANK', group = 'Symbols', inline = 's01')
s02 = input.symbol('ICICIBANK', group = 'Symbols', inline = 's02')
s03 = input.symbol('RELIANCE', group = 'Symbols', inline = 's03')
s04 = input.symbol('INFY', group = 'Symbols', inline = 's04')
s05 = input.symbol('BHARTIARTL', group = 'Symbols', inline = 's05')
s06 = input.symbol('LT', group = 'Symbols', inline = 's06')
s07 = input.symbol('ITC', group = 'Symbols', inline = 's07')
s08 = input.symbol('TCS', group = 'Symbols', inline = 's08')
s09 = input.symbol('AXISBANK', group = 'Symbols', inline = 's09')
s10 = input.symbol('SBIN', group = 'Symbols', inline = 's10')
//////////////////
// CALCULATIONS //
filt_col_id = switch filter_column
'Price' => 1
'RSI' => 2
'TSI' => 3
'ADX' => 4
'SuperTrend' => 5
=> 0
// Get only symbol
only_symbol(s) =>
array.get(str.split(s, ':'), 1)
id_symbol(s) =>
switch s
1 => only_symbol(s01)
2 => only_symbol(s02)
3 => only_symbol(s03)
4 => only_symbol(s04)
5 => only_symbol(s05)
6 => only_symbol(s06)
7 => only_symbol(s07)
8 => only_symbol(s08)
9 => only_symbol(s09)
10 => only_symbol(s10)
=> na
// for TSI
double_smooth(src, long, short) =>
fist_smooth = ta.ema(src, long)
ta.ema(fist_smooth, short)
// ADX
dirmov(len) =>
up = ta.change(high)
down = -ta.change(low)
plusDM = na(up) ? na : up > down and up > 0 ? up : 0
minusDM = na(down) ? na : down > up and down > 0 ? down : 0
truerange = ta.rma(ta.tr, len)
plus = fixnan(100 * ta.rma(plusDM, len) / truerange)
minus = fixnan(100 * ta.rma(minusDM, len) / truerange)
adx_func(dilen, adxlen) =>
= dirmov(dilen)
sum = plus + minus
adx = 100 * ta.rma(math.abs(plus - minus) / (sum == 0 ? 1 : sum), adxlen)
adx
screener_func() =>
// RSI
rsi = ta.rsi(close, rsi_len)
// TSI
pc = ta.change(close)
double_smoothed_pc = double_smooth(pc, tsi_long_len, tsi_shrt_len)
double_smoothed_abs_pc = double_smooth(math.abs(pc), tsi_long_len, tsi_shrt_len)
tsi = 100 * (double_smoothed_pc / double_smoothed_abs_pc)
// ADX
adx = adx_func(adx_dilen, adx_smooth)
// Supertrend
= ta.supertrend(sup_factor, sup_atr_len)
// Set Up Matrix
screenerMtx = matrix.new(0, 6, na)
screenerFun(numSym, sym, flg) =>
= request.security(sym, timeframe.period, screener_func())
arr = array.from(numSym, cl, rsi, tsi, adx, sup)
if flg
matrix.add_row(screenerMtx, matrix.rows(screenerMtx), arr)
// Security call
screenerFun(01, s01, u01)
screenerFun(02, s02, u02)
screenerFun(03, s03, u03)
screenerFun(04, s04, u04)
screenerFun(05, s05, u05)
screenerFun(06, s06, u06)
screenerFun(07, s07, u07)
screenerFun(08, s08, u08)
screenerFun(09, s09, u09)
screenerFun(10, s10, u10)
///////////
// PLOTS //
var tbl = table.new(position.top_right, 6, 41, frame_color = #151715, frame_width = 1, border_width = 2, border_color = color.new(color.white, 100))
log.info(str.tostring(filt_col_id))
alert_msg = ''
if barstate.islast
table.clear(tbl, 0, 0, 5, 40)
table.cell(tbl, 0, 0, 'Symbol', text_halign = text.align_center, bgcolor = color.gray, text_color = color.white, text_size = size.small)
table.cell(tbl, 1, 0, 'Price', text_halign = text.align_center, bgcolor = color.gray, text_color = color.white, text_size = size.small)
table.cell(tbl, 2, 0, 'RSI', text_halign = text.align_center, bgcolor = color.gray, text_color = color.white, text_size = size.small)
table.cell(tbl, 3, 0, 'TSI', text_halign = text.align_center, bgcolor = color.gray, text_color = color.white, text_size = size.small)
table.cell(tbl, 4, 0, 'ADX', text_halign = text.align_center, bgcolor = color.gray, text_color = color.white, text_size = size.small)
table.cell(tbl, 5, 0, 'Supertrend', text_halign = text.align_center, bgcolor = color.gray, text_color = color.white, text_size = size.small)
if matrix.rows(screenerMtx) > 0
for i = 0 to matrix.rows(screenerMtx) - 1 by 1
is_filt = not filter_enabled or matrix.get(screenerMtx, i, filt_col_id) >= filter_from and matrix.get(screenerMtx, i, filt_col_id) <= filter_to
if is_filt
if str.length(alert_msg) > 0
alert_msg := alert_msg + ','
alert_msg
alert_msg := alert_msg + id_symbol(matrix.get(screenerMtx, i, 0))
rsi_col = matrix.get(screenerMtx, i, 2) > rsi_ob ? color.red : matrix.get(screenerMtx, i, 2) < rsi_os ? color.green : #aaaaaa
tsi_col = matrix.get(screenerMtx, i, 3) > tsi_ob ? color.red : matrix.get(screenerMtx, i, 3) < tsi_os ? color.green : #aaaaaa
adx_col = matrix.get(screenerMtx, i, 4) > adx_level ? color.green : #aaaaaa
sup_text = matrix.get(screenerMtx, i, 5) > 0 ? 'Down' : 'Up'
sup_col = matrix.get(screenerMtx, i, 5) < 0 ? color.green : color.red
table.cell(tbl, 0, i + 1, id_symbol(matrix.get(screenerMtx, i, 0)), text_halign = text.align_left, bgcolor = color.gray, text_color = color.white, text_size = size.small)
table.cell(tbl, 1, i + 1, str.tostring(matrix.get(screenerMtx, i, 1)), text_halign = text.align_center, bgcolor = #aaaaaa, text_color = color.white, text_size = size.small)
table.cell(tbl, 2, i + 1, str.tostring(matrix.get(screenerMtx, i, 2), '#.##'), text_halign = text.align_center, bgcolor = rsi_col, text_color = color.white, text_size = size.small)
table.cell(tbl, 3, i + 1, str.tostring(matrix.get(screenerMtx, i, 3), '#.##'), text_halign = text.align_center, bgcolor = tsi_col, text_color = color.white, text_size = size.small)
table.cell(tbl, 4, i + 1, str.tostring(matrix.get(screenerMtx, i, 4), '#.##'), text_halign = text.align_center, bgcolor = adx_col, text_color = color.white, text_size = size.small)
table.cell(tbl, 5, i + 1, sup_text, text_halign = text.align_center, bgcolor = sup_col, text_color = color.white, text_size = size.small)
if str.length(alert_msg) > 0
alert(alert_msg, freq = alert.freq_once_per_bar_close)
MA20 / MA40 / MA100 / MA200LAchi1911@ MA20_MA100
Medias moviles en todos los periodos pra identificar tendencias
SDCALibraryMy Valuation Library for mostly crypto currency use, but some can be applied to other assets.
There are technical and on-chain indicator functions for use.
Technical Indicators:
1. **drawdown_zscore**
- **Summary**: Calculates the z-score of drawdowns over a specified lookback period.
- **Inputs**:
- `lookback_length` (int): Period for drawdown calculation.
- `zScoreLen` (int): Length for z-score calculation.
2. **sharpe_zscore**
- **Summary**: Computes the z-score of the Sharpe ratio using returns over a period and a smoothing length.
- **Inputs**:
- `length` (int): Period for returns calculation.
- `smalen` (int): Smoothing length for returns.
- `zScoreLen` (int): Length for z-score calculation.
3. **rsi_zscore**
- **Summary**: Calculates the z-score of the Relative Strength Index (RSI) with smoothing.
- **Inputs**:
- `length` (int): Period for RSI calculation.
- `smalen` (int): Smoothing length for RSI.
- `zScoreLen` (int): Length for z-score calculation.
4. **DFATH_zscore**
- **Summary**: Computes the z-score for a specific DFATH metric (details not specified).
- **Inputs**:
- `zScoreLen` (int): Length for z-score calculation.
5. **RTI_zscore**
- **Summary**: Calculates the z-score of a trend indicator based on data count and sensitivity.
- **Inputs**:
- `trend_data_count` (int): Number of data points for trend analysis.
- `trend_sensitivity_percentage` (int): Sensitivity threshold for trend detection.
- `zScoreLen` (int): Length for z-score calculation.
On-Chain (Crypto only, mostly BTC, ETH)
6. **SOPR_zscore**
- **Summary**: Computes the z-score of Spent Output Profit Ratio (SOPR) for a specific coin.
- **Inputs**:
- `zScoreLen` (int): Length for z-score calculation.
- `coin_sopr` (string): SOPR data for the specified coin.
7. **thermocap_zscore**
- **Summary**: Calculates the z-score of the Thermocap metric using moving average and coin-specific data.
- **Inputs**:
- `ma_len` (int): Length of the moving average.
- `ma_type` (string): Type of moving average.
- `zScoreLen` (int): Length for z-score calculation.
- `coin_index` (string): Coin index data.
- `coin_blocks_mined` (string): Data on blocks mined for the coin.
8. **MVRV_zscore**
- **Summary**: Computes the z-score of the Market Value to Realized Value (MVRV) ratio.
- **Inputs**:
- `zScoreLen` (int): Length for z-score calculation.
- `coin_MC` (string): Market capitalization data.
- `coin_MC_real` (string): Realized market capitalization data.
9. **supplyinprofit_zscore**
- **Summary**: Calculates the z-score of the percentage of coin supply in profit or loss, optionally adjusted for alpha decay.
- **Inputs**:
- `isAlphaDecayAdjusted` (bool): Whether to apply alpha decay adjustment.
- `zScoreLen` (int): Length for z-score calculation.
- `coin_profit_address_percent` (string): Percentage of addresses in profit.
- `coin_loss_address_percent` (string): Percentage of addresses in loss.
10. **realized_price_zscore**
- **Summary**: Computes the z-score of the realized price based on realized market cap and supply.
- **Inputs**:
- `zScoreLen` (int): Length for z-score calculation.
- `coin_MC_real` (string): Realized market capitalization data.
- `coin_supply` (string): Coin supply data.
11. **CVVD_zscore**
- **Summary**: Calculates the z-score of Cumulative Value Days Destroyed (CVVD) metric.
- **Inputs**:
- `zScoreLen` (int): Length for z-score calculation.
- `coin_MC_real` (string): Realized market capitalization data.
- `coin_total_volume` (string): Total volume data for the coin.
12. **NUPL_zscore**
- **Summary**: Computes the z-score of Net Unrealized Profit and Loss (NUPL) metric.
- **Inputs**:
- `zScoreLen` (int): Length for z-score calculation.
- `coin_MC` (string): Market capitalization data.
- `coin_MC_real` (string): Realized market capitalization data.
Moving AveragesThis indicator allows you to seamlessly apply one or multiple moving averages simultaneously on your chart. You can easily select from predefined periods: 10, 20, 50, 100, and 200.
It is pre-configured to use Exponential Moving Averages (EMA) by default, so there’s no need to input or adjust the type manually—just enable the ones you need and you're ready to go.
Ideal for traders who rely on dynamic trend analysis and want a quick, clutter-free setup for multiple EMAs
Simple Position CalculatorThis indicator provides a real-time position sizing calculator designed for fast momentum trading. It instantly calculates optimal trade size based on your risk parameters, entry/exit prices, and exchange conditions (fees/slippage). Perfect for high-speed entries during candle closes and breakouts.
DJZS Session Tracker (PDT-Aligned)//@version=5
indicator("DJZS Session Tracker (PDT-Aligned)", overlay=true, max_lines_count=500)
// Extract current date/time
var int y = year(time)
var int mo = month(time)
var int d = dayofmonth(time)
// Convert local session times (PDT = UTC-7)
asia_start = timestamp("America/Los_Angeles", y, mo, d, 17, 0)
asia_end = timestamp("America/Los_Angeles", y, mo, d + 1, 2, 0)
london_start = timestamp("America/Los_Angeles", y, mo, d + 1, 0, 0)
london_end = timestamp("America/Los_Angeles", y, mo, d + 1, 9, 0)
ny_start = timestamp("America/Los_Angeles", y, mo, d + 1, 5, 0)
ny_end = timestamp("America/Los_Angeles", y, mo, d + 1, 14, 0)
in_session(start, end) =>
time >= start and time < end
asia = in_session(asia_start, asia_end)
london = in_session(london_start, london_end)
ny = in_session(ny_start, ny_end)
// Plot background for sessions
bgcolor(asia ? color.new(color.aqua, 85) : na)
bgcolor(london ? color.new(color.green, 85) : na)
bgcolor(ny ? color.new(color.orange, 85) : na)
// Track session highs/lows
var float asiaHigh = na
var float asiaLow = na
var float londonHigh = na
var float londonLow = na
var float nyHigh = na
var float nyLow = na
if asia
asiaHigh := na(asiaHigh) ? high : math.max(asiaHigh, high)
asiaLow := na(asiaLow) ? low : math.min(asiaLow, low)
else
asiaHigh := na
asiaLow := na
if london
londonHigh := na(londonHigh) ? high : math.max(londonHigh, high)
londonLow := na(londonLow) ? low : math.min(londonLow, low)
else
londonHigh := na
londonLow := na
if ny
nyHigh := na(nyHigh) ? high : math.max(nyHigh, high)
nyLow := na(nyLow) ? low : math.min(nyLow, low)
else
nyHigh := na
nyLow := na
// Plot session highs/lows
plot(asiaHigh, "Asia High", color=color.aqua, style=plot.style_linebr, linewidth=1)
plot(asiaLow, "Asia Low", color=color.aqua, style=plot.style_linebr, linewidth=1)
plot(londonHigh, "London High", color=color.green, style=plot.style_linebr, linewidth=1)
plot(londonLow, "London Low", color=color.green, style=plot.style_linebr, linewidth=1)
plot(nyHigh, "NY High", color=color.orange, style=plot.style_linebr, linewidth=1)
plot(nyLow, "NY Low", color=color.orange, style=plot.style_linebr, linewidth=1)
ATR, ADX, RSI TableATR, ADX & RSI Dashboard (Color-Coded)
Overview
This indicator provides a clean, all-in-one dashboard that displays the current values for three of the most popular technical indicators: Average True Range (ATR), Average Directional Index (ADX), and Relative Strength Index (RSI).
To make analysis faster and more intuitive, the values in the table are dynamically color-coded based on key thresholds. This allows you to get an immediate visual summary of market volatility, trend strength, and momentum without cluttering your main chart area.
Features
The indicator displays a simple table in the bottom-right corner of your chart with the following color logic:
ATR (Volatility): Measures the average volatility of an asset.
Green: Low Volatility (ATR is less than 3% of the current price).
Orange: Moderate Volatility (ATR is between 3% and 5%).
Red: High Volatility (ATR is greater than 5%).
ADX (Trend Strength): Measures the strength of the underlying trend, regardless of its direction.
Red: Weak or Non-Trending Market (ADX is below 20).
Orange: Developing or Neutral Trend (ADX is between 20 and 25).
Green: Strong Trend (ADX is above 25).
RSI (Momentum): Measures the speed and change of price movements to identify overbought or oversold conditions.
Green: Potentially Oversold (RSI is below 40).
Orange: Neutral/Normal Conditions (RSI is between 40 and 70).
Red: Potentially Overbought (RSI is above 70).
How to Use
This tool is perfect for traders who want a quick, at-a-glance understanding of the current market state. Instead of analyzing three separate indicators, you can use this dashboard to:
Quickly confirm if a strong trend is present before entering a trade.
Assess volatility to adjust your stop-loss and take-profit levels.
Instantly spot potential overbought or oversold conditions.
Customization
All input lengths for the ATR, ADX, and RSI are fully customizable in the indicator's settings menu, allowing you to tailor the calculations to your specific trading style and timeframe.
BTC Smart Buy/Sell//@version=5
indicator("BTC Smart Buy/Sell", overlay=true)
// === INPUTS ===
rsiPeriod = input.int(14, "RSI Period")
macdFast = input.int(12, "MACD Fast")
macdSlow = input.int(26, "MACD Slow")
macdSignal = input.int(9, "MACD Signal")
atrPeriod = input.int(10, "ATR Period")
atrMultiplier = input.float(3.0, "Supertrend Multiplier")
volMultiplier = input.float(1.5, "Volume Spike Multiplier")
// === CALCULATIONS ===
rsi = ta.rsi(close, rsiPeriod)
= ta.macd(close, macdFast, macdSlow, macdSignal)
macdCrossUp = ta.crossover(macdLine, signalLine)
macdCrossDown = ta.crossunder(macdLine, signalLine)
// Supertrend
= ta.supertrend(atrMultiplier, atrPeriod)
// Volume spike
avgVol = ta.sma(volume, 20)
volSpike = volume > avgVol * volMultiplier
volDrop = volume < avgVol * 0.7
// === CONDITIONS ===
buyCond = (rsi < 30 ? 1 : 0) + (macdCrossUp ? 1 : 0) + (supertrendDir == 1 ? 1 : 0) + (volSpike ? 1 : 0)
sellCond = (rsi > 70 ? 1 : 0) + (macdCrossDown ? 1 : 0) + (supertrendDir == -1 ? 1 : 0) + (volDrop ? 1 : 0)
buySignal = buyCond >= 3
sellSignal = sellCond >= 3
// === PLOT ===
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
Position Size Calculatorcalculates what size position you should enter given desired risk and distance from SL in ticks on any symbol
Live Momentum Alerts - Darrin G.detect setups pre-market, regular hours, and after-hours.
Run this on both stocks and crypto charts.
Receive alerts when momentum crosses the 9 EMA (with RVOL and VWAP filters still active).
Inside DayOnly uses completed bars (high , low ) — ignores today's intraday bar.
Plots only after market close, not during the current session.
Designed for end-of-day screeners and alerts, reliable for after-hours analysis.