Indicatori e strategie
Accumulation-Distribution CandlesThis structural visualization tool maps each candle through the lens of Effort vs. Result, blending Volume, Range, and closing bias into a normalized pressure score. Candle bodies are dynamically color-coded using a five-tier system—from heavy accumulation to heavy distribution—revealing where energy is building, dispersing, or neutral. This helps to visually isolate Markup, Markdown, Re-accumulation, and Distribution at a glance.
The indicator calculates a strength score by multiplying price result (close minus open) by effort (volume or price range), smoothing this raw value using a Fibonacci-based EMA. (34 for standard, 55 for crypto; the higher crypto value acknowledges that 24/7 trading offers more hours per week or month than trad markets.) The result is standardized against its rolling deviation and clamped to a range. This score determines the visual tier:
• 💙 Dark Blue = heavy Accumulation (strong upward result on strong effort)
• 🩵 Pale Blue = mild Accumulation
• 🌚 Gray = neutral (low conviction or balance)
• 💛 Pale Yellow = mild Distribution
• 🧡 Deep Yellow = heavy Distribution (strong downward result on strong effort)
The tool is optimized for the 1D chart, where Wyckoff phases are most clearly expressed. However, it adapts well to lower timeframes when used selectively. Traders may hide the body coloring and enable only zone highlighting to preserve other candle overlays such as SUPeR TReND 2.718, which offers directional clarity and trend duration. This combination is especially useful on intraday charts (15m–1H) where microstructure matters but visual clutter must be avoided.
When used alongside other Volume overlays (such as the OBVX Conviction Bias) or Volatility indicators (such as the Asymmetric Turbulence Ribbon (ATR)), this indicator adds confluence to directional setups by contextualizing pressure with Volatility. For example: compression zones marked by ATR may align with persistent pale blue candles—indicating quiet Accumulation before expansion.
Optional Overlays:
Normally ON -
• 📌 Pin Bars , filtered by volume, to isolate wick-dominant reversals from key zones
• 💪🏻 Strong-Body Candles — fuchsia candles w/ high body-to-range ratio reflect conviction
• 🧯 Wick Absorption Candles — red candles w/ long wicks and low closing strength indicate failed pushes or absorbed breakouts
• 🟦/🟧 Zone Highlighting for candles above a defined Accumulation/Distribution threshold
Normally OFF -
• 🔺 Fractals (5-bar) to map swing pivots by underlying pressure tier (normally OFF)
• 🟥/🟩 Engulfing patterns, filtered by directional conviction (normally OFF)
The Pin Bar strategy benefits most from the zone logic—when a bullish pin bar appears in an Accumulation zone (esp. pale or dark blue), and Volume exceeds its rolling average, it may mark a spring or failed breakdown. Conversely, bearish pins in Distribution zones can mark rejection or resistance.
This is not a signal engine—it’s a narrative filter designed to slot cleanly into a multi-layered workflow of visual structure and informed execution. Use it to identify bias and phase. Then deploy trade triggers from tools like SUPeR TReND 2.718, or the liquidity flows shown the The Silver Lining or the AltSeasonality - MTF indicators, for example. The candle colors tell you who’s in control—the other tools tell you when to act.
Moving Average Convergence Divergence + 2 SMAsThis TradingView Pine Script by STRADUK , is a **custom MACD indicator with two additional Simple Moving Averages (SMAs)** to enhance trend analysis and momentum insights. It includes:
- **MACD Components:**
- Configurable **Fast** and **Slow** MAs (SMA or EMA)
- Signal line (SMA or EMA)
- Histogram showing the difference between MACD and Signal
- Color-coded histogram for visual momentum changes
- Alerts for when the histogram switches from rising to falling and vice versa
- **Additional Features:**
- Two customizable **SMA lines** (e.g., 50 and 200) plotted directly on the price chart
- Helps identify broader market trends and potential support/resistance levels
This combined setup helps traders spot **momentum shifts** (via MACD) while also keeping an eye on the **overall market trend** (via SMAs).
DM Support / ResistanceThis indicator functions on the basis of Demarks Support / Resistance by analyzing the most recent 4-hour candle of the US trading session. The preferred candle for analysis is the one closing at 3 PM local time in the USA. The indicator's calculations are derived from the mathematical properties of the 4-hour candle immediately preceding the 3 PM candle, which would have opened at 10 AM USA time. Please consult the chart provided by the Capital.com broker. If the pivot value displayed by the indicator is positive (the fourth value shown), it indicates a long signal. In this case, consider entering a long position on the corresponding stock at the identified support level. Similarly, if the displayed pivot value is negative, look for a short opportunity from the resistance level. The resistance and support levels are the second and third values presented by the indicator, in that order.
Raman Ka IndicatorSell Side indicator. this is additional confirmation for trade where there is momentum. dont trade basis this indicator, use this as a extra confirmation to get trades sell side only
Highlight London Session (12:30 to 3:30 IST)The very first Pine Script code was designed to highlight the London trading session, specifically from 12:30 PM to 3:30 PM IST, which corresponds to 7:00 AM to 10:00 AM in UTC. During this window, the script monitored the highest and lowest prices reached and, once the session ended, it automatically plotted horizontal lines at those high and low levels. These lines stayed on the chart to provide a clear visual reference of the London session range, making it easier for traders to spot key areas of support and resistance. This is especially useful for identifying potential breakouts, liquidity grabs, or retests later in the day. The script didn’t include any visual boxes or background highlights—just clean, simple lines that marked the session's price boundaries for strategic analysis.
Autofib Extensions | DTDHello trader comuunity!
I'm introducing another script that is part of my main day-trading strategy. We all know regardless of what strategy we use, we need to know what levels offer the least amount of risk to our trade entry and a great tool to anticipate how far a move might go or what level a move may retrace to are the Fibonacci Retracement and Extensions. This indicator combines both together, but with a twist.
The main elements of the script are:
1. Multiple Session High and Lows | Developing my first script led me to understand that measuring key times during each session provides understanding of the market's continuity. I have provided 3 "sessions' a user can define according to CST time where the script saves the high and low of that session window to produce the retracement and extensions from those plots. Currently, the levels are always plotted from low to high (with the 0 mark being the high) and negative values provided so the levels are consistent. You can toggle each session on or off.
2. Coloring Key Retracements / Extensions | I use a dark background for my charts so the default colors help me distinguish from other another indicator I use. Feel free to adjust the colors to your preference. I consider 3 different colors because of their significance. Retracements that you want to see continue fall back into the .50 to .618 level (this I consider the "Golden Zone"). While basic Elliott Wave Theory states a wave is completed near the 1.618 level (this I consider "Major Extensions"). Everything isn't noise, but minor levels in a larger sequence.
______________
Script Limitations
All of my scripts are made with the help of ChatGPT so there are going to be limitations. One current one that I have made progress on, but not fully is when you are viewing a timeframe where the candle doesn't start when a session window starts. On smaller timeframes like the 7-minute this is not an issue. However, on the hourly, if your session window starts at the half hour which the 3rd session default window does, the lines will not produce. I will hopefully have this rectified in the near future. I will open the script since none of this work is original in nature and I would love to see how others can create a better product. Also, this is mainly a futures trading tool. If you are using this on stocks you will find it not as useful if the session window is too wide since the script waits until the session window closes to calculate the extension values.
Cheers,
DTD
ABRA LEVELS (PH1)ABRA LEVELS (PH1) is a precision-engineered indicator for SPY 0DTE and intraday scalping strategies. This tool marks the battlefield with institutional-grade clarity—highlighting Previous Day High/Low (PDH/PDL), Premarket High/Low (PMH/PML), Opening Range (ORH/ORL), and the critical 5-minute breakout zone.
Key Features
Automatic Levels:
Previous Day High/Low (PDH/PDL)
Premarket High/Low (PMH/PML)
Opening Range High/Low (ORH/ORL)
5th 1-Minute Candle High/Low (for early momentum reads)
First 5-Minute Candle Range with precision extensions
Zone Awareness:
Outer & inner range extensions from the first 5-minute bar
Retest + long-wick trap detection
Optional shaded liquidity zones for high-clarity entries
Real-Time Alerts:
Alerts for breaking inner/outer boundaries
First 5m high/low cross alerts
Smart retest and wick rejection signals
Customization:
Toggle visibility, styling, session timing, and shading layers. Clean, high-contrast visual layout built for fast, disciplined execution under pressure.
BeSight Mega SpotBeSight Mega Spot – Zone Based Price Grid Indicator
สคริปต์นี้ถูกออกแบบมาเพื่อช่วยเทรดเดอร์มองเห็นโซนราคาสำคัญที่ราคาอาจเกิดปฏิกิริยา โดยอ้างอิงจากระดับราคาที่ลงท้ายด้วย 0 และ 5 (เช่น 1350, 1355, 1360 เป็นต้น) ซึ่งมักเป็นระดับที่มีการตั้งคำสั่งซื้อขายจำนวนมากในตลาด
BeSight Mega Spot – Zone-Based Price Grid Indicator
This indicator is designed to help traders visualize key price zones where the market often reacts, based on price levels ending with 0 or 5 (e.g., 1350, 1355, 1360). These levels are commonly used for pending orders, liquidity, or price clustering zones.
It displays horizontal grid lines at fixed step intervals (default: every 5 points), covering the entire visible price range of the chart. Each price level is labeled for better clarity and planning.
🟦 Blue lines: Price levels ending in 0
⬜ Gray lines: Price levels ending in 5
This tool is useful for identifying potential institutional behavior zones, price consolidation, accumulation/distribution areas, or psychological support/resistance levels.
🧠 Notes:
- This indicator is not a buy/sell signal tool or predictive system.
- It works best when used in conjunction with other technical tools such as Supply/Demand zones or Smart Money Concepts (SMC) analysis.
- Compatible with all instruments: stocks, futures, forex, crypto, etc.
✅ How to use:
1. Add the indicator to your chart
2. Observe how price interacts with the 0/5 grid zones
3. Use the lines to assist with breakout, retest, or reversal planning
4. Combine with price action or other indicators for higher precision
✨ Developed by BeSight – A Community Of Traders
---------------------------------------------------------------------------------------
อินดิเคเตอร์นี้จะแสดงเส้นแนวนอนแบบตาราง (Grid) ที่แบ่งช่วงราคาออกเป็นระยะ ๆ ตามค่าที่ผู้ใช้กำหนด เช่น ทุก ๆ 5 จุด และครอบคลุมช่วงราคาทั้งหมดของกราฟ โดยแสดงเป็นเส้นแบบ dotted พร้อมป้ายราคาเพื่อให้มองเห็นได้ชัดเจน
🟦 เส้นสีน้ำเงิน: แสดงระดับราคาที่ลงท้ายด้วย 0
⬜ เส้นสีเทา: แสดงระดับราคาที่ลงท้ายด้วย 5
เหมาะสำหรับผู้ที่ต้องการดูโซนราคา "หยุดพัก / เก็บของ / เปิดโพซิชัน" ซึ่งอาจสะท้อนพฤติกรรมของผู้เล่นรายใหญ่หรือสถาบันในตลาด
🧠 ข้อควรรู้:
- อินดิเคเตอร์นี้ไม่ได้บอกจุดเข้าเทรดหรือการคาดการณ์ แต่ช่วยในการวางแผนแนวรับ-แนวต้านร่วมกับเครื่องมือวิเคราะห์อื่น ๆ
- รองรับทุกสินทรัพย์ที่มีหน่วยราคาคงที่ (หุ้น, ฟิวเจอร์ส, ฟอเร็กซ์, คริปโต ฯลฯ)
✅ วิธีใช้งาน:
1. เพิ่มอินดิเคเตอร์นี้ลงบนกราฟ
2. ใช้เส้น Grid เป็นแนวประกอบในการดูพฤติกรรมราคา เช่น การหยุดลง, การเบรกแนว, การกลับตัว
3. ผสมผสานกับโซน Demand/Supply หรือโซน SMC เพื่อความแม่นยำ
✨ พัฒนาโดย BeSight – คอมมูนิตี้ของเทรดเดอร์ตัวจริง
Weekly Levels Prep (Smart Weekly Candle)This script draws key weekly levels based on the most recent completed weekly candle (Monday–Friday). It automatically calculates and plots:
✅ Weekly High & Low
✅ Midpoint (50% level)
✅ Extension levels above and below
All levels are dynamically updated every new week and are visually marked with clean color-coded horizontal lines. Price values are shown near the price axis for clear visibility across all timeframes.
Great for:
Weekly preparation
Swing trading setups
Mean reversion and range breakouts
🔄 Works on all timeframes
🔍 Lightweight and non-intrusive
Built by a trader, for traders. 💼📈
TRIX Strategy)trix strategy with rsi
this is a winning strategy if used with good setting can get 140 pesent roi per year
this is true i have done that with this strategy jast play with the setting to get the best result
Trend Indicator with ArrowsTrend Indicator with arrows is a NoBrainer indicator to see the trend clearly.
UpTrend is defined as a candle closing above previous high. I
DownTrend is defined as a candle closing below previous low
A consolidation is defined as a candle closing inside previous candle high low.
UpTrend - Indicated with a green arrow below the candle with the current indicator.
DownTrend - ndicated with a red arrow above the candle with the current indicator.
So How to use this Indicator?
Identify zones of consolidation where the indicator doesn't show any arrows. Upon shift from consolidation to UpTrend or DownTrend take a entry. This is one way.
Second and most useful way is wait for Support or resistant hit.
If it's a support. Upon support hit wait for Consolidation, DownTrend and then UpTrend/(Consolidation again with uptrend) for long entry.
If its a resistance. Upon resistance hit wait for Consolidation, Uptrend and then DownTrend/(Consolidation again with DownTrend) for short Entry.
Vertical Lines Between Two Dates with BackgroundHere You can choose a range between any dates,
.
.
.
.
.
SMC Structures and FVGThe provided Pine Script code is an indicator for trading platforms, specifically designed to identify and visualize key trading concepts such as Fair Value Gaps (FVG) and market structures. Here is a detailed description of its functionality:
### Overall Purpose
This indicator aims to assist traders in analyzing market dynamics by highlighting important price levels and areas of interest. It combines the identification of FVGs and market structures to provide a comprehensive view of the market.
### Key Features and Functionalities
#### 1. Input Parameters
- **Fair Value Gap (FVG) Settings**:
- `isFvgToShow`: A boolean input to determine whether to display FVGs on the chart.
- `bullishFvgColor` and `bearishFvgColor`: Define the colors for bullish and bearish FVGs respectively.
- `mitigatedFvgColor`: Specifies the color for mitigated FVGs.
- `fvgHistoryNbr`: Determines the number of FVGs to display on the chart (default set to 10).
- `isMitigatedFvgToReduce`: A boolean input to decide whether to reduce the size of mitigated FVGs.
- **Market Structure Settings**:
- `isStructBodyCandleBreak`: A boolean input to indicate whether to consider the candle body for structure breaks.
- `isCurrentStructToShow`: A boolean input to control the display of the current market structure.
- `bullishBosColor` and `bearishBosColor`: Set the colors for bullish and bearish Break of Structure (BOS) lines (both set to green).
- `bosLineStyleOption` and `bosLineWidth`: Define the style and width (set to 2) of BOS lines.
- `bullishChochColor` and `bearishChochColor`: Determine the colors for bullish and bearish Change of Character (CHoCH) lines.
- `chochLineStyleOption` and `chochLineWidth`: Specify the style and width (set to 2) of CHoCH lines.
- `currentStructColor`, `currentStructLineStyleOption`, and `currentStructLineWidth`: Set the color, style, and width (set to 2) of the current market structure lines.
- `structHistoryNbr`: Defines the number of structure breaks to display on the chart.
#### 2. Fair Value Gap (FVG) Detection and Visualization
- **FVG Identification**:
- The code identifies bullish FVGs when the high of the third - previous bar is less than the low of the previous bar (`isBullishFVG`).
- Bearish FVGs are identified when the low of the third - previous bar is greater than the high of the previous bar (`isBearishFVG`).
- **FVG Drawing**:
- For each identified FVG, a box is drawn on the chart with the appropriate color based on its bullish or bearish nature.
- Labels are added to the FVG boxes.
- The code also handles the removal of FVGs that have been mitigated (i.e., when the price crosses the FVG range).
- Mitigated FVGs are colored differently, and an alert can be triggered when an FVG is mitigated.
#### 3. Market Structure Analysis
- **Structure Identification**:
- The code identifies the highest and lowest price levels within a lookback period (default 10 bars).
- It tracks the start index of the current high and low structures.
- Structure breaks are detected based on whether the price crosses the previous high or low structure levels, considering the candle body if `isStructBodyCandleBreak` is set to true.
- **Line Drawing**:
- When a structure break occurs, either a BOS or CHoCH line is drawn on the chart depending on the market direction.
- The lines are drawn with the specified color, style, and width.
- Labels are added to the lines to indicate whether they are BOS or CHoCH lines.
- The current market structure is also displayed on the chart with the defined color, style, and width.
#### 4. Alerts
- **Alert Conditions**:
- Alerts are set for BOS and CHoCH events. When a BOS or CHoCH occurs, an alert is triggered with the corresponding title and message.
In summary, this indicator provides traders with a visual representation of FVGs and market structures, along with alerts for key events, helping them to make more informed trading decisions.
Green Candle with Volume > Last 5 DaysIt shows the candle with High volume compared to previous 5 days
MACD Histogram ROC with PVT FilterBelow is a detailed description of the "MACD Histogram ROC with PVT Filter" indicator based on the Pine Script v6 version, which uses the built-in `ta.pvt` function. This description assumes the latest code I provided with a single timeframe (chart-native) and the PVT filter.
---
### Indicator Description: MACD Histogram ROC with PVT Filter
The "MACD Histogram ROC with PVT Filter" is a technical analysis indicator designed for TradingView (Pine Script v6) that combines the Moving Average Convergence Divergence (MACD) Histogram, its Rate of Change (ROC), and the Price Volume Trend (PVT) to identify bullish momentum with volume confirmation. Instead of plotting lines or values directly on the chart, it uses a customizable background color (default light green) to highlight periods where specific bullish conditions are met, providing a clean and visually intuitive signal for traders.
#### How It Works
The indicator evaluates three key conditions based on the chart’s native timeframe:
1. **MACD Histogram**:
- Calculated as the difference between the MACD Line (fast EMA minus slow EMA) and the Signal Line (EMA of the MACD Line).
- A positive Histogram (above zero) indicates bullish momentum.
2. **Histogram Rate of Change (ROC)**:
- Measures the change in the MACD Histogram from the previous bar.
- A positive ROC (increasing Histogram) suggests accelerating bullish strength.
3. **Price Volume Trend (PVT) with EMA Filter**:
- PVT tracks the cumulative relationship between price changes and volume, acting as a volume-weighted momentum indicator.
- An Exponential Moving Average (EMA) is applied to the PVT (default period of 9), and the indicator checks if the PVT is above this EMA, confirming that volume supports the price trend.
When all three conditions are true—MACD Histogram > 0, Histogram ROC > 0, and PVT > PVT EMA—the chart background is highlighted with the user-defined color, signaling a potential bullish opportunity.
#### Key Features
- **Single Timeframe**: Operates on the chart’s current timeframe (e.g., 1-minute, 5-minute, daily), ensuring alignment with your viewing resolution.
- **Customizable Price Input**: Allows selection of the price type (e.g., close, open, high, low, hl2, hlc3, ohlc4) for MACD and PVT calculations.
- **Adjustable MACD Parameters**: Users can modify the fast EMA, slow EMA, and signal EMA periods (default 12, 26, 9).
- **Configurable PVT EMA**: The EMA period applied to PVT is adjustable (default 9).
- **Background Highlight**: A single, customizable background color (default light green with 90% transparency) indicates when all conditions are met, keeping the chart uncluttered.
#### Purpose
This indicator is designed for traders seeking to confirm bullish price movements with both momentum (MACD Histogram and ROC) and volume (PVT) support. The background highlight simplifies decision-making by visually marking periods of strong bullish alignment without overwhelming the chart with additional lines or plots.
---
### How to Use
1. **Adding the Indicator**:
- Open TradingView and access the Pine Editor (bottom of the chart window).
- Copy and paste the indicator code into the editor.
- Click “Add to Chart” to apply it to your current chart.
2. **Customizing Settings**:
- After adding the indicator, click its name in the chart’s indicator list and select “Settings” (gear icon).
- Adjust the following inputs:
- **Fast EMA Length**: Set the period for the fast EMA in the MACD (default 12).
- **Slow EMA Length**: Set the period for the slow EMA in the MACD (default 26).
- **Signal EMA Length**: Set the period for the signal line EMA (default 9).
- **Price Type**: Choose the price input for calculations (options: "close" , "open", "high", "low", "hl2", "hlc3", "ohlc4").
- **PVT EMA Period**: Define the EMA period for the PVT filter (default 9).
- **Background Color**: Select the highlight color and transparency (default light green, `#90EE90`, 90% transparency).
3. **Interpreting the Indicator**:
- **Green Background**: Appears when:
- The MACD Histogram is positive (bullish momentum).
- The Histogram ROC is positive (increasing momentum).
- The PVT is above its EMA (volume supports the trend).
- **No Highlight**: Indicates one or more conditions are not met, suggesting weaker or non-bullish conditions.
- Use the green highlight as a signal to consider bullish setups, such as entries or confirmation of an uptrend, depending on your trading strategy.
4. **Application**:
- Works on any timeframe (e.g., 1-minute for scalping, daily for swing trading) since it uses the chart’s native resolution.
- Combine with other indicators (e.g., support/resistance, RSI) or price action for a more robust trading system.
- Adjust the PVT EMA period to fine-tune sensitivity: a shorter period (e.g., 5) reacts faster, while a longer period (e.g., 20) smooths the filter.
---
### Notes
- **Timeframe**: The indicator reflects the chart’s current timeframe. Change your chart’s resolution (e.g., from 5-minute to 15-minute) to analyze different timeframes.
- **Transparency**: The default 90% transparency allows price action to remain visible beneath the highlight. Lower it (e.g., to 50%) for a more solid color if preferred.
- **Limitations**: This is a bullish-only signal. It won’t highlight bearish conditions (e.g., Histogram < 0). Let me know if you’d like to add bearish highlights!
This indicator is a powerful tool for traders who value momentum and volume confirmation in a minimalist format. Let me know if you’d like to tweak it further or add more features!
MOPS Indicator - Master of ProfitsWhat this Script Does
1. Quick Buy (QB)
Conditions:
MACD crossover
RSI < 50
Trend is up (EMA50 > EMA200)
➡️ Places a label below the bar:
"QB Entry: xxx SL: xxx | TP: xxx | R:R"
2. Quick Sell (QS)
Conditions:
MACD crossunder
RSI > 50
Trend is down (EMA50 < EMA200)
➡️ Label appears above the bar.
3. Close Quick Buy (QBC)
When the previous candle had QB and now a MACD crossunder happens.
➡️ Label "QBC" above bar to close long.
4. Close Quick Sell (QSC)
Previous candle had QS and now MACD crossover.
➡️ Label "QSC" below bar to close short.
5. Bull Buy (BullB)
When price crosses above middle Bollinger Band + MACD cross + price between BB Middle & Upper + MACD above zero.
➡️ Entry label below bar.
6. Bear Sell (BearS)
Opposite logic to BullB, label above bar.
7. Close BullB / Close BearS
Opposite exit signals using price movement and MACD.
8. Swing Buy / Swing Sell
When price breaks Fibonacci retracement levels with trend confirmation.
TrendLibrary "Trend"
calculateSlopeTrend(source, length, thresholdMultiplier)
Parameters:
source (float)
length (int)
thresholdMultiplier (float)
Purpose:
The primary goal of this function is to determine the short-term trend direction of a given data series (like closing prices). It does this by calculating the slope of the data over a specified period and then comparing that slope against a dynamic threshold based on the data's recent volatility. It classifies the trend into one of three states: Upward, Downward, or Flat.
Parameters:
`source` (Type: `series float`): This is the input data series you want to analyze. It expects a series of floating-point numbers, typically price data like `close`, `open`, `hl2` (high+low)/2, etc.
`length` (Type: `int`): This integer defines the lookback period. The function will analyze the `source` data over the last `length` bars to calculate the slope and standard deviation.
`thresholdMultiplier` (Type: `float`, Default: `0.1`): This is a sensitivity factor. It's multiplied by the standard deviation to determine how steep the slope needs to be before it's considered a true upward or downward trend. A smaller value makes it more sensitive (detects trends earlier, potentially more false signals), while a larger value makes it less sensitive (requires a stronger move to confirm a trend).
Calculation Steps:
Linear Regression: It first calculates the value of a linear regression line fitted to the `source` data over the specified `length` (`ta.linreg(source, length, 0)`). Linear regression finds the "best fit" straight line through the data points.
Slope Calculation: It then determines the slope of this linear regression line. Since `ta.linreg` gives the *value* of the line on the current bar, the slope is calculated as the difference between the current bar's linear regression value (`linRegValue`) and the previous bar's value (`linRegValue `). A positive difference means an upward slope, negative means downward.
Volatility Measurement: It calculates the standard deviation (`ta.stdev(source, length)`) of the `source` data over the same `length`. Standard deviation is a measure of how spread out the data is, essentially quantifying its recent volatility.
Adaptive Threshold: An adaptive threshold (`threshold`) is calculated by multiplying the standard deviation (`stdDev`) by the `thresholdMultiplier`. This is crucial because it means the definition of a "flat" trend adapts to the market's volatility. In volatile times, the threshold will be wider, requiring a larger slope to signal a trend. In quiet times, the threshold will be narrower.
Trend Determination: Finally, it compares the calculated `slope` to the adaptive `threshold`:
If the `slope` is greater than the positive `threshold`, the trend is considered **Upward**, and the function returns `1`.
If the `slope` is less than the negative `threshold` (`-threshold`), the trend is considered **Downward**, and the function returns `-1`.
If the `slope` falls between `-threshold` and `+threshold` (inclusive of 0), the trend is considered **Flat**, and the function returns `0`.
Return Value:
The function returns an integer representing the determined trend direction:
`1`: Upward trend
`-1`: Downward trend
`0`: Flat trend
In essence, this library function provides a way to gauge trend direction using linear regression, but with a smart filter (the adaptive threshold) to avoid classifying minor noise or low-volatility periods as significant trends.
EMA Crossover 9/21 📈 **EMA Crossover Signal Line**
Created by **Ahmet AKSOY (tugeday)**
This indicator visualizes the crossover between two EMAs using a single dynamic-colored line.
✅ **How it works:**
- The script calculates two EMAs: a short-period EMA and a long-period EMA.
- Only the **short EMA line** is displayed on the chart.
- When the short EMA **crosses above** the long EMA (bullish crossover), the line color turns **green**.
- When the short EMA **crosses below** the long EMA (bearish crossover), the line color turns **red**.
- The line color remains based on the last crossover signal.
🎛️ **Customizable Inputs:**
- Short EMA period (default: 9)
- Long EMA period (default: 21)
All EMA periods can be adjusted from the settings panel, allowing traders to fine-tune the indicator to match their strategy.
Simple, clean, and effective.
Developed by **Ahmet AKSOY (tugeday)** — enjoy and trade smart!
RSI with EMA and WMA on RSI
> "This is an indicator that combines EMA and WMA on the RSI.
> It highlights the strength of price waves as well as support and resistance zones."
XRP/USD Advanced Trading StrategyKey Features:
Triple Confirmation System combines:
Moving Average crossover (9-period vs 21-period)
RSI oversold/overbought conditions (14-period)
MACD histogram crossover
Risk Management:
Built-in stop loss/profit taking (modify via strategy settings)
Margin requirements specified (100:1 leverage)
Visual Elements:
Clean price chart overlay
Clear buy/sell arrows with labels
Moving average plots for trend identification
Optimization Tips:
Adjust MA lengths for different timeframes (shorter for day trading)
Modify RSI levels based on market volatility
Combine with Ichimoku Cloud for additional confirmation
Use Bollinger Bands® to filter false breakouts
Backtesting:
Test on multiple timeframes (4h/daily weekly)
Check performance during different market conditions
Optimize parameters using Strategy Tester
This strategy reduces false signals by requiring confirmation from three different technical indicators while maintaining clarity in signal generation. Always validate with fundamental analysis and market news before executing trade
Highlight London Session (12:30 to 3:30 IST)The very first Pine Script code was designed to highlight the London trading session, specifically from 12:30 PM to 3:30 PM IST, which corresponds to 7:00 AM to 10:00 AM in UTC. During this window, the script monitored the highest and lowest prices reached and, once the session ended, it automatically plotted horizontal lines at those high and low levels. These lines stayed on the chart to provide a clear visual reference of the London session range, making it easier for traders to spot key areas of support and resistance. This is especially useful for identifying potential breakouts, liquidity grabs, or retests later in the day. The script didn’t include any visual boxes or background highlights—just clean, simple lines that marked the session's price boundaries for strategic analysis.
Impulse Candle with Volume & Std AnalysisImpulse Candle with Volume & Std Analysis
This indicator highlights “impulse” candles on your chart by combining price action and volume analysis to gauge the strength of market moves.
How It Works:
Impulse Candle Detection:
The indicator measures the candle’s body size and compares it to the Average True Range (ATR). When a candle’s body exceeds a user-defined multiple of the ATR (the “Impulse Factor”), it is flagged as an impulse candle.
Volume Analysis:
For each impulse candle, the indicator calculates the expected volume (Impulse Factor × average volume) and compares the actual volume against this expected value. It uses the standard deviation of volume over a specified period to classify the move’s volume as:
Extreme Low: More than 2 standard deviations below the expected volume
Low: Between 1 and 2 standard deviations below expected
Normal: Within 1 standard deviation of expected volume
High: Between 1 and 2 standard deviations above expected
Extreme High: More than 2 standard deviations above expected
Visual Cues:
The impulse candles are color-coded based on the volume classification.
A text-only label (with customizable text color) appears just above each impulse candle, indicating its volume category. The label has no background, ensuring a clean, unobtrusive look.
Customization:
Users can adjust parameters such as the Impulse Factor, ATR length, and volume averaging period to tailor the indicator to their trading style.
This tool is perfect for traders who want a quick visual representation of both significant price moves and the corresponding volume strength behind those moves.