Elliott Wave Expert AdvisorElliott Wave Expert Advisor - Professional Wave Analysis Tool
OVERVIEW
--------
The Elliott Wave Expert Advisor is a comprehensive Pine Script indicator designed for TradingView that automates Elliott Wave analysis and generates high-probability trading signals. Built on Ralph Nelson Elliott's Wave Principle, this indicator identifies impulse wave patterns, validates them against strict Elliott Wave rules, and provides precise entry points with calculated risk management levels.
CORE FUNCTIONALITY
------------------
1. TREND DETECTION
- Dual Moving Average system (Fast/Slow MA)
- MACD confirmation for trend strength
- Automatic trend classification (Uptrend/Downtrend/Sideways)
- Only generates signals aligned with main trend
2. SWING POINT DETECTION
- Automatic pivot high/low identification
- Configurable sensitivity (lookback periods)
- Minimum swing size filtering to reduce noise
- ZigZag visualization connecting swing points
3. WAVE IDENTIFICATION
- 5-wave impulse pattern recognition (1-2-3-4-5)
- 3-wave corrective pattern detection (A-B-C)
- Wave labels displayed on chart
- Color-coded validation status (Blue = Valid, Orange = Pending)
4. ELLIOTT WAVE RULES VALIDATION
Strictly enforces three cardinal rules:
- Rule 1: Wave 2 never retraces more than 100% of Wave 1
- Rule 2: Wave 3 is never the shortest impulse wave
- Rule 3: Wave 4 never overlaps Wave 1 price territory
5. FIBONACCI ANALYSIS
- Automatic Fibonacci retracement calculations (23.6%, 38.2%, 50%, 61.8%, 78.6%)
- Fibonacci extension projections (100%, 161.8%, 261.8%)
- Wave 3 and Wave 5 target projections
- Fibonacci-based Take Profit levels
6. SIGNAL GENERATION
- Entry signals at Wave 2 completion (catch Wave 3)
- Entry signals at Wave 4 completion (catch Wave 5)
- Automatic Stop Loss placement below/above pivot points
- Multiple Take Profit targets (TP1 at 1.618 extension, TP2 at Wave 5 projection)
- Risk/Reward ratio calculation and filtering
- Minimum R:R threshold (default 1.5:1)
7. VISUAL ELEMENTS
- Pivot markers (H/L) showing swing highs and lows
- ZigZag lines connecting swing points
- Wave number labels (1-2-3-4-5) with validation colors
- Entry signal arrows (Green = BUY, Red = SELL)
- Stop Loss lines (Red dashed)
- Take Profit lines (Green dashed and dotted)
- Real-time status dashboard showing:
* Number of pivots detected
* Wave count progress (X/5)
* Pattern validation status
* Market trend direction
* Signal active status
* Helpful tips and guidance
OPTIMAL USAGE
-------------
• Timeframes: H1, H4, D1 (avoid M1-M5 due to noise)
• Markets: Forex majors (EUR/USD, GBP/USD), Gold (XAU/USD), Major Cryptocurrencies
• Market Conditions: Strong trending markets (avoid ranging/sideways conditions)
• Risk Management: Never risk more than 1-2% per trade
• Position Sizing: Based on calculated Stop Loss distance
CONFIGURATION PARAMETERS
------------------------
Trend Detection:
- MA Fast Period (default: 20)
- MA Slow Period (default: 50)
- MACD settings (12/26/9)
Swing Detection:
- Pivot Lookback Left/Right (default: 10/10, reduce to 5/5 for M15)
- Min Swing Size % (default: 0.1%, reduce to 0.05% for M15)
Wave Detection:
- Min Wave Size % (default: 0.5%, reduce to 0.2-0.3% for smaller timeframes)
Risk Management:
- SL Buffer % (default: 0.1%)
- TP1 Fibonacci Ratio (default: 1.618)
- Min Risk/Reward (default: 1.5)
Visualization:
- Toggle visibility for MAs, ZigZag, Wave Labels, Signals, SL/TP
- Customizable colors for all elements
- Optional trend background coloring
IMPORTANT NOTES
---------------
• Elliott Wave analysis is subjective - this indicator implements one specific interpretation
• Works best in trending markets; automatically suppresses signals in sideways conditions
• Signals are NOT repainting after pivot confirmation
• Not a "holy grail" - combine with other analysis and proper risk management
• Requires patience - quality setups are infrequent but high-probability
• Always backtest on historical data before live trading
ELLIOTT WAVE THEORY BACKGROUND
------------------------------
Elliott Wave Theory, developed by Ralph Nelson Elliott in the 1930s, proposes that market prices move in predictable wave patterns driven by investor psychology. An impulse wave consists of five sub-waves (three in the trend direction, two corrections), followed by a three-wave correction. This indicator automates the identification of these patterns and validates them against Elliott's original rules.
DISCLAIMER
----------
This indicator is for educational and informational purposes only. Past performance does not guarantee future results. Always conduct your own analysis and never trade with money you cannot afford to lose. The indicator provides signals based on technical analysis patterns and does not constitute financial advice.
VERSION
-------
v1.0 - Initial Release
Pine Script v5
Created: 2024
SUPPORT
-------
For detailed usage instructions, refer to the included documentation:
- usage_guide.md - Complete user manual with examples
- elliott_rules.md - Elliott Wave theory reference and implementation details
อินดิเคเตอร์และกลยุทธ์
ROC & Momentum FusionROC & Momentum Fusion
(by HabibiTrades ©)
Purpose:
“ROC & Momentum Fusion” combines the Rate of Change (ROC) with a MACD-style signal engine to identify early momentum reversals, confirmed trend shifts, and low-volatility choppy zones.
It’s built for traders who want early momentum detection with the clarity of trend persistence — adaptable to any instrument and timeframe.
⚙️ How It Works
Rate of Change (ROC):
Measures the percentage speed of price change over time, showing the raw momentum strength.
Signal Line (EMA):
A short EMA of the ROC — responds faster to new directional shifts, similar to a MACD signal line.
Histogram:
Displays acceleration and deceleration between the ROC and its signal line.
Persistent Trend States:
When the ROC crosses the signal line or zero, the indicator enters a new momentum regime
(bullish or bearish) and stays in that color until another flip occurs.
Dynamic Choppy Zone:
When ROC momentum fades within the zero buffer zone, the indicator turns orange, signaling a sideways or indecisive market.
🟢 Visual Regimes
Regime Description Color
Bullish Momentum ROC above zero or signal line 🟢 Neon Green
Bearish Momentum ROC below zero or signal line 🔴 Neon Red
Choppy / Neutral ROC hovering within ±threshold range 🟠 Neon Orange
This color system makes it visually effortless to see whether the market is trending, reversing, or consolidating.
🧭 Adaptive Intelligence
The script automatically adjusts to market type and session for consistent accuracy:
Session Adaptive: Adjusts smoothing based on global sessions (Asian, London, New York, Sydney).
Instrument Adaptive: Fine-tunes sensitivity automatically for major assets — NASDAQ (NQ), S&P 500 (ES), Gold (GC), Oil (CL), Bitcoin (BTC).
Volatility Normalization: Optionally divides ROC by its own standard deviation to stabilize noisy assets and maintain consistent scaling.
🔔 Signals & Alerts
Bullish Reversal:
ROC crosses above its signal or zero line — early momentum flip.
Bearish Reversal:
ROC crosses below its signal or zero line — downward momentum flip.
Alerts:
Both reversal conditions include built-in alert triggers for automation and notifications.
🎨 Visual Features
Main ROC Line: Adaptive EMA of ROC, color-coded by trend regime.
Signal Line: Optional white EMA overlay for MACD-style crossovers.
Histogram: Visual burst display of acceleration (green/red).
Reversal Markers: Optional triangles marking exact crossover points.
Threshold Lines: Highlight the zero and buffer zones for visual clarity.
🧩 Best Use Cases
Identify early momentum shifts before price confirms them.
Confirm trend continuation or exhaustion with color persistence.
Detect choppy / low-volatility periods instantly.
Works across all timeframes — from 1-minute scalping to weekly swings.
Combine with structure, EMAs, or volume for confirmation.
⚙️ Recommended Settings
Setting Default Description
ROC Period 6 Core momentum length (lower = faster response).
Signal EMA Length 3 MACD-style responsiveness (lower = more reactive).
Zero Buffer Threshold 0.15 Defines the width of the neutral zone around zero.
Choppy Zone Multiplier 1.0 Expands or tightens the orange zone sensitivity.
These defaults have been optimized through real-market testing to balance responsiveness and smoothness across different asset classes.
⚠️ Notes
The color regime is persistent, meaning once the line turns bullish or bearish, it remains in that state until momentum structurally flips.
The orange zone represents momentum uncertainty and helps avoid false entries in range-bound markets.
Works seamlessly on any timeframe and with any asset.
ADR levels+// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © notprofessorgreen
//@version=5
indicator("ADR levels", shorttitle = 'ADR', overlay=true, max_bars_back=5000, max_lines_count=500)
// Error catching
if (timeframe.in_seconds() >= timeframe.in_seconds('D'))
runtime.error('Timeframe cannot be greater than Daily')
// Inputs
adr_days = input.int(10, title = 'Days', maxval=250, minval = 1)
std_x = input.float(1.0, "Scale Factor")
width = input.int(1, "Line Width")
// ADR line inputs
adr_color = input.color(color.gray, "ADR Color")
adr_style = input.string("solid", "ADR Style", options= )
// Standard deviation inputs
std_dev_0_5 = input.float(0.5, "Std Dev 1 Multiplier", minval=0.1, maxval=5.0)
std_0_5_show = input.bool(true, "Show Std Dev 1", inline="std1")
std_0_5_color = input.color(color.gray, "Std Dev 1 Color", inline="std1")
std_0_5_style = input.string("dotted", "Std Dev 1 Style", options= , inline="std1")
std_dev_1 = input.float(1.0, "Std Dev 2 Multiplier", minval=0.1, maxval=5.0)
std_1_show = input.bool(true, "Show Std Dev 2", inline="std2")
std_1_color = input.color(color.gray, "Std Dev 2 Color", inline="std2")
std_1_style = input.string("dotted", "Std Dev 2 Style", options= , inline="std2")
std_dev_2 = input.float(2.0, "Std Dev 3 Multiplier", minval=0.1, maxval=5.0)
std_2_show = input.bool(true, "Show Std Dev 3", inline="std3")
std_2_color = input.color(color.gray, "Std Dev 3 Color", inline="std3")
std_2_style = input.string("dotted", "Std Dev 3 Style", options= , inline="std3")
// Fibonacci inputs
fib_1_level = input.float(0.3, "Fib Level 1", minval=0, maxval=2.0)
fib_1_show = input.bool(true, "Show Fib 1", inline="fib1")
fib_1_color = input.color(color.blue, "Fib 1 Color", inline="fib1")
fib_1_style = input.string("dashed", "Fib 1 Style", options= , inline="fib1")
fib_2_level = input.float(0.5, "Fib Level 2", minval=0, maxval=2.0)
fib_2_show = input.bool(true, "Show Fib 2", inline="fib2")
fib_2_color = input.color(color.blue, "Fib 2 Color", inline="fib2")
fib_2_style = input.string("dashed", "Fib 2 Style", options= , inline="fib2")
fib_3_level = input.float(0.7, "Fib Level 3", minval=0, maxval=2.0)
fib_3_show = input.bool(true, "Show Fib 3", inline="fib3")
fib_3_color = input.color(color.blue, "Fib 3 Color", inline="fib3")
fib_3_style = input.string("dashed", "Fib 3 Style", options= , inline="fib3")
show_labels = input.bool(true, "Show Labels")
// Stats table inputs
show_stats = input.bool(true, "Show Table")
sample_size = input.bool(true, "Show Sample Sizes")
tbl_loc = input.string('Bottom Right', "Table", options = )
tbl_size = input.string('Tiny', "", options = )
rch_color = input.color(color.rgb(3, 131, 99, 70), "Reached ")
csd_color = input.color(color.rgb(127, 1, 185, 70), "Closed Through ")
// Function to convert style string to line style
get_line_style(string style) =>
switch style
"solid" => line.style_solid
"dashed" => line.style_dashed
"dotted" => line.style_dotted
// Variables
reset = session.islastbar_regular
var float track_highs = 0.00
var float track_lows = 0.00
var float today_adr = 0.00
var adrs = array.new_float(adr_days, 0.00)
var line adr_pos = na
var line adr_neg = na
var line fib_1_pos = na
var line fib_1_neg = na
var line fib_2_pos = na
var line fib_2_neg = na
var line fib_3_pos = na
var line fib_3_neg = na
var line std_0_5_pos = na
var line std_0_5_neg = na
var line std_1_pos = na
var line std_1_neg = na
var line std_2_pos = na
var line std_2_neg = na
var label fib_1_pos_lbl = na
var label fib_1_neg_lbl = na
var label fib_2_pos_lbl = na
var label fib_2_neg_lbl = na
var label fib_3_pos_lbl = na
var label fib_3_neg_lbl = na
var label adr_pos_lbl = na
var label adr_neg_lbl = na
var label std_0_5_pos_lbl = na
var label std_0_5_neg_lbl = na
var label std_1_pos_lbl = na
var label std_1_neg_lbl = na
var label std_2_pos_lbl = na
var label std_2_neg_lbl = na
// ADR calculation
track_highs := reset ? high : math.max(high, track_highs )
track_lows := reset ? low : math.min(low, track_lows )
if reset
array.unshift(adrs, math.round_to_mintick(track_highs - track_lows ))
if array.size(adrs) > adr_days
array.pop(adrs)
today_adr := math.round_to_mintick(array.avg(adrs))
// Delete previous lines and labels
line.delete(adr_pos )
line.delete(adr_neg )
line.delete(fib_1_pos )
line.delete(fib_1_neg )
line.delete(fib_2_pos )
line.delete(fib_2_neg )
line.delete(fib_3_pos )
line.delete(fib_3_neg )
line.delete(std_0_5_pos )
line.delete(std_0_5_neg )
line.delete(std_1_pos )
line.delete(std_1_neg )
line.delete(std_2_pos )
line.delete(std_2_neg )
label.delete(fib_1_pos_lbl )
label.delete(fib_1_neg_lbl )
label.delete(fib_2_pos_lbl )
label.delete(fib_2_neg_lbl )
label.delete(fib_3_pos_lbl )
label.delete(fib_3_neg_lbl )
label.delete(adr_pos_lbl )
label.delete(adr_neg_lbl )
label.delete(std_0_5_pos_lbl )
label.delete(std_0_5_neg_lbl )
label.delete(std_1_pos_lbl )
label.delete(std_1_neg_lbl )
label.delete(std_2_pos_lbl )
label.delete(std_2_neg_lbl )
// Draw ADR lines
adr_pos := line.new(bar_index, open + today_adr, bar_index+50, open + today_adr,
width=width, color=adr_color, style=get_line_style(adr_style))
adr_neg := line.new(bar_index, open - today_adr, bar_index+50, open - today_adr,
width=width, color=adr_color, style=get_line_style(adr_style))
// Draw ADR labels
if show_labels
adr_pos_lbl := label.new(bar_index+50, open + today_adr, "ADR High (" + str.tostring(adr_days) + "D)",
xloc=xloc.bar_index, textalign=text.align_left, textcolor=adr_color, color=color.new(color.blue, 90), style=label.style_none)
adr_neg_lbl := label.new(bar_index+50, open - today_adr, "ADR Low (" + str.tostring(adr_days) + "D)",
xloc=xloc.bar_index, textalign=text.align_left, textcolor=adr_color, color=color.new(color.red, 90), style=label.style_none)
// Calculate deviations
var float half_dev = na
var float one_dev = na
var float two_dev = na
half_dev := today_adr * std_dev_0_5
one_dev := today_adr * std_dev_1
two_dev := today_adr * std_dev_2
// Draw standard deviation lines (with show/hide options)
if std_0_5_show
std_0_5_pos := line.new(bar_index, (open + today_adr) + half_dev, bar_index+50, (open + today_adr) + half_dev,
width=width, color=std_0_5_color, style=get_line_style(std_0_5_style))
std_0_5_neg := line.new(bar_index, (open - today_adr) - half_dev, bar_index+50, (open - today_adr) - half_dev,
width=width, color=std_0_5_color, style=get_line_style(std_0_5_style))
if show_labels
std_0_5_pos_lbl := label.new(bar_index+50, (open + today_adr) + half_dev, "Std " + str.tostring(std_dev_0_5),
xloc=xloc.bar_index, textalign=text.align_left, textcolor=std_0_5_color, color=color.new(#000000,100), style=label.style_none)
std_0_5_neg_lbl := label.new(bar_index+50, (open - today_adr) - half_dev, "Std -" + str.tostring(std_dev_0_5),
xloc=xloc.bar_index, textalign=text.align_left, textcolor=std_0_5_color, color=color.new(#000000,100), style=label.style_none)
if std_1_show
std_1_pos := line.new(bar_index, (open + today_adr) + one_dev, bar_index+50, (open + today_adr) + one_dev,
width=width, color=std_1_color, style=get_line_style(std_1_style))
std_1_neg := line.new(bar_index, (open - today_adr) - one_dev, bar_index+50, (open - today_adr) - one_dev,
width=width, color=std_1_color, style=get_line_style(std_1_style))
if show_labels
std_1_pos_lbl := label.new(bar_index+50, (open + today_adr) + one_dev, "Std " + str.tostring(std_dev_1),
xloc=xloc.bar_index, textalign=text.align_left, textcolor=std_1_color, color=color.new(#000000,100), style=label.style_none)
std_1_neg_lbl := label.new(bar_index+50, (open - today_adr) - one_dev, "Std -" + str.tostring(std_dev_1),
xloc=xloc.bar_index, textalign=text.align_left, textcolor=std_1_color, color=color.new(#000000,100), style=label.style_none)
if std_2_show
std_2_pos := line.new(bar_index, (open + today_adr) + two_dev, bar_index+50, (open + today_adr) + two_dev,
width=width, color=std_2_color, style=get_line_style(std_2_style))
std_2_neg := line.new(bar_index, (open - today_adr) - two_dev, bar_index+50, (open - today_adr) - two_dev,
width=width, color=std_2_color, style=get_line_style(std_2_style))
if show_labels
std_2_pos_lbl := label.new(bar_index+50, (open + today_adr) + two_dev, "Std " + str.tostring(std_dev_2),
xloc=xloc.bar_index, textalign=text.align_left, textcolor=std_2_color, color=color.new(#000000,100), style=label.style_none)
std_2_neg_lbl := label.new(bar_index+50, (open - today_adr) - two_dev, "Std -" + str.tostring(std_dev_2),
xloc=xloc.bar_index, textalign=text.align_left, textcolor=std_2_color, color=color.new(#000000,100), style=label.style_none)
// Draw Fibonacci lines
if fib_1_show
fib_1_pos := line.new(bar_index, open + today_adr * fib_1_level, bar_index+50, open + today_adr * fib_1_level,
width=width, color=fib_1_color, style=get_line_style(fib_1_style))
fib_1_neg := line.new(bar_index, open - today_adr * fib_1_level, bar_index+50, open - today_adr * fib_1_level,
width=width, color=fib_1_color, style=get_line_style(fib_1_style))
if show_labels
fib_1_pos_lbl := label.new(bar_index+50, open + today_adr * fib_1_level, "Fib " + str.tostring(fib_1_level),
xloc=xloc.bar_index, textalign=text.align_left, textcolor=fib_1_color, color=color.new(#000000,100), style=label.style_none)
fib_1_neg_lbl := label.new(bar_index+50, open - today_adr * fib_1_level, "Fib -" + str.tostring(fib_1_level),
xloc=xloc.bar_index, textalign=text.align_left, textcolor=fib_1_color, color=color.new(#000000,100), style=label.style_none)
if fib_2_show
fib_2_pos := line.new(bar_index, open + today_adr * fib_2_level, bar_index+50, open + today_adr * fib_2_level,
width=width, color=fib_2_color, style=get_line_style(fib_2_style))
fib_2_neg := line.new(bar_index, open - today_adr * fib_2_level, bar_index+50, open - today_adr * fib_2_level,
width=width, color=fib_2_color, style=get_line_style(fib_2_style))
if show_labels
fib_2_pos_lbl := label.new(bar_index+50, open + today_adr * fib_2_level, "Fib " + str.tostring(fib_2_level),
xloc=xloc.bar_index, textalign=text.align_left, textcolor=fib_2_color, color=color.new(#000000,100), style=label.style_none)
fib_2_neg_lbl := label.new(bar_index+50, open - today_adr * fib_2_level, "Fib -" + str.tostring(fib_2_level),
xloc=xloc.bar_index, textalign=text.align_left, textcolor=fib_2_color, color=color.new(#000000,100), style=label.style_none)
if fib_3_show
fib_3_pos := line.new(bar_index, open + today_adr * fib_3_level, bar_index+50, open + today_adr * fib_3_level,
width=width, color=fib_3_color, style=get_line_style(fib_3_style))
fib_3_neg := line.new(bar_index, open - today_adr * fib_3_level, bar_index+50, open - today_adr * fib_3_level,
width=width, color=fib_3_color, style=get_line_style(fib_3_style))
if show_labels
fib_3_pos_lbl := label.new(bar_index+50, open + today_adr * fib_3_level, "Fib " + str.tostring(fib_3_level),
xloc=xloc.bar_index, textalign=text.align_left, textcolor=fib_3_color, color=color.new(#000000,100), style=label.style_none)
fib_3_neg_lbl := label.new(bar_index+50, open - today_adr * fib_3_level, "Fib -" + str.tostring(fib_3_level),
xloc=xloc.bar_index, textalign=text.align_left, textcolor=fib_3_color, color=color.new(#000000,100), style=label.style_none)
else
today_adr := today_adr
line.set_x2(adr_pos, bar_index+50)
line.set_x2(adr_neg, bar_index+50)
if show_labels
label.set_x(adr_pos_lbl, bar_index+50)
label.set_x(adr_neg_lbl, bar_index+50)
if std_0_5_show
line.set_x2(std_0_5_pos, bar_index+50)
line.set_x2(std_0_5_neg, bar_index+50)
if show_labels
label.set_x(std_0_5_pos_lbl, bar_index+50)
label.set_x(std_0_5_neg_lbl, bar_index+50)
if std_1_show
line.set_x2(std_1_pos, bar_index+50)
line.set_x2(std_1_neg, bar_index+50)
if show_labels
label.set_x(std_1_pos_lbl, bar_index+50)
label.set_x(std_1_neg_lbl, bar_index+50)
if std_2_show
line.set_x2(std_2_pos, bar_index+50)
line.set_x2(std_2_neg, bar_index+50)
if show_labels
label.set_x(std_2_pos_lbl, bar_index+50)
label.set_x(std_2_neg_lbl, bar_index+50)
if fib_1_show
line.set_x2(fib_1_pos, bar_index+50)
line.set_x2(fib_1_neg, bar_index+50)
if show_labels
label.set_x(fib_1_pos_lbl, bar_index+50)
label.set_x(fib_1_neg_lbl, bar_index+50)
if fib_2_show
line.set_x2(fib_2_pos, bar_index+50)
line.set_x2(fib_2_neg, bar_index+50)
if show_labels
label.set_x(fib_2_pos_lbl, bar_index+50)
label.set_x(fib_2_neg_lbl, bar_index+50)
if fib_3_show
line.set_x2(fib_3_pos, bar_index+50)
line.set_x2(fib_3_neg, bar_index+50)
if show_labels
label.set_x(fib_3_pos_lbl, bar_index+50)
label.set_x(fib_3_neg_lbl, bar_index+50)
// Stats calculation
var float d_hi = high
var float d_lo = low
var float d_open = open
var float d_range = array.new_float()
var float adr_val = na
var float d_adr_hi = na
var float d_adr_lo = na
type adr_stats
int hit_adr_hi = 0
int hit_adr_lo = 0
int hit_adr_both = 0
int thru_adr_hi = 0
int thru_adr_lo = 0
int hit_fib_1_hi = 0
int hit_fib_1_lo = 0
int hit_fib_2_hi = 0
int hit_fib_2_lo = 0
int hit_fib_3_hi = 0
int hit_fib_3_lo = 0
int hit_std_0_5_hi = 0
int hit_std_0_5_lo = 0
int hit_std_1_hi = 0
int hit_std_1_lo = 0
int hit_std_2_hi = 0
int hit_std_2_lo = 0
int d_count = 0
var adr_sun = adr_stats.new()
var adr_mon = adr_stats.new()
var adr_tue = adr_stats.new()
var adr_wed = adr_stats.new()
var adr_thu = adr_stats.new()
var adr_fri = adr_stats.new()
var adr_sat = adr_stats.new()
if timeframe.change("D")
x = adr_mon
dow = dayofweek(time , "America/New_York")
if dow == dayofweek.tuesday
x := adr_tue
else if dow == dayofweek.wednesday
x := adr_wed
else if dow == dayofweek.thursday
x := adr_thu
else if dow == dayofweek.friday
x := adr_fri
else if dow == dayofweek.saturday
x := adr_sat
else if dow == dayofweek.sunday
x := adr_sun
if not na(adr_val)
x.d_count += 1
if d_hi > d_adr_hi
x.hit_adr_hi += 1
if d_lo < d_adr_lo
x.hit_adr_lo += 1
if d_hi > d_adr_hi and d_lo < d_adr_lo
x.hit_adr_both += 1
if close > d_adr_hi
x.thru_adr_hi += 1
if close < d_adr_lo
x.thru_adr_lo += 1
if fib_1_show
if d_hi > d_open + (adr_val * fib_1_level)
x.hit_fib_1_hi += 1
if d_lo < d_open - (adr_val * fib_1_level)
x.hit_fib_1_lo += 1
if fib_2_show
if d_hi > d_open + (adr_val * fib_2_level)
x.hit_fib_2_hi += 1
if d_lo < d_open - (adr_val * fib_2_level)
x.hit_fib_2_lo += 1
if fib_3_show
if d_hi > d_open + (adr_val * fib_3_level)
x.hit_fib_3_hi += 1
if d_lo < d_open - (adr_val * fib_3_level)
x.hit_fib_3_lo += 1
if std_0_5_show
if d_hi > d_adr_hi + (adr_val * std_dev_0_5)
x.hit_std_0_5_hi += 1
if d_lo < d_adr_lo - (adr_val * std_dev_0_5)
x.hit_std_0_5_lo += 1
if std_1_show
if d_hi > d_adr_hi + (adr_val * std_dev_1)
x.hit_std_1_hi += 1
if d_lo < d_adr_lo - (adr_val * std_dev_1)
x.hit_std_1_lo += 1
if std_2_show
if d_hi > d_adr_hi + (adr_val * std_dev_2)
x.hit_std_2_hi += 1
if d_lo < d_adr_lo - (adr_val * std_dev_2)
x.hit_std_2_lo += 1
if timeframe.change("D")
d_open := open
array.unshift(d_range, d_hi - d_lo)
if array.size(d_range) > adr_days
array.pop(d_range)
if array.size(d_range) == adr_days
adr_val := array.avg(d_range)
d_adr_hi := open + (adr_val*std_x)/2
d_adr_lo := open - (adr_val*std_x)/2
d_hi := high
d_lo := low
else
d_hi := math.max(high, d_hi)
d_lo := math.min(low, d_lo)
// Table functions
get_table_pos(pos) =>
switch pos
"Bottom Center" => position.bottom_center
"Bottom Left" => position.bottom_left
"Bottom Right" => position.bottom_right
"Middle Center" => position.middle_center
"Middle Left" => position.middle_left
"Middle Right" => position.middle_right
"Top Center" => position.top_center
"Top Left" => position.top_left
"Top Right" => position.top_right
var _loc = get_table_pos(tbl_loc)
get_table_size(size) =>
switch size
'Tiny' => size.tiny
'Small' => size.small
'Normal' => size.normal
'Large' => size.large
'Huge' => size.huge
'Auto' => size.auto
var _size = get_table_size(tbl_size)
fmt_sample(s, float pct, int count) =>
str.format("{0,number,percent}", pct) + (sample_size ? " ("+str.tostring(count)+")" : "")
// Draw table
if barstate.islast and show_stats
var tbl = table.new(_loc, 100, 100, chart.bg_color, chart.fg_color, 2, chart.fg_color, 1)
// Column headers (days + empty first cell)
table.cell(tbl, 0, 0, "Level", text_size = _size)
table.cell(tbl, 1, 0, "Mon", bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, 0, "Tue", bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, 0, "Wed", bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, 0, "Thu", bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, 0, "Fri", bgcolor = rch_color, text_size = _size)
// Row headers and data
var row = 1
table.cell(tbl, 0, row, "ADR High", text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_adr_hi / adr_mon.d_count, adr_mon.hit_adr_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_adr_hi / adr_tue.d_count, adr_tue.hit_adr_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_adr_hi / adr_wed.d_count, adr_wed.hit_adr_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_adr_hi / adr_thu.d_count, adr_thu.hit_adr_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_adr_hi / adr_fri.d_count, adr_fri.hit_adr_hi), bgcolor = rch_color, text_size = _size)
row := row + 1
table.cell(tbl, 0, row, "ADR Low", text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_adr_lo / adr_mon.d_count, adr_mon.hit_adr_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_adr_lo / adr_tue.d_count, adr_tue.hit_adr_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_adr_lo / adr_wed.d_count, adr_wed.hit_adr_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_adr_lo / adr_thu.d_count, adr_thu.hit_adr_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_adr_lo / adr_fri.d_count, adr_fri.hit_adr_lo), bgcolor = rch_color, text_size = _size)
row := row + 1
table.cell(tbl, 0, row, "ADR High (Close)", text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.thru_adr_hi / adr_mon.d_count, adr_mon.thru_adr_hi), bgcolor = csd_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.thru_adr_hi / adr_tue.d_count, adr_tue.thru_adr_hi), bgcolor = csd_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.thru_adr_hi / adr_wed.d_count, adr_wed.thru_adr_hi), bgcolor = csd_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.thru_adr_hi / adr_thu.d_count, adr_thu.thru_adr_hi), bgcolor = csd_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.thru_adr_hi / adr_fri.d_count, adr_fri.thru_adr_hi), bgcolor = csd_color, text_size = _size)
row := row + 1
table.cell(tbl, 0, row, "ADR Low (Close)", text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.thru_adr_lo / adr_mon.d_count, adr_mon.thru_adr_lo), bgcolor = csd_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.thru_adr_lo / adr_tue.d_count, adr_tue.thru_adr_lo), bgcolor = csd_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.thru_adr_lo / adr_wed.d_count, adr_wed.thru_adr_lo), bgcolor = csd_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.thru_adr_lo / adr_thu.d_count, adr_thu.thru_adr_lo), bgcolor = csd_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.thru_adr_lo / adr_fri.d_count, adr_fri.thru_adr_lo), bgcolor = csd_color, text_size = _size)
row := row + 1
if fib_1_show
table.cell(tbl, 0, row, "Fib " + str.tostring(fib_1_level), text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_fib_1_hi / adr_mon.d_count, adr_mon.hit_fib_1_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_fib_1_hi / adr_tue.d_count, adr_tue.hit_fib_1_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_fib_1_hi / adr_wed.d_count, adr_wed.hit_fib_1_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_fib_1_hi / adr_thu.d_count, adr_thu.hit_fib_1_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_fib_1_hi / adr_fri.d_count, adr_fri.hit_fib_1_hi), bgcolor = rch_color, text_size = _size)
row := row + 1
table.cell(tbl, 0, row, "Fib -" + str.tostring(fib_1_level), text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_fib_1_lo / adr_mon.d_count, adr_mon.hit_fib_1_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_fib_1_lo / adr_tue.d_count, adr_tue.hit_fib_1_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_fib_1_lo / adr_wed.d_count, adr_wed.hit_fib_1_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_fib_1_lo / adr_thu.d_count, adr_thu.hit_fib_1_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_fib_1_lo / adr_fri.d_count, adr_fri.hit_fib_1_lo), bgcolor = rch_color, text_size = _size)
row := row + 1
if fib_2_show
table.cell(tbl, 0, row, "Fib " + str.tostring(fib_2_level), text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_fib_2_hi / adr_mon.d_count, adr_mon.hit_fib_2_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_fib_2_hi / adr_tue.d_count, adr_tue.hit_fib_2_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_fib_2_hi / adr_wed.d_count, adr_wed.hit_fib_2_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_fib_2_hi / adr_thu.d_count, adr_thu.hit_fib_2_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_fib_2_hi / adr_fri.d_count, adr_fri.hit_fib_2_hi), bgcolor = rch_color, text_size = _size)
row := row + 1
table.cell(tbl, 0, row, "Fib -" + str.tostring(fib_2_level), text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_fib_2_lo / adr_mon.d_count, adr_mon.hit_fib_2_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_fib_2_lo / adr_tue.d_count, adr_tue.hit_fib_2_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_fib_2_lo / adr_wed.d_count, adr_wed.hit_fib_2_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_fib_2_lo / adr_thu.d_count, adr_thu.hit_fib_2_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_fib_2_lo / adr_fri.d_count, adr_fri.hit_fib_2_lo), bgcolor = rch_color, text_size = _size)
row := row + 1
if fib_3_show
table.cell(tbl, 0, row, "Fib " + str.tostring(fib_3_level), text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_fib_3_hi / adr_mon.d_count, adr_mon.hit_fib_3_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_fib_3_hi / adr_tue.d_count, adr_tue.hit_fib_3_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_fib_3_hi / adr_wed.d_count, adr_wed.hit_fib_3_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_fib_3_hi / adr_thu.d_count, adr_thu.hit_fib_3_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_fib_3_hi / adr_fri.d_count, adr_fri.hit_fib_3_hi), bgcolor = rch_color, text_size = _size)
row := row + 1
table.cell(tbl, 0, row, "Fib -" + str.tostring(fib_3_level), text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_fib_3_lo / adr_mon.d_count, adr_mon.hit_fib_3_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_fib_3_lo / adr_tue.d_count, adr_tue.hit_fib_3_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_fib_3_lo / adr_wed.d_count, adr_wed.hit_fib_3_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_fib_3_lo / adr_thu.d_count, adr_thu.hit_fib_3_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_fib_3_lo / adr_fri.d_count, adr_fri.hit_fib_3_lo), bgcolor = rch_color, text_size = _size)
row := row + 1
if std_0_5_show
table.cell(tbl, 0, row, "Std " + str.tostring(std_dev_0_5), text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_std_0_5_hi / adr_mon.d_count, adr_mon.hit_std_0_5_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_std_0_5_hi / adr_tue.d_count, adr_tue.hit_std_0_5_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_std_0_5_hi / adr_wed.d_count, adr_wed.hit_std_0_5_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_std_0_5_hi / adr_thu.d_count, adr_thu.hit_std_0_5_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_std_0_5_hi / adr_fri.d_count, adr_fri.hit_std_0_5_hi), bgcolor = rch_color, text_size = _size)
row := row + 1
table.cell(tbl, 0, row, "Std -" + str.tostring(std_dev_0_5), text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_std_0_5_lo / adr_mon.d_count, adr_mon.hit_std_0_5_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_std_0_5_lo / adr_tue.d_count, adr_tue.hit_std_0_5_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_std_0_5_lo / adr_wed.d_count, adr_wed.hit_std_0_5_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_std_0_5_lo / adr_thu.d_count, adr_thu.hit_std_0_5_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_std_0_5_lo / adr_fri.d_count, adr_fri.hit_std_0_5_lo), bgcolor = rch_color, text_size = _size)
row := row + 1
if std_1_show
table.cell(tbl, 0, row, "Std " + str.tostring(std_dev_1), text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_std_1_hi / adr_mon.d_count, adr_mon.hit_std_1_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_std_1_hi / adr_tue.d_count, adr_tue.hit_std_1_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_std_1_hi / adr_wed.d_count, adr_wed.hit_std_1_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_std_1_hi / adr_thu.d_count, adr_thu.hit_std_1_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_std_1_hi / adr_fri.d_count, adr_fri.hit_std_1_hi), bgcolor = rch_color, text_size = _size)
row := row + 1
table.cell(tbl, 0, row, "Std -" + str.tostring(std_dev_1), text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_std_1_lo / adr_mon.d_count, adr_mon.hit_std_1_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_std_1_lo / adr_tue.d_count, adr_tue.hit_std_1_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_std_1_lo / adr_wed.d_count, adr_wed.hit_std_1_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_std_1_lo / adr_thu.d_count, adr_thu.hit_std_1_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_std_1_lo / adr_fri.d_count, adr_fri.hit_std_1_lo), bgcolor = rch_color, text_size = _size)
row := row + 1
if std_2_show
table.cell(tbl, 0, row, "Std " + str.tostring(std_dev_2), text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_std_2_hi / adr_mon.d_count, adr_mon.hit_std_2_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_std_2_hi / adr_tue.d_count, adr_tue.hit_std_2_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_std_2_hi / adr_wed.d_count, adr_wed.hit_std_2_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_std_2_hi / adr_thu.d_count, adr_thu.hit_std_2_hi), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_std_2_hi / adr_fri.d_count, adr_fri.hit_std_2_hi), bgcolor = rch_color, text_size = _size)
row := row + 1
table.cell(tbl, 0, row, "Std -" + str.tostring(std_dev_2), text_size = _size)
table.cell(tbl, 1, row, fmt_sample(adr_mon.d_count, adr_mon.hit_std_2_lo / adr_mon.d_count, adr_mon.hit_std_2_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 2, row, fmt_sample(adr_tue.d_count, adr_tue.hit_std_2_lo / adr_tue.d_count, adr_tue.hit_std_2_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 3, row, fmt_sample(adr_wed.d_count, adr_wed.hit_std_2_lo / adr_wed.d_count, adr_wed.hit_std_2_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 4, row, fmt_sample(adr_thu.d_count, adr_thu.hit_std_2_lo / adr_thu.d_count, adr_thu.hit_std_2_lo), bgcolor = rch_color, text_size = _size)
table.cell(tbl, 5, row, fmt_sample(adr_fri.d_count, adr_fri.hit_std_2_lo / adr_fri.d_count, adr_fri.hit_std_2_lo), bgcolor = rch_color, text_size = _size)
RSI ValdeXEste indicador es una version del "Heikin Ashi RSI Oscillator" se han modificado los parametros originales para que solo se observe la linea RSI. El creador original es JayRogers.
--------------------
This indicator is a modified version of the "Heikin Ashi RSI Oscillator," with the original parameters displayed only on the RSI line. The original creator is JayRogers.
RSI + MACD Multi-Timeframe StrategyThis strategy combines the Relative Strength Index (RSI) from the daily timeframe with the Moving Average Convergence Divergence (MACD) from the 4-hour timeframe to generate precise long entry and exit signals.
The system uses a multi-timeframe approach to align longer-term trend conditions with shorter-term momentum shifts — allowing traders to catch dips with confirmation and exit before reversals.
🧠 Strategy Logic
✅ Long Entry Condition:
- RSI on the daily (1D) timeframe is oversold (below your defined threshold)
- MACD on the 4H timeframe crosses above the signal line
→ A long trade is opened when these two align
✅ Long Exit Condition:
- RSI on the daily timeframe is overbought
- MACD on the 4H timeframe crosses below the signal line
→ The long trade is closed when these two conditions are met
💡 This strategy currently supports long entries only. Short logic can be added if needed.
📊 Indicator Components
🔹 RSI (Relative Strength Index):
- A momentum oscillator that measures the speed and magnitude of price changes.
- Helps identify overbought (potential sell) and oversold (potential buy) conditions.
- Applied on the 1D timeframe (by default) to reflect broader market trend or exhaustion levels.
🔹 MACD (Moving Average Convergence Divergence):
- A trend-following momentum indicator based on moving averages.
- The MACD Line (fast EMA - slow EMA) crossing above the Signal Line indicates bullish momentum.
- Used here on the 4-hour timeframe (by default) for shorter-term momentum confirmation.
🔹 Multi-Timeframe (MTF) Logic:
- Uses request.security() to pull higher timeframe data (1D for RSI, 4H for MACD).
- Ensures no repainting, as it only uses closed candles from the higher timeframe.
- Aligns longer-term signals with shorter-term entries, reducing false signals.
📈 Plotting Options
The script includes a plot selector input allowing you to toggle between:
- RSI Plot (with overbought/oversold lines)
- MACD Plot (MACD line and signal line)
- This helps visualize signal conditions clearly on your chart.
🛠 Customization
- RSI & MACD settings are fully configurable
- RSI and MACD timeframes can be adjusted independently
⚠️ Disclaimer
This strategy is provided for educational and informational purposes only.
It is not financial advice or a recommendation to buy or sell any asset.
Past performance does not guarantee future results. Always test strategies in a simulated environment before live use, and consult with a licensed financial advisor for investment decisions.
Moving Average ProjectionDisplays 2-5 moving averages (solid lines) and projects their future trajectory (dashed lines) based on current trend momentum. This helps you anticipate where key MAs are heading and identify potential future support/resistance levels.
Important: Projections show where MAs would move IF the current trend continues—they're not predictions. Market conditions change, so use projections as planning tools, not trading signals.
General Settings
Number of MAs (2-5) controls how many moving averages display on your chart. Start with 2-3 to avoid clutter. Projection Bars (1-100) determines how far into the future to project—use 10-20 for intraday charts and 20-40 for daily charts. Lookback for Slope (2-100) sets the number of bars used to calculate trend slope, where shorter lookbacks are more responsive and longer ones are smoother. The default of 20 works well for most situations.
Individual MA Settings (MA 1-5)
Each MA has four settings: Length sets the period for the MA (common values are 9, 20, 50, 100, and 200), Type lets you choose between SMA, EMA, WMA, HMA, VWMA, or RMA (EMA is most popular), Color sets the historical MA line color, and Projection Color sets the projected line color (usually a lighter or transparent version of the main color).
MA Types Quick Reference: EMA is most popular and responsive to recent prices. SMA gives equal weight to all periods and is the smoothest. HMA is very responsive with low lag. VWMA incorporates volume data.
Quick Setup Examples
Day Trading: 3 MAs (9/21/50 EMA), 10-15 projection bars, 10-15 lookback
Swing Trading: 2 MAs (50/200 EMA), 20-30 projection bars, 20 lookback
Scalping: 2 MAs (9/20 EMA), 5-10 projection bars, 5-10 lookback
How to Use
Trend Identification: An uptrend shows price above rising MAs with projections pointing up. A downtrend shows price below falling MAs with projections pointing down. Consolidation appears as flat MAs with horizontal projections.
Support & Resistance: Rising MA projections act as future dynamic support levels, while falling MA projections act as future dynamic resistance levels.
Anticipating Changes: Watch for projected MA crossovers before they happen. When projections converge, expect volatility or consolidation. Steep projections suggest unsustainable trends, so be cautious. Flat projections indicate ranging markets.
Trade Planning: Check the current trend using MA alignment, then look at projections to gauge trend continuation likelihood. Use projected MA levels for potential targets or stop placement.
Important Tips
When Projections Work Best: Projections are most reliable in stable trending markets with consistent momentum, low volatility environments, and away from major news events.
When to Be Cautious: Use caution during high volatility or choppy price action, around major economic releases, when projections show extreme or parabolic angles, and during trend transitions.
Combine With Other Analysis: Don't trade projections alone. Use them alongside price action, volume, support and resistance levels, and other indicators for confirmation.
Best Practices
Start with 2-3 MAs to avoid chart clutter. Match your projection and lookback bars to your trading timeframe. Use consistent color schemes for quick interpretation. Adjust settings as market conditions change. Always use proper risk management—projections are planning tools, not guarantees.
Troubleshooting
Projections not showing: Check that Projection Bars > 0 and you're viewing the most recent bar
Chart too cluttered: Reduce number of MAs or increase projection color transparency
Projections too volatile: Increase lookback bars or switch to EMA/SMA from HMA
Can't see certain MAs: Verify "Number of MAs" setting includes them (MA 3 won't show if set to 2)
Multi-Method Candle Repainter by Mustang Algo# 🎯 Candle Repainter - Price Direction by Mustang Algo
## Overview
A powerful and intuitive indicator that repaints candles in real-time based on price direction detection. This tool helps traders quickly identify market trends by coloring candles according to bullish, bearish, or neutral momentum using multiple proven technical analysis methods.
## 🌟 Key Features
### 5 Detection Methods
Choose from multiple sophisticated algorithms to detect price direction:
1. **EMA Trend** - Compares price against Exponential Moving Average with momentum confirmation (price above EMA + upward movement)
2. **Price vs SMA** - Classic crossover method using Simple Moving Average (price position relative to SMA)
3. **Momentum** - Pure momentum-based detection for aggressive signals (rate of price change)
4. **Higher High/Lower Low** - Structure-based analysis identifying swing points and price patterns
5. **Supertrend** - Popular ATR-based trend following system for reliable trend identification
### Visual Features
- 🟢 **Green Candles** - Bullish trend detected
- 🔴 **Red Candles** - Bearish trend detected
- ⚪ **Gray Candles** - Neutral/indecisive market
- 🔺 **Triangle Signals** - Mark trend changes (optional, clean by default)
- 📊 **Background Coloring** - Subtle background highlighting for zones
- 📈 **Overlay Indicators** - Display the chosen MA/Supertrend line for reference
### Smart Signal System
- **Default Mode**: Shows triangles ONLY on trend changes (cleaner charts, less noise)
- **All Candles Mode**: Display signals on every bullish/bearish candle (more aggressive)
- Fully customizable signal visibility
- Real-time statistics dashboard
## ⚙️ Customizable Parameters
### Method-Specific Settings
- **EMA Length** (default: 20) - For EMA Trend method - adjust based on your timeframe
- **SMA Length** (default: 50) - For Price vs SMA method - classic period for trend detection
- **Momentum Period** (default: 14) - For Momentum method - sensitivity control
- **HH/LL Lookback** (default: 10) - For Higher High/Lower Low method - swing detection range
- **ATR Period** (default: 10) - For Supertrend method - volatility measurement period
- **ATR Multiplier** (default: 3.0) - For Supertrend method - trend sensitivity control
### Visual Controls
- Toggle signal display on/off
- Choose between change signals or all candles
- Background highlighting control
- Clean, minimalist interface
## 📊 Real-Time Dashboard
A compact information table displays:
- Current trend direction (BULLISH 🔼 / BEARISH 🔽 / NEUTRAL ➡️)
- Active detection method
- Creator credit (Mustang Algo)
- Real-time status updates
## 🔔 Built-in Alerts
Set up automated alerts for:
- Bullish trend changes - "Switch to BULLISH trend"
- Bearish trend changes - "Switch to BEARISH trend"
- Get notified on any device when market direction changes
## 💡 How to Use
### For Day Traders
- Use **EMA Trend** with shorter periods (10-20)
- Enable "Show on all candles" for continuous feedback
- Combine with volume for confirmation
- Best on 5m-15m timeframes
### For Swing Traders
- Use **Supertrend** or **Price vs SMA** with longer periods (50-200)
- Keep default "changes only" mode for cleaner entries
- Perfect for multi-timeframe analysis
- Best on 1H-4H-Daily timeframes
### For Scalpers
- Use **Momentum** method for fastest signals
- Lower timeframes (1m-5m)
- Combine with support/resistance levels
- Quick entries on trend changes
### For Position Traders
- Use **Higher High/Lower Low** on higher timeframes
- Weekly or Daily charts
- Focus on structural changes in the market
## 🎨 Best Practices
1. **Multiple Timeframes**: Always confirm direction on a higher timeframe before entering
2. **Combine Methods**: Test different detection methods for your specific asset and timeframe
3. **Risk Management**: Always use stop-losses - don't rely solely on color changes
4. **Backtesting**: Test parameters on historical data before live trading
5. **Context Matters**: Use with support/resistance, volume, and market structure
6. **No Holy Grail**: This is a tool to assist your analysis, not a standalone trading system
## ⚠️ Important Notes
- This is a **repainting indicator** - signals may adjust as new price data arrives (by design for real-time trend following)
- Best used for **trend confirmation and direction bias**, not as standalone entry/exit signals
- Different methods work better in different market conditions (trending vs ranging)
- Always combine with proper risk management and position sizing
- No indicator is perfect - false signals can occur, especially in choppy/ranging markets
## 📈 Recommended Settings by Market
### Crypto (High Volatility)
- Method: **Supertrend**
- ATR Period: 10
- ATR Multiplier: 3.0
- Timeframe: 15m - 4H
- Works well in trending crypto markets
### Forex (Trending Markets)
- Method: **EMA Trend** or **Price vs SMA**
- Period: 20-50
- Timeframe: 1H - Daily
- Excellent for major pairs
### Stocks (Moderate Volatility)
- Method: **Higher High/Lower Low**
- Lookback: 10-15
- Timeframe: Daily - Weekly
- Great for swing trading stocks
### Indices (Clear Trends)
- Method: **Price vs SMA**
- SMA Length: 50-200
- Timeframe: 4H - Daily
- Classic trend following on indices
### Commodities
- Method: **Supertrend**
- ATR Period: 10-14
- Timeframe: 1H - Daily
- Adapts well to commodity volatility
## 🚀 Quick Start Guide
1. Add indicator to your chart
2. Select your preferred detection method from the dropdown
3. Adjust parameters based on your timeframe and market
4. Observe candle colors for trend direction
5. Look for triangle signals on trend changes
6. Set up alerts for automated notifications
7. Combine with your existing trading strategy
## 🔧 Advanced Tips
- **Combining with other indicators**: Works great with RSI, MACD, or volume indicators
- **Filter false signals**: Use on higher timeframe to filter lower timeframe noise
- **Trend confirmation**: Wait for 2-3 consecutive colored candles before entry
- **Exit strategy**: Consider exiting when candle color changes or use fixed targets
- **Avoid ranging markets**: This indicator performs best in trending conditions
## 📚 Educational Value
This indicator teaches:
- How different technical methods identify trends
- The concept of trend following vs momentum trading
- The importance of trend direction in trading decisions
- How to combine multiple timeframes for better analysis
## 🏆 Credits
**Created by Mustang Algo**
Version 1.0 - November 2025
For the trader who values simplicity, clarity, and effective trend detection.
## 📞 Support & Feedback
If you find this indicator useful:
- Leave a comment with your feedback
- Share your results and optimal settings
- Suggest improvements or additional features
- Report any bugs or issues
---
## Tags
`trend` `candles` `repainter` `moving-average` `supertrend` `momentum` `signals` `alerts` `price-action` `trend-following` `daytrading` `swingtrading` `multi-method` `beginner-friendly`
## Category
**Trend Analysis / Candles**
## License
Open source - Free to use and modify for personal trading
---
*Remember: Trading involves risk. Always use proper risk management and never risk more than you can afford to lose. This indicator is a tool to assist your analysis, not financial advice.*
TTM Squeeze MTF DashboardThis indicator is a multi-timeframe (MTF) powerhouse for spotting breakout trades: It blends TTM Squeeze volatility, momentum oscillator (MOM), EMA trend stacks, MACD histogram expansion, and a "Green Count" (GC) tracker for post-squeeze timing. Perfect for day traders hunting confluence across TFs (e.g., 5m/15m/1H) to enter longs on lower timeframes (LTF) when signals align bullish.1. Quick OverviewCore Features:Dashboard Table: Real-time status for 3 user-defined TFs (defaults: 5m, 15m, 1H).
Rows: MOM (momentum), EMA (trend stack), MACD (histogram expansion), SQZ (volatility), GC (breakout counter), + optional GC MOM.
Plots: MOM histogram + GC line below price for visual confirmation.
Alerts: Triggers on full bullish/bearish alignment (positive/negative MOM + EMA stack + GC ≤3).
Edge: Filters noise with MTF alignment—wait for the table to "light up" (2+ TFs green/aqua) for high-conviction entries.
Best Use: Liquid markets (stocks, forex, crypto). Chart on LTF (e.g., 5m) for entries, use HTF for bias.
2. Installation & AccessOpen TradingView > Load a chart (e.g., AAPL on 5m).
Click Indicators (top toolbar) > Search "TTM Squeeze MTF Dashboard".
Add to chart—table appears top-right (customizable).
Pro Tip: Pin to favorites for quick access. Save chart layouts to preserve settings.
If editing: Right-click indicator > "Edit Pine Script" (open-source code available).3. Customizing SettingsGear icon (next to indicator name) > Adjust groups:Multi-Timeframe SettingsTF1/2/3: Set your scales (e.g., 1m/5m/15m for scalps; 15m/1H/4H for swings).
EMA SettingsLengths: 8/21/55/200 (Fib-tuned for trend).
Colors: Green (bull stack), Red (bear), Gray (neutral).
MACD SettingsLengths: 12/26/9 (standard).
Colors: Green (up-expansion: bull building), Red (down: bear building), Gray (retracting: pause).
Table Colors & DisplayGC Colors: Customize highlights for low GC + momentum.
Histogram Color: MOM shades (aqua/blue positive; red/yellow negative).
Squeeze Dot Color: Green (no squeeze), Black (low), Red/Orange (compression).
Toggles: Show/hide rows (e.g., disable SQZ for cleaner view).
Position/Size: Top-right default; tweak text color/size.
OtherSqueeze Length: 20 (BB/KC base).
Multipliers: BB=2.0, KC=1.0/1.5/2.0 (vol bands).
Hit OK—updates live. Defaults work great out-of-box.4. Reading the Table5 columns: Label | TF1 | TF2 | TF3 | Spacer.
Colors = signals; text = TF labels or GC numbers. Default order: MOM > EMA > MACD > SQZ > GC MOM > GC.Row
Purpose
Bullish (Green/Aqua)
Bearish (Red/Yellow)
Neutral (Gray)
MOM
Momentum flow.
Aqua (rising positive: strong bull).
Blue (falling positive: bull slowing).
Red (rising negative: bear easing).
Yellow (falling negative: deep bear).
N/A.
EMA
Trend stack (short > long EMAs).
Green: Ascending (with trend).
Red: Descending (against).
Mixed.
MACD
Histogram expansion.
Green: Positive & growing (momentum surge).
Red: Negative & shrinking (bear surge).
Flat/retracting (avoid).
SQZ
Volatility compression.
Green: No squeeze (expanding).
Black: Low (mild coil).
N/A.
Red: Medium.
Orange: High (wait).
GC MOM (Opt.)
GC ≤3 + positive MOM.
Aqua/Blue: Entry sweet spot.
N/A.
No match.
GC
Bars since last red squeeze.
MOM color if ≤3 (breakout now!). Text: Count (e.g., "2").
N/A.
>3 (wait).
Bullish Light-Up: 2+ TFs green/aqua on MOM/EMA/MACD + SQZ green/black + GC ≤3 = Long setup.5. Chart PlotsMOM Histogram: Colored bars (aqua = buy pressure)—confirms table.
GC Line: Purple, rising from 0—≤3 signals volatility release.
6. Alerts SetupRight-click chart > Add Alert > Select indicator.
Pick: "Bullish Alignment TF1" (e.g., for 5m).
Message: "Long {{ticker}}—MOM+/EMA Up/GC≤3 on TF1!"
Once Per Bar to avoid noise.
Bullish: Positive MOM + up EMA + low GC (long entry).
Bearish: Negative MOM + down EMA + low GC (short).
7. Trading FrameworkBias Check: HTF EMA green + SQZ release.
Confluence: Table aligns bullish (alert fires).
LTF Entry: On 5m, buy close above EMA8 (or dip to it). SL below swing low (1-2% risk).
Manage: Trail on MACD gray or GC reset. TP: 1.5-2:1 RR.
Avoid: Choppy news; <2 TF alignment.
Example: Alert on TF2 (15m). Switch to 5m: MOM aqua, price bounces EMA—long.Backtest Tip: Convert to strategy script for stats (55-65% win rate on aligns).
📋 Trading Checklist – Precision Entry SystemTake your trading discipline to the next level with this Precision Trading Checklist for TradingView. Designed for intraday traders following liquidity, structure, and Smart Money Concepts (SMC) AKA ICT Concepts, this overlay ensures you never miss a key confirmation before entering a trade.
Features:
✅ Pre-Market Preparation: Track previous session highs/lows, AM/PM sessions, and key liquidity zones.
✅ Bias & Narrative Check: Quickly confirm daily trend, price position relative to daily open, and higher timeframe confluence.
✅ Session-Specific Rules: Focused sessions like Silver Bullet (10:00–11:30), Afternoon (13:30–15:00), and Final Hour (15:00–16:00).
✅ Structure & Setup Validation: Confirm liquidity sweeps, market structure shifts, expansion candles, fair value gaps, and order blocks.
✅ Risk Management Reminders: Stop-loss, target points, risk percentage, breakeven management, and pyramiding rules.
✅ Post-Trade Journaling: Document entries, session, setup type, trade outcome, and grading for continuous improvement.
✅ Golden Rules: Visual reminders to enforce discipline, avoid emotional trades, and respect session limits.
Why Use It:
This checklist is perfect for traders who want to stay consistent, minimise mistakes, and follow a disciplined routine. Displayed as an overlay on your chart, it provides all essential checks in one glance, keeping you focused on the setup rather than scrolling through notes or separate trackers.
How to use:
Add the indicator to your chart
Click the settings/gear icon
Check off items as you complete them
The checklist on your chart updates in real-time with green checkmarks!
The checkboxes will persist as long as the indicator is on your chart,
making it perfect for tracking your pre-trade and post-trade routines!
Follow the checklist items step by step before entering trades.
Use the session-specific guidelines to filter setups.
Journal your trades post-execution for growth and analysis.
Average Directional Index with Key Level and Reversal Marker ADXOverview
This indicator calculates the Average Directional Index (ADX) and adds a visual marker when a potential trend reversal occurs above a key ADX level.
How it works
The indicator computes ADX using built-in ta.adx() and DI lines.
When ADX peaks above the Key Level and then starts descending, a blue circle marker highlights the reversal area.
You can adjust:
ADX Length (adxlen)
DI Length (dilen)
Key Level (keyLevel)
Mark bar window (markBars)
Use case
Helps traders identify strong trend exhaustion points and potential trend reversals in any timeframe or asset.
Notes
Works on all symbols and timeframes.
Does not repaint or use future data.
The blue circle marks the latest reversal within the last markBars bars.
© reysudo.dev — Open-source educational indicator.
3D Cube Projection - √3 Diagonal3D Cube Projection - √3 Diagonal
OVERVIEW
This indicator implements Bradley F. Cowan's cube projection methodology from his "Four Dimensional Stock Market Structures & Cycles" work. It visualizes a 3D cube projected onto the 2D price-time chart, using the √3 (square root of 3) body diagonal as the primary analytical tool for identifying market structure and potential cycle termination points.
METHODOLOGY
The cube is constructed by selecting two pivot points (A and E) which form the body diagonal - the longest diagonal running through the cube's interior from one corner to the diagonally opposite corner. According to Cowan's geometric approach:
- Point A = Starting pivot (low or high)
- Point E = Ending pivot (opposite extreme)
- Body Diagonal (A→E) = √3 × cube side length
- Face Diagonal (A→C) = √2 × cube side length
The script calculates the cube dimensions by:
1. Measuring the total price range from A to E
2. Dividing by √3 to determine the cube side length in price
3. Distributing the time component across three equal segments
4. Projecting the 3D structure onto the 2D chart plane
FEATURES
✓ Interactive date selection for points A and E
✓ Automatic UPLEG/DOWNLEG detection
✓ All 8 cube vertices labeled (A-H)
✓ All 6 cube faces with independent color/opacity controls
✓ √3 body diagonal (red line by default)
✓ √2 face diagonal (orange line by default)
✓ Customizable cube lines, fills, and labels
✓ Information table showing key measurements
VISUAL CUSTOMIZATION
- Front & Back faces: Box fills for the two square faces
- Side faces: Left and right vertical faces
- Top & Bottom faces: Horizontal connecting faces
- Each group has independent color and opacity settings
- Label size and transparency fully adjustable
- Cube line styles (solid, dashed, dotted) for depth perception
IMPORTANT LIMITATIONS & DISCLOSURES
This indicator works within the inherent constraints of projecting 3D geometry onto a 2D price-time chart:
⚠️ VISUAL APPROXIMATION: This is a visual projection tool, not a mathematically perfect 3D cube. True 3D geometry cannot be accurately represented on a 2D plane without distortion.
⚠️ TIME DISTRIBUTION: The script divides the time axis into three equal segments (total bars ÷ 3) for practical visualization. This is an approximation that prioritizes visual coherence over strict geometric accuracy.
⚠️ UNIT SCALING: Price and time use different units (dollars vs. bars), making true isometric projection impossible. The cube appears proportional on screen but the dimensions are not directly comparable.
⚠️ 2D CONSTRAINT: We only have X (time) and Y (price) axes available. The Z-axis (depth) is simulated through visual projection techniques (line styles, shading).
INTENDED USE
This tool is designed for traders and analysts who study Bradley Cowan's geometric market analysis methods. It helps visualize:
- Market structure in geometric terms
- Potential support/resistance zones at cube edges
- Cycle timing relationships using √2 and √3 ratios
- Harmonic price-time relationships
The cube projection should be used as one component of a comprehensive analysis approach, combined with other technical tools and fundamental analysis.
MATHEMATICAL FOUNDATION
While the visual representation involves approximations, the core √3 relationship is mathematically sound:
- For any cube, the body diagonal = √3 × side length
- The face diagonal = √2 × side length
- These ratios are preserved in the price dimension calculations
HOW TO USE
1. Select your starting date (Point A) - typically a significant low or high
2. Select your ending date (Point E) - the opposite extreme pivot
3. The indicator automatically constructs the cube geometry
4. Analyze the cube edges, diagonals, and faces for market structure insights
5. Adjust colors and opacity to suit your chart aesthetic
TECHNICAL NOTES
- Works on all timeframes and instruments
- Best viewed on charts with sufficient historical data
- Cube updates in real-time as new bars form
- Range selection is marked with vertical lines and shading
- Calculator table shows Point A, Point E, side length, and bar measurements
ACKNOWLEDGMENT
This indicator is based on the geometric market analysis principles developed by Bradley F. Cowan. Users are encouraged to study Cowan's original works for deeper understanding of the theoretical framework.
DISCLAIMER
This indicator is for educational and analytical purposes only. It does not constitute financial advice. Past performance does not guarantee future results. Always conduct your own research and risk management before making trading decisions.
Midnight ET + Daily H/L True dayThis script divides each day from midnight EST to the next midnight opening price (True day). Full credits go to my mentor ICT for the idea behind the script
A+ Trade Checklist (Bullish + Bearish Mode + Alerts) – Fixed v61. Trend direction (EMA alignment)
2. Relative Strength vs SPY (is your stock stronger than the market?)
3. Volume confirmation
4. RSI strength
5. Candle momentum
BTC Bull/Bear marketThis indicator plots the 350-period Simple Moving Average (SMA) calculated on the Daily ("D") timeframe.
he color of the SMA line is determined by the closing price of the 2-Week ("2W") timeframe.
1. It fetches the 350-day SMA value (`sma350_daily`).
2. It checks where the *last closed* 2-Week candle finished relative to this SMA line.
3. If the 2W candle closed *above* the 350 SMA, the line is colored GREEN.
4. If the 2W candle closed *below* the 350 SMA, the line is colored RED.
This helps to visualize the long-term trend (350 SMA) confirmed by a higher (2W) timeframe bias, using non-repainting logic (`close `) for the color signal.
Stacked EMAs with Background & AlertsStacked EMAs with Background & AlertsThis indicator plots 5 customizable Exponential Moving Averages (EMAs) on your chart, perfect for spotting trend strength and reversals. Key Features:Flexible EMAs: Set lengths (defaults: 8, 21, 50, 100, 200), toggle visibility, and color each line individually for a clean, personalized ribbon.
Stack Detection: Highlights when all EMAs align—bullish (shortest > longest) or bearish (shortest < longest).
Dynamic Background: Fills the chart with a semi-transparent green tint on bullish stacks (trend up) or red on bearish (trend down), making alignment pop at a glance.
Smart Alerts: Get notified on stack formations/changes, plus key crossovers (e.g., short EMA over long for bull signals, medium over long for trend shifts).
How It Works for Trading: Use the stack backgrounds as your trend filter—go long on green fills with rising price, short on red. Alerts catch entries/exits early, reducing noise. Ideal for swing/day trading on any timeframe; pair with volume for confluence. Simple, no-repaint, and fully customizable!
Option Selling Indicator @mybullandbearThe Option Selling Indicator is designed to help traders identify high-probability buy and sell zones based on market momentum and trend conditions. It provides a simple yet powerful visual cue system to make trading decisions clear and intuitive.
🎯 How It Works:
When the background turns green and the price moves above the black trend line, it signals bullish strength — a good condition to go for BUY or sell PUT options.
When the background turns red and the price moves below the black trend line, it signals bearish strength — a good condition to go for SELL or sell CALL options.
⚙️ Key Features:
Clear color-coded background for instant trend visualization.
Dynamic black trend line acts as a support/resistance guide.
Simple setup suitable for both beginners and experienced option sellers.
Works effectively across multiple timeframes and instruments.
💡 Usage Tip:
Combine this indicator with volume or volatility filters for more accurate entries, and always confirm signals with your trading strategy and risk management rules.
ADX Trend Strength Filter + TRAMA [DotGain]Summary
Are you tired of trading trend signals, only to get stopped out in volatile, sideways chop?
The ADX Trend Strength Filter (ADX TSF) is designed to solve this exact problem. It is a comprehensive trend-following system that only generates signals when a trend not only has the right direction and momentum, but also sufficient strength.
This indicator filters out weak or indecisive market phases (the "chop") and will only color the bars Green or Red when all conditions for a strong, confirmed trend are met.
⚙️ Core Components and Logic
The ADX TSF relies on a triple-filter logic to generate a clear trade signal:
Trend Filter (TRAMA): A TRAMA (Trending Adaptive Moving Average) is used as the main trendline. This adaptive average automatically adjusts to market volatility, acting as a dynamic support/resistance level.
Price > TRAMA = Bullish
Price < TRAMA = Bearish
Momentum Filter (RSI Crossover): Momentum is measured by a crossover of two moving averages of the RSI (a fast EMA and a slow SMA). This confirms whether the momentum is pointing in the same direction as the trend.
Strength Filter (ADX): This is the most important filter. A signal is only considered valid if the ADX (Average Directional Index) is above a defined threshold (Default: 30). This ensures the trend has sufficient strength.
🚦 How to Read the Indicator
The indicator has three states, displayed directly as bar colors on your chart:
🟩 GREEN BARS (Strong Uptrend) All three conditions are met:
Price is above the TRAMA.
RSI momentum is bullish (Fast MA > Slow MA).
ADX is above 30 (Strong trend is present).
🟥 RED BARS (Strong Downtrend) All three conditions are met:
Price is below the TRAMA.
RSI momentum is bearish (Fast MA < Slow MA).
ADX is above 30 (Strong trend is present).
🟧 ORANGE BARS (Neutral / Caution) This state appears if any of the following conditions are true:
Weak Trend: The ADX is below 30. The market is in consolidation or a sideways phase. (This is the primary filter!)
Indecision: The price is caught in the "Neutral Zone" between the TRAMA and the 200 SMA.
Visual Elements
Bar Colors: (Green/Red/Orange) Show the current trend status.
TRAMA (Orange Line): Your primary adaptive trendline.
200 SMA (White Line): Serves as a reference for the long-term trend.
Orange Background (Fill): Fills the area between the TRAMA and SMA to visually highlight the "Neutral Zone."
Key Benefit
The goal of the ADX TSF is to keep traders out of weak, unpredictable markets and help them participate only in strong, momentum-confirmed trends.
Have fun :)
Disclaimer
This "Buy The F*cking Dip" (BTFD) indicator is provided for informational and educational purposes only. It does not, and should not be construed as, financial, investment, or trading advice.
The signals generated by this tool (both "Buy" and "Sell") are the result of a specific set of algorithmic conditions. They are not a direct recommendation to buy or sell any asset. All trading and investing in financial markets involves substantial risk of loss. You can lose all of your invested capital.
Past performance is not indicative of future results. The signals generated may produce false or losing trades. The creator (© DotGain) assumes no liability for any financial losses or damages you may incur as a result of using this indicator.
You are solely responsible for your own trading and investment decisions. Always conduct your own research (DYOR) and consider your personal risk tolerance before making any trades.
Fat Tony's Composite Momentum Histogram (v01)Fat Tony's Composite Momentum Histogram (v01)
Overview
Fat Tony's Composite Momentum Histogram (v01) is a sophisticated momentum oscillator that combines four powerful technical analysis components into a single, unified signal. Unlike traditional single-indicator approaches, this tool synthesizes Williams %R, Stochastic, MACD Histogram, and Rate of Change to provide a comprehensive view of momentum across multiple timeframes and calculation methods.
The indicator displays as a histogram that oscillates between -150 and +150, with overbought/oversold zones clearly marked at +100/-100. When momentum crosses above the oversold level with sufficient volume, a green triangle appears below the histogram signaling a potential long entry. Conversely, when momentum crosses below the overbought level, a red triangle appears above signaling a potential short entry.
What Makes This Different
Multi-Component Synthesis: Rather than relying on a single momentum calculation, this indicator averages four complementary momentum measures, each capturing different aspects of price action:
Williams %R captures overbought/oversold conditions
Stochastic tracks momentum relative to recent price range
MACD Histogram shows trend strength and potential reversals
Rate of Change measures velocity of price movement, normalized by volatility
Intelligent Volume Weighting: The indicator amplifies signals when volume confirms the move. Recent volume is compared to a 20-bar average using a logarithmic scale, preventing extreme spikes from distorting the signal while still rewarding genuine volume-backed momentum.
Adaptive Normalization: The MACD component uses a 200-bar standard deviation to adaptively scale itself, ensuring the indicator remains responsive across different market conditions and volatility regimes.
Volume Filtering: Optional minimum volume threshold (5-bar average) prevents false signals during low-liquidity periods when price moves may not be meaningful.
Key Features
Composite Signal: Combines four momentum indicators into one cohesive oscillator
Volume Confirmation: Optional volume weighting amplifies signals backed by strong participation
Trend Filter: Optional EMA-200 filter to trade only with the dominant trend
Visual Clarity: Color-coded histogram (blue for positive, orange for negative, red/green at extremes)
Automatic Alerts: Built-in alerts for entry and exit signals
Customizable Thresholds: Adjust overbought/oversold levels to match your trading style
ROC Toggle: Enable/disable the Rate of Change component based on your preference
Debug Mode: View individual component plots for fine-tuning and validation
Settings & Customization
Momentum Settings
Length (default: 14): Primary calculation period for Williams %R and Stochastic
MACD Fast (default: 12): Fast EMA period for MACD calculation
MACD Slow (default: 26): Slow EMA period for MACD calculation
MACD Signal (default: 9): Signal line period for MACD
ROC Length (default: 10): Lookback period for Rate of Change calculation
MACD StDev Length (default: 200): Period for adaptive MACD normalization
Levels
Overbought Level (default: 100): Threshold for short signals
Oversold Level (default: -100): Threshold for long signals
Volume Settings
Enable Volume Weighting (default: ON): Amplifies signals when volume confirms
Volume Sensitivity (default: 1.5): Controls strength of volume impact (0.5-3.0)
Min Avg Volume (default: 50,000): Minimum 5-bar average volume to trigger signals
Components
Include ROC Component (default: ON): Adds Rate of Change to the composite
Enable Trend Filter (default: OFF): Only signals aligned with EMA-200 trend
Show Component Plots (default: OFF): Display individual components for analysis
How to Use
Basic Signal Interpretation:
Green triangle below histogram = Long signal (momentum crossing up through oversold)
Red triangle above histogram = Short signal (momentum crossing down through overbought)
Histogram color indicates momentum direction and strength
Background shading highlights extreme overbought/oversold zones
Entry Strategy:
Wait for the histogram to enter oversold territory (below -100) for longs, or overbought (above +100) for shorts
Look for the entry signal (triangle) when momentum crosses back through the threshold
Confirm the signal occurs with adequate volume (if volume filter is enabled)
Consider the trend filter if trading with the dominant direction only
Exit Strategy:
Optional exit signals appear when momentum crosses the zero line against your position
Consider taking profits at extreme opposite readings (e.g., long exit when reaching +100)
Use price action, support/resistance, or your own risk management for final exits
Fine-Tuning:
Shorter Length settings (8-10): More responsive, more signals, potentially more noise
Longer Length settings (18-21): Smoother signals, fewer false positives, slower response
Higher Volume Sensitivity: Requires stronger volume confirmation
Lower Overbought/Oversold Levels (±80): More frequent signals
Enable Trend Filter: Reduces signals but improves win rate by trading with trend
Best Practices
Combine with Price Action: Use this indicator to confirm what you're seeing on the price chart, not as a standalone system
Respect the Volume Filter: Low-volume signals are often false moves; the volume confirmation is there for a reason
Don't Chase: Wait for signals at extreme levels; entries in the middle zone tend to whipsaw
Use Multiple Timeframes: Check that momentum aligns across your trading timeframe and a higher timeframe
Backtest Your Settings: Default parameters work well on many instruments, but optimization for your specific market and timeframe can improve results
Technical Details
The indicator normalizes each component to a -50 to +50 range before averaging, ensuring equal weighting regardless of the raw scale differences between Williams %R, Stochastic, MACD, and ROC. The MACD component uses a hyperbolic tangent function for smooth, bounded normalization. Volume weighting applies a logarithmic scale to prevent extreme outliers from dominating the calculation while still capturing genuine volume surges.
RSI Mean-Reversion StrategyLong entry when RSI ≤ 30; exit at RSI ≥ 70. 100% equity per trade, 0.1% commission + 1 tick slippage. Optional 2% stop-loss. Visual buy/sell signals, dynamic SL line, and background highlight on oversold zones. Clean, backtest-ready Pine Script v5. Everything is easily adjustable to suit your liking.






















