SOPORTE RESISTENCIA FUERTE MAS LINEAS DIAGONALES"This script draws configurable support and resistance lines to provide greater security. It also draws diagonal lines for guidance and double confirmation."
Indicators and strategies
Opening Range BoxOpening Range plots the price range of the first candle from a selected timeframe within a defined trading session. It highlights key intraday levels and visually extends that range across the session, helping traders spot breakout or reversal setups.
8 EMA vs 21 EMA Crossover AlertsThis indicator creates a Buy signal when 8 EMA crosses above 21 EMA and vice versa on any time frame selected on the chart
MSTR Premium/Discount Analyzer by Marius1032)This indicator provides a transparent, real-time framework for evaluating MicroStrategy Inc. (MSTR) based on its two primary value components:
Bitcoin Holdings (Mark-to-Market)
Core Enterprise Value (ex-Bitcoin)
By calculating the Net Asset Value (NAV) per share from both segments, the indicator enables accurate assessment of whether MSTR is trading at a premium or discount relative to its fundamental value.
📊 Key Metrics Displayed on Chart
MSTR Share Price (Close)
BTC NAV per Share (Holdings × BTC price ÷ Shares Outstanding)
Core NAV per Share (Enterprise Value ÷ Shares Outstanding)
Total NAV per Share (BTC + Core)
Premium / Discount % (Market deviation from NAV)
Manual Timestamp for last data input (auditable)
Input data taken from www.gurufocus.com finance.yahoo.com
🔧 Customizable Inputs
BTC Holdings (default: 592,345 BTC)
BTC Price (manually updated)
Shares Outstanding (default: 266M)
Core Enterprise Value (EV ex-BTC)
Data Timestamp (manual)
🧠 Valuation Logic
The script separates MSTR’s market value into:
Digital Asset Treasury — fully marked to market via BTC price input.
Core Software/Analytics Business — approximated using total enterprise value less BTC exposure.
This two-part decomposition provides a cleaner NAV structure than traditional book value, which is often distorted by high intangible assets (MSTR’s tangible book value is negative as of Q2 2025).
⚠️ Disclosures
All inputs are manual — ensure accuracy by updating with the latest BTC prices and EV disclosures.
Core EV is treated as a constant unless updated, and does not include BTC or speculative adjustments.
Does not model future BTC acquisitions or operational leverage.
Historical Volatility with HV Average & High/Low Trendlines
### 📊 **Indicator Title**: Historical Volatility with HV Average & High/Low Trendlines
**Version**: Pine Script v5
**Purpose**:
This script visualizes market volatility using **Historical Volatility (HV)** and enhances analysis by:
* Showing a **moving average** of HV to identify volatility trends.
* Marking **high and low trendlines** to highlight extremes in volatility over a selected period.
---
### 🔧 **Inputs**:
1. **HV Length (`length`)**:
Controls how many bars are used to calculate Historical Volatility.
*(Default: 10)*
2. **Average Length (`avgLength`)**:
Number of bars used for calculating the moving average of HV.
*(Default: 20)*
3. **Trendline Lookback Period (`trendLookback`)**:
Number of bars to look back for calculating the highest and lowest values of HV.
*(Default: 100)*
---
### 📈 **Core Calculations**:
1. **Historical Volatility (`hv`)**:
$$
HV = 100 \times \text{stdev}\left(\ln\left(\frac{\text{close}}{\text{close} }\right), \text{length}\right) \times \sqrt{\frac{365}{\text{period}}}
$$
* Measures how much the stock price fluctuates.
* Adjusts annualization factor depending on whether it's intraday or daily.
2. **HV Moving Average (`hvAvg`)**:
A simple moving average (SMA) of HV over the selected `avgLength`.
3. **HV High & Low Trendlines**:
* `hvHigh`: Highest HV value over the last `trendLookback` bars.
* `hvLow`: Lowest HV value over the last `trendLookback` bars.
---
### 🖍️ **Visual Plots**:
* 🔵 **HV**: Blue line showing raw Historical Volatility.
* 🔴 **HV Average**: Red line (thicker) indicating smoothed HV trend.
* 🟢 **HV High**: Green horizontal line marking volatility peaks.
* 🟠 **HV Low**: Orange horizontal line marking volatility lows.
---
### ✅ **Usage**:
* **High HV**: Indicates increased risk or potential breakout conditions.
* **Low HV**: Suggests consolidation or calm markets.
* **Cross of HV above Average**: May signal rising volatility (e.g., before breakout).
* **Touching High/Low Levels**: Helps identify volatility extremes and possible reversal zones.
ATR Trailing Stops Strategy with Cross Arrowsadds signals when the ATR line is crossed.
Can be used for entries as well as a stop loss area.
Multi-Timeframe Close Alert with Toggleyou can create alerts with this indicator for when a time frame closes
EMA Cloud 200 High/Close с цветом трендаEMA Cloud 200 High/Close with Trend Color
Overview
This indicator creates a dynamic EMA cloud between two Exponential Moving Averages calculated from different price sources, providing clear visual trend identification and support/resistance zones.
Key Features
Dual EMA System: Upper EMA based on High prices, Lower EMA based on Close prices
Custom Timeframe: Analyze EMA on any timeframe regardless of chart timeframe
Dynamic Trend Coloring: Green for uptrend, Red for downtrend
Visual Cloud: Filled area between EMAs highlights price zones
Configurable Period: Default 200-period EMA (adjustable)
How It Works
The indicator calculates two separate 200-period EMAs:
Upper EMA: Based on High prices - shows resistance levels
Lower EMA: Based on Close prices - shows support levels
Trend Detection:
Current price above average EMA = Green (Bullish)
Current price below average EMA = Red (Bearish)
Trading Applications
Trend Identification: Color changes indicate trend shifts
Support/Resistance: Cloud boundaries act as dynamic S/R zones
Entry/Exit Points: Price interaction with cloud edges
Multi-timeframe Analysis: View higher timeframe EMAs on lower timeframe charts
Settings
EMA Period: Adjust calculation period (default: 200)
Top Source: Price source for upper EMA (default: High)
Bottom Source: Price source for lower EMA (default: Close)
Custom Timeframe: Choose analysis timeframe (default: 15min)
Best Practices
Use on trending markets for optimal results
Combine with other indicators for confirmation
Higher timeframes provide stronger signals
Cloud thickness indicates volatility levels
Perfect for swing traders and trend followers seeking clear visual trend analysis with dynamic support/resistance identification.
CLMM Vault策略回测 (专业版) v5Explanation of the CLMM (Concentrated Liquidity - Market Maker) Strategy Backtesting Model Developed for the Sui Chain Vaults Protocol
Why Are We Doing This?
Conducting strategy backtesting is a crucial step for us to make data-driven decisions, validate the feasibility of strategies, and manage potential risks before committing real funds and significant development resources. A strategy that appears to have a high APY may perform entirely differently once real-world frictional costs (such as rebalancing fees and slippage) are deducted. The goal of this backtesting model is to quickly and cost-effectively identify which strategy parameter combinations have the potential to be profitable and which ones pose risks before formal development, thereby avoiding significant losses and providing data support for the project's direction.
Core Features of the Backtesting Model
We have built a "pro version" (v5) strategy simulator using TradingView's Pine Script. It can quickly simulate the core performance of our auto-compounding and rebalancing Vaults on historical price data, with the following main features:
Auto-Compounding: Continuously adds the generated fee income to the principal based on the set profit range (e.g., 0.01%).
Auto-Rebalancing: Simulates automatic rebalancing actions when the price exceeds the preset profit range and deducts the corresponding costs.
Smart Filtering Mechanism: To make the simulation closer to our ideal "smart" decision-making, it integrates three freely combinable filtering mechanisms:
Buffer Zone: Tolerates minor and temporary breaches of the profit range to avoid unnecessary rebalancing.
Breakout Confirmation: Requires the price to be in the trigger zone for N consecutive candles to confirm a breakout, filtering out market noise from "false breakouts."
Time Cooldown: Enforces a minimum time interval between two rebalances to prevent value-destroying high-frequency trading in extreme market conditions.
Important: Simplifications and Assumptions of the Model
To quickly prototype and iterate on the TradingView platform, we have made some key simplifications to the model.
A fully accurate backtest would require a deep simulation of on-chain liquidity pools (Pool Pair), calculating the price impact (Slippage) and impermanent loss (IL) caused by each rebalance on the pool. Since TradingView cannot access real-time on-chain liquidity data, we have made the following simplifications:
Simplified Rebalancing Costs: Instead of simulating real transaction slippage, we use a unified input parameter of single rebalance cost (%) to "bundle" and approximate the total of Gas fees, slippage, and realized impermanent loss.
Simplified Fee Income: Instead of calculating fees based on real-time trading volume, we directly input an average fee annualized return (%) as the core income assumption for our strategy.
How to Use and Test
Team members can load this script and test different strategies by adjusting the input parameters on the panel. The most critical parameters include: position profit range, average fee annualized return, single rebalance cost, and the switches and corresponding values of the above three smart filters.
HTF Previous Candle Sweeps (1H–4D) - Safesa f as. as f. f sf s. sa fs. fsadsjaf dsadf jsdaf sdjf sajk fj sdfj saf d sj sadsd
HTF Previous Candle Sweeps (1H–4D)This is the TVS indicator, marking out DOL and previous candle sweeps.
Engulfing CandlesDetects Engulfing Candles with tha addition of an extra condition so that the volume of the engulfing candle is greater than the volume of the last four candles
TDSeqThe TDSeq is a trend exhaustion indicator. It's designed to identify potential price reversals by analyzing a pattern of price candles, signaling when a trend is likely to exhaust and reverse or consolidate. It is commonly used in professional trading to time entries, exits, or spot trend fatigue.
Reversal probable when number >=9
Volatility Zones (STDEV %)This indicator displays the relative volatility of an asset as a percentage, based on the standard deviation of price over a custom length.
🔍 Key features:
• Uses standard deviation (%) to reflect recent price volatility
• Classifies volatility into three zones:
Low volatility (≤2%) — highlighted in blue
Medium volatility (2–4%) — highlighted in orange
High volatility (>4%) — highlighted in red
• Supports visual background shading and colored line output
• Works on any timeframe and asset
📊 This tool is useful for identifying low-risk entry zones, periods of expansion or contraction in price behavior, and dynamic market regime changes.
You can adjust the STDEV length to suit your strategy or timeframe. Best used in combination with your entry logic or trend filters.
HTF Previous Candle Sweeps (1H–4D)This is a TVS entry module, marking out the DOL and Previous candle sweeps.
Trend 13/25/32 EMA SignalA simple script which fires of a signal on the first close above or below the 13/25/32 ema trend
Session SeparatorAn indicator that adds a vertical line for each of the following sessions start times:
Tokyo Session: 7pm EST
London Session: 3am EST
US Session: 8am EST
The purpose of this indicator is to have a minimalistic separation of the different time zones without cluttering the chart!
Fibo_Ma with Toggleable 200 EMA Filter Fibo_MA with Toggleable 200 EMA Filter
Description:
This multi-functional indicator blends Fibonacci-based moving averages with customizable filters and visual enhancements to support various trading strategies. It offers traders the flexibility to analyze trend dynamics and potential reversal zones using multiple tools in one script.
Key Features:
🔹 Fibonacci MA Framework
Leverage a range of Fibonacci numbers (from 1 to 233) to visualize trend-based EMA lines with optional smoothing. Users can choose the moving average method (SMA, EMA, RMA, WMA, VWMA, etc.) and adjust the smoothing length for fine-tuned analysis.
🔹 VWAP and Dynamic EMA Tools
Includes VWAP and a color-coded 200 EMA that updates based on trend slope. These help visualize key dynamic support and resistance levels.
🔹 Multi-Timeframe Support
Option to switch the data source to a higher timeframe for broader trend confirmation.
🔹 Signal Highlights
Bullish and bearish signal markers based on crossovers with optional filters.
Background highlights show whether the current price is above or below a smoothed EMA line.
🔹 Customizable Filters
Enable or disable filters like:
200 EMA Position Filter (only signal when price is above or below the 200 EMA)
ATR Filter (filter out low-volatility candles)
Volume Filter (signal only on sufficient volume)
🔹 Cross Alerts & Labels
Built-in alert conditions for crossovers and customizable signal display options—labels, shapes, and background highlights.
🔹 Advanced Options
Toggle forecast line visibility and offset
Fine-tune alerts using price action relative to the smooth trend line
Optional tail and cross label display for deeper chart customization
How to Use:
This tool can support trend-following, breakout, and pullback strategies. Customize the MA types, filters, and timeframe settings to match your trading style. The script is designed for visual clarity while offering rich configurability for discretionary and system-based traders.
Market Session“These are the time points I’ve studied in the Market Session, and they work very well for me.”
EMA 11/22/5 + MACD Zero Cross Buy/SellStrategy to identify entry and sell points using EMA 11/22/5 + MACD Zero Cross Buy/Sell
Stochastic RSI [Ehlers]The Stochastic RSI is a momentum oscillator that applies the Stochastic formula to the Relative Strength Index (RSI), rather than price. The Ehlers version refers to an enhanced, smoothed variant developed by John F. Ehlers, who is known for using signal processing techniques to reduce lag and noise in indicators.