EVaR Indicator and Position SizingThe Problem:
Financial markets consistently show "fat-tailed" distributions where extreme events occur with higher frequency than predicted by normal distributions (Gaussian or even log-normal). These fat tails manifest in sudden price crashes, volatility spikes, and black swan events that traditional risk measures like volatility can underestimate. Standard deviation and conventional VaR calculations assume normally distributed returns, leaving traders vulnerable to severe drawdowns during market stress.
Cryptocurrencies and volatile instruments display particularly pronounced fat-tailed behavior, with extreme moves occurring 5-10 times more frequently than normal distribution models would predict. This reality demands a more sophisticated approach to risk measurement and position sizing.
The Solution: Entropic Value at Risk (EVAR)
EVaR addresses these limitations by incorporating principles from statistical mechanics and information theory through Tsallis entropy. This advanced approach captures the non-linear dependencies and power-law distributions characteristic of real financial markets.
Entropy is more adaptive than standard deviations and volatility measures.
I was inspired to create this indicator after reading the paper " The End of Mean-Variance? Tsallis Entropy Revolutionises Portfolio Optimisation in Cryptocurrencies " by by Sana Gaied Chortane and Kamel Naoui.
Key advantages of EVAR over traditional risk measures:
Superior tail risk capture: More accurately quantifies the probability of extreme market moves
Adaptability to market regimes: Self-calibrates to changing volatility environments
Non-parametric flexibility: Makes less assumptions about the underlying return distribution
Forward-looking risk assessment: Better anticipates potential market changes (just look at the charts :)
Mathematically, EVAR is defined as:
EVAR_α(X) = inf_{z>0} {z * log(1/α * M_X(1/z))}
Where the moment-generating function is calculated using q-exponentials rather than conventional exponentials, allowing precise modeling of fat-tailed behavior.
Technical Implementation
This indicator implements EVAR through a q-exponential approach from Tsallis statistics:
Returns Calculation: Price returns are calculated over the lookback period
Moment Generating Function: Approximated using q-exponentials to account for fat tails
EVAR Computation: Derived from the MGF and confidence parameter
Normalization: Scaled to for intuitive visualization
Position Sizing: Inversely modulated based on normalized EVAR
The q-parameter controls tail sensitivity—higher values (1.5-2.0) increase the weighting of extreme events in the calculation, making the model more conservative during potentially turbulent conditions.
Indicator Components
1. EVAR Risk Visualization
Dynamic EVAR Plot: Color-coded from red to green normalized risk measurement (0-1)
Risk Thresholds: Reference lines at 0.3, 0.5, and 0.7 delineating risk zones
2. Position Sizing Matrix
Risk Assessment: Current risk level and raw EVAR value
Position Recommendations: Percentage allocation, dollar value, and quantity
Stop Parameters: Mathematically derived stop price with percentage distance
Drawdown Projection: Maximum theoretical loss if stop is triggered
Interpretation and Application
The normalized EVAR reading provides a probabilistic risk assessment:
< 0.3: Low risk environment with minimal tail concerns
0.3-0.5: Moderate risk with standard tail behavior
0.5-0.7: Elevated risk with increased probability of significant moves
> 0.7: High risk environment with substantial tail risk present
Position sizing is automatically calculated using an inverse relationship to EVAR, contracting during high-risk periods and expanding during low-risk conditions. This is a counter-cyclical approach that ensures consistent risk exposure across varying market regimes, especially when the market is hyped or overheated.
Parameter Optimization
For optimal risk assessment across market conditions:
Lookback Period: Determines the historical window for risk calculation
Q Parameter: Controls tail sensitivity (higher values increase conservatism)
Confidence Level: Sets the statistical threshold for risk assessment
For cryptocurrencies and highly volatile instruments, a q-parameter between 1.5-2.0 typically provides the most accurate risk assessment because it helps capturing the fat-tailed behavior characteristic of these markets. You can also increase the q-parameter for more conservative approaches.
Practical Applications
Adaptive Risk Management: Quantify and respond to changing tail risk conditions
Volatility-Normalized Positioning: Maintain consistent exposure across market regimes
Black Swan Detection: Early identification of potential extreme market conditions
Portfolio Construction: Apply consistent risk-based sizing across diverse instruments
This indicator is my own approach to entropy-based risk measures as an alterative to volatility and standard deviations and it helps with fat-tailed markets.
Enjoy!
Indicators and strategies
AV BTC Investor ToolThe Investor Tool
Created by Philip Swift . Intended to be used by long term investors . The tool uses two simple moving averages of price as the basis for under/overvalued conditions: the 2-year MA (green) and a 5x multiple of the 2-year MA (red).
Price below the 2-year average: often means good profits and a bear market bottom .
Price above the 5x average: usually shows a bull market top , so investors may want to be cautious.
Short-Term Holder MVRVThis script calculates and visualizes the Market Value to Realized Value (MVRV) ratio for Bitcoin, specifically focusing on short-term holders (STH). The MVRV ratio is a key on-chain metric that compares Bitcoin's market cap to its realized cap (the aggregate cost basis of all coins). It helps traders identify overbought and oversold conditions in the market.
Key Features
1. Moving Averages (Customizable)
The script allows users to apply different moving averages to smooth the MVRV data:
EMA (Exponential Moving Average)
SMA (Simple Moving Average)
SMMA/RMA (Smoothed/Rolling Moving Average)
WMA (Weighted Moving Average)
VWMA (Volume-Weighted Moving Average)
HMA (Hull Moving Average)
2. Core Calculation
Fetches BTC_MVRV data from TradingView's security function.
Computes a moving average (default: 238-period WMA) of the MVRV values.
Calculates the Ratio_MVRV as:
text
Ratio_MVRV = Current MVRV / Moving Average of MVRV
A bullish signal is generated when Ratio_MVRV > 1 (market is heating up).
A bearish signal is generated when Ratio_MVRV < 1 (market is cooling down).
3. Visual Output
Main Plot:
A line chart showing Ratio_MVRV.
Orange when bullish (Ratio_MVRV > 1).
Purple when bearish (Ratio_MVRV < 1).
Horizontal Line:
A dotted white line at 1.0, acting as a threshold.
Table Display:
A small table in the top-right corner showing "↑ Bull" (green) or "↓ Bear" (red) based on the current market state.
4. Alerts
Triggers TradingView alerts when the market state changes between bullish and bearish.
Interpretation & Trading Signals
When Ratio_MVRV > 1 (Bullish):
Suggests Bitcoin is gaining momentum, possibly entering an overbought phase.
Could indicate a good time to hold or accumulate, but extreme highs may signal a potential top.
When Ratio_MVRV < 1 (Bearish):
Suggests Bitcoin is undervalued, possibly in an oversold phase.
Could indicate a buying opportunity, but prolonged lows may signal further downside.
Default Settings & Customization
Length: 238 (adjustable, default based on common long-term trend analysis).
Moving Average Type: WMA (Weighted Moving Average).
Users can modify these settings in the Inputs menu in TradingView.
Use Case
Helps traders identify market cycles by tracking short-term holder behavior.
Works best as a confirmation tool alongside other indicators (e.g., RSI, MACD).
Useful for swing traders and long-term investors looking for trend reversals.
Supertrend AT v1.0📌 Supertrend AT v1.0 — Strategy Overview
Overview
Supertrend AT v1.0 is a fully automated trading strategy based on the Supertrend indicator.
It identifies trend reversals and places long or short entries accordingly, with built-in position sizing, stop-loss/take-profit management, and commission-aware calculations.
🚀 Key Features
✅ Entry Signals Based on Trend Reversals
Long entry when Supertrend changes from downtrend to uptrend
Short entry when Supertrend changes from uptrend to downtrend
✅ Risk-Based Position Sizing
Calculates position size so that a stop-loss only risks a fixed percentage (RPT) of total capital
✅ Reward/Risk Ratio-Based Target Price Calculation
Take-profit price is computed not by price difference, but by actual loss and desired reward-to-risk (RR) ratio
✅ Fully Commission-Aware
Commission is factored into entry, stop-loss, and take-profit price calculations
Ensure commission settings match in both the input panel and the strategy properties tab
✅ Dual Language Support
Switch between English and Korean interface
✅ Visual Trade Levels & Info Display
Entry, stop, and target prices plotted on the chart
Real-time open PnL and equity shown in an on-screen table
⚙️ How to Use
Apply Strategy to Chart
Load the strategy and configure the following parameters in both the Input tab and the Properties tab:
Commission rate (e.g., 0.05%)
Market decimal precision (e.g., 4 for 0.0001)
Adjust Entry Parameters
RPT: Risk per trade as a percentage of your total equity (e.g., 2%)
RR: Reward-to-risk ratio (e.g., 3 = target profit is 3× the potential loss)
Choose whether to allow Long or Short trades
For Auto-Trading Integration
Make sure the minimum order size is valid for your exchange
If the calculated quantity is below the exchange's minimum unit, it may result in errors
⚠️ Important Notes
❗ Non-Repainting — Supertrend is based on confirmed candles and does not repaint
❗ Backtest-Only — The strategy is for signal generation only and does not execute real trades without external automation
❗ Margin-Based Calculations — Default settings assume margin trading; adjust accordingly
📄 License & Disclaimer
This strategy is licensed under the Mozilla Public License 2.0.
This script is not financial advice. Use at your own risk.
Always test thoroughly with backtesting and paper trading before using in live markets.
Improved Breakout-Retest Strategy (5M Entry)This strategy combines the strength of a higher timeframe structure with precision 5-minute entries. It identifies consolidation zones on the 4H chart, waits for a strong breakout in the direction of the trend, and then enters on a retest confirmed by an engulfing candle on the 5-minute timeframe. A 200 EMA filter ensures trades align with the dominant trend, while a strict 1:3 risk-to-reward ratio maximizes profitability. It's designed to reduce false breakouts and optimize small account growth with tight stop losses and high probability setups during active trading hours.
Simple Volume IndicatorBased on the great work of Nitin Ranjan .
Plots volume in 4 different colors and reduce all the noise.
Sanuja nuwanThe Zero Fear Indicator is a custom-built trading tool designed for confident and precise entries. Powered by real-time market structure, volume pressure, and volatility logic, it filters out noise and shows clear buy/sell signals with zero hesitation. Perfect for both beginners and experienced traders looking to trade without fear.
Hidden Divergence Buy/Sell SignalsHidden divergence Buy/sell signals
Hidden divergence Buy/sell signals
Hidden divergence Buy/sell signals
Hidden divergence Buy/sell signalsHidden divergence Buy/sell signalsHidden divergence Buy/sell signalsHidden divergence Buy/sell signalsHidden divergence Buy/sell signalsHidden divergence Buy/sell signalsHidden divergence Buy/sell signalsHidden divergence Buy/sell signalsHidden divergence Buy/sell signals
RSI Multi-Timeframe Dashboard by giua64)### Summary
This is an advanced dashboard that provides a comprehensive overview of market strength and momentum, based on the Relative Strength Index (RSI) analyzed across 6 different timeframes simultaneously (from 5 minutes to the daily chart).
The purpose of this script is to offer traders an immediate and easy-to-read summary of market conditions, helping to identify the prevailing trend direction, overbought/oversold levels, and potential reversals through divergence detection. All of this is available in a single panel, eliminating the need to switch timeframes on your main chart.
### Key Features
* **Multi-Timeframe Analysis:** Simultaneously monitors the 5m, 15m, 30m, 1H, 4H, and Daily timeframes.
* **Scoring System:** Each timeframe is assigned a score based on multiple RSI conditions (e.g., above/below 50, overbought/oversold status, direction) to quantify bullish or bearish strength.
* **Aggregated Signal:** The dashboard calculates a total percentage score and provides a clear summary signal: **LONG**, **SHORT**, or **WAIT**.
* **Divergence Detection:** Automatically identifies Bullish and Bearish divergences between price and RSI for each timeframe.
* **Non-Repainting Option:** In the settings, you can choose to base calculations on the close of the previous candle (`Use RSI on Closed Candle`). This ensures that past signals (like status and score) do not change, providing more reliable data for analysis.
* **Fully Customizable:** Users can modify the RSI period, overbought/oversold thresholds, divergence detection settings, and the appearance of the table.
### How to Read the Dashboard
The table consists of 6 columns, each providing specific information:
* **% (Total Score):**
* **Header:** Shows the overall strength as a percentage. A positive value indicates bullish momentum, while a negative value indicates bearish momentum. The background color changes based on intensity.
* **Rows:** Displays the numerical score for the individual timeframe.
* **RSI:**
* **Header:** The background color indicates the average of all RSI values. Green if the average is > 50, Red if < 50.
* **Rows:** Shows the real-time RSI value for that timeframe.
* **Signal (Status):**
* **Header:** This is the final operational signal. It turns **🟢 LONG** when bullish strength is high, **🔴 SHORT** when bearish strength is high, and **⚪ WAIT** in neutral conditions.
* **Rows:** Describes the RSI status for that timeframe (e.g., Bullish, Bearish, Overbought, Oversold).
* **Dir (Direction):**
* **Header:** Displays an arrow representing the majority direction across all timeframes.
* **Rows:** Shows the instantaneous direction of the RSI (↗️ for rising, ↘️ for falling).
* **Diverg (Divergence):**
* Indicates if a bullish (`🟢 Bull`) or bearish (`🔴 Bear`) divergence has been detected on that timeframe.
* **TF (Timeframe):**
* Indicates the reference timeframe for that row.
### Advantages and Practical Use
This tool was created to solve a common problem: the need to analyze multiple charts to understand the bigger picture. With this dashboard, you can:
1. **Confirm a Trend:** A predominance of green and a "LONG" signal provides strong confirmation of bullish sentiment.
2. **Identify Weakness:** Red signals on higher timeframes can warn of an impending loss of momentum.
3. **Spot Turning Points:** A divergence on a major timeframe can signal an excellent reversal opportunity.
### Originality and Acknowledgements
This script is an original work, written from scratch by giua64. The idea was to create a comprehensive and visually intuitive tool for RSI analysis.
Any feedback, comments, or suggestions to improve the script are welcome!
**Disclaimer:** This is a technical analysis tool and should not be considered financial advice. Always do your own research and backtest any tool before using it in a live trading environment.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
giua64
borsamercati.it – Educational tools by giua64
Anche su:
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
BullFinder_15M_OBV_RSI_MFI📊 BullFinder_15M_OBV_RSI_MFI
15-Minute BTC/USDT Long-Only Strategy Powered by OBV, NetVolume, RSI and MFI
Designed for high-frequency bullish opportunities, this strategy combines volume-confirmed momentum with dynamic trailing stop exits. Ideal for breakout traders seeking consistency over noise.
🔍 Indicators Used:
OBV + Net Volume: Volume divergence & pressure detection
RSI + MFI: Momentum and liquidity filters
EMA21: Baseline trend confirmation
Advanced Trailing Stop: Dynamic trigger + offset + hard loss control
📅 Backtest Summary (Last 12 Months | BTC/USDT | 15m TF):
Total Trades: 381
Win Rate: 83.20%
Avg. PnL per Trade: +746.18 USDT
Avg. Winner: 7,097 USDT
Avg. Loser: -30,713 USDT
Best Trade: 65,654 USDT
Profit Factor: 0.231
✅ Alerts Available
To automate entries or get Telegram alerts, set an alarm with the message:
📢 "BullFinder: Long Entry Triggered"
VWEMA-Based Trend Strength IndicatorThis script plots the strength and direction of a trend as the percentage difference between two volume weighted EMAs.
Tao Bounce & Exit + Rip AlertsTao bounce long and short flags/alerts, plus exit alerts (both 2 and 3 ATR). Also includes "rip" indicators to try to flag when a strong trend is in process but all the Tao entry criteria aren't met.
Greer EPS Yield📘 Script Title
Greer EPS Yield – Valuation Insight Based on Earnings Productivity
🧾 Description
Greer EPS Yield is a valuation-focused indicator from the Greer Financial Toolkit, designed to evaluate how efficiently a company generates earnings relative to its current stock price. This script calculates the Earnings Per Share Yield (EPS%), using the formula:
EPS Yield (%) = Earnings Per Share ÷ Stock Price × 100
This yield metric provides a quick snapshot of valuation through the lens of profitability per share. It dynamically highlights when the EPS yield is:
🟢 Above its historical average (potentially undervalued)
🔴 Below its historical average (potentially overvalued)
🔍 Use Case
Quickly assess valuation attractiveness based on earnings yield.
Identify potential buy opportunities when EPS% is above its long-term average.
Combine with other indicators in the Greer Financial Toolkit for a fundamentals-driven investment strategy:
📘 Greer Value – Tracks year-over-year growth consistency across six key metrics
📊 Greer Value Yields Dashboard – Visualizes valuation-based yield metrics
🟢 Greer BuyZone – Highlights long-term technical buy zones
🛠️ Inputs & Data
Uses fiscal year EPS data from TradingView’s built-in financial database.
Tracks a static average EPS Yield to compare current valuation to historical norms.
Clean, intuitive visual with automatic color coding.
⚠️ Disclaimer
This tool is for educational and informational purposes only and should not be considered financial advice. Always conduct your own research before making investment decisions.
3.RSI LIJO 45*55//@version=6
indicator(title="3.RSI LIJO 45*55", shorttitle="RSI-LIJO-45-55", format=format.price, precision=2, timeframe="", timeframe_gaps=true)
rsiLengthInput = input.int(9, minval=1, title="RSI Length", group="RSI Settings")
rsiSourceInput = input.source(close, "Source", group="RSI Settings")
calculateDivergence = input.bool(false, title="Calculate Divergence", group="RSI Settings", display=display.data_window, tooltip="Calculating divergences is needed in order for divergence alerts to fire.")
change = ta.change(rsiSourceInput)
up = ta.rma(math.max(change, 0), rsiLengthInput)
down = ta.rma(-math.min(change, 0), rsiLengthInput)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
// Change RSI line color based on bands
rsiColor = rsi > 50 ? color.green : rsi < 50 ? color.red : color.white
rsiPlot = plot(rsi, "RSI", color=rsiColor)
rsiUpperBand = hline(55, "RSI Upper Band", color=color.rgb(5, 247, 22))
midline = hline(50, "RSI Middle Band", color=color.new(#787B86, 50))
rsiLowerBand = hline(45, "RSI Lower Band", color=color.rgb(225, 18, 14))
fill(rsiUpperBand, rsiLowerBand, color=color.rgb(126, 87, 194, 90), title="RSI Background Fill")
midLinePlot = plot(50, color=na, editable=false, display=display.none)
fill(rsiPlot, midLinePlot, 100, 55, top_color=color.new(color.green, 0), bottom_color=color.new(color.green, 100), title="Overbought Gradient Fill")
fill(rsiPlot, midLinePlot, 45, 0, top_color=color.new(color.red, 100), bottom_color=color.new(color.red, 0), title="Oversold Gradient Fill")
// Smoothing MA inputs
GRP = "Smoothing"
TT_BB = "Only applies when 'SMA + Bollinger Bands' is selected. Determines the distance between the SMA and the bands."
maTypeInput = input.string("SMA", "Type", options= , group=GRP, display=display.data_window)
maLengthInput = input.int(31, "Length", group=GRP, display=display.data_window)
bbMultInput = input.float(2.0, "BB StdDev", minval=0.001, maxval=50, step=0.5, tooltip=TT_BB, group=GRP, display=display.data_window)
var enableMA = maTypeInput != "None"
var isBB = maTypeInput == "SMA + Bollinger Bands"
// Smoothing MA Calculation
ma(source, length, MAtype) =>
switch MAtype
"SMA" => ta.sma(source, length)
"SMA + Bollinger Bands" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
// Smoothing MA plots
smoothingMA = enableMA ? ma(rsi, maLengthInput, maTypeInput) : na
smoothingStDev = isBB ? ta.stdev(rsi, maLengthInput) * bbMultInput : na
plot(smoothingMA, "RSI-based MA", color=color.yellow, display=enableMA ? display.all : display.none, editable=enableMA)
bbUpperBand = plot(smoothingMA + smoothingStDev, title="Upper Bollinger Band", color=color.green, display=isBB ? display.all : display.none, editable=isBB)
bbLowerBand = plot(smoothingMA - smoothingStDev, title="Lower Bollinger Band", color=color.green, display=isBB ? display.all : display.none, editable=isBB)
fill(bbUpperBand, bbLowerBand, color=isBB ? color.new(color.green, 90) : na, title="Bollinger Bands Background Fill", display=isBB ? display.all : display.none, editable=isBB)
// Divergence
lookbackRight = 5
lookbackLeft = 5
rangeUpper = 60
rangeLower = 5
bearColor = color.red
bullColor = color.green
textColor = color.white
noneColor = color.new(color.white, 100)
_inRange(bool cond) =>
bars = ta.barssince(cond)
rangeLower <= bars and bars <= rangeUpper
plFound = false
phFound = false
bullCond = false
bearCond = false
rsiLBR = rsi
if calculateDivergence
//------------------------------------------------------------------------------
// Regular Bullish
// rsi: Higher Low
plFound := not na(ta.pivotlow(rsi, lookbackLeft, lookbackRight))
rsiHL = rsiLBR > ta.valuewhen(plFound, rsiLBR, 1) and _inRange(plFound )
// Price: Lower Low
lowLBR = low
priceLL = lowLBR < ta.valuewhen(plFound, lowLBR, 1)
bullCond := priceLL and rsiHL and plFound
//------------------------------------------------------------------------------
// Regular Bearish
// rsi: Lower High
phFound := not na(ta.pivothigh(rsi, lookbackLeft, lookbackRight))
rsiLH = rsiLBR < ta.valuewhen(phFound, rsiLBR, 1) and _inRange(phFound )
// Price: Higher High
highLBR = high
priceHH = highLBR > ta.valuewhen(phFound, highLBR, 1)
bearCond := priceHH and rsiLH and phFound
plot(
plFound ? rsiLBR : na,
offset = -lookbackRight,
title = "Regular Bullish",
linewidth = 2,
color = (bullCond ? bullColor : noneColor),
display = display.pane,
editable = calculateDivergence)
plotshape(
bullCond ? rsiLBR : na,
offset = -lookbackRight,
title = "Regular Bullish Label",
text = " Bull ",
style = shape.labelup,
location = location.absolute,
color = bullColor,
textcolor = textColor,
display = display.pane,
editable = calculateDivergence)
plot(
phFound ? rsiLBR : na,
offset = -lookbackRight,
title = "Regular Bearish",
linewidth = 2,
color = (bearCond ? bearColor : noneColor),
display = display.pane,
editable = calculateDivergence)
plotshape(
bearCond ? rsiLBR : na,
offset = -lookbackRight,
title = "Regular Bearish Label",
text = " Bear ",
style = shape.labeldown,
location = location.absolute,
color = bearColor,
textcolor = textColor,
display = display.pane,
editable = calculateDivergence)
alertcondition(bullCond, title='Regular Bullish Divergence', message="Found a new Regular Bullish Divergence, Pivot Lookback Right number of bars to the left of the current bar.")
alertcondition(bearCond, title='Regular Bearish Divergence', message='Found a new Regular Bearish Divergence, Pivot Lookback Right number of bars to the left of the current bar.')
Bollinger Bands ±2σ & ±3σBollinger Band 2 & 3 standard deviation, clubbed together, so that you can take trade on BKP & BKT.
// This Pine Script plots Bollinger Bands with both ±2σ and ±3σ levels for enhanced volatility analysis.
// Users can customize the moving average type, length, and standard deviation multipliers directly in the settings.
// The indicator overlays a shaded ±2σ region and semi-transparent ±3σ bands to highlight extreme price movements.
Random Coin Toss Strategy📌 Overview
This strategy is a probability-based trading simulation that randomly decides trade direction using a coin-toss mechanism and executes trades with a customizable risk-reward ratio. It's designed primarily for testing entry frequency and risk dynamics, not predictive accuracy.
🎯 Core Concept
Every N bars (configurable), the strategy performs a pseudo-random coin toss.
Based on the result:
If heads → Buy
If tails → Sell
Once a position is opened, it sets a Stop-Loss (SL) and Take-Profit (TP) based on a multiple of the current ATR (Average True Range) value.
⚙️ Configurable Inputs
ATR Length Period for ATR calculation, determines volatility basis.
SL Multiplier SL distance = ATR × multiplier (e.g., 1.0 means 1x ATR) .
TP Multiplier TP distance = ATR × multiplier (e.g., 2.0 = 2x ATR) .
Entry Frequency Bars to wait between each new coin toss decision.
Show TP/SL Zones Toggle on/off for drawing visual TP and SL zones.
Box Size Number of bars used to define the width of the TP/SL boxes.
🔁 Entry & Exit Logic
Entry:
Happens only when no current position exists and it's the correct bar interval.
Entry direction is randomly decided.
Exit:
Positions exit at either:
Take-Profit (TP) level
Stop-Loss (SL) level
Both are calculated using the configured ATR-based distances.
🖼️ Visual Features
TP and SL zones:
Rendered as shaded rectangles (boxes) only once per trade.
Green box for TP zone, red box for SL zone.
Automatically deleted and redrawn for each new trade to avoid chart clutter.
ATR Display Table:
A minimal info table at the top-right shows the current ATR value.
Updates every few bars for performance.
🧪 Use Cases
Ideal for risk-reward modeling, strategy prototyping, and understanding how volatility-based SL/TP behavior affects results.
Great for backtesting frequency, RR tweaks (e.g., 2:5 or 3:1), and execution structure in random conditions.
⚠️ Disclaimer
Since the trade direction is random, this script is not meant for predictive trading but serves as a powerful experiment framework for studying how SL, TP, and volatility interact with random chance in a controlled, repeatable system.
Byquan ADX RSI EMA9 Cross AlertThis indicator is used when the ADX exceeds the 40 threshold to look for potential reversals, confirmed by the crossover between the RSI and the RSI-based moving average, as well as the EMA 9.
Low Price RSI CrossoverThis Pine Script indicator is a Multi-Timeframe Low RSI Crossover system that combines three key filtering criteria to identify high-probability buy signals. Here's what it does:
Core Concept
The indicator only generates buy signals when all three conditions are met simultaneously:
Price at Multi-Period Low: Current price must be at or near the lowest point within your selected timeframe (1 week to 5 years, or custom)
RSI Momentum Shift: The smoothed RSI must cross above its signal line (EMA), indicating upward momentum
Below Threshold Entry: Both the RSI and its signal line must be below your threshold level (default 50) when the crossover occurs
Key Features
RSI Smoothing: Uses Hull Moving Average (HMA) to smooth the raw RSI, reducing noise and false signals while maintaining responsiveness.
Flexible Timeframes: Choose from predefined periods (1W, 2W, 3W, 1M, 2M, 3M, 6M, 9M, 1Y, 2Y, 3Y, 5Y) or set a custom number of bars.
Visual Feedback:
Plots the smoothed RSI (blue line) and its signal line (red line)
Shows threshold and overbought levels
Highlights signal bars with green background
Displays tiny green triangles at signal points
Real-time status table showing all conditions
Trading Logic
This is essentially a mean-reversion strategy that waits for:
Price to reach significant lows (value zone)
Momentum to start shifting upward (RSI crossover)
Entry from oversold/neutral territory (below 50 RSI)
Why This Works
By requiring price to be at multi-period lows, you avoid buying during downtrends or sideways chop. The RSI crossover confirms that selling pressure is starting to ease, while the threshold filter ensures you're not buying into overbought conditions.
The combination of these filters should significantly reduce false signals compared to using any single indicator alone.
6-Month Average High/Lows Trend LineThis is an indicator that tracks the 6 month high/low average as a MA and the 6 month high/low average as a flat line.
I added alerts if the price action crosses the high or low line. Also makes a great dynamic channel.
If combined with other confirming indicator like the RSI and/or MACD this could be a very effective tool with respect to levels and 6 month high/lows
Bullish & Bearish Wick MarkerMarks bullish and bearish engulfing candles
Bullish engulfing candle:
when the low is lower than the previous candle low and the body close is higher than the previous candle body
Bearish engulfing cande:
when the high is higher than the previous candle high and the body close is lower than the previous candle body
Overlapping FVG - [Fandesoft Trading Academy]🧠 Overview
This script plots Higher Timeframe Fair Value Gaps (FVGs) with full visibility and precise placement on lower timeframe charts. Each timeframe (30s–15m) has its own independent toggle, custom label, and box styling, allowing traders to analyze market structures in detail.
🎯 Features
✅ Identifies Fair Value Gaps using a 3-candle logic (candle 1 high vs candle 3 low, and vice versa).
✅ Plots HTF FVG boxes aligned to lower timeframes for intraday analysis.
✅ Supports custom timeframes: 30s to 15m, with individual toggles.
✅ Full visual customization: border color, bullish/bearish box opacity, label font size and color.
✅ Modular inputs to enable or disable specific timeframes for performance.
✅ Uses barstate.isconfirmed logic for stable, non-repainting plots.
⚙️ How It Works
The script requests higher timeframe data via request.security. For each confirmed bar, it checks for FVGs based on:
Bullish FVG: low >= high
Bearish FVG: low >= high
If a gap is detected, a box is plotted between candle 1 and candle 3 using box.new().
Timeframe toggles ensure calculations remain within the limit of 40 request.security calls.
📈 Use Cases
Scalpers and intraday traders analyzing microstructure.
ICT methodology practitioners visualizing displacement and inefficiencies.
Traders layering multiple FVG timeframes for confluence.
Jumping watermark# Jumping watermark
## Function description
- Dynamic watermark: Mainly used to add dynamic watermarks to prevent theft and transfer when recording videos.
- Static watermark: Sharing opinions can easily include information such as trading pairs, cycles, current time, and individual signatures.
### Static watermark:
Display the watermark related to the current trading pair in the center of the chart.
- Configuration items:
- You can choose to configure the display content: current trading pair code and name, cycle, date, time, and individual signature content
### Dynamic watermark
Display the configured watermark content in a dynamic random position.
- Configuration items:
- Turn on or off the display of watermark jumping
- Modify the display text content and style by yourself
----- 中文简介-----
# 跳动水印
## 功能描述
- 动态水印: 主要可用于视频录制时添加动态水印防盗、防搬运。
- 静态水印:观点分享是可方便的带上交易对、周期、当前时间、个签等信息。
### 静态水印:
在图表中心位置显示当前交易对相关信息水印。
- 配置项:
- 可选择配置显示内容:当前交易对代码及名称、周期、日期、时间、个签内容
### 动态水印
动态随机位置显示配置水印内容。
- 配置项:
- 开启或关闭显示水印跳动
- 自行修改配置显示文字内容和样式
AV BTC Top Cap ModelThe Bitcoin Top Cap
Developed by Willy Woo to identify market cycle tops. Top Cap is calculated by multiplying the Average Cap by 35. Average cap is calculated by taking the cumulative sum of daily market cap divided by the age of market in days. Additional Top Cap using 15x multiplier is included to show sensitivity and to gauge the effect of diminishing returns.
For the use on BTC Market Cap Chart : No changes necessary. Switching to logarithmic scale in recommended.
For the use on BTC Price Chart : After adding the indicator, enable Convert to price setting.
Customization of multipliers is enabled in the settings.
Data sources used: GLASSNODE:BTC_MARKETCAP and GLASSNODE:BTC_SUPPLY (for price conversion)
Note: Use with caution. I coded this for learning. This model might be past it's usefulness date. I am also seeing single digit % difference between this indicator values and top cap indicators available online.