DEMA Double Exponential Moving Average Strategy@Moneros 2017
Based on The DEMA is a fast-acting moving average that is more responsive to market changes than a traditional moving average
en.wikipedia.org
!!!! IN ORDER TO AVOID REPAITING ISSUES !!!!
!!!! DO NOT VIEW IN LOWER RESOLUTIONS THAN res/2 PARAMETER !!!!
for example res = 120 view >= 60m res = 60 view >= 30m
the length of the DEMA sampling shouldn't be longer than a candle
Best profits tested on BTCUSD
res = 105 slowPeriod = 2 fastPeriod = 32
res = 125 slowPeriod = 3 fastPeriod = 21
res = 120 slowPeriod = 2 fastPeriod = 32
res = 130 slowPeriod = 1 fastPeriod = 24
res = 40 slowPeriod = 4 fastPeriod = 93
res = 60 slowPeriod = 1 fastPeriod = 67
BTCUSD
Search in scripts for "股价站上60月线"
RSI in Bull and Bear Market V2.0RSI oversold at 60/40 in bullish market
And Overbought at 40/60 in Bearish market
for more info of this Strategy
WaveTrend [MastroFran]Great indicator to show short term price movements. 5 day moving average oscillator. When green crosses red and under the 60 mark, buy with caution. when over the 60 mark and red crosses green sell immediately for highest profits.
Hersheys CoCo VolumeCoCo Volume shows you volume movement of your symbol after subtracting the movement from another symbol, preferrably the sector or market the stock belongs to.
My latest update to my CoCoVolume Indicator. It calculates today's volume percent over the 60 period average for both your symbol and index, and displays that difference. If the percent is over the max it highlights the color, showing BIG action for that stock.
The last version was calculating the percent volume difference from yesterday to today for the stock and index and displaying the difference. The prior method had large swings on low volume stocks... this one shows the independent volume action much better. The default values will suit most stocks.
You can set three variables...
- the index symbol, default is SPY
- the period for averaging, default is 60
- the max volume percent, default is 500
Good trading!
Brian Hershey
close-hl2 Price actionStill not tested, but looks very good ; it is the difference between EMA median price and EMA close in different time frame, I used 240, 60, and the current Time frame ,plus one more customed period ; can forcast the price movement , but it s not in scale, so it can not show how much higher or lower the price can goes but just the next direction. I think intraday on 5 ,15 ,60 better then high frame.If you need to try on Daily frame have to change the period to higher then Daily
Everyday 0002 _ MAC 1st Trading Hour WalkoverThis is the second strategy for my Everyday project.
Like I wrote the last time - my goal is to create a new strategy everyday
for the rest of 2016 and post it here on TradingView.
I'm a complete beginner so this is my way of learning about coding strategies.
I'll give myself between 15 minutes and 2 hours to complete each creation.
This is basically a repetition of the first strategy I wrote - a Moving Average Crossover,
but I added a tiny thing.
I read that "Statistics have proven that the daily high or low is established within the first hour of trading on more than 70% of the time."
(source: )
My first Moving Average Crossover strategy, tested on VOLVB daily, got stoped out by the volatility
and because of this missed one nice bull run and a very nice bear run.
So I added this single line: if time("60", "1000-1600") regarding when to take exits:
if time("60", "1000-1600")
strategy.exit("Close Long", "Long", profit=2000, loss=500)
strategy.exit("Close Short", "Short", profit=2000, loss=500)
Sweden is UTC+2 so I guess UTC 1000 equals 12.00 in Stockholm. Not sure if this is correct, actually.
Anyway, I hope this means the strategy will only take exits based on price action which occur in the afternoon, when there is a higher probability of a lower volatility.
When I ran the new modified strategy on the same VOLVB daily it didn't get stoped out so easily.
On the other hand I'll have to test this on various stocks .
Reading and learning about how to properly test strategies is on my todo list - all tips on youtube videos or blogs
to read on this topic is very welcome!
Like I said the last time, I'm posting these strategies hoping to learn from the community - so any feedback, advice, or corrections is very much welcome and appreciated!
/pbergden
Trend River Pullback (Avramis-style) v1//@version=5
strategy("Trend River Pullback (Avramis-style) v1",
overlay=true, initial_capital=10000, commission_type=strategy.commission.percent, commission_value=0.02,
pyramiding=0, calc_on_order_fills=true, calc_on_every_tick=true, margin_long=1, margin_short=1)
// ===== Inputs
// EMA "река"
emaFastLen = input.int(8, "EMA1 (быстрая)")
ema2Len = input.int(13, "EMA2")
emaMidLen = input.int(21, "EMA3 (средняя)")
ema4Len = input.int(34, "EMA4")
emaSlowLen = input.int(55, "EMA5 (медленная)")
// Откат и импульс
rsiLen = input.int(14, "RSI длина")
rsiOB = input.int(60, "RSI порог тренда (лонг)")
rsiOS = input.int(40, "RSI порог тренда (шорт)")
pullbackPct = input.float(40.0, "Глубина отката в % ширины реки", minval=0, maxval=100)
// Риск-менеджмент
riskPct = input.float(1.0, "Риск на сделку, % от капитала", step=0.1, minval=0.1)
atrLen = input.int(14, "ATR длина (стоп/трейлинг)")
atrMultSL = input.float(2.0, "ATR множитель для стопа", step=0.1)
tpRR = input.float(2.0, "Тейк-профит R-множитель", step=0.1)
// Трейлинг-стоп
useTrail = input.bool(true, "Включить трейлинг-стоп (Chandelier)")
trailMult = input.float(3.0, "ATR множитель трейлинга", step=0.1)
// Торговые часы (по времени биржи TradingView символа)
useSession = input.bool(false, "Ограничить торговые часы")
sessInput = input.session("0900-1800", "Сессия (локальная для биржи)")
// ===== Calculations
ema1 = ta.ema(close, emaFastLen)
ema2 = ta.ema(close, ema2Len)
ema3 = ta.ema(close, emaMidLen)
ema4 = ta.ema(close, ema4Len)
ema5 = ta.ema(close, emaSlowLen)
// "Река": верх/низ как конверт по средним
riverTop = math.max(math.max(ema1, ema2), math.max(ema3, math.max(ema4, ema5)))
riverBot = math.min(math.min(ema1, ema2), math.min(ema3, math.min(ema4, ema5)))
riverMid = (riverTop + riverBot) / 2.0
riverWidth = riverTop - riverBot
// Трендовые условия: выстроенность EMAs
bullAligned = ema1 > ema2 and ema2 > ema3 and ema3 > ema4 and ema4 > ema5
bearAligned = ema1 < ema2 and ema2 < ema3 and ema3 < ema4 and ema4 < ema5
// Импульс
rsi = ta.rsi(close, rsiLen)
// Откат внутрь "реки"
pullbackLevelBull = riverTop - riverWidth * (pullbackPct/100.0) // чем больше %, тем глубже внутрь
pullbackLevelBear = riverBot + riverWidth * (pullbackPct/100.0)
pullbackOkBull = bullAligned and rsi >= rsiOB and low <= pullbackLevelBull
pullbackOkBear = bearAligned and rsi <= rsiOS and high >= pullbackLevelBear
// Триггер входа: возврат в импульс (пересечение быстрой EMA)
longTrig = pullbackOkBull and ta.crossover(close, ema1)
shortTrig = pullbackOkBear and ta.crossunder(close, ema1)
// Сессия
inSession = useSession ? time(timeframe.period, sessInput) : true
// ATR для стопов
atr = ta.atr(atrLen)
// ===== Position sizing по риску
// Расчет размера позиции: риск% от капитала / (стоп в деньгах)
capital = strategy.equity
riskMoney = capital * (riskPct/100.0)
// Предварительные уровни стопов
longSL = close - atrMultSL * atr
shortSL = close + atrMultSL * atr
// Цена тика и размер — приблизительно через syminfo.pointvalue (может отличаться на разных рынках)
tickValue = syminfo.pointvalue
// Избежать деления на 0
slDistLong = math.max(close - longSL, syminfo.mintick)
slDistShort = math.max(shortSL - close, syminfo.mintick)
// Кол-во контрактов/лотов
qtyLong = riskMoney / (slDistLong * tickValue)
qtyShort = riskMoney / (slDistShort * tickValue)
// Ограничение: не меньше 0
qtyLong := math.max(qtyLong, 0)
qtyShort := math.max(qtyShort, 0)
// ===== Entries
if inSession and longTrig and strategy.position_size <= 0
strategy.entry("Long", strategy.long, qty=qtyLong)
if inSession and shortTrig and strategy.position_size >= 0
strategy.entry("Short", strategy.short, qty=qtyShort)
// ===== Exits: фиксированный TP по R и стоп
// Храним цену входа
var float entryPrice = na
if strategy.position_size != 0 and na(entryPrice)
entryPrice := strategy.position_avg_price
if strategy.position_size == 0
entryPrice := na
// Цели
longTP = na(entryPrice) ? na : entryPrice + tpRR * (entryPrice - longSL)
shortTP = na(entryPrice) ? na : entryPrice - tpRR * (shortSL - entryPrice)
// Трейлинг: Chandelier
trailLong = close - trailMult * atr
trailShort = close + trailMult * atr
// Итоговые уровни выхода
useTrailLong = useTrail and strategy.position_size > 0
useTrailShort = useTrail and strategy.position_size < 0
// Для лонга
if strategy.position_size > 0
stopL = math.max(longSL, na) // базовый стоп
tStop = useTrailLong ? trailLong : longSL
// Выход по стопу/трейлу и ТП
strategy.exit("L-Exit", from_entry="Long", stop=tStop, limit=longTP)
// Для шорта
if strategy.position_size < 0
stopS = math.min(shortSL, na)
tStopS = useTrailShort ? trailShort : shortSL
strategy.exit("S-Exit", from_entry="Short", stop=tStopS, limit=shortTP)
// ===== Visuals
plot(ema1, "EMA1", display=display.all, linewidth=1)
plot(ema2, "EMA2", display=display.all, linewidth=1)
plot(ema3, "EMA3", display=display.all, linewidth=2)
plot(ema4, "EMA4", display=display.all, linewidth=1)
plot(ema5, "EMA5", display=display.all, linewidth=1)
plot(riverTop, "River Top", style=plot.style_linebr, linewidth=1)
plot(riverBot, "River Bot", style=plot.style_linebr, linewidth=1)
fill(plot1=plot(riverTop, display=display.none), plot2=plot(riverBot, display=display.none), title="River Fill", transp=80)
plot(longTP, "Long TP", style=plot.style_linebr)
plot(shortTP, "Short TP", style=plot.style_linebr)
plot(useTrailLong ? trailLong : na, "Trail Long", style=plot.style_linebr)
plot(useTrailShort ? trailShort : na, "Trail Short", style=plot.style_linebr)
// Маркеры сигналов
plotshape(longTrig, title="Long Trigger", style=shape.triangleup, location=location.belowbar, size=size.tiny, text="L")
plotshape(shortTrig, title="Short Trigger", style=shape.triangledown, location=location.abovebar, size=size.tiny, text="S")
// ===== Alerts
alertcondition(longTrig, title="Long Signal", message="Long signal: trend aligned + pullback + momentum")
alertcondition(shortTrig, title="Short Signal", message="Short signal: trend aligned + pullback + momentum")
BTC – 6 o'clock Windows (AM/PM) • stable v6Treat 02:30 and 14:30 UTC with Respect
This study focuses on two recurring intraday windows on BTC: 02:30 and 14:30 UTC. Using a time-based overlay that highlights 60–90 minute windows around these timestamps, you’ll notice that many days feature a sharp move, often kicked off by a quick liquidity sweep.
On the chart:
• Boxes visualize each window’s High–Low range.
• Labels show only the dollar change across the window (no decimals).
• Gray label = net up (Close − Open > 0). Purple label = net down (Close − Open < 0).
Why exactly 02:30 and 14:30 UTC?
1. Session overlap and peak liquidity. 02:30 sits inside Asia; 14:30 lands during prime U.S. hours. Block orders and rebalancing cluster here, lifting volatility.
2. Perpetuals mechanics. Funding, scheduled rolls, and liquidations often bunch around these times, triggering stop runs and occasional cascades.
3. Algorithmic execution. CTAs/HFTs batch orders near session turns and around key candle opens/closes.
4. Liquidity grabs. Fast sweeps above/below obvious highs/lows harvest stops before the real direction develops.
How to trade around these windows
• Time alerts at 02:25 and 14:25 UTC.
• Reduce size or hedge from \~10–15 minutes before to 30–90 minutes after.
• Avoid obvious swing-point stops; use ATR-based buffers.
• Wait for confirmation: liquidity sweep plus structure shift (MSB/CHOCH) with volume—don’t chase the first spike.
• Check the calendar first; CPI/FOMC/CME and major macro prints can magnify moves.
Method
Windows are highlighted strictly around 02:30 and 14:30 UTC on 15–30 minute charts. The magnitude cue comes from the window’s High–Low range, while label color reflects the net result (Close − Open): gray for net up, purple for net down. Repeated observations across recent days show this timing effect clearly.
Bottom line
The 02:30 and 14:30 UTC windows are liquidity magnets. Even if you trade swing or trend, acknowledging the elevated volatility here can materially improve entries, risk placement, and position durability.
This is an analytical view, not financial advice.
RS Alpha by The Noiseless TraderRS Alpha by The Noiseless Trader plots a clean, benchmark‑relative strength line for any symbol and (optionally) a mean line to assess trend and momentum in relative performance. It’s designed for uncluttered, professional RS analysis and works across any timeframe.
Compare any symbol vs a benchmark (default: NSE:NIFTY).
Optional log‑normalized RS for return‑aware comparisons.
Optional RS Mean with trend coloring (rising/falling).
Optional RS Trend zero‑line coloring based on short‑range slope.
Lightweight alerts for rising/falling RS mean.
Tip: Use RS to identify leaders (RS > 0 with rising mean) and laggards (RS < 0 with falling mean), then align setups with your price action rules.
Reading the indicator
Leadership: RS > 0 and RS Mean rising → outperformance vs benchmark.
Weakness: RS < 0 and RS Mean falling → underperformance vs benchmark.
Inflections: Watch RS crossing above/below its Mean for early shifts.
Zero‑line context: With RS Trend on, the zero line subtly reflects short‑term slope (green for positive, maroon for negative).
Alerts
Rising Strength – RS Mean turning/remaining upward.
Declining Strength – RS Mean turning/remaining downward.
(Use these as context; execute entries on your price‑action rules.)
Best practices
Pair RS with your trend/structure rules (e.g., higher highs + RS leadership).
For sectors/baskets, keep the Comparative Symbol consistent to rank peers.
Log‑normalized RS helps when comparing assets with very different volatilities or large base effects.
Test multiple length and Mean settings; 60 is a balanced default for swing/positional work.
Credits
Original concept & code: © bharatTrader
Modifications & refinements: The Noiseless Trader
ADX MTF mura visionOverview
ADX MTF — mura vision measures trend strength and visualizes a higher-timeframe (HTF) ADX on any chart. The current-TF ADX is drawn as a line; the HTF ADX is rendered as “step” segments to reflect closed HTF bars without repainting. Optional soft fills highlight the 20–25 (trend forming) and 40–50 (strong trend) zones.
How it works
ADX (current TF) : Classic Wilder formulation using DI components and RMA smoothing.
HTF ADX : Requested via request.security(..., lookahead_off, gaps_off).
When a new HTF bar opens, the previous value is frozen as a horizontal segment.
The current HTF bar is shown as a live moving segment.
This staircase look is expected on lower timeframes.
Auto timeframe mapping
If “Auto” is selected, the HTF is derived from the chart TF:
<30m → 60m, 30–<240m → 240m, 240m–<1D → 1D, 1D → 1W, 1W/2W → 1M, ≥1M → same.
Inputs
DI Length and ADX Smoothing — core ADX parameters.
Higher Time Frame — Auto or a fixed TF.
Line colors/widths for current ADX and HTF ADX.
Fill zone 20–25 and Fill zone 40–50 — optional light background fills.
Number of HTF ADX Bars — limits stored HTF segments to control chart load.
Reading the indicator
ADX < 20: typically range-bound conditions; trend setups require extra caution.
20–25: trend emergence; breakouts and continuation structures gain validity.
40–50: strong trend; favor continuation and manage with trailing stops.
>60 and turning down: possible trend exhaustion or transition toward range.
Note: ADX measures strength, not direction. Combine with your directional filter (e.g., price vs. MA, +DI/−DI, structure/levels).
Non-repainting behavior
HTF values use lookahead_off; closed HTF bars are never revised.
The only moving piece is the live segment for the current HTF bar.
Best practices
Use HTF ADX as a regime filter; time entries with the current-TF ADX rising through your threshold.
Pair with ATR-based stops and a MA/structure filter for direction.
Consider higher thresholds on highly volatile altcoins.
Performance notes
The script draws line segments for HTF bars. If your chart becomes heavy, reduce “Number of HTF ADX Bars.”
Disclaimer
This script is for educational purposes only and does not constitute financial advice. Trading involves risk.
ORB with Fib Levels - TradingbrockOpening Range (OR) Indicator Overview
This TradingView indicator analyzes and displays the Opening Range - a popular day trading concept that tracks price movement during the first 30-60 minutes of the trading session.
Core Functionality:
Opening Range Detection: By default, it monitors the 9:30-10:00 AM ET period and tracks the highest high and lowest low during this time frame, creating upper and lower boundaries.
Fibonacci Retracement Levels: Inside the opening range, it displays five key Fibonacci levels:
0.236 (23.6% - shallow retracement)
0.382 (38.2% - standard retracement)
0.500 (50% - halfway point)
0.618 (61.8% - golden ratio)
0.786 (78.6% - deep retracement)
Extension Levels: The indicator projects additional levels beyond the opening range:
1x extension above/below the range
2x extension levels that only appear when price breaks the first extension
Trading Applications:
Support & Resistance: The opening range high/low often act as key levels throughout the trading day
Breakout Trading: Many traders watch for price to break above or below the opening range
Mean Reversion: The Fibonacci levels within the range can serve as potential reversal points
Risk Management: Helps define clear levels for stop losses and profit targets
The indicator essentially gives traders a framework to understand how price is behaving relative to the early session's established range, which often sets the tone for the entire trading day.
Martingale Strategy Simulator [BackQuant]Martingale Strategy Simulator
Purpose
This indicator lets you study how a martingale-style position sizing rule interacts with a simple long or short trading signal. It computes an equity curve from bar-to-bar returns, adapts position size after losing streaks, caps exposure at a user limit, and summarizes risk with portfolio metrics. An optional Monte Carlo module projects possible future equity paths from your realized daily returns.
What a martingale is
A martingale sizing rule increases stake after losses and resets after a win. In its classical form from gambling, you double the bet after each loss so that a single win recovers all prior losses plus one unit of profit. In markets there is no fixed “even-money” payout and returns are multiplicative, so an exact recovery guarantee does not exist. The core idea is unchanged:
Lose one leg → increase next position size
Lose again → increase again
Win → reset to the base size
The expectation of your strategy still depends on the signal’s edge. Sizing does not create positive expectancy on its own. A martingale raises variance and tail risk by concentrating more capital as a losing streak develops.
What it plots
Equity – simulated portfolio equity including compounding
Buy & Hold – equity from holding the chart symbol for context
Optional helpers – last trade outcome, current streak length, current allocation fraction
Optional diagnostics – daily portfolio return, rolling drawdown, metrics table
Optional Monte Carlo probability cone – p5, p16, p50, p84, p95 aggregate bands
Model assumptions
Bar-close execution with no slippage or commissions
Shorting allowed and frictionless
No margin interest, borrow fees, or position limits
No intrabar moves or gaps within a bar (returns are close-to-close)
Sizing applies to equity fraction only and is capped by your setting
All results are hypothetical and for education only.
How the simulator applies it
1) Directional signal
You pick a simple directional rule that produces +1 for long or −1 for short each bar. Options include 100 HMA slope, RSI above or below 50, EMA or SMA crosses, CCI and other oscillators, ATR move, BB basis, and more. The stance is evaluated bar by bar. When the stance flips, the current trade ends and the next one starts.
2) Sizing after losses and wins
Position size is a fraction of equity:
Initial allocation – the starting fraction, for example 0.15 means 15 percent of equity
Increase after loss – multiply the next allocation by your factor after a losing leg, for example 2.00 to double
Reset after win – return to the initial allocation
Max allocation cap – hard ceiling to prevent runaway growth
At a high level the size after k consecutive losses is
alloc(k) = min( cap , base × factor^k ) .
In practice the simulator changes size only when a leg ends and its PnL is known.
3) Equity update
Let r_t = close_t / close_{t-1} − 1 be the symbol’s bar return, d_{t−1} ∈ {+1, −1} the prior bar stance, and a_{t−1} the prior bar allocation fraction. The simulator compounds:
eq_t = eq_{t−1} × (1 + a_{t−1} × d_{t−1} × r_t) .
This is bar-based and avoids intrabar lookahead. Costs, slippage, and borrowing costs are not modeled.
Why traders experiment with martingale sizing
Mean-reversion contexts – if the signal often snaps back after a string of losses, adding size near the tail of a move can pull the average entry closer to the turn
Behavioral or microstructure edges – some rules have modest edge but frequent small whipsaws; size escalation may shorten time-to-recovery when the edge manifests
Exploration and stress testing – studying the relationship between streaks, caps, and drawdowns is instructive even if you do not deploy martingale sizing live
Why martingale is dangerous
Martingale concentrates capital when the strategy is performing worst. The main risks are structural, not cosmetic:
Loss streaks are inevitable – even with a 55 percent win rate you should expect multi-loss runs. The probability of at least one k-loss streak in N trades rises quickly with N.
Size explodes geometrically – with factor 2.0 and base 10 percent, the sequence is 10, 20, 40, 80, 100 (capped) after five losses. Without a strict cap, required size becomes infeasible.
No fixed payout – in gambling, one win at even odds resets PnL. In markets, there is no guaranteed bounce nor fixed profit multiple. Trends can extend and gaps can skip levels.
Correlation of losses – losses cluster in trends and in volatility bursts. A martingale tends to be largest just when volatility is highest.
Margin and liquidity constraints – leverage limits, margin calls, position limits, and widening spreads can force liquidation before a mean reversion occurs.
Fat tails and regime shifts – assumptions of independent, Gaussian returns can understate tail risk. Structural breaks can keep the signal wrong for much longer than expected.
The simulator exposes these dynamics in the equity curve, Max Drawdown, VaR and CVaR, and via Monte Carlo sketches of forward uncertainty.
Interpreting losing streaks with numbers
A rough intuition: if your per-trade win probability is p and loss probability is q=1−p , the chance of a specific run of k consecutive losses is q^k . Over many trades, the chance that at least one k-loss run occurs grows with the number of opportunities. As a sanity check:
If p=0.55 , then q=0.45 . A 6-loss run has probability q^6 ≈ 0.008 on any six-trade window. Across hundreds of trades, a 6 to 8-loss run is not rare.
If your size factor is 1.5 and your base is 10 percent, after 8 losses the requested size is 10% × 1.5^8 ≈ 25.6% . With factor 2.0 it would try to be 10% × 2^8 = 256% but your cap will stop it. The equity curve will still wear the compounded drawdown from the sequence that led to the cap.
This is why the cap setting is central. It does not remove tail risk, but it prevents the sizing rule from demanding impossible positions
Note: The p and q math is illustrative. In live data the win rate and distribution can drift over time, so real streaks can be longer or shorter than the simple q^k intuition suggests..
Using the simulator productively
Parameter studies
Start with conservative settings. Increase one element at a time and watch how the equity, Max Drawdown, and CVaR respond.
Initial allocation – lower base reduces volatility and drawdowns across the board
Increase factor – set modestly above 1.0 if you want the effect at all; doubling is aggressive
Max cap – the most important brake; many users keep it between 20 and 50 percent
Signal selection
Keep sizing fixed and rotate signals to see how streak patterns differ. Trend-following signals tend to produce long wrong-way streaks in choppy ranges. Mean-reversion signals do the opposite. Martingale sizing interacts very differently with each.
Diagnostics to watch
Use the built-in metrics to quantify risk:
Max Drawdown – worst peak-to-trough equity loss
Sharpe and Sortino – volatility and downside-adjusted return
VaR 95 percent and CVaR – tail risk measures from the realized distribution
Alpha and Beta – relationship to your chosen benchmark
If you would like to check out the original performance metrics script with multiple assets with a better explanation on all metrics please see
Monte Carlo exploration
When enabled, the forecast draws many synthetic paths from your realized daily returns:
Choose a horizon and a number of runs
Review the bands: p5 to p95 for a wide risk envelope; p16 to p84 for a narrower range; p50 as the median path
Use the table to read the expected return over the horizon and the tail outcomes
Remember it is a sketch based on your recent distribution, not a predictor
Concrete examples
Example A: Modest martingale
Base 10 percent, factor 1.25, cap 40 percent, RSI>50 signal. You will see small escalations on 2 to 4 loss runs and frequent resets. The equity curve usually remains smooth unless the signal enters a prolonged wrong-way regime. Max DD may rise moderately versus fixed sizing.
Example B: Aggressive martingale
Base 15 percent, factor 2.0, cap 60 percent, EMA cross signal. The curve can look stellar during favorable regimes, then a single extended streak pushes allocation to the cap, and a few more losses drive deep drawdown. CVaR and Max DD jump sharply. This is a textbook case of high tail risk.
Strengths
Bar-by-bar, transparent computation of equity from stance and size
Explicit handling of wins, losses, streaks, and caps
Portable signal inputs so you can A–B test ideas quickly
Risk diagnostics and forward uncertainty visualization in one place
Example, Rolling Max Drawdown
Limitations and important notes
Martingale sizing can escalate drawdowns rapidly. The cap limits position size but not the possibility of extended adverse runs.
No commissions, slippage, margin interest, borrow costs, or liquidity limits are modeled.
Signals are evaluated on closes. Real execution and fills will differ.
Monte Carlo assumes independent draws from your recent return distribution. Markets often have serial correlation, fat tails, and regime changes.
All results are hypothetical. Use this as an educational tool, not a production risk engine.
Practical tips
Prefer gentle factors such as 1.1 to 1.3. Doubling is usually excessive outside of toy examples.
Keep a strict cap. Many users cap between 20 and 40 percent of equity per leg.
Stress test with different start dates and subperiods. Long flat or trending regimes are where martingale weaknesses appear.
Compare to an anti-martingale (increase after wins, cut after losses) to understand the other side of the trade-off.
If you deploy sizing live, add external guardrails such as a daily loss cut, volatility filters, and a global max drawdown stop.
Settings recap
Backtest start date and initial capital
Initial allocation, increase-after-loss factor, max allocation cap
Signal source selector
Trading days per year and risk-free rate
Benchmark symbol for Alpha and Beta
UI toggles for equity, buy and hold, labels, metrics, PnL, and drawdown
Monte Carlo controls for enable, runs, horizon, and result table
Final thoughts
A martingale is not a free lunch. It is a way to tilt capital allocation toward losing streaks. If the signal has a real edge and mean reversion is common, careful and capped escalation can reduce time-to-recovery. If the signal lacks edge or regimes shift, the same rule can magnify losses at the worst possible moment. This simulator makes those trade-offs visible so you can calibrate parameters, understand tail risk, and decide whether the approach belongs anywhere in your research workflow.
Trend Bars with Okuninushi Line Filter# Trend Bars with Okuninushi Line Filter: A Powerful Trading Indicator
##TrendSpider Hackathon 2025 Trend Bars with Okuninushi Filter
trendspider.com
##X
x.com
## Introduction
The **Trend Bars with Okuninushi Line Filter** is an innovative technical indicator that combines two powerful concepts: trend bar analysis and the Okuninushi Line filter. This indicator helps traders identify high-quality trending moves by analyzing candle body strength relative to the overall price range while ensuring the price action aligns with the dominant market structure.
## What Are Trend Bars?
Trend bars are candles where the body (distance between open and close) represents a significant portion of the total price range (high to low). These bars indicate strong directional momentum with minimal indecision, making them valuable signals for trend continuation.
### Key Characteristics:
- **Strong directional movement**: Large body relative to total range
- **Minimal upper/lower shadows**: Shows sustained pressure in one direction
- **High conviction**: Represents decisive market action
## The Okuninushi Line Filter
The Okuninushi Line, also known as the Kijun Line in Ichimoku analysis, is calculated as the midpoint of the highest high and lowest low over a specified period (default: 52 periods).
**Formula**: `(Highest High + Lowest Low) / 2`
This line acts as a dynamic support/resistance level and trend filter, helping to:
- Identify the overall market bias
- Filter out counter-trend signals
- Provide confluence for trade entries
## How the Indicator Works
The indicator combines these two concepts with the following logic:
### Bull Trend Bars (Green)
A candle is colored **green** when ALL conditions are met:
1. **Bullish candle**: Close > Open
2. **Strong body**: |Close - Open| ≥ Threshold × (High - Low)
3. **Above trend filter**: Close > Okuninushi Line
### Bear Trend Bars (Red)
A candle is colored **red** when ALL conditions are met:
1. **Bearish candle**: Close < Open
2. **Strong body**: |Close - Open| ≥ Threshold × (High - Low)
3. **Below trend filter**: Close < Okuninushi Line
### Neutral Bars (Gray)
All other candles that don't meet the complete criteria are colored **gray**.
## Customizable Parameters
### Trend Bar Threshold
- **Range**: 10% to 100%
- **Default**: 75%
- **Purpose**: Controls how "strong" a candle must be to qualify as a trend bar
**Threshold Effects:**
- **Low (10-30%)**: More sensitive, catches smaller trending moves
- **Medium (50-75%)**: Balanced approach, filters out most noise
- **High (80-100%)**: Very selective, only captures the strongest moves
### Okuninushi Line Length
- **Default**: 52 periods
- **Purpose**: Determines the lookback period for calculating the midpoint
- **Common Settings**:
- for 15m is 92, per 1 day as 23h*4(15m in 1h)
- for 1h is 115, per 1 week as 5d*23(23h in 1d)
- for 4h is 120, per 1 month as 20d*6
- for 1d is 65, per 3 months
- for 1w is 52, per 1 year
## Trading Applications
### 1. Trend Continuation Signals
- **Green bars**: Look for bullish continuation opportunities
- **Red bars**: Consider bearish continuation setups
- **Gray bars**: Exercise caution, mixed signals
### 2. Market Structure Analysis
- Clusters of same-colored bars indicate strong trends
- Alternating colors suggest choppy, indecisive markets
- Transition from red to green (or vice versa) may signal trend changes
### 3. Entry Timing
- Use colored bars as confirmation for existing trade setups
- Wait for color alignment with your market bias
- Avoid trading during predominantly gray periods
### 4. Risk Management
- Gray bars can serve as early warning signs of weakening trends
- Color changes might indicate appropriate exit points
- Use in conjunction with other risk management tools
## Advantages
1. **Dual Filtering**: Combines momentum (trend bars) with trend direction (Okuninushi Line)
2. **Visual Clarity**: Immediate visual feedback through candle coloring
3. **Customizable**: Adjustable parameters for different trading styles
4. **Versatile**: Works across multiple timeframes and instruments
5. **Objective**: Rule-based system reduces subjective interpretation
## Limitations
1. **Lagging Nature**: Based on historical price data
2. **False Signals**: Can produce whipsaws in choppy markets
3. **Parameter Sensitivity**: Requires optimization for different instruments
4. **Market Conditions**: May be less effective in ranging markets
## Best Practices
### Optimization Tips:
- **Volatile Markets**: Use higher thresholds (80-90%)
- **Steady Trends**: Use moderate thresholds (60-75%)
- **Short-term Trading**: Shorter Okuninushi Line periods (26)
- **Long-term Analysis**: Longer Okuninushi Line periods (104+)
### Combination Strategies:
- Pair with volume indicators for confirmation
- Use alongside support/resistance levels
- Combine with other trend-following indicators
- Consider market context and overall trend direction
## Conclusion
The Trend Bars with Okuninushi Line Filter offers traders a sophisticated yet intuitive way to identify high-quality trending moves. By combining the momentum characteristics of trend bars with the directional filter of the Okuninushi Line, this indicator helps traders focus on the most promising opportunities while avoiding low-probability setups.
Remember that no single indicator should be used in isolation. Always consider market context, risk management, and other technical factors when making trading decisions. The true power of this indicator lies in its ability to quickly highlight periods of strong, aligned price action – exactly what trend traders are looking for.
FibADX MTF Dashboard — DMI/ADX with Fibonacci DominanceFibADX MTF Dashboard — DMI/ADX with Fibonacci Dominance (φ)
This indicator fuses classic DMI/ADX with the Fibonacci Golden Ratio to score directional dominance and trend tradability across multiple timeframes in one clean panel.
What’s unique
• Fibonacci dominance tiers:
• BULL / BEAR → one side slightly stronger
• STRONG when one DI ≥ 1.618× the other (φ)
• EXTREME when one DI ≥ 2.618× (φ²)
• Rounded dominance % in the +DI/−DI columns (e.g., STRONG BULL 72%).
• ADX column modes: show the value (with strength bar ▂▃▅… and slope ↗/↘) or a tier (Weak / Tradable / Strong / Extreme).
• Configurable intraday row (30m/1H/2H/4H) + D/W/M toggles.
• Threshold line: color & width; Extended (infinite both ways) or Not extended (historical plot).
• Theme presets (Dark / Light / High Contrast) or full custom colors.
• Optional panel shading when all selected TFs are strong (and optionally directionally aligned).
How to use
1. Choose an intraday TF (30/60/120/240). Enable D/W/M as needed.
2. Use ADX ≥ threshold (e.g., 21 / 34 / 55) to find tradable trends.
3. Read the +DI/−DI labels to confirm bias (BULL/BEAR) and conviction (STRONG/EXTREME).
4. Prefer multi-TF alignment (e.g., 4H & D & W all strong bull).
5. Treat EXTREME as a momentum regime—trail tighter and scale out into spikes.
Alerts
• All selected TFs: Strong BULL alignment
• All selected TFs: Strong BEAR alignment
Notes
• Smoothing selectable: RMA (Wilder) / EMA / SMA.
• Percentages are whole numbers (72%, not 72.18%).
• Shorttitle is FibADX to comply with TV’s 10-char limit.
Why We Use Fibonacci in FibADX
Traditional DMI/ADX indicators rely on fixed numeric thresholds (e.g., ADX > 20 = “tradable”), but they ignore the relationship between +DI and −DI, which is what really determines trend conviction.
FibADX improves on this by introducing the Fibonacci Golden Ratio (φ ≈ 1.618) to measure directional dominance and classify trend strength more intelligently.
⸻
1. Fibonacci as a Natural Strength Threshold
The golden ratio φ appears everywhere in nature, growth cycles, and fractals.
Since financial markets also behave fractally, Fibonacci levels reflect natural crowd behavior and trend acceleration points.
In FibADX:
• When one DI is slightly larger than the other → BULL or BEAR (mild advantage).
• When one DI is at least 1.618× the other → STRONG BULL or STRONG BEAR (trend conviction).
• When one DI is 2.618× or more → EXTREME BULL or EXTREME BEAR (high momentum regime).
This approach adds structure and consistency to trend classification.
⸻
2. Why 1.618 and 2.618 Instead of Random Numbers
Other traders might pick thresholds like 1.5 or 2.0, but φ has special mathematical properties:
• φ is the most irrational ratio, meaning proportions based on φ retain structure even when scaled.
• Using φ makes FibADX naturally adaptive to all timeframes and asset classes — stocks, crypto, forex, commodities.
⸻
3 . Trading Advantages
Using the Fibonacci Golden Ratio inside DMI/ADX has several benefits:
• Better trend filtering → Avoid false DI crossovers without conviction.
• Catch early momentum shifts → Spot when dominance ratios approach φ before ADX reacts.
• Consistency across markets → Because φ is scalable and fractal, it works everywhere.
⸻
4. How FibADX Uses This
FibADX combines:
• +DI vs −DI ratio → Measures directional dominance.
• φ thresholds (1.618, 2.618) → Classifies strength into BULL, STRONG, EXTREME.
• ADX threshold → Confirms whether the move is tradable or just noise.
• Multi-timeframe dashboard → Aligns bias across 4H, D, W, M.
⸻
Quick Blurb for TradingView
FibADX uses the Fibonacci Golden Ratio (φ ≈ 1.618) to classify trend strength.
Unlike classic DMI/ADX, FibADX measures how much one side dominates:
• φ (1.618) = STRONG trend conviction
• φ² (2.618) = EXTREME momentum regime
This creates an adaptive, fractal-aware framework that works across stocks, crypto, forex, and commodities.
⚠️ Disclaimer : This script is provided for educational purposes only.
It does not constitute financial advice.
Use at your own risk. Always do your own research before making trading decisions.
Created by @nomadhedge
Custom RSI with Dual Smoothing + Bias Bands + ZonesRSI indicator with two layers of smoothing, key levels (20, 40, 50, 60, 80), and color-coded background zones for bullish, bearish, and neutral bias.
Great for spotting momentum, trend direction, and overbought/oversold conditions across any timeframe.
Quad Stochastic Div (Latching Quad)This script combines 4 stochastic lines, plotting only the %D lines.
(9,3)(14,3)(40,4)(60,10)
When all 4 are oversold or overbought, a buy or sell background is painted. When the slowest moving stochastic finally rotates back towards the center, the background will unlatch. This script also marks most divergences made between the chart and the 2 faster moving stochastic lines. White markers for the 9,3 and orange markers for the 14,4. Tradable signals are both orange and white divergence occurring on the same pivot, or either divergence leading out of a rotation. Generally more useful for scalping 1-5m charts.
I also built out some strength ratings to attempt to classify the divergences against one another, but this didn't seem to have much value in practice so by default the tags are turned off.
This indicator is helpful for anyone interested in daytradingrockstar on youtube's quad stochastic strategy.
Ultimate Pattern ScannerSmart Pattern Scanner Pro - Complete Study Guide
The Smart Pattern Scanner Pro is an advanced candlestick pattern recognition indicator that automatically detects over 30 traditional Japanese candlestick patterns across multiple timeframes simultaneously. It combines pattern recognition with volume analysis and trend confirmation to provide traders with comprehensive reversal and continuation signals.
Core Features:
• 30+ Candlestick Patterns: Complete library of traditional patterns
• Multi-Timeframe Scanning: Simultaneous analysis across up to 7 timeframes
• Volume Integration: Buy/sell volume analysis with pattern confirmation
• Trend Filtering: SMA-based trend confirmation for pattern validity
• Real-Time Dashboard: Professional interface with customizable display
• Alert System: Automated notifications when patterns are detected
________________________________________
Candlestick Pattern Categories
Reversal Patterns (Bullish)
Single Candle Patterns
1. Hammer
o Formation: Small body at top, long lower shadow (2x body size)
o Signal: Bullish reversal after downtrend
o Reliability: High when confirmed with volume
o Entry: Above hammer high with stop below low
2. Inverted Hammer
o Formation: Small body at bottom, long upper shadow
o Signal: Potential bullish reversal (needs confirmation)
o Reliability: Medium (requires next candle confirmation)
o Entry: Confirmed breakout above pattern
3. Dragonfly Doji
o Formation: Open = Close, long lower shadow, no upper shadow
o Signal: Strong bullish reversal signal
o Reliability: High in downtrends
o Entry: Above doji high with tight stop
4. Long Lower Shadow
o Formation: Lower shadow 2x body length
o Signal: Rejection of lower prices, bullish sentiment
o Reliability: Medium to high with volume
o Entry: Above candle high
Multi-Candle Patterns
1. Bullish Engulfing
o Formation: Large white candle completely engulfs previous black candle
o Signal: Strong bullish reversal
o Reliability: Very high with volume confirmation
o Entry: Above engulfing candle high
2. Morning Star
o Formation: 3-candle pattern (down, small, up)
o Signal: Major bullish reversal
o Reliability: Excellent (one of most reliable patterns)
o Entry: Above third candle high
3. Morning Doji Star
o Formation: Like Morning Star but middle candle is doji
o Signal: Strong bullish reversal
o Reliability: Very high
o Entry: Above third candle close
4. Piercing Pattern
o Formation: White candle opens below previous low, closes above midpoint
o Signal: Bullish reversal
o Reliability: High when closing >50% into previous candle
o Entry: Above piercing candle high
5. Bullish Harami
o Formation: Small white candle within previous large black candle
o Signal: Potential bullish reversal
o Reliability: Medium (needs confirmation)
o Entry: Above mother candle high
Reversal Patterns (Bearish)
Single Candle Patterns
1. Shooting Star
o Formation: Small body at bottom, long upper shadow
o Signal: Bearish reversal after uptrend
o Reliability: High with volume confirmation
o Entry: Below shooting star low
2. Hanging Man
o Formation: Like hammer but appears in uptrend
o Signal: Potential bearish reversal
o Reliability: Medium (needs confirmation)
o Entry: Below hanging man low
3. Gravestone Doji
o Formation: Open = Close, long upper shadow, no lower shadow
o Signal: Strong bearish reversal
o Reliability: High in uptrends
o Entry: Below doji low
4. Long Upper Shadow
o Formation: Upper shadow 2x body length
o Signal: Rejection of higher prices
o Reliability: Medium to high
o Entry: Below candle low
Multi-Candle Patterns
1. Bearish Engulfing
o Formation: Large black candle engulfs previous white candle
o Signal: Strong bearish reversal
o Reliability: Very high
o Entry: Below engulfing candle low
2. Evening Star
o Formation: 3-candle pattern (up, small, down)
o Signal: Major bearish reversal
o Reliability: Excellent
o Entry: Below third candle low
3. Dark Cloud Cover
o Formation: Black candle opens above previous high, closes below midpoint
o Signal: Bearish reversal
o Reliability: High when closing <50% into previous candle
o Entry: Below dark cloud low
Continuation Patterns
1. Rising Three Methods
o Formation: White candle, 3 small declining candles, white candle
o Signal: Bullish continuation
o Reliability: High in strong uptrends
2. Falling Three Methods
o Formation: Black candle, 3 small rising candles, black candle
o Signal: Bearish continuation
o Reliability: High in strong downtrends
Indecision Patterns
1. Doji
o Formation: Open = Close (or very close)
o Signal: Market indecision, potential reversal
o Reliability: Context-dependent
2. Spinning Tops
o Formation: Small body with upper and lower shadows
o Signal: Market indecision
o Reliability: Low without confirmation
________________________________________
Multi-Timeframe Analysis
Timeframe Hierarchy Strategy
Primary Analysis Flow:
1. Higher Timeframe (Daily/Weekly): Establish overall trend direction
2. Intermediate Timeframe (4H/1H): Identify key support/resistance levels
3. Lower Timeframe (15M/5M): Precise entry and exit timing
Configuration Guidelines:
• Scalping: 1M, 3M, 5M, 15M, 30M
• Day Trading: 5M, 15M, 30M, 1H, 4H
• Swing Trading: 1H, 4H, 1D, 1W
• Position Trading: 4H, 1D, 1W, 1M
Pattern Confluence Rules:
1. High Probability Setup: Same pattern type appears on 3+ timeframes
2. Trend Alignment: Reversal patterns should align with higher timeframe structure
3. Volume Confirmation: Strong volume on pattern timeframe and higher timeframes
________________________________________
Volume Analysis Integration
Volume Components:
1. Buy Volume: Volume when close > open (green candles)
2. Sell Volume: Volume when close ≤ open (red candles)
3. Volume Ratio: Current volume / 20-period moving average
4. Progress Indicator: Visual representation of volume strength
Volume Signal Interpretation:
• Ratio >1.5: Strong volume confirmation
• Ratio 1.0-1.5: Moderate volume support
• Ratio <1.0: Weak volume (pattern less reliable)
Volume Analysis Rules:
1. Bullish Patterns: Require strong buy volume for confirmation
2. Bearish Patterns: Require strong sell volume for confirmation
3. Volume Divergence: When pattern and volume disagree, favor volume
4. Volume Spikes: Ratios >2.0 indicate institutional interest
________________________________________
Live Market Application
Step 1: Dashboard Setup
1. Position Selection: Choose optimal table position for your layout
2. Timeframe Configuration: Set relevant timeframes for your strategy
3. Volume Analysis: Enable for confirmation signals
4. Progress Indicators: Enable for visual signal strength
Step 2: Pattern Identification Process
Real-Time Scanning:
1. Monitor Multiple Timeframes: Check all configured timeframes simultaneously
2. Pattern Priority: Focus on patterns appearing on higher timeframes first
3. Signal Confluence: Look for patterns appearing across multiple timeframes
4. Volume Confirmation: Verify adequate volume support
Pattern Validation:
1. Trend Context: Ensure pattern aligns with overall market structure
2. Support/Resistance: Check if pattern forms at key levels
3. Market Conditions: Consider overall market volatility and sentiment
4. Time of Day: Be aware of session characteristics (open, close, lunch)
Step 3: Entry Decision Matrix
High Probability Entries:
• Pattern on 3+ timeframes
• Strong volume confirmation (ratio >1.5)
• Trend alignment with higher timeframes
• Formation at key support/resistance
Medium Probability Entries:
• Pattern on 2 timeframes
• Moderate volume (ratio 1.0-1.5)
• Partial trend alignment
• Formation in trending market
Low Probability Entries:
• Single timeframe pattern
• Weak volume (ratio <1.0)
• Counter-trend formation
• Choppy/sideways market
________________________________________
Pattern Reliability Assessment
Tier 1 Patterns (Highest Reliability - 70-80% success rate):
• Morning Star / Evening Star
• Bullish/Bearish Engulfing
• Three White Soldiers / Three Black Crows
• Hammer (in strong downtrend)
• Shooting Star (in strong uptrend)
Tier 2 Patterns (High Reliability - 60-70% success rate):
• Piercing Pattern / Dark Cloud Cover
• Morning/Evening Doji Star
• Harami patterns
• Abandoned Baby
• Kicking patterns
Tier 3 Patterns (Moderate Reliability - 50-60% success rate):
• Doji patterns
• Tweezer Tops/Bottoms
• Window patterns
• Tasuki Gap patterns
• Marubozu patterns
Tier 4 Patterns (Lower Reliability - 40-50% success rate):
• Spinning Tops
• Long shadow patterns (single)
• Neutral doji formations
• Single candle continuation patterns
________________________________________
Trading Strategies
Strategy 1: Multi-Timeframe Reversal
Objective: Catch major trend reversals using high-reliability patterns
Rules:
1. Wait for Tier 1 patterns on Daily + 4H timeframes
2. Require volume ratio >1.5 on both timeframes
3. Enter on 1H confirmation candle
4. Stop loss below/above pattern extreme
5. Target 2:1 or 3:1 risk-reward ratio
Strategy 2: Intraday Scalping
Objective: Quick profits from short-term pattern formations
Rules:
1. Focus on 5M and 15M timeframes
2. Trade only Tier 1 and Tier 2 patterns
3. Require volume confirmation
4. Quick exits (10-30 pip targets)
5. Tight stops (5-15 pips)
Strategy 3: Swing Trading
Objective: Multi-day position holding based on pattern signals
Rules:
1. Use Daily and Weekly timeframes
2. Focus on major reversal patterns
3. Combine with fundamental analysis
4. Wider stops (2-5% of entry price)
5. Hold for 5-20 trading days
Strategy 4: Trend Continuation
Objective: Enter trending markets using continuation patterns
Rules:
1. Identify strong trends on higher timeframes
2. Wait for continuation patterns on lower timeframes
3. Enter in direction of main trend
4. Trail stops using pattern lows/highs
5. Pyramid positions on additional patterns
________________________________________
Risk Management
Position Sizing Rules:
1. Tier 1 Patterns: Risk up to 2% of account
2. Tier 2 Patterns: Risk up to 1.5% of account
3. Tier 3 Patterns: Risk up to 1% of account
4. Tier 4 Patterns: Risk up to 0.5% of account
Stop Loss Guidelines:
1. Reversal Patterns: Stop beyond pattern extreme + 1 ATR
2. Continuation Patterns: Stop at pattern invalidation level
3. Doji Patterns: Tight stops due to indecision nature
4. Multi-Candle Patterns: Use pattern range for stop placement
Take Profit Strategies:
1. Conservative: 1:1 risk-reward ratio
2. Moderate: 2:1 risk-reward ratio
3. Aggressive: 3:1 risk-reward ratio
4. Trailing: Move stops to breakeven after 1:1 achieved
________________________________________
Limitations and Considerations
Technical Limitations:
1. Pattern Subjectivity: Slight variations in pattern interpretation
2. Market Context Dependency: Patterns perform differently in various market conditions
3. False Signals: Not all patterns lead to expected price moves
4. Lagging Nature: Patterns are confirmed after formation is complete
Market Condition Considerations:
1. Trending Markets: Continuation patterns more reliable than reversals
2. Range-Bound Markets: Reversal patterns at extremes more effective
3. High Volatility: Patterns may not develop properly
4. News Events: Fundamental factors can override technical patterns
Optimal Usage Conditions:
1. Liquid Markets: Adequate volume and participation
2. Normal Volatility: Not during extreme market stress
3. Clear Market Structure: Defined support and resistance levels
4. Multiple Timeframe Alignment: Confluence across timeframes
When NOT to Trade Patterns:
1. Major News Releases: Economic announcements can invalidate patterns
2. Market Holidays: Reduced participation affects reliability
3. Extreme Volatility: VIX >30 or similar stress indicators
4. Gap Openings: Large gaps can negate pattern significance
________________________________________
Risk Disclaimer
CRITICAL WARNING FROM aiTrendview
TRADING FINANCIAL INSTRUMENTS INVOLVES SUBSTANTIAL RISK OF LOSS
This Smart Pattern Scanner Pro indicator ("the Indicator") is provided for educational and analytical purposes only. By using this indicator, you acknowledge and accept the following terms and conditions:
No Financial Advice
• NOT INVESTMENT ADVICE: This indicator does not constitute financial, investment, or trading advice
• NO RECOMMENDATIONS: Pattern signals are not recommendations to buy or sell any financial instrument
• EDUCATIONAL TOOL: Designed for learning technical analysis concepts and pattern recognition
• INDEPENDENT RESEARCH REQUIRED: Always conduct your own thorough analysis before making trading decisions
Substantial Trading Risks
• CAPITAL LOSS RISK: You may lose some or all of your trading capital
• LEVERAGE DANGERS: Margin trading can amplify losses beyond your initial investment
• MARKET VOLATILITY: Financial markets are inherently unpredictable and can move against any analysis
• PATTERN FAILURE: Candlestick patterns fail frequently and do not guarantee profitable outcomes
• FALSE SIGNALS: The indicator may generate incorrect or misleading signals
Technical Analysis Limitations
• NOT PREDICTIVE: Candlestick patterns analyze past price action, not future movements
• SUBJECTIVE INTERPRETATION: Pattern recognition can vary between traders and market conditions
• CONTEXT DEPENDENT: Patterns must be analyzed within broader market context
• NO GUARANTEE: No technical analysis method guarantees trading success
• STATISTICAL PROBABILITY: Even high-reliability patterns fail 20-30% of the time
User Responsibilities
• SOLE RESPONSIBILITY: You are entirely responsible for all trading decisions and outcomes
• RISK MANAGEMENT: Implement appropriate position sizing and stop-loss strategies
• PROFESSIONAL CONSULTATION: Seek advice from qualified financial professionals
• REGULATORY COMPLIANCE: Ensure compliance with local financial regulations
• CONTINUOUS EDUCATION: Maintain ongoing education in market analysis and risk management
Indicator Limitations
• SOFTWARE BUGS: Technical glitches or calculation errors may occur
• DATA DEPENDENCY: Relies on accurate price and volume data feeds
• PLATFORM LIMITATIONS: Subject to TradingView platform capabilities and restrictions
• VERSION UPDATES: Functionality may change with future updates
• COMPATIBILITY: May not work optimally with all chart configurations
Volume Analysis Limitations
• DATA ACCURACY: Volume data may be incomplete or delayed
• MARKET VARIATIONS: Volume patterns differ across markets and instruments
• INSTITUTIONAL ACTIVITY: Cannot guarantee detection of all institutional trading
• LIQUIDITY FACTORS: Low liquidity markets may produce unreliable volume signals
Multi-Timeframe Considerations
• CONFLICTING SIGNALS: Different timeframes may show contradictory patterns
• TIME SYNCHRONIZATION: Pattern timing may vary across timeframes
• COMPUTATIONAL LOAD: Multiple timeframe analysis may affect performance
• COMPLEXITY RISK: More data does not necessarily mean better decisions
Specific Trading Warnings
Pattern-Specific Risks:
1. Doji Patterns: Indicate indecision, not directional conviction
2. Single Candle Patterns: Generally less reliable than multi-candle formations
3. Continuation Patterns: May signal trend exhaustion rather than continuation
4. Gap Patterns: Subject to overnight and weekend gap risks
Market Condition Risks:
1. News Events: Fundamental factors can invalidate any technical pattern
2. Market Manipulation: Large players can create false pattern signals
3. Algorithmic Trading: High-frequency trading can distort traditional patterns
4. Market Crashes: Extreme events render technical analysis ineffective
Psychological Trading Risks:
1. Overconfidence: Successful patterns may lead to excessive risk-taking
2. Pattern Addiction: Over-reliance on patterns without broader analysis
3. Confirmation Bias: Seeing patterns that don't actually exist
4. Emotional Trading: Fear and greed can override pattern discipline
Legal and Regulatory Disclaimers
Intellectual Property:
• COPYRIGHT PROTECTION: This indicator is protected by copyright law
• AUTHORIZED USE ONLY: Use only as permitted by TradingView terms of service
• NO REDISTRIBUTION: Unauthorized copying or redistribution is prohibited
• MODIFICATION RESTRICTIONS: Code modifications may void any support or warranties
Regulatory Compliance:
• LOCAL LAWS: Ensure compliance with your jurisdiction's financial regulations
• LICENSING REQUIREMENTS: Some jurisdictions require licenses for trading or advisory activities
• TAX OBLIGATIONS: Trading profits/losses may have tax implications
• REPORTING REQUIREMENTS: Some jurisdictions require reporting of trading activities
Limitation of Liability:
• NO LIABILITY: aiTrendview accepts no liability for any losses, damages, or adverse outcomes
• INDIRECT DAMAGES: Not liable for consequential, incidental, or punitive damages
• MAXIMUM LIABILITY: Limited to amount paid for indicator access (if any)
• FORCE MAJEURE: Not responsible for events beyond reasonable control
Final Warnings and Recommendations
Before Using This Indicator:
1. DEMO TRADING: Practice extensively with paper trading before risking real money
2. EDUCATION: Thoroughly understand candlestick pattern theory and market dynamics
3. RISK ASSESSMENT: Honestly assess your risk tolerance and financial situation
4. PROFESSIONAL ADVICE: Consult with qualified financial advisors
5. START SMALL: Begin with minimal position sizes to test strategies
Red Flags - Do NOT Trade If:
• You cannot afford to lose the money you're risking
• You're experiencing financial stress or pressure
• You're trading emotionally or impulsively
• You don't understand the patterns or market mechanics
• You're using borrowed money or credit to trade
• You're treating trading as gambling rather than calculated risk-taking
Emergency Procedures:
• STOP TRADING immediately if experiencing significant losses
• SEEK HELP if trading is affecting your mental health or relationships
• REVIEW STRATEGY after any series of losses
• TAKE BREAKS from trading to maintain perspective
• PROFESSIONAL HELP: Contact financial counselors if needed
Acknowledgment Required
By using the Smart Pattern Scanner Pro indicator, you explicitly acknowledge that:
1. You have read and understood this entire disclaimer
2. You accept full responsibility for all trading decisions and outcomes
3. You understand the substantial risks involved in financial trading
4. You will not hold aiTrendview liable for any losses or damages
5. You will use this tool only for educational and personal analysis purposes
6. You will comply with all applicable laws and regulations
7. You will implement appropriate risk management practices
8. You understand that past performance does not predict future results
REMEMBER: The most important rule in trading is capital preservation. No pattern, indicator, or strategy is worth risking your financial well-being.
________________________________________
Disclaimer from aiTrendview.com
The content provided in this blog post is for educational and training purposes only. It is not intended to be, and should not be construed as, financial, investment, or trading advice. All charting and technical analysis examples are for illustrative purposes. Trading and investing in financial markets involve substantial risk of loss and are not suitable for every individual. Before making any financial decisions, you should consult with a qualified financial professional to assess your personal financial situation.
[quantish.io] ORB - Opening Range BreakoutsA streamlined opening range breakout indicator focused purely on identifying and signaling potential entry points. This simplified version removes complex profit-taking and risk management features to provide clear, actionable breakout signals.
Key Features
Multiple ORB Timeframes - 15 minutes to 4 hours opening range periods
Clean Breakout Detection - Simple close-based signals above/below opening range
Trade Window Control - Optional time limit for valid entries after ORB period
Visual Clarity - Shaded opening range zones with optional trade windows
Entry Signals - Clear "Bullish" and "Bearish" labels with dotted entry lines
Customizable Display - Toggle opening range, trade window, and entry signal visibility
Entry Alerts - Real-time notifications when breakout conditions are met
Custom Sessions - Define your own market opening times if needed
Best Used For
Intraday trading on sub-60 minute timeframes. Ideal for traders who prefer to manage their own exits and risk management while getting clean entry signals based on opening range breakouts.
Important Notes
This indicator provides entry signals only - no exit or risk management guidance
Works on all markets with defined opening sessions
Always use proper position sizing and risk management
Test thoroughly before live trading
Simplified from the original FluxCharts ORB indicator with enhanced visuals and focused functionality.
Intrabar Volume Delta — RealTime + History (Stocks/Crypto/Forex)Intrabar Volume Delta Grid — RealTime + History (Stocks/Crypto/Forex)
# Short Description
Shows intrabar Up/Down volume, Delta (absolute/relative) and UpShare% in a compact grid for both real-time and historical bars. Includes an MTF (M1…D1) dashboard, contextual coloring, density controls, and alerts on Δ and UpShare%. Smart historical splitting (“History Mode”) for Crypto/Futures/FX.
---
# What it does (Quick)
* **UpVol / DownVol / Δ / UpShare%** — visualizes order-flow inside each candle.
* **Real-time** — accumulates intrabar volume live by tick-direction.
* **History Mode** — splits Up/Down on closed bars via simple or range-aware logic.
* **MTF Dashboard** — one table view across M1, M5, M15, M30, H1, H4, D1 (Vol, Up/Down, Δ%, Share, Trend).
* **Contextual opacity** — stronger signals appear bolder.
* **Label density** — draw every N-th bar and limit to last X bars for performance.
* **Alerts** — thresholds for |Δ|, Δ%, and UpShare%.
---
# How it works (Real-Time vs History)
* **Real-time (open bar):** volume increments into **UpVolRT** or **DownVolRT** depending on last price move (↑ goes to Up, ↓ to Down). This approximates live order-flow even when full tick history isn’t available.
* **History (closed bars):**
* **None** — no split (Up/Down = 0/0). Safest for equities/indices with unreliable tick history.
* **Approx (Close vs Open)** — all volume goes to candle direction (green → Up 100%, red → Down 100%). Fast but yields many 0/100% bars.
* **Price Action Based** — splits by Close position within High-Low range; strength = |Close−mid|/(High−Low). Above mid → more Up; below mid → more Down. Falls back to direction if High==Low.
* **Auto** — **Stocks/Index → None**, **Crypto/Futures/FX → Approx**. If you see too many 0/100 bars, switch to **Price Action Based**.
---
# Rows & Meaning
* **Volume** — total bar volume (no split).
* **UpVol / DownVol** — directional intrabar volume.
* **Delta (Δ)** — UpVol − DownVol.
* **Absolute**: raw units
* **Relative (Δ%)**: Δ / (Up+Down) × 100
* **Both**: shows both formats
* **UpShare%** — UpVol / (Up+Down) × 100. >50% bullish, <50% bearish.
* Helpful icons: ▲ (>65%), ▼ (<35%).
---
# MTF Dashboard (🔧 Enable Dashboard)
A single table with **Vol, Up, Down, Δ%, Share, Trend (🔼/🔽/⏭️)** for selected timeframes (M1…D1). Great for a fast “panorama” read of flow alignment across horizons.
---
# Inputs (Grouped)
## Display
* Toggle rows: **Volume / Up / Down / Delta / UpShare**
* **Delta Display**: Absolute / Relative / Both
## Realtime & History
* **History Mode**: Auto / None / Approx / Price Action Based
* **Compact Numbers**: 1.2k, 1.25M, 3.4B…
## Theme & UI
* **Theme Mode**: Auto / Light / Dark
* **Row Spacing**: vertical spacing between rows
* **Top Row Y**: moves the whole grid vertically
* **Draw Guide Lines**: faint dotted guides
* **Text Size**: Tiny / Small / Normal / Large
## 🔧 Dashboard Settings
* **Enable Dashboard**
* **📏 Table Text Size**: Tiny…Huge
* **🦓 Zebra Rows**
* **🔲 Table Border**
## ⏰ Timeframes (for Dashboard)
* **M1…D1** toggles
## Contextual Coloring
* **Enable Contextual Coloring**: opacity by signal strength
* **Δ% cap / Share offset cap**: saturation caps
* **Min/Max transparency**: solid vs faint extremes
## Label Density & Size
* **Show every N-th bar**: draw labels only every Nth bar
* **Limit to last X bars**: keep labels only in the most recent X bars
## Colors
* Up / Down / Text / Guide
## Alerts
* **Delta Threshold (abs)** — |Δ| in volume units
* **UpShare > / <** — bullish/bearish thresholds
* **Enable Δ% Alert**, **Δ% > +**, **Δ% < −** — relative delta levels
---
# How to use (Quick Start)
1. Add the indicator to your chart (overlay=false → separate pane).
2. **History Mode**:
* Crypto/Futures/FX → keep **Auto** or switch to **Price Action Based** for richer history.
* Stocks/Index → prefer **None** or **Price Action Based** for safer splits.
3. **Label Density**: start with **Limit to last X bars = 30–150** and **Show every N-th bar = 2–4**.
4. **Contextual Coloring**: keep on to emphasize strong Δ% / Share moves.
5. **Dashboard**: enable and pick only the TFs you actually use.
6. **Alerts**: set thresholds (ideas below).
---
# Alerts (in TradingView)
Add alert → pick this indicator → choose any of:
* **Delta exceeds threshold** (|Δ| > X)
* **UpShare above threshold** (UpShare% > X)
* **UpShare below threshold** (UpShare% < X)
* **Relative Delta above +X%**
* **Relative Delta below −X%**
**Starter thresholds (tune per symbol & TF):**
* **Crypto M1/M5**: Δ% > +25…35 (bullish), Δ% < −25…−35 (bearish)
* **FX (tick volume)**: UpShare > 60–65% or < 40–35%
* **Stocks (liquid)**: set **Absolute Δ** by typical volume scale (e.g., 50k / 100k / 500k)
---
# Notes by Market Type
* **Crypto/Futures**: 24/7 and high liquidity — **Price Action Based** often gives nicer history splits than Approx.
* **Forex (FX)**: TradingView volume is typically **tick volume** (not true exchange volume). Treat Δ/Share as tick-based flow, still very useful intraday.
* **Stocks/Index**: historical tick detail can be limited. **None** or **Price Action Based** is a safer default. If you see too many 0/100% shares, switch away from Approx.
---
# “All Timeframes” accuracy
* Works on **any TF** (M1 → D1/W1).
* **Real-time accuracy** is strong for the open bar (live accumulation).
* **Historical accuracy** depends on your **History Mode** (None = safest, Approx = fastest/simplest, Price Action Based = more nuanced).
* The MTF dashboard uses `request.security` and therefore follows the same logic per TF.
---
# Trade Ideas (Use-Cases)
* **Scalping (M1–M5)**: a spike in Δ% + UpShare>65% + rising total Vol → momentum entries.
* **Intraday (M5–M30–H1)**: when multiple TFs show aligned Δ%/Share (e.g., M5 & M15 bullish), join the trend.
* **Swing (H4–D1)**: persistent Δ% > 0 and UpShare > 55–60% → structural accumulation bias.
---
# Advantages
* **True-feeling live flow** on the open bar.
* **Adaptable history** (three modes) to match data quality.
* **Clean visual layout** with guides, compact numbers, contextual opacity.
* **MTF snapshot** for quick bias read.
* **Performance controls** (last X bars, every N-th bar).
---
# Limitations & Care
* **FX uses tick volume** — interpret Δ/Share accordingly.
* **History Mode is an approximation** — confirm with trend/structure/liquidity context.
* **Illiquid symbols** can produce noisy or contradictory signals.
* **Too many labels** can slow charts → raise N, lower X, or disable guides.
---
# Best Practices (Checklist)
* Crypto/Futures: prefer **Price Action Based** for history.
* Stocks: **None** or **Price Action Based**; be cautious with **Approx**.
* FX: pair Δ% & UpShare% with session context (London/NY) and volatility.
* If labels overlap: tweak **Row Spacing** and **Text Size**.
* In the dashboard, keep only the TFs you actually act on.
* Alerts: start around **Δ% 25–35** for “punchy” moves, then refine per asset.
---
# FAQ
**1) Why do some closed bars show 0%/100% UpShare?**
You’re on **Approx** history mode. Switch to **Price Action Based** for smoother splits.
**2) Δ% looks strong but price doesn’t move — why?**
Δ% is an **order-flow** measure. Price also depends on liquidity pockets, sessions, news, higher-timeframe structure. Use confirmations.
**3) Performance slowdown — what to do?**
Lower **Limit to last X bars** (e.g., 30–100), increase **Show every N-th bar** (2–6), or disable **Draw Guide Lines**.
**4) Dashboard values don’t “match” the grid exactly?**
Dashboard is multi-TF via `request.security` and follows the history logic per TF. Differences are normal.
---
# Short “Store” Marketing Blurb
Intrabar Volume Delta Grid reveals the order-flow inside every candle (Up/Down, Δ, UpShare%) — live and on history. With smart history splitting, an MTF dashboard, contextual emphasis, and flexible alerts, it helps you spot momentum and bias across Crypto, Forex (tick volume), and Stocks. Tidy labels and compact numbers keep the panel readable and fast.
K線虛擬幣// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © dear.simpson
//@version=5
indicator("月季線視覺操盤", "", true)
// Getting inputs
length = input(5, "操盤線週期")
// Calculating
ma = ta.sma(close, length)
spread = close-ma
// Plotcandle
plotcandle(open, high, low, close, title='操盤K線', editable = false , display =display.pane+display.price_scale , color = (spread>=0 ? #ef5350 : #26a69a) , bordercolor= (spread>=0 ? #ef5350 : #26a69a) , wickcolor = #5d606b)
// Getting inputs
maPeriods1 = input( 5 , "MA 1" , group="移動平均線")
maPeriods2 = input(20 , "MA 2" , group="移動平均線")
maPeriods3 = input(60 , "MA 3" , group="移動平均線")
line0 = ta.sma(close, 2)
line1 = ta.sma(close, maPeriods1)
line2 = ta.sma(close, maPeriods2)
line3 = ta.sma(close, maPeriods3)
// Plot Moving Average Line
p0PlotID = plot(line0 ,"MA 0" , color.new(color.black ,100), display = display.none , editable = false)
p1PlotID = plot(line1 ,"MA 1" , color.new(#787b86, 50), display = display.pane+display.price_scale )
p2PlotID = plot(line2 ,"MA 2" , color.new(#787b86, 0), display = display.pane+display.price_scale )
p3PlotID = plot(line3 ,"MA 3" , color.new(color.blue , 30), display = display.pane+display.price_scale )
// Plot Zone Color
fill(p0PlotID, p2PlotID, close > line2 ? color.new(#ef5350, 70) : color.new(#26a69a, 90), '高/低於月線區域顏色')
fill(p0PlotID, p3PlotID, close > line3 ? color.new(#ef5350, 70) : color.new(#26a69a, 90), '高/低於季線區域顏色' , display = display.none )
MTF CRT Setup Finder (Raids + BOS linked)//@version=6
indicator("MTF CRT Setup Finder (Raids + BOS linked)", overlay=true, max_lines_count=500)
// === INPUTS ===
lookback = input.int(5, "Swing Lookback Bars", minval=2)
// === Function: Detect swing highs/lows ===
swingHigh(src, lb) => ta.pivothigh(src, lb, lb)
swingLow(src, lb) => ta.pivotlow(src, lb, lb)
// === Function: Detect CRT with memory ===
f_crt(tf) =>
hi = request.security(syminfo.tickerid, tf, high)
lo = request.security(syminfo.tickerid, tf, low)
cl = request.security(syminfo.tickerid, tf, close)
sh = request.security(syminfo.tickerid, tf, swingHigh(high, lookback))
sl = request.security(syminfo.tickerid, tf, swingLow(low, lookback))
raidHigh = not na(sh) and hi > sh and cl < sh
raidLow = not na(sl) and lo < sl and cl > sl
// store last raid state
var bool hadRaidHigh = false
var bool hadRaidLow = false
if raidHigh
hadRaidHigh := true
if raidLow
hadRaidLow := true
bosDown = hadRaidHigh and cl < sl
bosUp = hadRaidLow and cl > sh
// reset after BOS
if bosDown
hadRaidHigh := false
if bosUp
hadRaidLow := false
// === Apply on H1 only first (test) ===
= f_crt("60")
// === Plot ===
plotshape(raidHigh, title="Raid High", style=shape.diamond, color=color.red, size=size.small, text="Raid High")
plotshape(raidLow, title="Raid Low", style=shape.diamond, color=color.green, size=size.small, text="Raid Low")
plotshape(bosDown, title="Bearish CRT", style=shape.triangledown, color=color.red, size=size.large, text="CRT↓")
plotshape(bosUp, title="Bullish CRT", style=shape.triangleup, color=color.green, size=size.large, text="CRT↑")
Advanced Pattern Detection System [50+ Patterns]【Advanced Pattern Detection System - Auto-detects 50+ Chart Patterns】
Introducing the most powerful pattern detection indicator for TradingView!
◆ What is this?
An automated tool that finds and displays over 50 chart patterns on your charts. It detects all the patterns professional traders use - Double Tops, Triangles, Head & Shoulders, and more - all in ONE indicator.
◆ Main Features
・Detects 50+ patterns in real-time
・Shows visual explanation of WHY each pattern was identified
・Automatically calculates theoretical target prices
・Displays confidence levels in % (60-95%)
・Choose panel position from 9 locations
・Works on all timeframes (1min to Monthly)
◆ Detectable Patterns
1. Classic Patterns (Double Top/Bottom, Head & Shoulders, etc.)
2. Triangle Patterns (Ascending, Descending, Symmetrical, Expanding)
3. Continuation Patterns (Flags, Pennants, Wedges, etc.)
4. Harmonic Patterns (Gartley, Butterfly, Bat, etc.)
5. Price Action (Pin Bar, Engulfing, Hammer, etc.)
6. Special Patterns (Cup & Handle, V-formations, etc.)
◆ What Makes It Different
・Not just detection - shows the reasoning behind it
・Auto-draws pivot points and necklines
・Displays target prices with % gain/loss from current price
・Detects multiple patterns simultaneously, sorted by confidence
・Available in both Japanese and English versions
◆ Perfect For
✓ Anyone tired of using multiple indicators
✓ Beginners wanting to learn pattern trading
✓ Traders who don't want to miss entry points
✓ Those looking to improve discretionary trading accuracy
◆ How to Use (Easy 3 Steps)
1. Open TradingView and paste code in Pine Editor
2. Click "Add to Chart"
3. Enable only the patterns you need in settings
◆ Color Meanings
Green → Bullish potential (Buy signal)
Red → Bearish potential (Sell signal)
Yellow → Neutral direction (Wait and see)
◆ Recommended Settings
Scalping: Detection period 20, Sensitivity 0.0025
Day Trading: Detection period 50, Sensitivity 0.002
Swing Trading: Detection period 100, Sensitivity 0.0015
◆ Real Trading Example
"Detects Double Bottom → 85% confidence → Enter on neckline break → Take profit at displayed target price"
This is how you can use it in practice.
◆ Important Notes
・This is an analysis tool, not investment advice
・Always combine with other indicators
・Always set stop losses
・Practice on demo account before live trading
◆ Performance
If running slow, turn OFF unused pattern categories. Reducing max display count to 3 also helps.
◆ Summary
This single tool provides functionality that would normally require multiple paid indicators (worth $100-200 total). It's the ultimate pattern detection system recommended for all traders, from beginners to professionals.
Give it a try if interested! Feel free to ask questions in the comments.
Full EMAA comprehensive EMA trading indicator featuring 14 distinct exponential moving averages (EMAs) with lengths of 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 125, 150, 175, and 200 provides a detailed view of market momentum and trend structure across multiple timeframes.
This dense configuration allows traders to analyze short-term, medium-term, and long-term price behavior simultaneously, identifying potential support and resistance levels, trend direction, and dynamic bias zones .
The indicator can be used to detect crossovers between different EMAs, which may signal shifts in momentum or potential entry/exit points .
The inclusion of such a wide range of EMAs enables a granular assessment of market structure, helping to distinguish between temporary pullbacks and significant trend changes.