Variación vs Cierre MáximoChange in the highest closing price of period N versus the current closing price to see the percentage change, ideal for setting an alarm when the price rises or falls more than a certain value.
Indicators and strategies
Float LabelFloat label
Float label is simply a label that will display the float (number of shares that are publicly available for trading on the open market) for the ticker currently open in the chart.
Very handy for trading smaller cap names.
Currently working on a complete low float label to replace this.
Sessioni di Trading - Londra & New YorkIndicator for mechanics 3.0 marking the London and New York sessions with vertical dotted lines
Distance from 52-week LowYou will see a % line showing distance from 52 week low.
Colour changes:
Green if price is within 10% up from 52 week low
Orange if price is between 10% to 25% up from 52 week low
Red if price is more than 25% up from 52 week low.
2x 200MAThis indicator plots the 200-period Moving Average (SMA or EMA) and a line that represents 2x the value of the 200MA. You can switch between SMA and EMA from the settings panel.
DDDDD: ATR & ADR Table + Suggested Time-based Exit📈 DDDDD: ATR & ADR Table + Suggested Time-based Exit
This indicator provides a simple yet powerful table displaying key volatility metrics for any timeframe you apply it to. It is designed for traders who want to assess the volatility of an asset, estimate the average time required for a potential move, and define a time-based exit strategy.
🔍 Features:
Displays ATR (Average True Range) for the selected length
Shows Average Range (High-Low) and Maximum Range over a configurable number of bars
Calculates Avg Bars/Move → average number of bars needed to achieve the maximum range
Calculates Recommended Exit Bars → suggested maximum holding period (in bars) before considering an exit if price hasn’t moved as expected
All values dynamically adjust based on the chart’s current timeframe
Outputs values directly in a table overlay on your main chart for quick reference
📝 How to interpret the table:
Field Meaning
ATR (14) Average True Range over the last 14 bars (volatility indicator)
Avg Range (20) Average High-Low range over the last 20 bars
Max Range Maximum High-Low range observed in the last 20 bars
Avg Bars/Move Average number of bars it takes to achieve a Max Range move
Rec. Exit Bars Suggested max holding period (bars) → consider exit if move hasn’t occurred
✅ How to use:
Apply this indicator to any chart (works on minutes, hourly, daily, weekly…)
It will automatically calculate based on the chart’s current timeframe
Use ATR & Avg Range to gauge volatility
Use Avg Bars/Move to estimate how long the market usually takes to achieve a big move
Use Rec. Exit Bars as a soft stop — if price hasn’t moved by this time, consider exiting due to declining probability of a breakout
⚠️ Notes:
All values are relative to your current chart timeframe. For example:
→ On a daily chart, ATR represents daily volatility
→ On a 1H chart, ATR represents hourly volatility
“Bars” refers to the bars of the current timeframe. Always interpret time accordingly.
Perfect for traders who want to:
Time their trades based on average volatility
Avoid overholding losing positions
Set time-based exit rules to complement price-based stoplosses
XAUUSA Sniping SMA by Time/Trend with BBPT trend alignmentThis indicator is designed to trade XAUUSD and has defaults set during the hours (Central Time) that gold usually falls and when it usually rises. Using the input form defaults and a 1 to 3 minute timeframe on your chart is best. Don't take trades during the no-trade times (white line) and do trade when the line changes to either green or red. The first few bars going with the trend are high probability but as the trend fades the line will change to orange (caution signal) when the trend is likely over for the moment. This indicator is best used with the BBPT indicator that shows bull/bear strength. When the BBPT trend line is rising, pair with the green line in this indicator and when the BBPT trend is falling pair with the red line in this indicator for some high probability trades.
TTM Squeeze Overlay (Wave A/B/C Visible)This script overlays three MACD-based wave structures directly on the price chart — giving you a clear, time-based view of market momentum without needing a sub-panel.
🔴 Wave A (Short-Term) – fast reactions, shows immediate price pressure
⚫ Wave B (Mid-Term) – smoother movements, ideal for swing context
🔵 Wave C (Long-Term) – area-style macro trend overlay
All waves are dynamically scaled and centered around price action, so you don’t need to manually stretch or shift anything.
Built for traders who want trend clarity at a glance — right where it matters.
Distance from 52W High & LowThis indicator calculates and plots two percentage metrics in %
Distance from 52 week low
Distance from 52 week high
Features:
Green line: % above 52 week low
Red line: % above 52 week high
Alerts when price is 5% of either extreme
Perfect for traders/ investors who track opportunities near long term lows or highs
Guppy Multiple Moving Average (GMMA)The GMMA Momentum Indicator plots 12 EMAs on your chart, divided into two groups:
Short-term EMAs (6 lines, default periods: 3, 5, 8, 10, 12, 15): Represent short-term trader sentiment and momentum.
Long-term EMAs (6 lines, default periods: 30, 35, 40, 45, 50, 60): Reflect long-term investor behavior and broader market trends.
By analyzing the interaction between these two groups, the indicator identifies:
Bullish and bearish trends based on the relative positions of the short- and long-term EMAs.
Momentum strength through the spread or convergence of the EMAs.
Potential reversals or breakouts via compression signals.
This PineScript version enhances the traditional GMMA by adding visual cues like background colors, bearish signals, and compression detection, making it ideal for swing traders seeking clear, actionable insights.
The GMMA Momentum Indicator provides several key features:
1. Trend Identification
Bullish Trend: When the short-term EMAs (green lines) are above the long-term EMAs (blue lines) and spreading apart, it signals strong upward momentum. The chart background turns light green to highlight this condition.
Bearish Trend: When the short-term EMAs cross below the long-term EMAs and converge, it indicates downward momentum. The background turns light red, and an orange downward triangle appears above the bar to mark a new bearish signal.
2. Momentum Analysis
The spread between the short-term EMAs reflects the strength of short-term momentum. A wide spread suggests strong momentum, while a tight grouping indicates weakening momentum or consolidation. Similarly, the long-term EMAs act as dynamic support or resistance, guiding traders on the broader trend.
3. Compression Detection
Compression occurs when both the short-term and long-term EMAs converge, signaling low volatility and a potential breakout or reversal. A yellow upward triangle appears below the bar when compression is detected, alerting traders to watch for price action.
4. Visual Cues
Green short-term EMAs: Show short-term trader activity.
Blue long-term EMAs: Represent long-term investor sentiment.
Background colors: Light green for bullish trends, light red for bearish trends, and transparent for neutral conditions.
Orange downward triangles: Mark new bearish trends.
Yellow upward triangles: Indicate compression, hinting at potential breakouts.
How to Use the GMMA Momentum Indicator for Swing Trading
Swing trading involves capturing price moves over days to weeks, and the GMMA Momentum Indicator is an excellent tool for this strategy. Here’s how to use it effectively:
1. Identifying Trade Entries
Buy Opportunities:
Look for a bullish trend (green background) where the short-term EMAs are above the long-term EMAs and spreading apart, indicating strong momentum.
A compression signal (yellow triangle) followed by a breakout above resistance or a bullish candlestick pattern can confirm an entry.
Example: On a daily chart, if the short-term EMAs cross above the long-term EMAs and the background turns green, consider entering a long position, especially if volume supports the move.
Sell Opportunities:
Watch for a bearish signal (orange downward triangle) or a bearish trend (red background) where the short-term EMAs cross below the long-term EMAs.
Example: If the short-term EMAs collapse below the long-term EMAs and an orange triangle appears, it may signal a shorting opportunity or a time to exit longs.
2. Managing Trades
Use the long-term EMAs as dynamic support (in uptrends) or resistance (in downtrends) to set stop-loss levels or trail stops.
Monitor the spread of the short-term EMAs. A widening spread suggests the trend is strong, while convergence may indicate it’s time to take profits or tighten stops.
3. Anticipating Reversals
Compression signals (yellow triangles) highlight periods of low volatility, often preceding significant price moves. Combine these with price action (e.g., breakouts or reversals) or other indicators (e.g., RSI or volume) for confirmation.
Example: If a compression signal appears near a key support level and the price breaks upward, it could signal the start of a new bullish swing.
4. Best Practices
Timeframes: The indicator works well on daily or 4-hour charts for swing trading, but you can adjust the EMA periods for shorter (e.g., 1-hour) or longer (e.g., weekly) timeframes.
Confirmation: Combine the GMMA with other tools like support/resistance levels, candlestick patterns, or oscillators (e.g., MACD) to reduce false signals.
Risk Management: Always use proper position sizing and stop-losses, as EMAs are lagging indicators and may produce delayed signals in choppy markets.
BURR Orb Signal Lines9 and 26 EMA. Can be used to confirm identify trend change or confirm breakout from S&R zones.
Sessioni di Trading - Londra & New YorkMarks the London and New York trading sessions with vertical colored lines (Mechanics 3.0)
Average Daily LiquidityIt is important to have sufficient daily trading value (liquidity) to ensure you can easily enter and, importantly, exit the trade. This indicator allows you to see if the traded value of a stock is adequate. The default average is 10 periods and it is common to average the daily traded value as both price and volume can have spikes causing trading errors. Some investors use a 5 period for a week, 10 period for 2 weeks, 20 or 21 period for 4 weeks/month and 65 periods for a quarter. You need to ascertain your buying amount such as $10000 and then have the average daily trading value be your comfortable moving average more such as average liquidity is more than 10 x MA(close x volume) or $100000 in this example. The value is extremely important for small and micro cap stocks you may wish to purchase.
Timeframe StrategyThis is a multi-timeframe trading strategy inspired by Ross Cameron's style, optimized for scalping and trend-following across various timeframes (1m, 5m, 15m, 1h, and 1D). The strategy integrates a comprehensive set of technical indicators, dynamic risk management, and visual tools.
Core Features
Dynamic Take Profit, Stop Loss & Trailing Stop
> Separate settings per timeframe for:
-TP% (Take Profit)
-SL% (Stop Loss)
-Trailing Stop %
-Cooldown bars
> Configurable via UI inputs.
>Smart Entry Conditions
Bullish entry: EMA9 crossover EMA20 and EMA50 > EMA200
Bearish entry: EMA9 crossunder EMA20 and EMA50 < EMA200
>Additional confirmation filters:
-Volume Filter (enabled/disabled via UI)
-Time Filter (e.g., only between 15:00–20:00 UTC)
-Spike Filter: rejects high-volatility candles
-RSI Filter: above/below 50 for trend confirmation
-ADX Filter (only applied on 1m, e.g., ADX > 15)
-Micro-Volatility Filter: minimum range percentage (1m only)
-Trend Filter (1m only): price must be above/below EMA200
>Trailing Stop Logic
-Configurable for each timeframe.
- Optional via toggle (use_trailing).
>Trade Cooldown Logic
-Prevents consecutive trades within X bars, configurable per timeframe.
>Technical Indicators Used
-EMA 9 / 20 / 50 / 200
-VWAP
-RSI (14)
-ATR (14) for volatility-based spike filtering
-Custom-calculated ADX (14) (manually implemented)
>Visual Elements
🔼/🔽 Entry signals (long/short) plotted on the chart.
📉 Table in bottom-left:
Displays current values of EMA/VWAP/volume/ATR/ADX.
> Optional "Tab info" panel in top-right (toggleable):
-Timeframe & strategy settings
-Live status of filters (volume, time, cooldown, spike, RSI, ADX, range, trend)
-Uses emoji (✅ / ❌) for quick diagnostics.
>User Customization
-Inputs per timeframe for all key parameters.
-Toggle switches for:
-Trailing stop
-Volume filter
-Info table visibility
This strategy is designed for active traders seeking a balance between momentum entry, risk control, and adaptability across timeframes. It's ideal for backtesting quick reversals or breakout setups in fast markets, especially at lower timeframes like 1m or 5m.
Multi Bollinger Bands (3, 4, 5 SD)Multi Bollinger Bands Ribbon.
You can see Bollinger Bands with SD 3, 4, 5 in the same ribbon eliminating the need to put separate BBs on the chart.
Multi-Timeframe Converging Signal AlertThis is not financial advice, nor meant to influence anyone's trading strategies.
Please use at your discretion and if you decide to give this indicator a shot, please leave some feedback if there could be changes made to the intervals or if there any other necessary changes to make.
Signal fires only when ALL of the following align across timeframes:
🔹 Long-Term (Daily or Weekly)
PMO crosses above its signal line and SMA-50
MACD bullish crossover
RSI crosses above 50 from below
Price closes above SMA-50 and Bollinger Mid-Band
🔹 Mid-Term (4H/1H)
EWO positive and climbing
MACD histogram turning up
Volume spike (relative to 20-period avg)
VWAP reclaimed after drop
🔹 Short-Term (15/30m)
Price breaks out of Bollinger Band squeeze
RSI > 60 and climbing
MACD > Signal line
Price closes above VWAP & SMA-50
The code is designed for steady, multi-indicator-confirmed trend reversals, not extreme or rapid parabolic moves like short squeezes. This is why the sell indicator has fallen short on the squeeze of 2021 and 2024 with GME because there is no parabolic overextension trigger and certain indicators lag behind and miss out on the data in that type of movement.
I hope this is helpful in determining solid entries and provides an understanding of the data to analyze when looking to accumulate or unload some shares for profit, but as always provide feedback if there are any concerns or feedback.
Buy/Sell Signal Indicatorbuy sell signal that you can use then apply to chart and win, ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
Seekho roj kamao StrategyThe "Seekho Roj Kamao Strategy" is a powerful backtesting tool designed to identify high-probability trend continuation setups. It combines RSI, Chande Momentum Oscillator (CMO), and adaptive ATR-based trailing stop logic to detect precise entry points and manage risk through automated take profit (1R, 2R, 3R) and stop loss levels. This strategy dynamically evaluates trend direction shifts using price action and momentum divergence, enabling traders to test robust trading scenarios with clearly defined exits. Ideal for forex, crypto, and stock traders, it allows full customization of sensitivity and volatility filters, making it suitable for both intraday and swing trading approaches.
4H MA Crossover Pullback StrategyMedium-High frequency Moving Average Crossover Pullback strategy
Fast EMA (50) > Slow EMA (200) for trend confirmation.
Entries occur when price pulls back to a 20 EMA, then resumes with a crossover.
RSI filter added to ensure momentum is aligned.
ATR-based stop loss and take profit with a 1.2:1 risk-reward ratio.
AllCandlestickPatternsLibraryAll Candlestick Patterns Library
The Candlestick Patterns Library is a Pine Script (version 6) library extracted from the All Candlestick Patterns indicator. It provides a comprehensive set of functions to calculate candlestick properties, detect market trends, and identify various candlestick patterns (bullish, bearish, and neutral). The library is designed for reusability, enabling TradingView users to incorporate pattern detection into their own scripts, such as indicators or strategies.
The library is organized into three main sections:
Trend Detection: Functions to determine market trends (uptrend or downtrend) based on user-defined rules.
Candlestick Property Calculations: A function to compute core properties of a candlestick, such as body size, shadow lengths, and doji characteristics.
Candlestick Pattern Detection: Functions to detect specific candlestick patterns, each returning a tuple with detection status, pattern name, type, and description.
Library Structure
1. Trend Detection
This section includes the detectTrend function, which identifies whether the market is in an uptrend or downtrend based on user-specified rules, such as the relationship between the closing price and Simple Moving Averages (SMAs).
Function: detectTrend
Parameters:
downTrend (bool): Initial downtrend condition.
upTrend (bool): Initial uptrend condition.
trendRule (string): The rule for trend detection ("SMA50" or "SMA50, SMA200").
p_close (float): Current closing price.
sma50 (float): Simple Moving Average over 50 periods.
sma200 (float): Simple Moving Average over 200 periods.
Returns: A tuple indicating the detected trend.
Logic:
If trendRule is "SMA50", a downtrend is detected when p_close < sma50, and an uptrend when p_close > sma50.
If trendRule is "SMA50, SMA200", a downtrend is detected when p_close < sma50 and sma50 < sma200, and an uptrend when p_close > sma50 and sma50 > sma200.
2. Candlestick Property Calculations
This section includes the calculateCandleProperties function, which computes essential properties of a candlestick based on OHLC (Open, High, Low, Close) data and configuration parameters.
Function: calculateCandleProperties
Parameters:
p_open (float): Candlestick open price.
p_close (float): Candlestick close price.
p_high (float): Candlestick high price.
p_low (float): Candlestick low price.
bodyAvg (float): Average body size (e.g., from EMA of body sizes).
shadowPercent (float): Minimum shadow size as a percentage of body size.
shadowEqualsPercent (float): Tolerance for equal shadows in doji detection.
dojiBodyPercent (float): Maximum body size as a percentage of range for doji detection.
Returns: A tuple containing 17 properties:
C_BodyHi (float): Higher of open or close price.
C_BodyLo (float): Lower of open or close price.
C_Body (float): Body size (difference between C_BodyHi and C_BodyLo).
C_SmallBody (bool): True if body size is below bodyAvg.
C_LongBody (bool): True if body size is above bodyAvg.
C_UpShadow (float): Upper shadow length (p_high - C_BodyHi).
C_DnShadow (float): Lower shadow length (C_BodyLo - p_low).
C_HasUpShadow (bool): True if upper shadow exceeds shadowPercent of body.
C_HasDnShadow (bool): True if lower shadow exceeds shadowPercent of body.
C_WhiteBody (bool): True if candle is bullish (p_open < p_close).
C_BlackBody (bool): True if candle is bearish (p_open > p_close).
C_Range (float): Candlestick range (p_high - p_low).
C_IsInsideBar (bool): True if current candle body is inside the previous candle's body.
C_BodyMiddle (float): Midpoint of the candle body.
C_ShadowEquals (bool): True if upper and lower shadows are equal within shadowEqualsPercent.
C_IsDojiBody (bool): True if body size is small relative to range (C_Body <= C_Range * dojiBodyPercent / 100).
C_Doji (bool): True if the candle is a doji (C_IsDojiBody and C_ShadowEquals).
Purpose: These properties are used by pattern detection functions to evaluate candlestick formations.
3. Candlestick Pattern Detection
This section contains functions to detect specific candlestick patterns, each returning a tuple . The patterns are categorized as bullish, bearish, or neutral, and include detailed descriptions for use in tooltips or alerts.
Supported Patterns
The library supports the following candlestick patterns, grouped by type:
Bullish Patterns:
Rising Window: A two-candle continuation pattern in an uptrend with a price gap between the first candle's high and the second candle's low.
Rising Three Methods: A five-candle continuation pattern with a long green candle, three short red candles, and another long green candle.
Tweezer Bottom: A two-candle reversal pattern in a downtrend with nearly identical lows.
Upside Tasuki Gap: A three-candle continuation pattern in an uptrend with a gap between the first two green candles and a red candle closing partially into the gap.
Doji Star (Bullish): A two-candle reversal pattern in a downtrend with a long red candle followed by a doji gapping down.
Morning Doji Star: A three-candle reversal pattern with a long red candle, a doji gapping down, and a long green candle.
Piercing: A two-candle reversal pattern in a downtrend with a red candle followed by a green candle closing above the midpoint of the first.
Hammer: A single-candle reversal pattern in a downtrend with a small body and a long lower shadow.
Inverted Hammer: A single-candle reversal pattern in a downtrend with a small body and a long upper shadow.
Morning Star: A three-candle reversal pattern with a long red candle, a short candle gapping down, and a long green candle.
Marubozu White: A single-candle pattern with a long green body and minimal shadows.
Dragonfly Doji: A single-candle reversal pattern in a downtrend with a doji where open and close are at the high.
Harami Cross (Bullish): A two-candle reversal pattern in a downtrend with a long red candle followed by a doji inside its body.
Harami (Bullish): A two-candle reversal pattern in a downtrend with a long red candle followed by a small green candle inside its body.
Long Lower Shadow: A single-candle pattern with a long lower shadow indicating buyer strength.
Three White Soldiers: A three-candle reversal pattern with three long green candles in a downtrend.
Engulfing (Bullish): A two-candle reversal pattern in a downtrend with a small red candle followed by a larger green candle engulfing it.
Abandoned Baby (Bullish): A three-candle reversal pattern with a long red candle, a doji gapping down, and a green candle gapping up.
Tri-Star (Bullish): A three-candle reversal pattern with three doji candles in a downtrend, with gaps between them.
Kicking (Bullish): A two-candle reversal pattern with a bearish marubozu followed by a bullish marubozu gapping up.
Bearish Patterns:
On Neck: A two-candle continuation pattern in a downtrend with a long red candle followed by a short green candle closing near the first candle's low.
Falling Window: A two-candle continuation pattern in a downtrend with a price gap between the first candle's low and the second candle's high.
Falling Three Methods: A five-candle continuation pattern with a long red candle, three short green candles, and another long red candle.
Tweezer Top: A two-candle reversal pattern in an uptrend with nearly identical highs.
Dark Cloud Cover: A two-candle reversal pattern in an uptrend with a green candle followed by a red candle opening above the high and closing below the midpoint.
Downside Tasuki Gap: A three-candle continuation pattern in a downtrend with a gap between the first two red candles and a green candle closing partially into the gap.
Evening Doji Star: A three-candle reversal pattern with a long green candle, a doji gapping up, and a long red candle.
Doji Star (Bearish): A two-candle reversal pattern in an uptrend with a long green candle followed by a doji gapping up.
Hanging Man: A single-candle reversal pattern in an uptrend with a small body and a long lower shadow.
Shooting Star: A single-candle reversal pattern in an uptrend with a small body and a long upper shadow.
Evening Star: A three-candle reversal pattern with a long green candle, a short candle gapping up, and a long red candle.
Marubozu Black: A single-candle pattern with a long red body and minimal shadows.
Gravestone Doji: A single-candle reversal pattern in an uptrend with a doji where open and close are at the low.
Harami Cross (Bearish): A two-candle reversal pattern in an uptrend with a long green candle followed by a doji inside its body.
Harami (Bearish): A two-candle reversal pattern in an uptrend with a long green candle followed by a small red candle inside its body.
Long Upper Shadow: A single-candle pattern with a long upper shadow indicating seller strength.
Three Black Crows: A three-candle reversal pattern with three long red candles in an uptrend.
Engulfing (Bearish): A two-candle reversal pattern in an uptrend with a small green candle followed by a larger red candle engulfing it.
Abandoned Baby (Bearish): A three-candle reversal pattern with a long green candle, a doji gapping up, and a red candle gapping down.
Tri-Star (Bearish): A three-candle reversal pattern with three doji candles in an uptrend, with gaps between them.
Kicking (Bearish): A two-candle reversal pattern with a bullish marubozu followed by a bearish marubozu gapping down.
Neutral Patterns:
Doji: A single-candle pattern with a very small body, indicating indecision.
Spinning Top White: A single-candle pattern with a small green body and long upper and lower shadows, indicating indecision.
Spinning Top Black: A single-candle pattern with a small red body and long upper and lower shadows, indicating indecision.
Pattern Detection Functions
Each pattern detection function evaluates specific conditions based on candlestick properties (from calculateCandleProperties) and trend conditions (from detectTrend). The functions return:
detected (bool): True if the pattern is detected.
name (string): The name of the pattern (e.g., "On Neck").
type (string): The pattern type ("Bullish", "Bearish", or "Neutral").
description (string): A detailed description of the pattern for use in tooltips or alerts.
For example, the detectOnNeckBearish function checks for a bearish On Neck pattern by verifying a downtrend, a long red candle followed by a short green candle, and specific price relationships.
Usage Example
To use the library in a TradingView indicator, you can import it and call its functions as shown below:
//@version=6
indicator("Candlestick Pattern Detector", overlay=true)
import CandlestickPatternsLibrary as cp
// Calculate SMA for trend detection
sma50 = ta.sma(close, 50)
sma200 = ta.sma(close, 200)
= cp.detectTrend(true, true, "SMA50", close, sma50, sma200)
// Calculate candlestick properties
bodyAvg = ta.ema(math.max(close, open) - math.min(close, open), 14)
= cp.calculateCandleProperties(open, close, high, low, bodyAvg, 5.0, 100.0, 5.0)
// Detect a pattern (e.g., On Neck Bearish)
= cp.detectOnNeckBearish(downTrend, blackBody, longBody, whiteBody, open, close, low, bodyAvg, smallBody, candleRange)
if onNeckDetected
label.new(bar_index, low, onNeckName, style=label.style_label_up, color=color.red, textcolor=color.white, tooltip=onNeckDesc)
// Detect another pattern (e.g., Piercing Bullish)
= cp.detectPiercingBullish(downTrend, blackBody, longBody, whiteBody, open, low, close, bodyMiddle)
if piercingDetected
label.new(bar_index, low, piercingName, style=label.style_label_up, color=color.blue, textcolor=color.white, tooltip=piercingDesc)
Steps in the Example
Import the Library: Use import CandlestickPatternsLibrary as cp to access the library's functions.
Calculate Trend: Use detectTrend to determine the market trend based on SMA50 or SMA50/SMA200 rules.
Calculate Candlestick Properties: Use calculateCandleProperties to compute properties like body size, shadow lengths, and doji status.
Detect Patterns: Call specific pattern detection functions (e.g., detectOnNeckBearish, detectPiercingBullish) and use the returned values to display labels or alerts.
Visualize Patterns: Use label.new to display detected patterns on the chart with their names, types, and descriptions.
Key Features
Modularity: The library is designed as a standalone module, making it easy to integrate into other Pine Script projects.
Comprehensive Pattern Coverage: Supports over 40 candlestick patterns, covering bullish, bearish, and neutral formations.
Detailed Documentation: Each function includes comments with @param and @returns annotations for clarity.
Reusability: Can be used in indicators, strategies, or alerts by importing the library and calling its functions.
Extracted from All Candlestick Patterns: The library is derived from the All Candlestick Patterns indicator, ensuring it inherits a well-tested foundation for pattern detection.
Notes for Developers
Pine Script Version: The library uses Pine Script version 6, as specified by //@version=6.
Parameter Naming: Parameters use prefixes like p_ (e.g., p_open, p_close) to avoid conflicts with built-in variables.
Error Handling: The library has been fixed to address issues like undeclared identifiers (C_SmallBody, C_Range), unused arguments (factor), and improper comment formatting.
Testing: Developers should test the library in TradingView to ensure patterns are detected correctly under various market conditions.
Customization: Users can adjust parameters like bodyAvg, shadowPercent, shadowEqualsPercent, and dojiBodyPercent in calculateCandleProperties to fine-tune pattern detection sensitivity.
Conclusion
The Candlestick Patterns Library, extracted from the All Candlestick Patterns indicator, is a powerful tool for traders and developers looking to implement candlestick pattern detection in TradingView. Its modular design, comprehensive pattern support, and detailed documentation make it an ideal choice for building custom indicators or strategies. By leveraging the library's functions, users can analyze market trends, compute candlestick properties, and detect a wide range of patterns to inform their trading decisions.
INTELLECT_city - Quarters - Q1-Q2-Q3-Q4Quarters - Q1-Q2-Q3-Q4
Quarter dates.
Sometimes it is useful to find patterns when a quarter ends.
Alerta Caída Brusca + Confirmación de VolumenTechnical Components of the Indicator
EMA 9 vs EMA 21
Detects momentum shifts via exponential moving average crossovers.
When EMA 9 crosses below EMA 21, it is interpreted as a bearish signal.
Bollinger Band Compression
Identifies periods of low volatility (tight bands).
A breakout following this compression typically precedes sharp and fast price moves.
Ichimoku Cloud (Kumo Breakout)
If the price closes below the Kumo (Ichimoku cloud), it indicates structural bearish pressure.
This confirms the loss of key technical support.
RSI (Relative Strength Index)
A reading below 45 signals price weakness and low buying pressure.
🛑 Conditions to Trigger a Sell Signal
A sell signal is generated when all of the following conditions occur simultaneously:
Bollinger Bands show compression (low volatility).
EMA 9 crosses below EMA 21 (bearish crossover).
Price breaks below the Ichimoku cloud (Kumo).
RSI is below 45, confirming weak buying momentum.
When these conditions are met, a "SELL" label is visually projected on the corresponding candle.
📈 Usage Recommendations
Recommended timeframes: 5 minutes, 15 minutes, or 1 hour.
Useful for anticipating drops, avoiding late entries, and detecting technical breakdowns.
Can be combined with volume, candlestick patterns, or liquidity zones for higher accuracy.
INTELLECT_city - Bitcoin Genesis Block DayBitcoin Genesis Block Day is celebrated on January 3 each year, commemorating the creation of the first block in the Bitcoin blockchain, known as the genesis block, by Satoshi Nakamoto on January 3, 2009. This block, block 0, marked the official launch of the Bitcoin network, embedding a message in its coinbase transaction: "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks," referencing a headline from The Times newspaper. This message highlighted Bitcoin’s purpose as a decentralized alternative to centralized financial systems amid the 2008 financial crisis.
The genesis block is unique because it’s hardcoded into the Bitcoin protocol and cannot be spent, containing 50 BTC that remain unspendable. It established the foundation for Bitcoin’s blockchain, with subsequent blocks building upon it through cryptographic hashing. The day symbolizes the birth of cryptocurrency and is celebrated by the crypto community as a milestone in financial and technological innovation.