DEMACROSSOVA BY FLACODouble EMAs for entry signals
ATR Bands for stoploss
Fibonacci bollinger bands for early exit confirmation
Göstergeler ve stratejiler
Recession Warning Model [BackQuant]Recession Warning Model
Overview
The Recession Warning Model (RWM) is a Pine Script® indicator designed to estimate the probability of an economic recession by integrating multiple macroeconomic, market sentiment, and labor market indicators. It combines over a dozen data series into a transparent, adaptive, and actionable tool for traders, portfolio managers, and researchers. The model provides customizable complexity levels, display modes, and data processing options to accommodate various analytical requirements while ensuring robustness through dynamic weighting and regime-aware adjustments.
Purpose
The RWM fulfills the need for a concise yet comprehensive tool to monitor recession risk. Unlike approaches relying on a single metric, such as yield-curve inversion, or extensive economic reports, it consolidates multiple data sources into a single probability output. The model identifies active indicators, their confidence levels, and the current economic regime, enabling users to anticipate downturns and adjust strategies accordingly.
Core Features
- Indicator Families : Incorporates 13 indicators across five categories: Yield, Labor, Sentiment, Production, and Financial Stress.
- Dynamic Weighting : Adjusts indicator weights based on recent predictive accuracy, constrained within user-defined boundaries.
- Leading and Coincident Split : Separates early-warning (leading) and confirmatory (coincident) signals, with adjustable weighting (default 60/40 mix).
- Economic Regime Sensitivity : Modulates output sensitivity based on market conditions (Expansion, Late-Cycle, Stress, Crisis), using a composite of VIX, yield-curve, financial conditions, and credit spreads.
- Display Options : Supports four modes—Probability (0-100%), Binary (four risk bins), Lead/Coincident, and Ensemble (blended probability).
- Confidence Intervals : Reflects model stability, widening during high volatility or conflicting signals.
- Alerts : Configurable thresholds (Watch, Caution, Warning, Alert) with persistence filters to minimize false signals.
- Data Export : Enables CSV output for probabilities, signals, and regimes, facilitating external analysis in Python or R.
Model Complexity Levels
Users can select from four tiers to balance simplicity and depth:
1. Essential : Focuses on three core indicators—yield-curve spread, jobless claims, and unemployment change—for minimalistic monitoring.
2. Standard : Expands to nine indicators, adding consumer confidence, PMI, VIX, S&P 500 trend, money supply vs. GDP, and the Sahm Rule.
3. Professional : Includes all 13 indicators, incorporating financial conditions, credit spreads, JOLTS vacancies, and wage growth.
4. Research : Unlocks all indicators plus experimental settings for advanced users.
Key Indicators
Below is a summary of the 13 indicators, their data sources, and economic significance:
- Yield-Curve Spread : Difference between 10-year and 3-month Treasury yields. Negative spreads signal banking sector stress.
- Jobless Claims : Four-week moving average of unemployment claims. Sustained increases indicate rising layoffs.
- Unemployment Change : Three-month change in unemployment rate. Sharp rises often precede recessions.
- Sahm Rule : Triggers when unemployment rises 0.5% above its 12-month low, a reliable recession indicator.
- Consumer Confidence : University of Michigan survey. Declines reflect household pessimism, impacting spending.
- PMI : Purchasing Managers’ Index. Values below 50 indicate manufacturing contraction.
- VIX : CBOE Volatility Index. Elevated levels suggest market anticipation of economic distress.
- S&P 500 Growth : Weekly moving average trend. Declines reduce wealth effects, curbing consumption.
- M2 + GDP Trend : Monitors money supply and real GDP. Simultaneous declines signal credit contraction.
- NFCI : Chicago Fed’s National Financial Conditions Index. Positive values indicate tighter conditions.
- Credit Spreads : Proxy for corporate bond spreads using 10-year vs. 2-year Treasury yields. Widening spreads reflect stress.
- JOLTS Vacancies : Job openings data. Significant drops precede hiring slowdowns.
- Wage Growth : Year-over-year change in average hourly earnings. Late-cycle spikes often signal economic overheating.
Data Processing
- Rate of Change (ROC) : Optionally applied to capture momentum in data series (default: 21-bar period).
- Z-Score Normalization : Standardizes indicators to a common scale (default: 252-bar lookback).
- Smoothing : Applies a short moving average to final signals (default: 5-bar period) to reduce noise.
- Binary Signals : Generated for each indicator (e.g., yield-curve inverted or PMI below 50) based on thresholds or Z-score deviations.
Probability Calculation
1. Each indicator’s binary signal is weighted according to user settings or dynamic performance.
2. Weights are normalized to sum to 100% across active indicators.
3. Leading and coincident signals are aggregated separately (if split mode is enabled) and combined using the specified mix.
4. The probability is adjusted by a regime multiplier, amplifying risk during Stress or Crisis regimes.
5. Optional smoothing ensures stable outputs.
Display and Visualization
- Probability Mode : Plots a continuous 0-100% recession probability with color gradients and confidence bands.
- Binary Mode : Categorizes risk into four levels (Minimal, Watch, Caution, Alert) for simplified dashboards.
- Lead/Coincident Mode : Displays leading and coincident probabilities separately to track signal divergence.
- Ensemble Mode : Averages traditional and split probabilities for a balanced view.
- Regime Background : Color-coded overlays (green for Expansion, orange for Late-Cycle, amber for Stress, red for Crisis).
- Analytics Table : Optional dashboard showing probability, confidence, regime, and top indicator statuses.
Practical Applications
- Asset Allocation : Adjust equity or bond exposures based on sustained probability increases.
- Risk Management : Hedge portfolios with VIX futures or options during regime shifts to Stress or Crisis.
- Sector Rotation : Shift toward defensive sectors when coincident signals rise above 50%.
- Trading Filters : Disable short-term strategies during high-risk regimes.
- Event Timing : Scale positions ahead of high-impact data releases when probability and VIX are elevated.
Configuration Guidelines
- Enable ROC and Z-score for consistent indicator comparison unless raw data is preferred.
- Use dynamic weighting with at least one economic cycle of data for optimal performance.
- Monitor stress composite scores above 80 alongside probabilities above 70 for critical risk signals.
- Adjust adaptation speed (default: 0.1) to 0.2 during Crisis regimes for faster indicator prioritization.
- Combine RWM with complementary tools (e.g., liquidity metrics) for intraday or short-term trading.
Limitations
- Macro indicators lag intraday market moves, making RWM better suited for strategic rather than tactical trading.
- Historical data availability may constrain dynamic weighting on shorter timeframes.
- Model accuracy depends on the quality and timeliness of economic data feeds.
Final Note
The Recession Warning Model provides a disciplined framework for monitoring economic downturn risks. By integrating diverse indicators with transparent weighting and regime-aware adjustments, it empowers users to make informed decisions in portfolio management, risk hedging, or macroeconomic research. Regular review of model outputs alongside market-specific tools ensures its effective application across varying market conditions.
Fraktály a Trendovkyal shlash dlka sklhsda hasd klnasdnlkcalknacs 654 as64asd 65ads 156as 13ads 32asd 165as
XAUUSD Trendline Breakout + RSI + MA Signal//@version=5
indicator("XAUUSD Trendline Breakout + RSI + MA Signal", overlay=true)
// --- Inputs ---
lengthFast = input.int(10, title="Fast MA Length")
lengthSlow = input.int(30, title="Slow MA Length")
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
// --- Moving Averages ---
fastMA = ta.sma(close, lengthFast)
slowMA = ta.sma(close, lengthSlow)
// --- RSI ---
rsi = ta.rsi(close, rsiLength)
// --- Trendline (Manual input) ---
// Use fixed default price values here, change manually based on your chart.
trend_x1 = input.int(20, title="Trendline Point 1 X (bars ago)")
trend_y1 = input.float(3000.0, title="Trendline Point 1 Y (price)") // constant default
trend_x2 = input.int(2, title="Trendline Point 2 X (bars ago)")
trend_y2 = input.float(3100.0, title="Trendline Point 2 Y (price)") // constant default
bar_idx1 = bar_index - trend_x1
bar_idx2 = bar_index - trend_x2
trendline_y_value(bar) =>
m = (trend_y2 - trend_y1) / (bar_idx2 - bar_idx1)
c = trend_y1 - m * bar_idx1
m * bar + c
trend_y_curr = trendline_y_value(bar_index)
trend_y_prev = trendline_y_value(bar_index - 1)
// --- Signals ---
// Trendline breakout
buyBreakout = (close < trend_y_prev) and (close > trend_y_curr)
sellBreakout = (close > trend_y_prev) and (close < trend_y_curr)
// MA crossover
maBuy = ta.crossover(fastMA, slowMA)
maSell = ta.crossunder(fastMA, slowMA)
// RSI confirmation
rsiBuy = rsi < rsiOversold
rsiSell = rsi > rsiOverbought
// Final buy/sell signal with all conditions
buySignal = buyBreakout and maBuy and rsiBuy
sellSignal = sellBreakout and maSell and rsiSell
// --- Plot ---
plot(fastMA, color=color.blue, title="Fast MA")
plot(slowMA, color=color.orange, title="Slow MA")
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Plot trendline
var line trendLine = na
if barstate.islast
if na(trendLine)
trendLine := line.new(bar_idx1, trend_y1, bar_idx2, trend_y2, color=color.yellow, width=2)
else
line.set_xy1(trendLine, bar_idx1, trend_y1)
line.set_xy2(trendLine, bar_idx2, trend_y2)
// --- Alerts ---
alertcondition(buySignal, title="Buy Alert", message="XAUUSD Buy Signal")
alertcondition(sellSignal, title="Sell Alert", message="XAUUSD Sell Signal")
Inside Bars / Nested Bars (+ Gaps) [jenaparadies]📌 Features
Highlight inside bars
Highlight bars that remain within the range of a mother bar (called nested bars )
Highlight the mother bar (optional)
Highlight consecutive nested bars using a visual box (optional)
Enable no-gap candle logic (optional, see below)
Show no-gap candles on the chart (optional)
Fully customizable colors and appearance
📌 Method
An inside bar is any candle whose high is lower than or equal to the previous candle's high, and whose low is higher than or equal to the previous candle's low. In other words, the entire price action of the inside bar remains within the range of the previous candle without exceeding it. The preceding candle is referred to as the mother bar .
Occasionally, the candle following the inside bar may break above or below the inside bar's range, while still remaining fully within the high and low of the mother bar. These candles are referred to as nested bars and are highlighted in a different color.
Optionally, sequences of consecutive nested bars can be enclosed within a box to emphasize consolidation zones.
📌 No-Gap Candles (Optional)
This feature adjusts each candle’s opening price so that it matches the closing price of the previous candle. It is particularly useful for assets that frequently experience large gaps between candles.
By extending each candle's effective range to include the previous candle's close, the indicator maintains structural consistency over timeframes, especially when the open price deviates significantly from the prior close. Inside bars are then identified relative to the extended range of the mother bar.
Optionally, the adjusted no-gap candles can be visualized directly on the chart for better clarity.
🎁 Bonus
Activating the "Show No-Gap Candles" option transforms any line chart into a gap-free bar chart ‒ ideal for visualizing economic data such as inflation rates.
TrailingPE//@version=6
indicator("TrailingPE", shorttitle="TPE", overlay=true)
// === USER INPUTS ===
pos_x = input.string("Right", "Horizontal Position", options= )
pos_y = input.string("Top", "Vertical Position", options= )
text_color = input.color(color.white, "Text Color")
bg_color = input.color(color.new(color.blue, 80), "Background Color")
text_size = input.string("Normal", "Font Size", options= )
// === POSITION MAPPING ===
get_position_y() =>
switch pos_y
"Top" =>
switch pos_x
"Left" => position.top_left
"Center" => position.top_center
"Right" => position.top_right
"Middle" =>
switch pos_x
"Left" => position.middle_left
"Center" => position.middle_center
"Right" => position.middle_right
"Bottom" =>
switch pos_x
"Left" => position.bottom_left
"Center" => position.bottom_center
"Right" => position.bottom_right
get_text_size() =>
switch text_size
"Tiny" => size.tiny
"Small" => size.small
"Normal" => size.normal
"Large" => size.large
"Huge" => size.huge
// === PE CALCULATION ===
eps_ttm = request.financial(syminfo.tickerid, "EARNINGS_PER_SHARE_DILUTED", "TTM")
if na(eps_ttm)
eps_ttm := request.financial(syminfo.tickerid, "EARNINGS_PER_SHARE_BASIC", "TTM")
current_price = close
pe_ratio = eps_ttm > 0 ? current_price / eps_ttm : na
is_data_valid = not na(pe_ratio) and eps_ttm > 0
// === COMPACT SINGLE-LINE DISPLAY ===
if barstate.islast
var table pe_table = table.new(get_position_y(), 1, 1,
bgcolor=bg_color,
border_width=1,
border_color=color.gray)
table.clear(pe_table, 0, 0, 0, 0)
if is_data_valid
// Single line: "PE : Value" - removed text_style parameter
pe_rounded = math.ceil(pe_ratio)
pe_text = "PE : " + str.tostring(pe_rounded)
table.cell(pe_table, 0, 0, pe_text,
text_color=text_color,
text_size=get_text_size(),
bgcolor=bg_color)
else
table.cell(pe_table, 0, 0, "PE : N/A",
text_color=color.red,
text_size=get_text_size(),
bgcolor=bg_color)
Multi Averages - CustomizableThis script adds up to 5 moving averages to your plot!
Both type and length are customizable.
Auto AVWAP (Anchored-VWAP) with Breakout ScreenerAuto AVWAP (Anchored-VWAP) with Breakout Screener. fINAL VERSION
Wx2 Treasure Box – Institutional Entry🧩 Indicator Overview: Wx2 Treasure Box – Institutional Entry
Designed to detect Institutional Bars (IBs) and visualize high-probability entry zones, this script helps traders align with potential smart-money activity.
Institutional Bars are defined as Entry of Smart Money
⚙️ How It Works
20-period and 200-period Simple Moving Averages are plotted to show short‑ and long‑term trend direction.
On identification of an IB:
A label “IB” is placed above the bar.
A rectangular box is drawn around its high–low range, extending several bars to the right to mark the trade zone
Trade Signals & Setup Guidelines
Buy Entry:
Trigger: Price breaks above the box.
Stop Loss (SL): Set just below the box bottom.
Sell Entry:
Trigger: Price piercing below the box.
SL: Placed above the box top.
Risk-to-Reward Ratio (RRR):
Target RRR of 1:2 is recommended
Best Execution Zone:
Treasure Box is the best with 20SMA+200 SMA+Price in it.
📽️ Video Link
You’ve linked a YouTube video for explanation:
Watch Here
Simple Trading ChecklistCustomisable Simple Trading Checklist
This script overlays a fully customizable trading checklist directly onto your chart, providing an at-a-glance reminder of key trading steps and conditions before entering a position.
It is especially useful for discretionary or rule-based traders who want a consistent on-screen process to follow.
Perfect Triple EMA Cross (15min Only)//@version=5
indicator("Perfect Triple EMA Cross (15min Only)", overlay=true)
// ==== Inputs ====
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
// ==== Timeframe Check ====
is15min = (timeframe.period == "15")
// ==== Conditions ====
buyCond = is15min and ta.crossover(ema20, ema50) and ema20 > ema50 and ema50 > ema200
sellCond = is15min and ta.crossunder(ema20, ema50) and ema20 < ema50 and ema50 < ema200
// ==== Plots ====
plot(ema20, title="EMA 20", color=color.orange, linewidth=1)
plot(ema50, title="EMA 50", color=color.blue, linewidth=1)
plot(ema200, title="EMA 200", color=color.red, linewidth=2)
plotshape(buyCond, title="BUY", location=location.belowbar, style=shape.labelup, color=color.green, size=size.normal, text="BUY")
plotshape(sellCond, title="SELL", location=location.abovebar, style=shape.labeldown, color=color.red, size=size.normal, text="SELL")
// ==== Alerts ====
alertcondition(buyCond, title="BUY Signal", message="Triple EMA BUY Signal (15min)")
alertcondition(sellCond, title="SELL Signal", message="Triple EMA SELL Signal (15min)")
Step 3: Multi-Timeframe Trading SessionsFor editing purposes,
This is for editing purposes for developer to edit it before publishing.
RSI Z‑Score + TableRSI Z-Score + Table
This script calculates the Z-Score of the RSI (Relative Strength Index), which standardizes RSI based on its own recent history.
What It Shows:
RSI Z-Score = (Current RSI - Mean RSI) / Standard Deviation
This tells you how extreme the current RSI is compared to its historical values.
A table displays:
Current RSI
Rolling Mean
RSI Z-Score
How to Use:
Z-Score > +2 = Statistically overbought
Z-Score < -2 = Statistically oversold
Use it to time reversals or overextension in RSI behavior.
🔒 Based on rolling lookback window — fully customizable.
Author:
Tags: #RSI #ZScore #Momentum #StatisticalEdge #MeanReversion #Crypto
ICT OTE Market MakerICT OTE Market Maker
Implementing ICT and automatically identifies OTE zones to minimize drawdowns.
Multi EMA & SMA IndicatorDraws EMA 5/20/50/100 and SMA 200 in different colors and thickness in a single indicator
Kairi Trend Oscillator [T3][T69]📌 Overview
The Kairi Trend Oscillator is a Japanese-inspired hybrid oscillator combining Heikin-Ashi trend clarity with the Kairi (乖離率) indicator — a measure of price deviation from a moving average. This dual-layer system gives you both trend direction and trend strength/health, designed to highlight trend maturity and avoid overextended entries.
✨ Features
Heikin-Ashi or normal candlestick input modes
Multiple moving average options: SMA, EMA, DEMA, VWMA, and Kijun
Visual color-coded trend zones: overbought, oversold, healthy, weak, and reversal conditions
Full Kairi column plot with dynamic coloring
Adaptive logic for trend detection (linear regression or Heikin-Ashi structure)
Built-in reversal detection based on divergence between Kairi and trend direction
⚙️ How to Use
Choose Candle Type: Select Heiken Ashi or Normal Candlesticks via the Candle Mode dropdown.
Select Source: Choose open, high, low, or close as the input for Kairi computation.
Set MA Type & Length: Configure the moving average mode and its length under Moving Average Settings.
Interpret the Plot:
Green/Red bars: Show Kairi oscillator values above/below 0
Background color: Shows current trend (green = uptrend, red = downtrend)
Candle color overlays:
🟩 Teal = Overextended Bulls
🟥 Maroon = Overextended Bears
✅ Green = Healthy Uptrend
🔻 Red = Healthy Downtrend
🟨 Light tones = Weak trends
🔄 Blue/Fuchsia = Possible reversal detected
🔧 Configuration
Inputs:
Candle Mode: Heiken Ashi or Normal Candle Sticks
Source: Open, High, Low, Close
MA Mode: SMA, EMA, DEMA, VWMA, or Kijun
MA Length: Default is 29
🧪 Advanced Tips
Use Heikin-Ashi mode for better trend smoothing.
Kairi divergence (e.g., bullish Kairi in a downtrend) may signal upcoming reversal — watch for blue or fuchsia bars.
Combine with momentum indicators (e.g. RSI or MACD) for confluence-based setups.
For mean reversion strategies, fade extreme Kairi readings (> ±5%).
⚠️ Limitations
Not suited for ranging markets without trend.
Kairi extremes may remain elevated in strong trends — avoid early counter-trend entries.
Reversal logic is not a confirmation signal; use with caution.
📌 Disclaimer
This script is educational and illustrative. Always backtest thoroughly before using in live markets.
Power candle addPower candle add++++Power candle add++++Power candle add++++Power candle add++++Power candle add++++Power candle add++++Power candle add++++Power candle add++++Power candle add++++Power candle add++++Power candle add++++Power candle add++++Power candle add++++
XAUUSD & BTCUSD Buy/Sell Signals (80% Accuracy)this script gives approx 80% real and correct indicators depending on market
Auto NWOG Levels x5Indicator Name: Auto NWOG Levels with Labels
Description:
This indicator automatically plots the NWOG (Naked Weekly Open Gap) price levels on your chart. It includes:
NWOG High & Low: Solid maroon lines representing the high and low boundaries of the NWOG zone.
Intermediate Levels: Dotted maroon lines at 25%, 50%, and 75% levels within the NWOG range, providing visual guidance for possible support/resistance zones.
Labels: Each level is labeled on the right side of the chart, including a customizable date label for context.
Extendable Lines: All lines extend horizontally for a customizable number of bars (default: 500 bars) for better visibility over time.
Inputs:
NWOG High: Price level of the NWOG high.
NWOG Low: Price level of the NWOG low.
Date Label: Text to be displayed on the labels (e.g., the week of the NWOG).
This tool is useful for traders who monitor weekly price gaps and want clear, persistent levels drawn automatically on their charts.