Session Averages: Open, High, LowThis indicator allows for the user to specify an intraday time based range and calculate the average open price, average high price, and average low price for that session. The indicator plots the 5 most recent sessions on the chart, which allows for the user to identify fair value, Power of 3 movements, trends, and consolidations.
If bullish the user can identify when price is below the average open or low price of a range, and if bearish can identify when price is above the open or high of a range.
週期
TLU2025//@version=5
strategy("RSI + MA + BB30 Strategy", overlay=true)
// === Cài đặt RSI ===
rsiLength = input(14, title="RSI Length")
rsiOverbought = input(80, title="RSI Overbought Level")
rsiOversold = input(25, title="RSI Oversold Level")
rsi = ta.rsi(close, rsiLength)
// === Cài đặt MA ===
maLength20 = input(20, title="MA20 Length")
maLength50 = input(50, title="MA50 Length")
ma20 = ta.sma(close, maLength20)
ma50 = ta.sma(close, maLength50)
// === Cài đặt Bollinger Bands (BB30) ===
bbLength = input(30, title="Bollinger Bands Length")
bbStdDev = input(2, title="BB Standard Deviation")
= ta.bb(close, bbLength, bbStdDev)
// === Điều kiện giao dịch ===
// Điều kiện Long
longCondition = (rsi < rsiOversold) and (ma20 > ma50) and (close < bbLower)
// Điều kiện Short
shortCondition = (rsi > rsiOverbought) and (ma20 < ma50) and (close > bbUpper)
// === Mở lệnh giao dịch ===
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
// === Hiển thị chỉ báo trên biểu đồ ===
// Hiển thị MA
plot(ma20, color=color.blue, title="MA20")
plot(ma50, color=color.red, title="MA50")
// Hiển thị Bollinger Bands
plot(bbUpper, color=color.green, title="BB Upper")
plot(bbBasis, color=color.gray, title="BB Basis")
plot(bbLower, color=color.green, title="BB Lower")
// Hiển thị RSI và mức quan trọng
hline(rsiOverbought, "RSI Overbought", color=color.red, linestyle=hline.style_dashed)
hline(rsiOversold, "RSI Oversold", color=color.green, linestyle=hline.style_dashed)
plot(rsi, color=color.purple, title="RSI")
Average Candle RangeThis indicator calculates and displays the average trading range of candles over a specified period, helping traders identify volatility patterns and potential trading opportunities.
Features:
- Customizable lookback period (1-500 bars)
- Clean visual display in a top-right table overlay
- High-precision calculation showing 10 decimal places
- Real-time updates with each new bar
How it Works:
The indicator calculates the range of each candle (High - Low) and then computes the Simple Moving Average (SMA) of these ranges over your specified lookback period. The result is displayed in an easy-to-read table overlay.
Use Cases:
- Volatility Analysis: Monitor market volatility trends
- Position Sizing: Help determine position sizes based on average price movements
- Trading Strategy Development: Use as a reference for setting stop losses and take profits
- Market Phase Identification: Help identify high vs low volatility market phases
Settings:
- Lookback Period: Default is 140 bars, adjustable from 1 to 500
Note:
The indicator displays values with 10 decimal places for high-precision analysis, particularly useful in markets with small price movements.
CLAP Daily ATR Table with ATR LineATR Calculation:
The script calculates the ATR using the built-in ta.atr() function with a user-defined length.
The ATR is calculated on a daily time frame using request.security().
Table Creation:
A table is displayed in the top_right position of the chart.
The table includes the stock ticker symbol and its current daily ATR value.
Customization:
You can adjust the ATR length via the input panel.
The table design includes customizable colors and formatting.
EMA Crossover Strategy for XAUUSD (5m)Script Explanation:
Moving Averages:
MA 5: Uses 5 periods for a short moving average.
MA 10: Uses period 10 for intermediate moving average.
MA 20: Uses 20 period for long moving average.
BUY Signal Conditions:
MA 5 crosses MA 10 from bottom to top (ta.crossover(ma1, ma2)).
MA sequence after the crossover: MA 5 > MA 10 > MA 20 (confirmation of uptrend).
SELL Signal Conditions:
MA 5 crosses MA 10 from top to bottom (ta.crossunder(ma1, ma2)).
MA sequence after the crossover: MA 5 < MA 10 < MA 20 (confirmation of downtrend).
Visualization:
MA 5 (Red): The most responsive line.
MA 10 (Blue): Middle line.
MA 20 (Green): The slowest line.
Green Arrow (BUY): Appears below the candle when the BUY condition is met.
Red Arrow (SELL): Appears above the candle when the SELL condition is met.
Alerts:
Notifications are sent whenever a BUY or SELL signal is detected.
How to use:
Copy this script into the Pine Script Editor in TradingView.
Save and add to your chart.
Pay attention to signals:
BUY Signal: Appears when MA 5 cuts MA 10 from bottom to top, in the order MA 5 > MA 10 > MA 20.
SELL Signal: Appears when MA 5 cuts MA 10 from top to bottom, in the order MA 5 < MA 10 < MA 20.
3 SMA Crossover Signals - Improved SELL TimingSELL Logic Adjustment: SELL Signal Logic: Uses the ta.crossunder(sma2, sma3) condition to detect SMA 2 to below SMA 3 crossovers early. Added the condition that SMA 1 > SMA 2 > SMA 3 to ensure all SMAs are in descending order: SMA 1 (highest) → SMA 2 → SMA 3 (lowest). Change: Condition ta.crossunder(sma2, sma1) removed to speed up signal detection, as it slowed down SELL signals. BUY Signal: No change, keep using: SMA 2 cuts SMA 3 from bottom to top. Sequence SMA 1 < SMA 2 > SMA 3. Result: BUY Signal: A green arrow appears below the candle when a BUY condition is detected. SELL Signal: A red arrow appears faster above the candle when a SELL condition is detected. How to Use: Copy this code into the Pine Script Editor in TradingView. Save and add to your chart. Signal: BUY Signal (green arrow): Appears when the SMA crosses upwards. SELL Signal (red arrow): Appears faster when the SMA crosses downwards.
Close Difference of rolling candleThis is a modified version of FTFC concept.
FTFC concept look at HTF candle's direction, green or red.
This indicator calculate the closing price difference in a rolling base. For example, if now it is 3:05pm, it will show the price difference at closing between 3:05pm and 2:04pm if you use 60 mins as the setting. The moment it turn or green, it means in the last 1 hour, the candle is green. It is not tied to a time point of the HTF clock.
Monthly Drawdowns and Moves UP This script allows users to analyze the performance of a specific month across multiple years, focusing on maximum drawdowns and maximum upward moves within the selected month. The script offers the following features:
Dynamic Month Selection : Choose any month to analyze using an intuitive dropdown menu.
Maximum Drawdown and Upward Move Calculations :
Calculate the largest percentage drop (drawdown) and rise (move up) for the selected month each year.
Visual Highlights :
The selected month is visually highlighted on the chart with a semi-transparent overlay.
Dynamic Labels:
Labels display the maximum drawdown and upward move directly on the chart for better visualization.
Comprehensive Table Summary:
A table provides a year-by-year summary of the maximum drawdowns and upward moves for the selected month, making it easy to spot trends over time.
Customizable Display Options:
Toggle the visibility of drawdown labels, move-up labels, and the summary table for a clutter-free experience.
This tool is perfect for traders and analysts looking to identify seasonal patterns, assess risk and opportunity, and gain deeper insights into monthly performance metrics across years. Customize, explore, and make informed decisions with this powerful Pine Script indicator.
Master Bitcoin & Litecoin Stock To Flow (S2F) ModelMaster Bitcoin & Litecoin Stock-to-Flow (S2F) Model
This indicator visualizes the Stock-to-Flow (S2F) models for Bitcoin (BTC) and Litecoin (LTC) based on Plan B's methodology. It calculates S2F and projects price models for both assets, incorporating daily changes in circulating supply. The script is designed exclusively for daily timeframes.
Features:
LTC & BTC S2F Models:
Calculates Stock-to-Flow values for both assets using daily new supply and circulating supply data.
Models S2F values with a customizable multiplier for precise adjustments.
500-Day Moving Average Models:
Smoothens the S2F model by applying a 500-day (18-month) moving average, providing a long-term trend perspective.
Customizable Inputs:
Adjust LTC and BTC multipliers to fine-tune the models.
Alert for Timeframe:
Alerts users to switch to the daily timeframe if another period is selected.
Plots:
LTC S2F Model: Blue line representing Litecoin’s calculated S2F-based price model.
BTC S2F Model: Orange line representing Bitcoin’s calculated S2F-based price model.
500-Day Avg Models: Smoothened S2F models for both LTC and BTC.
Notes:
Requires daily timeframe (1D) for accurate calculations.
Supply data is sourced from GLASSNODE:LTC_SUPPLY and GLASSNODE:BTC_SUPPLY.
Disclaimer:
This model is derived from Plan B's S2F methodology and is intended for educational and entertainment purposes only. It does not reflect official predictions or financial advice. Always conduct your own research before making investment decisions.
Kmag's Pi Cycle Top Indicator w Next Top Predictor & BTC HalvingThis chart is for Bitcoin only, and only on the 1 day timeframe.
It shows the Pi Cycle indicator top signal, which is when the 111 day SMA crosses above the 350 day SMA x 2.
The prediction uses predictive analysis completed by AI given the current days 111 SMA line slope, and the 350 SMA x 2 line. As the 111 SMA line slope increases this date will re-calibrate quickly to show a date more indicative of the crossover date.
This chart also shows the Bitcoin halving, and also the average Bitcoin peak sell date signal in purple after the Bitcoin halving, which is about 525 days after the Bitcoin halving date.
Global M2 MonitorYoY change in M2s from US, China, Eurozone, and Japan.
US: 30% weight
China: 30% weight
Eurozone: 25% weight
Japan: 15% weight
These weights are approximations based on relative M2 sizes
Global M2 MonitorYoY change in M2s from US, China, Eurozone, and Japan.
US: 30% weight
China: 30% weight
Eurozone: 25% weight
Japan: 15% weight
These weights are approximations based on relative M2 sizes
Previous Day's High and Low with Dotted LinesThis indicator shows you the Previous Day's High and Low
It Screams When Crypto BottomsGet ready to ride the crypto rollercoaster with your new favourite tool for catching Bitcoin and Ethereum at their juiciest, most oversold moments. This isn’t just another boring indicator — it screams when it’s time to load your bags and get ready for the ride back up!
Why You'll Love It:
Crypto-Exclusive Magic: Works only for BTC and ETH, so you know it’s focused on the heavy hitters. Sooner or later, the rest will follow, innit?
Big Picture Focus: Designed for daily. No noisy intraday drama — just pure, clear signals.
Market Cap Wizardry: Uses advanced calculations (original vs. realised market cap, fancy math, and all that) to spot when the market’s gone too low.
Screaming Alerts: When the signal hits, it’s like a neon sign screaming, “Crypto Bottomed!"
Think of this indicator as your backstage pass to the crypto world’s most dramatic moments. It’s not subtle — it’s bold, loud, and ready to help you time the market like a pro.
Pro Tip: Use it only on a daily chart. Don’t try it on shorter timeframes — it won’t scream, and you’ll miss the show! 🙀
RSI %20 Change rsı ın yatay piyasa da hareket ederken anlık genişleme yapması durumun da bu da %20 dir beyAZ MUMLA BELİRTİR. RSI 70 ve 26 dını yuları kestiğin de bunları belirtir ve ema 50 ve 200 kullanılmıstır. fikirlerinizi merak ediyorum yorum yaparsanız sevinirim. bol lazançlar
Dynamic Time Period HighlighterDynamic time period highlighter for back testing. As you move along in bar replay mode, this indicator will highlight your trading window, saving you from having to do it manually.
TICK LevelsUSI:TICK This indicator will post in the Tick Chart the levels. it is useful to have it for market internals.
zero_line = 0
pos_500 = 500
neg_500 = -500
pos_750 = 750
neg_750 = -750
pos_1000 = 1000
neg_1000 = -1000
NVEST_GROUPTitle:
Pine Script for "NVEST " with Automated SELL Signal Detection
Features:
Multi-Symbol Support:
Automatically detects the symbol (e.g., XAU, WTI, USD/CAD) or allows for manual symbol selection.
Multi-Timeframe Analysis:
Customizable candle coloring:
Bullish candles: Blue
Bearish candles: Pink
Cloud visualization for bullish and bearish trends.
Displays Stop Loss and Take Profit lines, along with labeled buy signals.
Signal Logic:
Customizable Parameters:
Allows for manual symbol input and detailed customization of indicator settings for each symbol.
Option to disable timeframe checks for flexibility.
Additional Features:
Custom logo and branding display on the chart.
Error handling to ensure symbols match the chart's data.