Tristan's Devil Mark (Short)"Devil's Mark" in trading refers to a specific candlestick pattern where a candle opens and moves significantly in one direction without creating a wick on that side. This creates an "inefficiency" in the market, and traders use this as a signal that price will likely return to that level to "rebalance" the imbalance and print the missing wick.
This strategy marks every green candle with no bottom wick using a purple downward wedge above the candle. This is highlighting a candle where buyers dominated from the open, but creating inefficiency below.
The purple wedge marks candles that opened at their lowest point and closed higher.
These candles indicate buyer dominance from the start of the period. In downtrends, a green candle with no bottom wick may indicate a potential short-term reversal.
Wait for the candle to close, and short it. Wait for the price to go below the bottom of the body of the marked candle.
Combine with Trend Analysis
Look for these candles in uptrends to confirm continuation momentum.
In downtrends, a green candle with no bottom wick may indicate a potential short-term reversal.
Support/Resistance Filters
Use horizontal support/resistance levels or moving averages to filter trades.
A green no-wick candle bouncing off support is a stronger bullish signal.
Timeframe Consideration
Works on any timeframe; adjust your strategy accordingly.
For intraday scalping, use 1–15 minute charts; for swing trades, use daily or 4-hour charts.
Backtesting and Pattern Recognition
Since the indicator works on historical bars, review past setups to identify patterns where this candle type reliably predicts price movement.
指标和策略
多周期趋势动量面板(Multi-Timeframe Trend Momentum Panel - User Guide)多周期趋势动量面板(Multi-Timeframe Trend Momentum Panel - User Guide)(english explanation follows.)
📖 指标功能详解 (精简版):
🎯 核心功能:
1. 多周期趋势分析 同时监控8个时间周期(1m/5m/15m/1H/4H/D/W/M)
2. 4维度投票系统 MA趋势+RSI动量+MACD+布林带综合判断
3. 全球交易时段 可视化亚洲/伦敦/纽约交易时间
4. 趋势强度评分 0100%量化市场力量
5. 智能警报 强势多空信号自动推送
________________________________________
📚 重要名词解释:
🔵 趋势状态 (MA均线分析):
名词 含义 信号强度
强势多头 快MA远高于慢MA(差值≥0.35%) ⭐⭐⭐⭐⭐ 做多
多头倾向 快MA略高于慢MA(差值<0.35%) ⭐⭐⭐ 谨慎做多
震荡 快慢MA缠绕,无明确方向 ⚠️ 观望
空头倾向 快MA略低于慢MA ⭐⭐⭐ 谨慎做空
强势空头 快MA远低于慢MA ⭐⭐⭐⭐⭐ 做空
简单理解: 快MA就像短跑运动员(反应快),慢MA是长跑运动员(稳定)。短跑远超长跑=强势多头,反之=强势空头。
________________________________________
🟠 动量状态 (RSI力度分析):
名词 含义 操作建议
动量上攻↗ RSI>60且快速上升 强烈买入信号
动量高位 RSI>60但上升变慢 警惕回调,可减仓
动量中性 RSI在4060之间,平稳 等待方向明确
动量低位 RSI<40但下跌变慢 警惕反弹,可止盈
动量下压↘ RSI<40且快速下降 强烈卖出信号
简单理解: RSI就像汽车速度表。"动量上攻"=油门踩到底加速,"动量高位"=已经很快但不再加速了。
________________________________________
🟣 辅助信号:
MACD:
• MACD多头 = 柱状图>0 = 买方力量强
• MACD空头 = 柱状图<0 = 卖方力量强
布林带(BB):
• BB超买 = 价格在布林带上轨附近 = 可能回调
• BB超卖 = 价格在布林带下轨附近 = 可能反弹
• BB中轨 = 价格在中间位置 = 平衡状态
________________________________________
💡 快速上手 3步看懂面板:
第1步: 看"综合结论标签" (K线上方)
• 绿色"多头占优" → 可以做多
• 红色"空头占优" → 可以做空
• 橙色"震荡/均衡" → 观望
第2步: 看"票数 多/空" (面板最下方)
• 多头票数远大于空头 (差距>2) → 趋势强
• 票数接近 (差距<1) → 震荡市
第3步: 看"趋势强度" (综合标签中)
• 强度>70% → 强势趋势,可重仓
• 强度5070% → 中等趋势,正常仓位
• 强度<50% → 弱势,轻仓或观望
________________________________________
🎨 时段背景色含义:
• 紫色背景 = 亚洲时段 (东京交易时间) 波动较小
• 橙色背景 = 伦敦时段 (欧洲交易时间) 波动增大
• 蓝色背景 = 纽约凌晨 美盘准备阶段
• 红色背景 = 纽约关键5分钟 (09:3009:35) ⚠️ 最重要! 市场最活跃,趋势易形成
• 绿色背景 = 纽约上午后段 延续早盘趋势
交易建议: 重点关注红色关键时段,这5分钟往往决定全天方向!
________________________________________
⚙️ 三大市场推荐设置
🥇 黄金: Hull MA 12/EMA 34, 阈值0.250.35%
₿ 比特币: EMA 21/EMA 55, 阈值0.801.20%
💎 以太坊: TEMA 21/EMA 55, 阈值0.600.80%
参数优化建议
黄金 (XAUUSD)
快速MA: Hull MA 12 (超灵敏捕捉黄金快速波动)
慢速MA: EMA 34 (斐波那契数列)
RSI周期: 9 (加快反应)
强趋势阈值: 0.25%
周期: 5, 15, 60, 240, 1440
比特币 (BTCUSD)
快速MA: EMA 21
慢速MA: EMA 55
RSI周期: 14
强趋势阈值: 0.8% (波动大,阈值需提高)
周期: 15, 60, 240, D, W
外汇 EUR/USD
快速MA: TEMA 10 (快速响应)
慢速MA: T3 30, 因子0.7 (平滑噪音)
RSI周期: 14
强趋势阈值: 0.08% (外汇波动小)
周期: 5, 15, 60, 240, 1440
📖 Indicator Function Details (Concise Version):
🎯 Core Functions:
1. MultiTimeframe Trend Analysis Monitors 8 timeframes simultaneously (1m/5m/15m/1H/4H/D/W/M)
2. 4Dimensional Voting System Comprehensive judgment based on MA trend + RSI momentum + MACD + Bollinger Bands
3. Global Trading Sessions Visualizes Asia/London/New York trading hours
4. Trend Strength Score Quantifies market strength from 0100%
5. Smart Alerts Automatically pushes strong bullish/bearish signals
📚 Key Term Explanations:
🔵 Trend Status (MA Analysis):
| Term | Meaning | Signal Strength |
| | | |
| Strong Bull | Fast MA significantly > Slow MA (Diff ≥0.35%) | ⭐⭐⭐⭐⭐ Long |
| Bullish Bias | Fast MA slightly > Slow MA (Diff <0.35%) | ⭐⭐⭐ Caution Long |
| Ranging | MAs intertwined, no clear direction | ⚠️ Wait & See |
| Bearish Bias | Fast MA slightly < Slow MA | ⭐⭐⭐ Caution Short |
| Strong Bear | Fast MA significantly < Slow MA | ⭐⭐⭐⭐⭐ Short |
Simple Understanding: Fast MA = sprinter (fast reaction), Slow MA = longdistance runner (stable). Sprinter far ahead = Strong Bull, opposite = Strong Bear.
🟠 Momentum Status (RSI Analysis):
| Term | Meaning | Trading Suggestion |
| | | |
| Momentum Up ↗ | RSI >60 & rising rapidly | Strong Buy Signal |
| Momentum High | RSI >60 but rising slower | Watch for pullback, consider reducing position |
| Momentum Neutral | RSI between 4060, stable | Wait for clearer direction |
| Momentum Low | RSI <40 but falling slower | Watch for rebound, consider taking profit |
| Momentum Down ↘ | RSI <40 & falling rapidly | Strong Sell Signal |
Simple Understanding: RSI = car speedometer. "Momentum Up" = full throttle acceleration, "Momentum High" = already fast but not accelerating further.
🟣 Auxiliary Signals:
MACD:
MACD Bullish = Histogram >0 = Strong buyer power
MACD Bearish = Histogram <0 = Strong seller power
Bollinger Bands (BB):
BB Overbought = Price near upper band = Possible pullback
BB Oversold = Price near lower band = Possible rebound
BB Middle = Price near middle band = Balanced state
💡 Quick Start 3 Steps to Understand the Panel:
Step 1: Check "Composite Conclusion Label" (Above the chart)
Green "Bulls Favored" → Consider Long
Red "Bears Favored" → Consider Short
Orange "Ranging/Balanced" → Wait & See
Step 2: Check "Votes Bull/Bear" (Bottom of the panel)
Bull votes significantly > Bear votes (Difference >2) → Strong Trend
Votes close (Difference <1) → Ranging Market
Step 3: Check "Trend Strength" (In the composite label)
Strength >70% → Strong Trend, consider heavier position
Strength 5070% → Moderate Trend, normal position size
Strength <50% → Weak Trend, light position or wait & see
🎨 Trading Session Background Color Meanings:
Purple = Asian Session (Tokyo hours) Lower volatility
Orange = London Session (European hours) Increased volatility
Blue = NY Early Morning US session preparation phase
Red = NY Critical 5 Minutes (09:3009:35) ⚠️ Most Important! Market most active, trends easily form
Green = NY Late Morning Continuation of early session trend
Trading Tip: Focus on the red critical period; these 5 minutes often determine the day's direction!
⚙️ Recommended Settings for Three Major Markets
🥇 Gold (XAUUSD):
Fast MA: Hull MA 12 (Highly sensitive for gold's fast moves)
Slow MA: EMA 34 (Fibonacci number)
RSI Period: 9 (Faster reaction)
Strong Trend Threshold: 0.25%
Timeframes: 5, 15, 60, 240, 1440
₿ Bitcoin (BTCUSD):
Fast MA: EMA 21
Slow MA: EMA 55
RSI Period: 14
Strong Trend Threshold: 0.8% (High volatility, requires higher threshold)
Timeframes: 15, 60, 240, D, W
💎 Ethereum (ETHUSD):
Fast MA: TEMA 21
Slow MA: EMA 55
RSI Period: 14
Strong Trend Threshold: 0.600.80%
Timeframes: 15, 60, 240, D, W
💱 Forex EUR/USD:
Fast MA: TEMA 10 (Fast response)
Slow MA: T3 30, Factor 0.7 (Smooths noise)
RSI Period: 14
Strong Trend Threshold: 0.08% (Forex has low volatility)
Timeframes: 5, 15, 60, 240, 1440
Matt Market EfficiencyThis is a custom Pine Script v5 indicator for TradingView that creates a Market Efficiency Heatmap as a background overlay on your chart. It visualizes how "efficient" the market's price movement is over a specified period—essentially measuring how much of the total price volatility (wiggle room) resulted in net directional progress, weighted with volume activity.
High efficiency (stronger, less transparent color) indicates a clean trend with minimal wasted movement (e.g., a strong uptrend or downtrend).
Low efficiency (fainter color) suggests choppy, inefficient price action (e.g., ranging or noisy market).
Color coding: Teal for bullish (net price up), Purple for bearish (net price down).
The heatmap intensity scales from 1% opacity (very low efficiency) to 25% opacity (high efficiency), making it subtle yet informative without overwhelming the chart.
SMA乖離率This script plots the percentage distance between the current price and a Simple Moving Average (SMA) as a line in a separate sub-window (not on the main chart).
It helps you see whether price is over-extended (overbought/oversold) relative to its SMA.
global credit spread with global yield curveglobal credit spread with global yield curve designed to give short term and longer term asset price reversal
Moving Average Trend Strategy V2.1 — With Stop Loss and Add Posi**Strategy Feature Description:**
---
### **Entry Logic:**
* When **MA7** crosses **MA15**, and the distance between **MA15** and **MA99** is less than **0.5%**
* When **MA15** crosses **MA99**, and the distance between **MA7** and **MA15** is less than **0.5%**
* When the distance among all three MAs (**MA7**, **MA15**, **MA99**) is less than **0.5%** (adjustable via parameters)
---
### **Capital Management:**
* Initial capital: **$100**
* Each position uses **15%** of total capital
* Opens **both long and short positions simultaneously** (dual-direction mode)
---
### **Risk Control:**
* **Long position stop-loss:** Entry price − 2%
* **Short position stop-loss:** Entry price + 2%
* Uses a **five-level take-profit grid**:
* Every 5% profit → close 20% of position
* Any pending take-profit orders are automatically canceled when stop-loss triggers
---
### **Visualization Features:**
* Real-time display of the three moving averages
* Chart annotations for entry signal points
* All trade signals and performance can be viewed through **TradingView backtest reports**
---
### **Notes:**
* Parameters can be adjusted based on the volatility of the instrument (historical backtesting is recommended first)
* Dual-direction positions may generate **hedging costs** — recommended for low-fee markets
* Real trading must consider **exchange minimum order size limits**
* Suggest enabling a **volume filter mechanism** (extension interface already reserved)
* Always perform **historical backtesting and parameter optimization** in TradingView before connecting to live trading systems
VWAP&EMA 10/20/60/120his script is a clean and straightforward technical analysis tool designed to provide traders with a clear view of market trends and key price levels by overlaying five essential moving averages onto your chart:
Volume Weighted Average Price (VWAP)
Four (4) Exponential Moving Averages (EMAs) at lengths 10, 20, 60, and 120.
By combining these indicators, traders can quickly assess short-term momentum, medium-term trends, and long-term direction, all while referencing the volume-weighted average price as a key benchmark for institutional activity.
Features & Components
This indicator plots five distinct lines on your chart, each color-coded for easy identification:
VWAP (Volume Weighted Average Price)
Plot: Plotted as a bright blue line.
Purpose: The VWAP represents the true average price of an asset for the day (or session), weighted by volume. It is a critical level for many day traders and institutions.
Prices above VWAP are often considered bullish.
Prices below VWAP are often considered bearish.
It frequently acts as a dynamic level of support or resistance.
EMA 10 (Short-Term Momentum)
Plot: Plotted as a green line.
Purpose: This is the fastest-moving average, reflecting the most recent price action and short-term momentum.
EMA 20 (Short-Term Trend)
Plot: Plotted as a red line.
Purpose: Often used in conjunction with the EMA 10, this average helps confirm the immediate trend. Crossovers between the 10 and 20 EMAs can signal potential entry or exit points.
EMA 60 (Medium-Term Trend)
Plot: Plotted as an orange line.
Purpose: This average provides a clearer picture of the medium-term trend, filtering out much of the short-term noise. It often serves as a significant dynamic support or resistance level.
EMA 120 (Long-Term Trend)
Plot: Plotted as a purple line.
Purpose: This is the slowest-moving average in the script, defining the major underlying trend. As long as the price remains above the EMA 120, the long-term bias is generally considered bullish, and vice-versa.
How to Use This Indicator
This indicator is versatile and can be adapted to various trading strategies:
Trend Confirmation: Use the alignment of the EMAs to determine the trend.
Strong Bullish Trend: Price > EMA 10 > EMA 20 > EMA 60 > EMA 120.
Strong Bearish Trend: Price < EMA 10 < EMA 20 < EMA 60 < EMA 120.
Dynamic Support & Resistance: Watch how the price reacts to each of the five lines. In an uptrend, the EMAs and VWAP will often act as "bounces" or support levels for pullbacks. In a downtrend, they will act as resistance.
Entry & Exit Signals (Crossovers):
A bullish crossover (e.g., EMA 10 crossing above EMA 20) can signal buying interest.
A bearish crossover (e.g., EMA 10 crossing below EMA 20) can signal selling pressure.
VWAP Confluence: Pay special attention to areas where an EMA (like the 20 or 60) crosses or travels close to the VWAP. This "confluence" can create a very strong and significant price level. For example, if the price pulls back to the VWAP and also finds support at the EMA 60, it can be a high-probability trade setup.
Multi-Timeframe Stochastic (4x) z PodświetlaniemStochastic z możliwością paru tfów gdzie jak są w danej strefie to podświetla
Triple EMA strategy by kingtraderthis strategy is purely based on moving everages, ema5, ema50 and ema200, avoid ranging market. in 1 mint your tp should 15-20pips, in 3mint tp should be 25pips, in 5mint tp should not above 50pips, in 15mints make tp 60 to 80 pips, in 30 mints tp 150 and 1h and h4 ur tp above 200pips, when target achieves have partial closing and keep ur trade breakeven. this indicator is for educational purpose only any loss by using this indicator, the author will not be responsible.
EMA 8/50/200I set it up so that three EMAs are displayed within a single indicator window.
このスクリプトでは、3本のEMA(8間・50期間・200期間)を1つのインジケータ枠で表示しています。
EMA 3 Lines✅ JP
1つのインジケーター枠内に3本のEMA(短期・中期・長期)を表示します。
初期設定では 8(青)/50(赤)/200(緑)の期間が適用されます。
設定画面から期間・ラインカラー・太さを自由にカスタマイズできます。
✅ EN
This indicator displays three EMAs (short-term, mid-term, and long-term) within a single indicator window.
By default, the EMA periods are set to 8 (blue), 50 (red), and 200 (green).
You can freely customize the EMA lengths, line colors, and line thickness from the settings panel.
Candle Color Difference Marker (PSP)This indicator shows when the colors of the candles on two or three charts are different.
G_GMMA• Comprehensive GMMA Visualization: It plots six fast EMAs and six slow EMAs, clearly distinguishing short term and long term trends. The indicator fills the space between the fastest and slowest EMAs in each group, turning the moving averages into easily identifiable ribbons rather than a mass of overlapping lines.
• Customizable Appearance: Users can adjust the colors of the fast and slow EMA lines, the fill colors of each ribbon, and the overall line thickness. This makes it easy to tailor the chart to personal preferences or trading templates.
• Dynamic Background Shading: The script can shade the chart’s background depending on whether the fast ribbon is above or below the slow ribbon, giving a quick visual cue for trend direction (uptrend vs. downtrend).
• Touch Alert System: Up to three different EMA lengths can be monitored for “touch” events. When price touches a selected EMA (e.g., 20 , 50 or 200 period EMA), the indicator triggers an alert condition and plots a small circle on the chart at the contact point. This helps traders catch precise entry or exit signals without staring at the screen.
• Flexible Input: Both fast and slow EMA lengths, colors, and alert parameters are user adjustable from the indicator’s settings. This allows the same script to be used on different instruments (e.g., Gold, forex pairs) and time frames by simply changing the period values.
• Trend Sensitive Support/Resistance: By treating the slow EMA ribbon as a dynamic support/resistance zone, the indicator helps traders identify where price is likely to stall or reverse. Combining this with the touch alerts makes it well suited for scalping or intraday trades.
Long/Short Ratio Aggregated (Lite)Description — Long/Short Ratio Aggregated (Lite)
This indicator provides a cross-exchange, open-interest-weighted aggregation of the Long/Short Ratio (LSR) for the cryptocurrency asset currently on your chart. It is designed to unify fragmented derivatives positioning data from multiple major exchanges into a single normalized signal that more accurately reflects real market sentiment and positioning bias across platforms.
Concept and Originality
Traditional Long/Short Ratio indicators are exchange-specific. They show how many traders are long versus short, but only within the scope of one venue (e.g., Binance or Bybit). This makes them incomplete and often misleading for directional bias analysis, since different exchanges host different participant profiles, levels of leverage, and quote-currency exposures.
This script addresses that limitation by:
Aggregating LSR data across multiple exchanges (Binance and Bybit).
Weighting each ratio by Open Interest (OI) — ensuring exchanges with higher open positions contribute proportionally more to the overall sentiment.
Normalizing all contract types (USDT, USDC, and USD-margined) into a consistent base-currency format.
This step corrects for structural differences between coin- and stablecoin-margined instruments, producing a true like-for-like comparison.
The result is a globalized Long/Short Ratio, normalized by exposure and liquidity, suitable for multi-venue orderflow estimation and directional bias assessment.
Note for moderators: I know there are already other scripts out there, but they may not support Open Interest Weighting or the same number of pairs. They also might not support proper normalization like in my script.
Calculation Methodology
For each supported exchange and contract type:
The script retrieves the latest Long/Short Ratio (LSR) and Open Interest (OI) values.
OI is used as the weighting factor, creating a proportional representation of positioning volume.
Values denominated in USD are normalized into base currency using close-price adjustment.
The final value is computed as:
Weighted LSR = (Σ (LSRᵢ × OIᵢ)) / (Σ OIᵢ)
This ensures that if, for example, Binance has twice the open interest of Bybit, its LSR contributes twice as much to the total weighted sentiment.
Interpretation
Value > 1.0 → Market participants are net-long (bullish bias).
Value < 1.0 → Market participants are net-short (bearish bias).
Strength of deviation from 1.0 indicates positioning imbalance magnitude.
Because the ratio is OI-weighted, large players or heavily margined exchanges influence the output proportionally more than smaller, low-volume venues — making this metric a better reflection of true market positioning rather than isolated retail sentiment.
Usage and Applications
Use this indicator as a component in:
Orderflow and sentiment confirmation, alongside price action and volume.
Funding rate correlation studies.
Intraday reversals or exhaustion zones, when combined with volatility or OI delta metrics.
Overlaying or combining this indicator with open interest change, cumulative volume delta, or funding rate divergence allows traders to build a high-resolution understanding of positioning shifts and crowd behavior.
Notes
The “Lite” version is optimized for execution and accessibility, focusing on accuracy while staying within Pine Script’s computational limits.
Exchange data availability may vary by symbol; unsupported pairs automatically return na and are automatically not included in the weighted calculation.
In summary:
This indicator transforms fragmented, exchange-specific Long/Short Ratio into a unified, OI-weighted global sentiment measure — a foundational tool for traders seeking to quantify derivative-side orderflow bias with cross-venue accuracy.
Moving Average Trend Strategy V4.1 — Revised Version (Selectable✅ **Version Notes (V4.0)**
| Feature | Description |
| --------------------------------------- | -------------------------------------------------------- |
| 🧠 **Moving Average Type Options** | Choose from EMA / SMA / HMA / WMA |
| 🧱 **Take-Profit / Stop-Loss Switches** | Can be enabled or disabled independently |
| ⚙️ **Add Position Function** | Can be enabled or disabled independently |
| 🔁 **Add Position Signal Source** | Selectable between MA Crossover / MACD / RCI / RSI |
| 💹 **Adjustable Parameters** | All periods and percentages are customizable in settings |
---
✅ **Update Summary:**
| Function | Description |
| -------------------------------------- | --------------------------------------------------------------------- |
| **MA Type Selection** | Choose EMA / SMA / HMA / WMA in chart settings |
| **Take-Profit / Stop-Loss Percentage** | Configurable in the “Take-Profit & Stop-Loss” group |
| **Add / Reduce Position Percentage** | Adjustable separately in the “Add/Reduce Position” group |
| **MA Periods** | Customizable in the “Moving Average Parameters” section |
| **Code Structure** | Logic unchanged — only parameterization and selection functions added |
---
### **Strategy Recommendations:**
* **Trending Market:** Prefer EMA trend tracking or SAR indicators
* **Range-Bound Market:** Use ATR-based volatility stop-loss
* **Before Major Events:** Consider option hedging
* **Algorithmic Trading:** Recommend ATR + partial take-profit combination strategy
---
### **Key Parameter Optimization Logic:**
* Backtest different **ATR multipliers** (2–3× ATR)
* Test **EMA periods** (10–50 periods)
* Optimize **partial take-profit ratios**
* Adjust **maximum drawdown tolerance** (typically 30–50% of profit)
---
### **Risk Control Tips:**
* Avoid overly tight stop-losses that trigger too frequently
* During strong trends, consider widening take-profit targets
* Confirm trend continuation with **volume analysis**
* Adjust parameters based on **timeframe** (e.g., Daily vs Hourly)
---
### **Practical Example (Forex: EUR/USD):**
* **Entry:** Go long on breakout above 1.1200
* **Initial Stop-Loss:** 1.1150 (50 pips)
* **When profit reaches 1.1300:**
* Close 50% of position
* Move stop-loss to 1.1250 (lock in 50 pips profit)
* **When price rises to 1.1350:**
* Move stop-loss to 1.1300 (lock in 100 pips profit)
* **Final Outcome:**
* Price retraces to 1.1300, triggering take-profit
This method secured over **80% of trend profits** during the 2023 EUR rebound, capturing **23% more profit** compared to fixed take-profit strategies (based on backtest results).
ADX +DI/-DI with Buy/Sell Signals//@version=5
indicator("ADX +DI/-DI with Buy/Sell Signals", overlay=true)
// Inputs
adxLength = input.int(14, "ADX Length")
threshold = input.float(25.0, "ADX Threshold")
// Directional Movement
upMove = ta.change(high)
downMove = -ta.change(low)
plusDM = (upMove > downMove and upMove > 0) ? upMove : 0.0
minusDM = (downMove > upMove and downMove > 0) ? downMove : 0.0
// True Range and Smoothed Values
tr = ta.rma(ta.tr, adxLength)
plusDI = 100 * ta.rma(plusDM, adxLength) / tr
minusDI = 100 * ta.rma(minusDM, adxLength) / tr
dx = 100 * math.abs(plusDI - minusDI) / (plusDI + minusDI)
adx = ta.rma(dx, adxLength)
// Buy/Sell Conditions
buySignal = ta.crossover(plusDI, minusDI) and adx > threshold
sellSignal = ta.crossover(minusDI, plusDI) and adx > threshold
// Plot Buy/Sell markers
plotshape(buySignal, title="BUY", location=location.belowbar,
color=color.new(color.lime, 0), style=shape.triangleup, size=size.large, text="BUY")
plotshape(sellSignal, title="SELL", location=location.abovebar,
color=color.new(color.red, 0), style=shape.triangledown, size=size.large, text="SELL")
// Optional ADX + DI lines (hidden by default)
plot(adx, title="ADX", color=color.yellow, linewidth=2, display=display.none)
plot(plusDI, title="+DI", color=color.green, display=display.none)
plot(minusDI, title="-DI", color=color.red, display=display.none)
hline(threshold, "ADX Threshold", color=color.gray, linestyle=hline.style_dotted)
// Alerts
alertcondition(buySignal, title="BUY Alert", message="ADX Buy Signal Triggered")
alertcondition(sellSignal, title="SELL Alert", message="ADX Sell Signal Triggered")
MarketMonkey-Indicator-Set-6 Support & Resistance v3.0 colorsMarketMonkey-Indicator-Set-6 Support & Resistance v3.0 colors
Automatically detects and plots up to four recent support and resistance levels using pivot highs and lows. Lines update dynamically with adaptive colours, highlighting key price zones in real time. Optional R1–R4 and S1–S4 labels keep charts clean yet informative. Ideal for identifying trend reversals, breakout points, and areas where buyers or sellers are likely to act.
________________________________________
🔍 What It Does
The script uses pivot highs and pivot lows to detect recent swing points — the moments where price has clearly turned.
• Resistance levels are drawn at recent pivot highs (red lines).
• Support levels are drawn at recent pivot lows (blue lines).
• Each level automatically updates as new price data forms, keeping your analysis current.
The indicator displays up to four recent resistance and support levels on each side (R1–R4, S1–S4), with labels and colours that adapt to whether the line is above or below current price.
________________________________________
🎨 Features
• Dynamic Detection: Automatically identifies and updates support and resistance using pivot logic.
• Multi-Level Display: Shows up to four most recent highs and lows for a broader market view.
• Customisable Inputs: Adjust the number of bars used to confirm pivots and control how many levels are displayed.
• Colour-Coded Clarity:
o Resistance lines = soft red tone (indicating potential ceiling levels).
o Support lines = soft blue tone (indicating price floors).
• Optional Labels: Toggle on/off “R1–R4” and “S1–S4” tags for quick reference.
• Strong Level Highlighting: The nearest (most recent) levels are drawn thicker for emphasis.
Countdown, Trading Volume, Price, Time Period"Volume and Price Countdown Code: This code will display colors according to the closing status of different timeframes."
ANF Bottom Watch + Retail Sector Alert (v6) Detect when ANF crosses above its 50-day moving average (technical recovery signal).
Show visual + alert when RSI recovers above 40 (momentum bottom confirmation).
Track peer strength (URBN, LULU, TPR, GPS) — if 3+ peers are trading above their own 50-day MA, the script flags a sector rotation (bullish context).
Give a “Bottom Watch Active” label when all three signals align.
2 Bandas de Bollinguer (10-20) + 4 EMA + 2 SMA 2 BB (10-20) + 4 EMA (35-50-100-200) + 2 SMA (75-100) configurable
Mother & Baby — Nifty 5m (Bull/Bear)Mother & Baby — Nifty 5m (Bull/Bear)
This indicator identifies Mother & Baby (Inside Bar) patterns on the Nifty 5-minute chart, helping traders spot potential reversals or continuation setups based on price compression.
🔍 Concept
The “Mother & Baby” setup occurs when:
The Mother candle (previous bar) has a larger range.
The Baby candle (current bar) forms completely inside the Mother’s range.
A Bullish pattern forms when the Mother is bearish (red) and the Baby is bullish (green).
A Bearish pattern forms when the Mother is bullish (green) and the Baby is bearish (red).
These formations often signal a pause before breakout and can help identify early momentum shifts.
⚙️ Features
🧭 Works on any symbol/timeframe (default: Nifty 5m)
📊 Optional ATR-based size filter to validate Mother candle strength
🟩🟥 Colored boxes and labels to highlight setups clearly
⚠️ Alerts for both Bullish and Bearish M&B signals
📈 Optional Mother candle high/low lines for visual reference
💡 Trading Idea
Bullish M&B → potential breakout above Mother high
Bearish M&B → potential breakdown below Mother low
Combine with volume, trend filters, or higher timeframe bias for confirmation.
NY 4H Wyckoff State Machine [CHE] NY 4H Wyckoff State Machine — Full (Re-Entry, Breakout, Wick, Re-Accum/Distrib, Dynamic Table) — One-Candle Wyckoff Re-Entry (OCWR)
Summary
OCWR operationalizes a one-candle session workflow: mark the first four-hour New York candle, fix its high and low as the session range when the window closes, and drive entries through a Wyckoff-style state machine on intraday bars. The script adds an ATR-scaled buffer around the range and requires multi-bar acceptance before treating breaks or re-entries as valid. Optional wick-cluster evidence, a proximity retest, and simple volume or RSI gates increase selectivity. Background tints expose regimes, shapes mark events, a dynamic table explains the current state, and hidden plots supply alert payloads. The design reduces random flips and makes state transitions auditable without higher-timeframe calls.
Origin and name
Method name: One-Candle Wyckoff Re-Entry (OCWR)
Transcript origin: The source idea is a “stupid simple one-candle scalping” routine: mark the first New York four-hour candle (commonly between one and five in the morning New York time), drop to five minutes, observe accumulation inside, wait for a manipulation move outside, then trade the re-entry back inside. Stops go beyond the excursion extreme; targets are either a fixed reward multiple or the opposite side of the range. Preference is given to several manipulation candles. This indicator codifies that workflow with explicit states, acceptance counters, buffers, and optional quality filters. Any external performance claims are not part of the code.
Motivation: Why this design?
Session levels are widely respected, yet single-bar breaches around them are noisy. OCWR separates range discovery from trade logic. It locks the range at the end of the window, applies an ATR-scaled buffer to ignore marginal oversteps, and requires acceptance over several bars for breaks and re-entries. Wick evidence and optional retest proximity help confirm that an excursion likely cleared liquidity rather than launched a trend. This yields cleaner transitions from test to commitment.
What’s different vs. standard approaches?
Baseline: Static session lines or one-shot Wyckoff tags without process control.
Architecture: Dual long and short state machines; ATR-buffered edges; multi-bar acceptance for breaks and re-entries; optional wick dominance and cluster checks; optional retest tolerance; direct and opposite breakout paths; cooldown after fires; distribution timeout; dynamic table with highlighted row.
Practical effect: Fewer single-bar head-fakes, clearer hand-offs, and on-chart explanations of the machine’s view.
Wyckoff structure by example — OCWR on five minutes
One-candle setup:
On the four-hour chart, mark the first New York candle’s high and low, then switch to five minutes. Solid lines show the fixed range; dashed lines show ATR-buffered edges.
Long path (verbal mapping):
Phase A, Stopping Action: Price stabilizes inside the range.
Phase B, Consolidation: Sustained balance while the window is closed and after the range is fixed.
Phase C, Test (Spring): Excursion below the buffered low with preference for several outside bars and dominant lower wicks, then a return inside.
Re-entry acceptance: A required run of inside bars validates the test.
Phase D, Breakout to Markup: Long signal fires; stop beyond the excursion extreme; objective is the opposite range or a fixed reward multiple.
Phase E, Trend (Markup) and Re-Accumulation: Advance continues until target, stop, confirmation back against the box, or timeout. A pause inside trend may register as re-accumulation.
Short path mirrors the above: A UTAD-style move forms above the buffered high, then re-entry leads to Markdown and possible re-distribution.
Variant map (verbal):
Accumulation after a downtrend: with Spring and Test, or without Spring; both proceed to Markup and may pause in Re-Accumulation.
Distribution after an uptrend: with UTAD and Test, or without UTAD; both proceed to Markdown and may pause in Re-Distribution.
Note: Phases A through E occur within each variant and are not separate variants.
How it works (technical)
Session window: A configurable four-hour New York window records its high and low. At window end, the bounds are fixed for the session.
ATR buffer: A margin above and below the fixed range discourages triggers from tiny oversteps.
Inside and outside: Users choose close-based or wick-based detection. Overshoot requirements are expressed verbally as a fraction of the range with an optional absolute minimum.
Manipulation tracking: The machine counts bars spent outside and records the side extreme.
Re-entry acceptance: After a return inside, a specified number of inside bars must print before acceptance.
Direct and opposite breakouts: Direct breakouts from accumulation and opposite breakouts after manipulation are supported, subject to acceptance and optional filters.
Targets and exits: Choose the opposite boundary or a fixed reward multiple. Distribution ends on target, stop, confirmation back against the range, or timeout.
Context filters (optional): Volume above a scaled SMA, RSI thresholds, and a trend SMA for simple regime context.
Diagnostics: Background tints for regimes; arrows for re-entries; triangles for breakouts; table with row highlights; hidden plots for alert values.
Central table (Wyckoff console)
The table sits top-right and explains the machine’s stance. Columns: Structure label, plain-English description, active state pair for long and short, and human phase tags. Rows: Start and range building; accumulation branch with Spring and Test as well as direct breakout; Markup and re-accumulation; distribution branch with UTAD and Test as well as direct short breakout; Markdown and re-distribution. Only the active state cell is rewritten each last bar, for example “L_ACCUM slash S_ACCUM”. Row highlighting is context-aware: accumulation, Spring or UTAD, breakout, Markup or Markdown, and re-accumulation or re-distribution checks can highlight independently so users see simultaneous conditions. The table is created once, updated only on the last bar for efficiency, and functions as a read-only console to audit why a signal fired and where the path currently sits.
Parameter Guide
Session window and time zone: First four hours of New York by default; time zone “America/New_York”.
ATR length and buffer factor: Control buffer size; larger reduces sensitivity, smaller reacts faster.
Minimum overshoot (fraction and absolute): Demand meaningful extension beyond the buffer.
Break mode: Close-based is stricter; wick-based is more reactive.
Acceptance counts: Separate counts for break, re-entry, and opposite breakout; higher values reduce noise.
Minimum bars outside: Ensures manipulation is not a single spike.
Wick detection and clusters (optional): Dominance thresholds and cluster size within a short window.
Retest required and tolerance (optional): Gate re-entry by proximity to the buffered edge.
Volume and RSI filters (optional): Simple gates on activity and momentum.
TP mode and reward multiple: Opposite range or fixed multiple.
Cooldown and distribution timeout: Rate-limit signals and prevent endless distribution.
Visualization toggles: Background phases, labels, table, and helper lines.
Reading & Interpretation
Solid lines are the fixed session bounds; dashed lines are buffers. Backgrounds tint accumulation, manipulation, and distribution. Arrows show accepted re-entries; triangles show direct or opposite breakouts. Labels can summarize entry, stop, target, and risk. The table highlights the active row and the current state pair.
Practical Workflows & Combinations
OCWR baseline: Each morning, mark the New York four-hour candle, move to five minutes, prefer multi-bar manipulation outside, then wait for a qualified re-entry inside. Stop beyond the excursion extreme. Target the opposite range for conservative management or a fixed multiple for uniform sizing.
Trend following: Favor direct breakouts with trend alignment and no contradictory wick evidence.
Quality control: When noise rises, increase acceptance, raise the buffer factor, enable retest, and require wick clusters.
Discretionary confluences: Fair-value gaps and trend lines can be added by the user; they are not computed by this script.
Behavior, Constraints & Performance
Closed-bar confirmation is recommended when you require finality; live-bar conditions can change until close. The script does not call higher-timeframe data. It uses arrays, lines, labels, boxes, and a table; maximum bars back is five thousand; table updates are last-bar only. Known limits include compressed buffers in quiet sessions, unreliable wick evidence in thin markets, and session misalignment if the platform time zone is not New York.
Sensible Defaults & Quick Tuning
Start with ATR length fourteen, buffer factor near zero point fifteen, overshoot fraction near zero point ten, acceptance counts of two, minimum outside duration three, retest required on.
Too many flips: increase acceptance, raise buffer, enable retest, and tighten wick thresholds.
Too slow: reduce acceptance, lower buffer, switch to wick-based breaks, disable retest.
Noisy wicks: increase minimum wick ratio and cluster size, or disable wick detection.
What this indicator is—and isn’t
A session-anchored visualization and signal layer that formalizes a Wyckoff-style re-entry and breakout workflow derived from a single four-hour New York candle. It is not predictive and not a complete trading system. Use with structure analysis, risk controls, and position management.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino