Adaptive Quadratic Kernel EnvelopeThis study draws a fair-value curve from a quadratic-weighted (Nadaraya-Watson) regression. Alpha sets how sharply weights decay inside the look-back window, so you trade lag against smoothness with one slider. Band half-width is ATRslow times a bounded fast/slow ATR ratio, giving an instant response to regime shifts without overshooting on spikes. Work in log space when an instrument grows exponentially, equal percentage moves then map to equal vertical steps. NearBase and FarBase define a progression of adaptive thresholds, useful for sizing exits or calibrating mean-reversion logic. Non-repaint mode keeps one-bar delay for clean back-tests, predictive mode shows the zero-lag curve for live decisions.
Key points
- Quadratic weights cut phase error versus Gaussian or SMA-based envelopes.
- Dual-ATR scaling updates width on the next bar, no residual lag.
- Log option preserves envelope symmetry across multi-decade data.
- Alpha provides direct control of curvature versus noise.
- Built-in alerts trigger on the first adaptive threshold, ready for automation.
Typical uses
Trend bias from the slope of the curve.
Entry timing when price pierces an inner threshold and momentum stalls.
Breakout confirmation when closes hold beyond outer thresholds while volatility expands.
Stops and targets anchored to chosen thresholds, automatically matching current noise.
Indicadores de Banda
SMT + CISD Detector | NQ✅ Features
Detects bullish and bearish SMT using ES1! vs NQ.
Scans multiple timeframes: 1m, 5m, 15m, 1H.
Displays SMT & CISD checklist in a live dashboard table on your chart.
Clean, no clutter — no plots or shapes, just detection logic + checklist.
Designed specifically for trading NQ.
🚀PriceAction & SmartMoney ∞ Galaxy [VNFlow]Contact and discussion to use advanced tools to support your trading strategy
Email: hasobin@outlook.com
Phone: 0373885338
See you,
MohdTZ - SUPER indicatorInspired by my mentor Paradise, I've developed a custom indicator that combines five powerful tools into one.
This is especially designed for users who are using the free TradingView plan and are limited to a single indicator. With this all-in-one solution, you no longer have to compromise.
The combined indicator includes:
Paradise Money Noodle
EMA 200
EMA 13
SuperTrend Indicator
Watermark Labeling
This setup brings clarity, efficiency, and power—all within a single script.
EMA + RSI + MACD StrategyEMA + RSI + MACD Strategy EMA + RSI + MACD Strategy EMA + RSI + MACD Strategy EMA + RSI + MACD Strategy EMA + RSI + MACD Strategy EMA + RSI + MACD Strategy EMA + RSI + MACD Strategy EMA + RSI + MACD Strategy EMA + RSI + MACD Strategy EMA + RSI + MACD Strategy EMA + RSI + MACD Strategy
SlopeDirectionLine_TWSlopeDirectionLine_TW
___________________________
Tried to copy a MT4 indicator
EMA 65 and 200 Strategy (Updated)//@version=5
strategy("EMA 65 and 200 Strategy (Updated)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// Define EMAs
ema65 = ta.ema(close, 65)
ema200 = ta.ema(close, 200)
// Plot EMAs
plot(ema65, color=color.blue, linewidth=2, title="EMA 65")
plot(ema200, color=color.red, linewidth=2, title="EMA 200")
// Conditions for sell entry (Price touching EMA65 or EMA200 with a bearish trend)
sell_condition = (close < ema65 and close > ema65) or (close < ema200 and close > ema200)
sell_stop_loss = close + 20 // 20 points above the entry
sell_take_profit = close - 10 // 10 points below the entry
// Conditions for buy entry (Price touching EMA65 or EMA200 with a bullish trend)
buy_condition = (close > ema65 and close < ema65) or (close > ema200 and close < ema200)
buy_stop_loss = close - 20 // 20 points below the entry
buy_take_profit = close + 10 // 10 points above the entry
// Strategy execution: Buy and Sell orders
if (sell_condition)
strategy.entry("Sell", strategy.short, stop=sell_stop_loss, limit=sell_take_profit)
if (buy_condition)
strategy.entry("Buy", strategy.long, stop=buy_stop_loss, limit=buy_take_profit)
// Plot buy and sell signals
plotshape(series=sell_condition, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal", text="SELL")
plotshape(series=buy_condition, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal", text="BUY")
// Draw stop loss and take profit levels for visualization
plot(sell_condition ? sell_stop_loss : na, color=color.red, style=plot.style_line, linewidth=1, title="Sell Stop Loss")
plot(sell_condition ? sell_take_profit : na, color=color.green, style=plot.style_line, linewidth=1, title="Sell Take Profit")
plot(buy_condition ? buy_stop_loss : na, color=color.red, style=plot.style_line, linewidth=1, title="Buy Stop Loss")
plot(buy_condition ? buy_take_profit : na, color=color.green, style=plot.style_line, linewidth=1, title="Buy Take Profit")
Trend TraderDescription and Usage of the "Trend Trader" Indicator
The "Trend Trader" indicator, created by Gerardo Mercado as a legacy project, is a versatile trading tool designed to identify potential buy and sell signals across various instruments. While it provides predefined settings for popular instruments like US30, NDX100, GER40, and GOLD, it can be seamlessly adapted to any market, including forex pairs like EUR/USD. The indicator combines moving averages, time-based filters, and MACD confirmation to enhance decision-making for traders.
How It Works
Custom Moving Averages (MAs):
The indicator uses two moving averages:
Short MA: A faster-moving average (default: 10 periods).
Long MA: A slower-moving average (default: 100 periods).
Buy signals are generated when the Short MA crosses above the Long MA.
Sell signals are triggered when the Short MA crosses below the Long MA.
Time-Based Signals:
The user can define specific trading session times (start and end in UTC) to focus on high-activity periods for their chosen market.
Signals and background coloring are only active during the allowed session times.
MACD Confirmation:
A MACD (Moving Average Convergence Divergence) calculation on a 15-minute timeframe ensures stronger confirmation for signals.
Buy signals require the MACD line to be above the signal line.
Sell signals require the MACD line to be at or below the signal line.
Target Levels:
Predefined profit targets are dynamically set based on the selected trading instrument.
While it includes settings for US30, NDX100, GER40, and GOLD, the target levels can be adjusted to fit the volatility and structure of any asset, including forex pairs like EUR/USD.
Target 1 and Target 2 levels display when these thresholds are met after an entry signal.
Adaptability to Any Market:
Although predefined options are included for specific instruments, the indicator's moving averages, time settings, and MACD logic are applicable to any tradable asset, making it suitable for forex, commodities, indices, and more.
Visual Alerts:
Labels appear on the chart to highlight "BUY" and "SELL" signals at crossover points.
Additional labels indicate when price movements reach the predefined target levels.
Bar and background coloring visually represent active signals and MACD alignment.
Purpose
The indicator aims to simplify trend-following and momentum-based trading strategies. By integrating moving averages, MACD, customizable time sessions, and dynamic targets, it offers clear entry and exit points while being adaptable to the needs of individual traders across diverse markets.
How to Use
Setup:
Add the indicator to your TradingView chart.
Configure the moving average periods, trading session times, and target levels according to your preferences.
Select the instrument for predefined target settings or customize them to fit the asset you’re trading (e.g., EUR/USD or other forex pairs).
Interpreting Signals:
Buy Signal: The Short MA crosses above the Long MA, MACD confirms the upward trend, and the session is active.
Sell Signal: The Short MA crosses below the Long MA, MACD confirms the downward trend, and the session is active.
Adapt for Any Instrument:
Adjust the predefined target levels to match the volatility and trading style for your chosen asset.
For forex pairs like EUR/USD, consider typical pip movements to set appropriate profit targets.
Targets:
Use the provided target labels (e.g., 50 or 100 points) or customize them to reflect realistic profit goals based on the asset’s volatility.
Visual Aids:
Pay attention to the background color:
Greenish: Indicates a bullish trend during the allowed session.
Redish: Indicates a bearish trend during the allowed session.
Use the "BUY" and "SELL" labels for actionable insights.
This indicator is a flexible and powerful tool, suitable for traders across all markets. Its adaptability ensures that it can enhance your strategy, whether you’re trading forex, commodities, indices, or other assets. By offering actionable alerts and customizable settings, the "Trend Trader" serves as a valuable addition to any trader’s toolkit. FX:EURUSD
Dinámicas de Mercado ProUser Manual: Indicator "Dinámicas de Mercado Pro" (DMP)
Author: @Profit_Quant
Created by: Gemini AI (2025)
1. General Concept
The "Dinámicas de Mercado Pro" indicator is an all-in-one technical analysis tool designed to be overlaid directly onto your price chart. Its goal is to provide a clear and concise view of the market structure by combining three crucial trading elements:
The Overall Trend: What is the main direction of the market?
Liquidity Zones: Where is the price likely to react (supports and resistances)?
Breakout Momentum: When is the price breaking out of a range with force and volume?
By integrating these components, the DMP helps you make more informed trading decisions by identifying high-probability zones for entering or exiting trades.
2. Essential Step! - Initial Chart Setup
For the indicator to work as designed, it is essential to hide the original candles of the TradingView chart.
The indicator already draws its own candles with the market sentiment colors. If you do not hide the original ones, you will see both sets of candles overlapping, which will make the chart confusing and unreadable.
How to hide the chart's candles?
There are two simple ways:
Method 1 (Recommended):
Once you have the "DMP" indicator on your chart, look for the symbol's name in the top-left corner of your screen (e.g., BTCUSD, EURUSD, etc.).
Right next to the name, you will see an eye icon (👁️).
Click that eye icon to hide the main symbol (the original candles, bars, or lines). The chart will become clean, showing only the candles drawn by the DMP indicator.
Method 2 (Alternative):
Click the gear icon (⚙️) for the chart settings.
Go to the "Symbol" tab.
Uncheck the boxes for "Body," "Borders," and "Wicks," or set their opacity to 0%.
3. Main Components and Their Interpretation
The indicator has 3 key visual components you need to understand.
a) Supply and Demand Zones (Order Blocks)
These are the colored rectangles drawn automatically on the chart.
What are they?: They represent zones where there was a strong imbalance between buyers and sellers, often caused by the activity of large institutions.
Demand Zone (Blue Rectangle): A potential support zone. When the price returns to this area, buying pressure is expected to increase, pushing the price up.
Supply Zone (Red Rectangle): A potential resistance zone. When the price reaches this area, selling pressure is expected to increase, pushing the price down.
Mitigated Zone (Gray Rectangle): When the price touches a supply or demand zone, it becomes "mitigated," meaning the liquidity in that zone has already been used. The zone turns gray to indicate that it is less reliable and the price is more likely to break through it in the future.
b) Candle Coloring (Market Sentiment)
The chart candles will change color based on a priority system to give you an instant read of market sentiment.
Green Candles (Uptrend): Indicate that the price is above the long-term Exponential Moving Average (EMA) (200 by default). This suggests the overall trend is bullish, and you should look for buying opportunities.
Red Candles (Downtrend): Indicate that the price is below the 200 EMA. This suggests the overall trend is bearish, and you should look for selling opportunities.
White Candles (Bullish Breakout): Alert! This occurs when the price breaks a recent range high AND is accompanied by above-average volume. It's a strong sign of bullish momentum.
Purple Candles (Bearish Breakout): Alert! This occurs when the price breaks a recent range low with high volume. It's a strong sign of bearish momentum.
Gray Candles (Neutral): Appear when the price is very close to the 200 EMA, indicating indecision or consolidation in the market. This is a time for caution.
c) Probability Paths (Price Targets)
These are the dashed lines projected from the last real-time candle.
Demand Path (Blue Dashed Line): Points from the current price to the center of the nearest unmitigated demand zone. It acts as a potential support target.
Supply Path (Red Dashed Line): Points from the current price to the center of the nearest unmitigated supply zone. It acts as a potential resistance target.
4. Basic Trading Strategies
Confluence Strategy: Look for buying opportunities when the price pulls back to a blue demand zone while the candles are green (uptrend). Look for selling opportunities when the price rallies to a red supply zone with red candles (downtrend).
Breakout Strategy: Use the white or purple candles as an aggressive entry signal in the direction of the breakout. The stop-loss could be placed on the other side of the breakout candle.
Range Strategy: When the price is trapped between a clear supply and demand zone (with no breakout candles), you can trade the bounces between them until one zone is broken with a white or purple candle, signaling the end of the range.
5. Indicator Settings (Parameters)
You can customize every aspect of the indicator in its settings panel (the options are self-explanatory in the indicator's menu).
Vix FIX / StochRSI StrategyVix FIX / StochRSI Strategy — Smart Gold Trading with Market Fear Detection
Pine Script Version 6 | Timeframe: 1H | Supports Long & Short
🔍 Strategy Overview:
This strategy is designed for trading gold and other highly volatile assets. It combines three powerful components:
Williams VIX Fix (WVF) – A fear-based volatility indicator inspired by the CBOE VIX Index, adapted for non-index assets.
Stochastic RSI – Measures overbought and oversold momentum, used as an exit trigger.
Price Action Filters – Confirms strong bullish or bearish bars to trigger high-conviction entries.
📌 Entry Conditions:
✅ Long Entry
WVF indicates the end of fear (mean reversion signal).
Bullish momentum bar (upRange).
Price is higher than n bars ago but still below medium/long-term recent highs.
✅ Short Entry
WVF indicates the market just cooled down from fear.
Bearish momentum bar (downRange).
Price is lower than n bars ago but still above recent lows.
📌 Exit Conditions:
🔴 Exit Long when Stochastic Overbought + %K cross below %D
🔵 Exit Short when Stochastic Oversold + %K cross above %D
📊 Key Features:
Dual-side entries (Long & Short)
Timeframe-limited to 1 Hour (60 minutes) for consistent signal quality
Ideal for gold and volatile assets (crypto, index CFDs)
Backtested with strong performance across major pairs
👽 PriceAction & SmartMoney ∞ Galaxy [VNFlow]Contact and discussion to use advanced tools to support your trading strategy
Email: hasobin@outlook.com
Phone: 0373885338
See you,
Dao động [VNFlow]Contact and discussion to use advanced tools to support your trading strategy
Email: hasobin@outlook.com
Phone: 0373885338
Cafe break: Hanoi
See you,
Turtle 2.0 – Backtest Strategy for Trend ConfirmationA simple backtesting tool for traders who want to test and understand their own ideas.
This is not a signal provider. Not a finished system. Not financial advice.
Purpose of this Script
This strategy is not intended for live trading, but rather as an analytical and educational tool.
It is based on a simplified, trend-following Turtle-style logic and helps you explore the question:
“When does a strategy work – and when does it fail?”
I (Tom) am not a professional trader myself, but someone who is between beginner and intermediate.
This tool helps me (and hopefully you too) think more systematically and back up (or challenge) my own ideas.
Core Idea
Most trading strategies only work under certain market conditions.
This script helps you analyze:
– Does your logic work better in clear trends?
– Do trend filters help – and when do they hurt?
– How do sideways phases affect performance?
– Is your setup robust across different timeframes and assets?
Adjustable Settings
The script is designed to be flexible. In the settings panel, you can configure:
• Enable EMA trend filter – Activate or deactivate trend filtering
• EMA 1–4 – Length of exponential moving averages (e.g. 21, 50, etc.)
• Show pivots – Display local highs and lows as reference
• Pivot length – Number of candles to each side to define a pivot
• Show signals – Enable or disable signal visualization
All parameters can be adjusted directly in the TradingView settings menu.
If You Decide to Trade with It (Not Recommended)
If you still want to test this strategy with real trading, please consider:
Always analyze market context (trend, volatility, news)
Use your own stop-loss and take-profit logic
Avoid choppy or sideways markets
Test across different timeframes and instruments
Combine it with volume, support/resistance, or candlestick patterns
Note: The script is non-repainting – signals are shown only after the bar is closed.
Possible Use Cases
– Only show signals in trend phases
– Analyze: When does your setup perform well or poorly?
– Review “what-if” scenarios
– Base for experimentation and further development
Feedback Welcome
If you have ideas, questions, or suggestions – feel free to reach out.
I'd love to hear your thoughts or see how you use or modify the script.
Background & Development
This script was initially inspired by publicly available code from parsimaj.
It was completely rewritten, modernized, documented, and customized to my own requirements.
The goal was to create a simple, robust, and flexible learning and testing tool.
License & Disclaimer
– No guarantee of profitability. Not financial advice.
– Use at your own risk. Educational and analytical use only.
Author: Tom & ChatGPT
Version: Turtle 2.0 – Backtest Edition
Platform: TradingView – Pine Script v5
log regression forex and altcoin dom (caN)(0-100 Range)NO REPAİNTİNG
Stablecoin Dominance Indicator
The Stablecoin Dominance Indicator is a powerful tool designed to analyze the relative dominance of stablecoins within the cryptocurrency market. It utilizes a combination of regression analysis and standard deviation to provide valuable insights into market sentiment and potential turning points. This indicator is particularly useful for traders and investors looking to make informed decisions in the dynamic world of cryptocurrencies.
How to Read the Indicator:
The Stablecoin Dominance Indicator comprises three key lines, each serving a specific purpose:
Middle Line (Regression Line):
The middle line represents the Regression Line of stablecoin dominance, acting as a baseline showing the average or mean dominance of stablecoins in the market.
When the stablecoin dominance hovers around this middle line, it suggests a relatively stable market sentiment with no extreme overbought or oversold conditions.
Upper Line (2 Standard Deviations Above Mean):
The upper line, positioned 2 standard deviations above the Regression Line, indicates a significant deviation from the mean.
When stablecoin dominance approaches or surpasses this upper line, it may imply that the cryptocurrency market is experiencing oversold conditions, potentially signaling a market bottom. This is an opportune time for traders to consider increasing their exposure to cryptocurrencies.
Lower Line (2 Standard Deviations Below Mean):
The lower line, positioned 2 standard deviations below the Regression Line, shows a significant deviation in the opposite direction, indicating overbought conditions.
When stablecoin dominance approaches or falls below this lower line, it suggests overbought conditions in the market, possibly indicating a market top. Traders may consider reducing their cryptocurrency holdings or taking profits during this phase.
It's important to note that the Stablecoin Dominance Indicator should be used in conjunction with other analysis tools and strategies.
By understanding and applying the insights provided by this indicator, traders and investors can make more informed decisions in the ever-changing cryptocurrency landscape, potentially enhancing their trading strategies and risk management practices.
Log Regression Oscillator (caN)fi(ki)=>'ra'
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © fikira
//@version=6
indicator('Log Regression Oscillator', max_bars_back=5000, max_labels_count=500, max_lines_count=500, overlay=false)
________________________________________________________________________________________________________________________ ='
⎞ Settings ⎛
(__--------__) '
cGREEN = #089981, cRED = #F23645, cGRAY = #757a79
threshold = input.int (300 , minval=150)
proactive = input.bool (false )
GRE = input.color(cGREEN , 'Bull' , group='Style' )
RED = input.color(cRED , 'Bear' , group='Style' )
GRY = input.color(cGRAY , 'Unconfirmed Bull/Bear' , group='Style' )
showDsh = input.bool ( true , 'Show Dashboard' , group='Dashboard' )
dshLoc = str.replace(str.lower(input.string('Top Right', 'Location', group='Dashboard', options= )), ' ', '_')
txtSize = str.lower(input.string('Normal' , 'Size' , group='Dashboard', options= ) )
________________________________________________________________________________________________________________________ :='
⎞ Constants and general variables ⎛
(__-------------------------------__) '
INV = color(na)
n = bar_index
________________________________________________________________________________________________________________________ :='
⎞ Functions ⎛
(__---------__) '
dot(x, y)=>
if x.size() > 1 and y.size() > 1
m1 = matrix.new()
m2 = matrix.new()
m1.add_col(m1.columns(), y)
m2.add_row(m2.rows (), x)
m1.mult (m2)
.eigenvalues()
.sum()
//Closed form solution to best fit log function
log_reg(log_x, log_x2, log_y) =>
sum_log_x = log_x . sum()
sum_y = log_y . sum()
sum_log_x_y = dot(log_x ,log_y)
sum_log_x_sq = log_x2 . sum()
n_ = log_x .size()
//Closed-form solutions for a and b
a = (n_ * sum_log_x_y - sum_log_x * sum_y)
/ (n_ * sum_log_x_sq - math.pow(sum_log_x , 2))
b = ( sum_y - a * sum_log_x ) / n_
//Variables declared for draw()
var arrayarr = array.new(4, na)
proActH = false, proActL = false
var lastHi = 0., var lastLi = 0.
draw(aTop_x, aTop_x2, aTop_y, aBot_x, aBot_x2, aBot_y, top_points, prc_points, btm_points, refit) =>
var label labH = na, var label labL = na
vTop = 0.
vBtm = 0.
if refit
top_points.clear(), prc_points.clear(), btm_points.clear()
= log_reg(aTop_x, aTop_x2, aTop_y), arr.set(0, a_top), arr.set(1, b_top)
= log_reg(aBot_x, aBot_x2, aBot_y), arr.set(2, a_btm), arr.set(3, b_btm)
for i = 0 to n
top = math.exp(a_top * math.log(i) + b_top)
btm = math.exp(a_btm * math.log(i) + b_btm)
avg = math.avg(top, btm)
if i == n
vTop := top
vBtm := btm
ix = n - i
if ix < 4999
hi = high
lo = low
cl = close
getC = hi > avg ? hi : lo < avg ? lo : cl
prc_points.push(chart.point.from_index(i, 100 * math.max(-1.5, math.min(1.5, (getC - btm) / (top - btm)))))
for lab in label.all
lab.delete()
firstH = proactive ? true : false
firstL = proactive ? true : false
color colH = na, color colL = na
sz = prc_points.size()
if aTop_x.size() > 0
for i = aTop_x.size() -1 to 0
idx = int(math.exp(aTop_x.get(i)))
if idx < sz and idx > n - 5000 and idx >= 0
if firstH
if aTop_x.last() != lastHi
colH := GRY
firstH := false
else
colH := RED
else
colH := RED
top = math.exp(a_top * math.log(idx) + b_top)
btm = math.exp(a_btm * math.log(idx) + b_btm)
label.new(idx , 100 *
math.max(-1.5, math.min(1.5, (high - btm)
/ (top - btm)
) ), '●', textcolor = colH, color=INV, size=8)
if aBot_x.size() > 0
for i = aBot_x.size() -1 to 0
idx = int(math.exp(aBot_x.get(i)))
if idx < sz and idx > n - 5000 and idx >= 0
if firstL
if aBot_x.last() != lastLi
colL := GRY
firstL := false
else
colL := GRE
else
colL := GRE
top = math.exp(a_top * math.log(idx) + b_top)
btm = math.exp(a_btm * math.log(idx) + b_btm)
label.new(idx , 100 *
math.max(-1.5, math.min(1.5, (low - btm)
/ (top - btm)
) ), '●', textcolor = colL, color=INV, size=8
, style = label.style_label_up)
else
top = math.exp(arr.get(0) * math.log(n) + arr.get(1))
btm = math.exp(arr.get(2) * math.log(n) + arr.get(3))
avg = math.avg(top, btm)
vTop := top
vBtm := btm
hi = high, lo = low, cl = close
getC = hi > avg ? hi : lo < avg ? lo : cl
prc_points.push(chart.point.from_index(n, 100 * math.max(-1.5, math.min(1.5, (getC - btm) / (top - btm)))))
for poly in polyline.all
poly.delete()
if barstate.islast
labH.delete(), labH := label.new(n, 100, str.tostring(vTop, format.mintick), color=color.new(chart.fg_color, 85), textcolor=RED, style=label.style_label_lower_left, size=12)
labL.delete(), labL := label.new(n, 0, str.tostring(vBtm, format.mintick), color=color.new(chart.fg_color, 85), textcolor=GRE, style=label.style_label_upper_left, size=12)
polyline.new(prc_points.size() >= 5000 ? prc_points.slice(prc_points.size()-4999, prc_points.size()-1) : prc_points, line_color=chart.fg_color)
________________________________________________________________________________________________________________________ :='
⎞ Variables ⎛
(__---------__) '
//bool trigerring fit
refit = false
var top_points = array.new(0)
var prc_points = array.new(0)
var btm_points = array.new(0)
//Variables arrays
var peaks_y = array.new(0)
var peaks_x = array.new(0)
var peaks_x2 = array.new(0)
var btms_y = array.new(0)
var btms_x = array.new(0)
var btms_x2 = array.new(0)
var tb = table.new(dshLoc, 4, 8
, bgcolor = #1e222d
, border_color = #373a46
, border_width = 1
, frame_color = #373a46
, frame_width = 1)
________________________________________________________________________________________________________________________ :='
⎞ Exec ⎛
(__----__) '
//Top Bottom detection
max = ta.max(high)
var min = low
min := max == high ? low
: math.min(low , min)
barsmax = ta.barssince(high == max)
barsmin = ta.barssince(low == min)
if barsmax == threshold
nmax = n-barsmax
if peaks_x .size() > 0 and peaks_x.last() != lastHi
peaks_y .set(-1, math.log( max) )
peaks_x .set(-1, math.log(nmax) )
peaks_x2.set(-1, math.pow(math.log(nmax), 2))
else
peaks_y .push( math.log(max) )
peaks_x .push( math.log(nmax) )
peaks_x2.push( math.pow(math.log(nmax), 2))
lastHi := math.log(nmax)
refit := true
else
min := math.min(low , min)
if barsmin == threshold
nmin = n-barsmin
if btms_x .size() > 0 and btms_x.last() != lastLi
btms_y .set(-1, math.log(min) )
btms_x .set(-1, math.log(nmin) )
btms_x2 .set(-1, math.pow(math.log(nmin), 2))
else
btms_y .push( math.log( min) )
btms_x .push( math.log(nmin) )
btms_x2.push( math.pow(math.log(nmin), 2))
lastLi := math.log(nmin)
refit := true
chMax = ta.change(max) , chMin = ta.change(min)
if (chMax != 0 or chMin != 0) and proactive and not refit and n > threshold
= log_reg(peaks_x, peaks_x2, peaks_y)
= log_reg( btms_x, btms_x2, btms_y)
top = math.exp(a_top * math.log(n) + b_top)
btm = math.exp(a_btm * math.log(n) + b_btm)
if 100 * ((high - btm) / (top - btm)) > 90
if peaks_x.last() == lastHi
peaks_y .push(math.log(max))
peaks_x .push(math.log(n))
peaks_x2.push(math.log(n)
*math.log(n))
else
peaks_y .set(-1, math.log(max))
peaks_x .set(-1, math.log(n))
peaks_x2.set(-1, math.log(n)
* math.log(n))
arr.set(0, a_top), arr.set(1, b_top)
arr.set(2, a_btm), arr.set(3, b_btm)
refit := true
proActH := true
if 100 * ((low - btm) / (top - btm)) < 10
if btms_x.last() == lastLi
btms_y .push(math.log(min))
btms_x .push(math.log(n))
btms_x2.push(math.log(n)
*math.log(n))
else
btms_y .set(-1, math.log(min))
btms_x .set(-1, math.log(n))
btms_x2.set(-1, math.log(n)
* math.log(n))
arr.set(0, a_top), arr.set(1, b_top)
arr.set(2, a_btm), arr.set(3, b_btm)
refit := true
proActL := true
enough = peaks_x.size() > 1 and btms_x.size() > 1
if enough
draw(peaks_x, peaks_x2, peaks_y, btms_x, btms_x2, btms_y, top_points, prc_points, btm_points, refit)
else
if barstate.islast
txt = ''
if peaks_x.size() < 2
txt += str.format('{0} Top Swing', peaks_x.size())
if btms_x .size() < 2
if txt != ''
txt += ', '
txt += str.format('{0} Bottom Swing', btms_x .size())
txt += ' Change "Threshold" or timeframe for more Swings'
tb.cell(0, 0, txt, text_color=chart.fg_color, text_size=txtSize)
________________________________________________________________________________________________________________________ :='
⎞ Plot ⎛
(__----__) '
plot(n%2==0? 30 : na,'30' , color=color.new(chart.fg_color, 50), style=plot.style_linebr, display=display.pane)
plot(n%2==0? 70 : na,'70' , color=color.new(chart.fg_color, 50), style=plot.style_linebr, display=display.pane)
_100 = plot(100, 'na(100)', display=display.none)
_70 = plot( 70, 'na(70)' , display=display.none)
_60 = plot( 60, 'na(60)' , display=display.none)
_50 = plot( 50, 'na(50)' , display=display.none)
_40 = plot( 40, 'na(40)' , display=display.none)
_30 = plot( 30, 'na(30)' , display=display.none)
_00 = plot( 0, 'na(0)' , display=display.none)
fill(_100, _70, 100, 70, color.new(RED, 50), INV)
fill( _60, _50, 60, 50, INV, color.new(chart.fg_color, 85))
fill( _50, _40, 50, 40, color.new(chart.fg_color, 85), INV)
fill( _30, _00, 30, 0, INV, color.new(GRE, 75))
________________________________________________________________________________________________________________________ :='
⎞ End ⎛
(__---__) '
👽 PriceAction & SmartMoney ∞ Galaxy [VNFlow]Contact and discussion to use advanced tools to support your trading strategy
Email: hasobin@outlook.com
Phone: 0373885338
See you,
WR-Top Dip signals
This script is a technical analysis tool for stocks that calculates the Williams %R (WR) indicator and displays tops and bottoms signals on the chart. The WR indicator is an oscillator that measures the momentum of the stock's price movement over a certain period of time. It is based on the highest and lowest prices over a certain period of time and is expressed as a percentage of the difference between the current price and the highest price (or lowest price) over that period. The WR indicator ranges from 0 to -100, with 0 indicating that the stock is oversold and -100 indicating that the stock is overbought.
The script provides default parameters of WR1:84 and WR2:168, which are suitable for most traders. However, you can modify the parameters according to your needs, such as WR1:55 and WR2:144. The WR1 parameter is the number of periods used to calculate the first WR line, and the WR2 parameter is the number of periods used to calculate the second WR line. The two lines are then plotted on the chart, and their crossing generates the tops and bottoms signals.
The tops and bottoms signals are determined by the crossing of two different time periods of the WR indicator. When the shorter-term WR line (WR1) crosses below the upper limit (usually set at -20), and the longer-term WR line (WR2) does not cross below the upper limit, a tops signal is generated. This indicates that the stock is overbought and may be a good time to sell. Conversely, when the shorter-term WR line (WR1) crosses above the lower limit (usually set at -80), and the longer-term WR line (WR2) does not cross above the lower limit, a bottoms signal is generated. This indicates that the stock is oversold and may be a good time to buy.
In addition to displaying the WR indicator and tops and bottoms signals, the script also includes some drawing and alert features. You can draw horizontal lines at the upper and lower limits to help you identify when the WR indicator crosses them. You can also set alerts to notify you when a tops or bottoms signal is generated.
Please note that this script is just one tool among many for technical analysis, and you should use it in conjunction with other tools and your own analysis to make your own buy or sell decisions. The purpose of this description is to help users understand the script's functionality and how to use it. If you have any questions, please refer to TradingView's community rules or contact TradingView customer service.
亚欧美盘开关及交接时段标记 - plotshape版📌 English Description:
This script highlights the opening and closing times of the Asian, European, and US trading sessions on your chart, helping traders understand global session dynamics and volatility shifts in a visual and intuitive way.
💡 Applicable Instruments: Gold (XAUUSD) and Major Forex Pairs (e.g., EURUSD, GBPUSD, USDJPY, etc.)
💡 Best for: Price Action, Session-based strategies, Breakout trades
Time zone used: Asia/Shanghai (GMT+8)
Asia Session: 08:00 - 15:00 (typically range-bound)
European Session: 15:00 - 19:00 (London volatility begins)
US Session: 20:00 - 00:00 (New York session, often the major trend period)
Gray background marks the 19:00 - 20:00 transition phase between EU and US sessions, often a quiet or pivotal moment
Perfect for short- to medium-term traders who rely on understanding session-based price behaviors—especially effective for gold and major forex pairs.
📌 中文描述:
本脚本用于在图表中标记亚盘、欧盘、美盘的开盘与收盘时间点,以直观的方式帮助交易者识别全球主要交易时段的节奏与波动特征。
💡 适用品种:黄金(XAUUSD)及主流外汇(如EURUSD、GBPUSD、USDJPY等)
💡 适用策略:价格行为(Price Action)、时段波动捕捉、趋势突破等
使用**北京时间(Asia/Shanghai)**识别时段
亚盘时间:08:00 - 15:00(通常为震荡行情)
欧盘时间:15:00 - 19:00(伦敦时段,波动增强)
美盘时间:20:00 - 00:00(纽约时段,主趋势时段)
灰色背景提示:19:00 - 20:00 为欧美盘交接期,是重要的波动衰减与等待爆发阶段
适合关注全球交易时段切换规律的中短线交易者,特别对黄金与外汇价格行为策略有重要参考意义。
THUAN RSIgiá trên rsi rất tiện dụng cho ae chuyên phái rsi, chỉ báo động lượng và biên độ giá real time
OBV with MA & Bollinger Bands by Marius1032OBV with MA & Bollinger Bands by Marius1032
This script adds customizable moving averages and Bollinger Bands to the classic OBV (On Balance Volume) indicator. It helps identify volume-driven momentum and trend strength.
Features:
OBV-based trend tracking
Optional smoothing: SMA, EMA, RMA, WMA, VWMA
Optional Bollinger Bands with SMA
Potential Combinations and Trading Strategies:
Breakouts: Look for price breakouts from the Bollinger Bands, and confirm with a rising OBV for an uptrend or falling OBV for a downtrend.
Trend Reversals: When the price touches a Bollinger Band, examine the OBV for divergence. A bullish divergence (price lower low, OBV higher low) near the lower band could signal a reversal.
Volume Confirmation: Use OBV to confirm the strength of the trend indicated by Bollinger Bands. For example, if the BBs indicate an uptrend and OBV is also rising, it reinforces the bullish signal.
1. On-Balance Volume (OBV):
Purpose: OBV is a momentum indicator that uses volume flow to predict price movements.
Calculation: Volume is added on up days and subtracted on down days.
Interpretation: Rising OBV suggests potential upward price movement. Falling OBV suggests potential lower prices.
Divergence: Divergence between OBV and price can signal potential trend reversals.
2. Moving Average (MA):
Purpose: Moving Averages smooth price fluctuations and help identify trends.
Combination with OBV: Pairing OBV with MAs helps confirm trends and identify potential reversals. A crossover of the OBV line and its MA can signal a trend reversal or continuation.
3. Bollinger Bands (BB):
Purpose: BBs measure market volatility and help identify potential breakouts and trend reversals.
Structure: They consist of a moving average (typically 20-period) and two standard deviation bands.
Combination with OBV: Combining BBs with OBV allows for a multifaceted approach to market analysis. For example, a stock hitting the lower BB with a rising OBV could indicate accumulation and a potential upward reversal.
Created by: Marius1032
Spaghetti 2.0 - Multi-Asset Performance [By Barbell_Fi]This is an updated and more opinionated take on the original Spaghetti indicator.
Multi Asset Performance indicator (also called “Spaghetti”) makes it easy to monitor the changes in Price, Open Interest, and On Balance Volume across multiple assets simultaneously, distinguish assets that are overperforming or underperforming, observe the relative strength of different assets or currencies, use it as a tool for identifying mean reversion opportunities and even for constructing pairs trading strategies, detect "risk-on" or "risk-off" periods, evaluate statistical relationships between assets through metrics like correlation and beta, construct hedging strategies, trade rotations and much more.
Start by selecting a time period (e.g., 1 DAY) to set the interval for when data is reset. This will provide insight into how price, open interest, and on-balance volume change over your chosen period. In the settings, asset selection is fully customizable, allowing you to create three groups of up to 30 tickers each. These tickers can be displayed in a variety of styles and colors. Additional script settings offer a range of options, including smoothing values with a Simple Moving Average (SMA), highlighting the top or bottom performers, plotting the group mean, applying heatmap/gradient coloring, generating a table with calculations like beta, correlation, and RSI, creating a profile to show asset distribution around the mean, and much more.
One of the most important script tools is the screener table, which can display:
🔸 Percentage Change (Represents the return or the percentage increase or decrease in Price/OI/OBV over the current selected period)
🔸 Beta (Represents the sensitivity or responsiveness of asset's returns to the returns of a benchmark/mean. A beta of 1 means the asset moves in tandem with the market. A beta greater than 1 indicates the asset is more volatile than the market, while a beta less than 1 indicates the asset is less volatile. For example, a beta of 1.5 means the asset typically moves 150% as much as the benchmark. If the benchmark goes up 1%, the asset is expected to go up 1.5%, and vice versa.)
🔸 Correlation (Describes the strength and direction of a linear relationship between the asset and the mean. Correlation coefficients range from -1 to +1. A correlation of +1 means that two variables are perfectly positively correlated; as one goes up, the other will go up in exact proportion. A correlation of -1 means they are perfectly negatively correlated; as one goes up, the other will go down in exact proportion. A correlation of 0 means that there is no linear relationship between the variables. For example, a correlation of 0.5 between Asset A and Asset B would suggest that when Asset A moves, Asset B tends to move in the same direction, but not perfectly in tandem.)
🔸 RSI (Measures the speed and change of price movements and is used to identify overbought or oversold conditions of each asset. The RSI ranges from 0 to 100 and is typically used with a time period of 14. Generally, an RSI above 70 indicates that an asset may be overbought, while RSI below 30 signals that an asset may be oversold.)
⚙️ Settings Overview:
◽️ Period
Periodic inputs (e.g. daily, monthly, etc.) determine when the values are reset to zero and begin accumulating again until the period is over. This visualizes the net change in the data over each period. The input "Visible Range" is auto-adjustable as it starts the accumulation at the leftmost bar on your chart, displaying the net change in your chart's visible range. There's also the "Timestamp" option, which allows you to select a specific point in time from where the values are accumulated. The timestamp anchor can be dragged to a desired bar via Tradingview's interactive option. Timestamp is particularly useful when looking for outperformers/underperformers after a market-wide move. The input positioned next to the period selection determines the timeframe on which the data is based. It's best to leave it at default (Chart Timeframe) unless you want to check the higher timeframe structure of the data.
◽️ Data
The first input in this section determines the data that will be displayed. You can choose between Price, OI, and OBV. The second input lets you select which one out of the three asset groups should be displayed. The symbols in the asset group can be modified in the bottom section of the indicator settings.
◽️ Appearance
You can choose to plot the data in the form of lines, circles, areas, and columns. The colors can be selected by choosing one of the six pre-prepared color palettes.
◽️ Labeling
This input allows you to show/hide the labels and select their appearance and size. You can choose between Label (colored pointed label), Label and Line (colored pointed label with a line that connects it to the plot), or Text Label (colored text).
◽️ Smoothing
If selected, this option will smooth the values using a Simple Moving Average (SMA) with a custom length. This is used to reduce noise and improve the visibility of plotted data.
◽️ Highlight
If selected, this option will highlight the top and bottom N (custom number) plots, while shading the others. This makes the symbols with extreme values stand out from the rest.
◽️ Group Mean
This input allows you to select the data that will be considered as the group mean. You can choose between Group Average (the average value of all assets in the group) or First Ticker (the value of the ticker that is positioned first on the group's list). The mean is then used in calculations such as correlation (as the second variable) and beta (as a benchmark). You can also choose to plot the mean by clicking on the checkbox.
◽️ Profile
If selected, the script will generate a vertical volume profile-like display with 10 zones/nodes, visualizing the distribution of assets below and above the mean. This makes it easy to see how many or what percentage of assets are outperforming or underperforming the mean.
◽️ Gradient
If selected, this option will color the plots with a gradient based on the proximity of the value to the upper extreme, zero, and lower extreme.
◽️ Table
This section includes several settings for the table's appearance and the data displayed in it. The "Reference Length" input determines the number of bars back that are used for calculating correlation and beta, while "RSI Length" determines the length used for calculating the Relative Strength Index. You can choose the data that should be displayed in the table by using the checkboxes.
◽️ Asset Groups
This section allows you to modify the symbols that have been selected to be a part of the 3 asset groups. If you want to change a symbol, you can simply click on the field and type the ticker of another one. You can also show/hide a specific asset by using the checkbox next to the field.