ChartPatternSetupsLibrary   "ChartPatternSetups" 
 detectSymmetricalTriangle(lookback) 
  Detects a Symmetrical Triangle (Bullish or Bearish) and provides trade levels.
  Parameters:
     lookback (int) : Number of bars to look back for pivots.
  Returns: Tuple of (isBullish, isBearish, entry, sl, tp).
 detectAscendingTriangle(lookback) 
  Detects an Ascending Triangle (Bullish) and provides trade levels.
  Parameters:
     lookback (int) : Number of bars to look back for pivots.
  Returns: Tuple of (isDetected, entry, sl, tp).
 detectDescendingTriangle(lookback) 
  Detects a Descending Triangle (Bearish) and provides trade levels.
  Parameters:
     lookback (int) : Number of bars to look back for pivots.
  Returns: Tuple of (isDetected, entry, sl, tp).
 detectFallingWedge(lookback) 
  Detects a Falling Wedge (Bullish) and provides trade levels.
  Parameters:
     lookback (int) : Number of bars to look back for pivots.
  Returns: Tuple of (isDetected, entry, sl, tp).
 detectRisingWedge(lookback) 
  Detects a Rising Wedge (Bearish) and provides trade levels.
  Parameters:
     lookback (int) : Number of bars to look back for pivots.
  Returns: Tuple of (isDetected, entry, sl, tp).
ابحث في النصوص البرمجية عن "tp"
Breakout Support & Resistance SwiftEdgeBreakout Support & Resistance
The Breakout  is a technical analysis tool designed to identify breakout opportunities in the market by detecting price movements through support and resistance levels. It plots potential entry points, stop-loss (SL), and take-profit (TP) levels based on user-defined percentages, helping traders visualize breakout setups on their charts.
How It Works
Support and Resistance Detection: The indicator uses pivot points to identify support and resistance levels over a user-defined lookback period.
Breakout Identification: A breakout is confirmed when the price crosses above a resistance level (bullish) or below a support level (bearish) and remains there for a specified number of bars.
Entry, SL, and TP Levels: Upon a confirmed breakout, the indicator sets an entry point at the closing price and calculates SL, TP1, and TP2 levels based on user-defined percentages.
Directional Filtering: To avoid conflicting signals, the indicator filters breakouts based on the current trade direction. A new entry in the opposite direction is only set if the price moves a user-defined percentage away from the previous entry or if the previous trade hits its SL, TP1, or TP2.
Visuals: The indicator plots support and resistance lines, breakout labels, and entry/SL/TP levels on the chart. Users can choose to display only the latest entry or up to 5 recent entries.
Features
Customizable Settings: Adjust the lookback period for pivot points, breakout confirmation bars, SL/TP percentages, and more.
Directional Change Control: A direction change is indicated when the price moves significantly in the opposite direction, helping to manage trend reversals.
Multiple Entry Display: Option to show up to 5 recent entries for tracking multiple breakouts.
Alerts: Receive alerts when a breakout is confirmed, including entry, SL, TP1, and TP2 levels.
Settings
Pivot Lookback Length: Number of bars to look back for identifying support and resistance levels (default: 5).
Breakout Confirmation Bars: Number of bars the price must stay above/below the level to confirm a breakout (default: 2).
Take Profit 1 (%): First take-profit level as a percentage above/below the entry (default: 2.0%).
Take Profit 2 (%): Second take-profit level as a percentage above/below the entry (default: 4.0%).
Stop Loss (%): Stop-loss level as a percentage below/above the entry (default: 1.0%).
Show Multiple Entries: Toggle to display up to 5 recent entries or only the latest (default: false).
Direction Change Threshold (%): Percentage the price must move away from the entry to allow a direction change (default: 2.0%).
How to Use
Add the Breakout Scanner to your chart.
Adjust the settings to match your trading style (e.g., tweak the pivot lookback or SL/TP percentages).
Watch for breakout labels ("Breakout") on the chart, indicating a confirmed breakout.
Use the plotted entry, SL, TP1, and TP2 levels to plan your trades.
Enable alerts to be notified of new breakouts in real-time.
Notes
This indicator is designed to assist with identifying breakout opportunities and does not guarantee specific results. Always combine it with other analysis and risk management techniques.
The direction change feature helps filter breakouts in the opposite direction, but significant price movements may still trigger a new entry in the opposite direction.
For best results, test the indicator on a demo account to understand its behavior in your preferred market and timeframe.
CCI with Signals & Divergence [AIBitcoinTrend]👽  CCI with Signals & Divergence (AIBitcoinTrend) 
The Hilbert Adaptive CCI with Signals & Divergence takes the traditional Commodity Channel Index (CCI) to the next level by dynamically adjusting its calculation period based on real-time market cycles using Hilbert Transform Cycle Detection. This makes it far superior to standard CCI, as it adapts to fast-moving trends and slow consolidations, filtering noise and improving signal accuracy.
Additionally, the indicator includes real-time divergence detection and an ATR-based trailing stop system, helping traders identify potential reversals and manage risk effectively.
  
 
👽  What Makes the Hilbert Adaptive CCI Unique? 
Unlike the traditional CCI, which uses a fixed-length lookback period, this version automatically adjusts its lookback period using Hilbert Transform to detect the dominant cycle in the market.
 ✅  Hilbert Transform Adaptive Lookback  – Dynamically detects cycle length to adjust CCI sensitivity.
 ✅  Real-Time Divergence Detection  – Instantly identifies bullish and bearish divergences for early reversal signals.
 ✅ Implement Crossover/Crossunder signals  tied to ATR-based trailing stops for risk management 
   
👽  The Math Behind the Indicator 
👾  Hilbert Transform Cycle Detection 
The Hilbert Transform estimates the dominant market cycle length based on the frequency of price oscillations. It is computed using the in-phase and quadrature components of the price series:
 tp = (high + low + close) / 3
smooth = (tp + 2 * tp  + 2 * tp  + tp ) / 6
detrender = smooth - smooth 
quadrature = detrender - detrender 
inPhase = detrender  + quadrature 
outPhase = quadrature  - inPhase 
instPeriod = 0.0
deltaPhase = math.abs(inPhase - inPhase ) + math.abs(outPhase - outPhase )
instPeriod := nz(3.25 / deltaPhase, instPeriod )
dominantCycle = int(math.min(math.max(instPeriod, cciMinPeriod), 500)) 
 Where: 
 
 In-Phase & Out-Phase Components are derived from a detrended version of the price series.
 Instantaneous Frequency measures the rate of cycle change, allowing the CCI period to adjust dynamically.
 The result is bounded within a user-defined min/max range, ensuring stability.
 
👽  How Traders Can Use This Indicator 
👾  Divergence Trading Strategy 
 Bullish Divergence Setup: 
 
 Price makes a lower low, while CCI forms a higher low.
 Buy signal is confirmed when CCI shows upward momentum.
 
 Bearish Divergence Setup: 
 
 Price makes a higher high, while CCI forms a lower high.
 Sell signal is confirmed when CCI shows downward momentum.
 
   
👾  Trailing Stop & Signal-Based Trading 
 Bullish Setup: 
  ✅ CCI crosses above -100 → Buy signal.
 ✅ A bullish trailing stop is placed at Low - (ATR × Multiplier).
 ✅ Exit if the price crosses below the stop. 
 Bearish Setup: 
  ✅ CCI crosses below 100 → Sell signal.
 ✅ A bearish trailing stop is placed at High + (ATR × Multiplier).
 ✅ Exit if the price crosses above the stop. 
   
👽  Why It’s Useful for Traders 
 
 Hilbert Adaptive Period Calculation  – No more fixed-length periods; the indicator dynamically adapts to market conditions.
   Real-Time Divergence Alerts  – Helps traders anticipate market reversals before they occur.
   ATR-Based Risk Management  – Stops automatically adjust based on volatility.
   Works Across Multiple Markets & Timeframes  – Ideal for stocks, forex, crypto, and futures.
 
👽  Indicator Settings 
 
 Min & Max CCI Period  – Defines the adaptive range for Hilbert-based lookback.
 Smoothing Factor  – Controls the degree of smoothing applied to CCI.
 Enable Divergence Analysis  – Toggles real-time divergence detection.
 Lookback Period  – Defines the number of bars for detecting pivot points.
 Enable Crosses Signals  – Turns on CCI crossover-based trade signals.
 ATR Multiplier  – Adjusts trailing stop sensitivity.
 
 Disclaimer: This indicator is designed for educational purposes and does not constitute financial advice. Please consult a qualified financial advisor before making investment decisions. 
Dynamic Timeframe Trend AnalyzerPurpose and Core Logic 
This indicator automatically adjusts its calculations based on the current chart’s timeframe, allowing traders to analyze trends, momentum, and mean reversion opportunities without manually changing indicator settings for each interval. It detects potential long or short setups by combining several techniques:
 
 Dynamic Timeframe Factor 
The script compares the current timeframe to a base (e.g., 5 minutes) and calculates a “factor” to scale certain parameters, such as EMA lengths or ATR settings. This reduces the need to reconfigure indicators when switching timeframes.
 Regime Detection 
It uses ADX (Average Directional Index) to classify the market as strongly trending, moderately trending, choppy, or in a potential mean-reversion phase.
RSI (Relative Strength Index) is also monitored for extreme levels (e.g., overbought/oversold) to detect potential reversal zones.
Volume is compared to a moving average to confirm or refute volatility conditions.
 Trend & Mean Reversion Signals 
EMA Alignment (8/21/55) helps identify bullish or bearish phases (strong bull if all EMAs align upward, strong bear if aligned downward).
For mean reversion opportunities, the script checks if ADX is sufficiently low (indicating weak or no trend) while price and RSI are at extreme levels—suggesting a snapback or countertrend move may occur.
 
Dynamic Stop Loss & Take Profit 
Uses ATR (Average True Range) to set initial stop-loss (SL) and take-profit (TP) levels, then adjusts these levels further with “regime multipliers” based on whether the market is in a high-volatility trend or a quieter mean-reversion environment.
This approach aims to place stops and targets in a more adaptive way, reflecting current market conditions rather than a one-size-fits-all approach.
 Visual Aids 
Color-coded chart backgrounds (e.g., greenish for bullish trend, red for bearish, yellow/orange for mean reversion).
Triangles to show recent bullish/bearish signals.
A status table in the top-right corner (optional) displaying key metrics like ADX, RSI, dynamic thresholds, current SL/TP levels, and whether a stop loss has been hit.
 How It Works Internally 
 ADX & Dynamic Thresholds: 
A moving average (adx_mean) and standard deviation (adx_std) of the ADX are calculated over a lookback period to define “strong” vs. “weak” ADX thresholds.
This allows the script to adapt to changing volatility and trend strength in different markets or timeframes.
 Mean Reversion Criteria: 
The indicator checks if price deviates significantly from its own moving average, alongside RSI extremes. If ADX suggests no strong directional push (i.e., the market is “quiet”), it may classify conditions as mean-reverting.
 Regime Multipliers: 
Once the script identifies the market regime (e.g., strong uptrend, choppy, mean reversion), it applies different multipliers to the user-defined base values for stop-loss and take-profit. For instance, strong trending conditions might allow for wider stops to handle volatility, while mean reversion signals use tighter exits to capture quick reversals.
 How to Use It
 Timeframe Agnostic
Simply apply it to any timeframe (from 1-minute up to daily or weekly). The “Dynamic Timeframe Factor” will scale the indicator parameters automatically.
 Look for Buy/Sell Triangles 
When the script detects a valid bullish trend shift or a mean-reversion long setup, it plots a green triangle under the price bar. Conversely, it plots a red triangle above the price bar for bearish or mean-reversion short setups.
 Check the Status Table 
The table in the top-right corner summarizes the indicator’s current readings: ADX, RSI, volume trends, and the market regime classification.
The table also shows if a stop loss has been hit (SL Hit) and displays recommended SL/TP levels if a signal is active.
 Stop Loss & Take Profit 
The script plots lines for SL and TP on your chart after a new signal. These lines are automatically adjusted based on ATR, volume conditions, and ADX-derived multipliers.
 Mean Reversion vs. Trend-Following 
If you see a “Mean Rev” state in the table or the background turning yellow/orange, it suggests potential countertrend trades. Conversely, “STRONG BULL” or “STRONG BEAR” states favor momentum-based entries in the prevailing direction.
 Originality & Benefits 
Adaptive to Timeframe: Many indicators require reconfiguration when switching from short to long timeframes. This script automates that process using the “timeframe factor” logic.
Regime-Based SL/TP: Instead of fixed risk parameters, the script dynamically tunes stop and target levels depending on whether the market is trending or reverting.
Comprehensive Market View: It combines multiple factors—ADX, RSI, volume, moving averages, and volatility measurements—into a single, integrated framework that categorizes the market regime in real time.
 Best Practices & Notes 
Timeframes: It typically performs well on intraday timeframes (5m, 15m, 1H) but can also be used for swing trading on 4H or Daily charts.
Settings: The defaults are a good starting point, but you can adjust the base ATR multiplier or ADX lookbacks if you prefer a different balance between sensitivity and stability.
Risk Management: This indicator is not a guarantee of any specific results. Always use proper risk management (position sizing, stop-losses, and diversified strategies).
Alert Conditions: Built-in alert conditions can notify you when a new long or short signal appears, or when a stop loss is triggered.
Stop Loss & TargetHow to Use the SL/TP Indicator
The SL/TP indicator is a versatile tool designed for traders to easily visualize entry, stop-loss (SL), and take-profit (TP) levels on their charts. This guide will walk you through the steps to configure and use the indicator effectively.
Features:
Configure Long Trades and Short Trades independently.
Define Entry Price, Stop Loss, and up to three Take Profit levels for each trade.
Customize line colors for better visualization.
Works for both risk-reward and target-based trading.
Adding the Indicator:
Open the TradingView platform.
Search for the indicator name: SL/TP.
Click the Add to Chart button to apply it.
Configuration:
1. Long Trade Settings
Enable Long Trade: Check this option to activate long trade lines on the chart.
Long Entry Price: Input the price at which you plan to enter the long trade.
Long Stop Loss: Input your stop-loss level for the long trade.
Line Colors: You can customize the colors for the Entry, SL, and TP lines in the Long Trade settings group.
Take Profit Levels (Calculated Automatically):
TP1: 1:1 Risk-Reward ratio (difference between Entry and SL added to Entry).
TP2: 1:2 Risk-Reward ratio.
TP3: 1:3 Risk-Reward ratio.
2. Short Trade Settings
Enable Short Trade: Check this option to activate short trade lines on the chart.
Short Entry Price: Input the price at which you plan to enter the short trade.
Short Stop Loss: Input your stop-loss level for the short trade.
Line Colors: You can customize the colors for the Entry, SL, and TP lines in the Short Trade settings group.
Take Profit Levels (Calculated Automatically):
TP1: 1:1 Risk-Reward ratio (difference between Entry and SL subtracted from Entry).
TP2: 1:2 Risk-Reward ratio.
TP3: 1:3 Risk-Reward ratio.
Visualizing on the Chart:
Once you configure the settings and enable the trade, the indicator will draw horizontal lines on the chart for:
Entry Price
Stop Loss
Take Profit Levels (TP1, TP2, TP3)
Each line will extend to three bars ahead of the current bar index.
Customization:
Adjust colors for better visibility depending on your chart theme.
The width and style of lines can also be modified in the source code if needed.
Example Usage:
Long Trade Example:
Enable Long Trade: Check the box.
Set Entry Price: 100.
Set Stop Loss: 95.
The indicator will draw the following lines:
Entry Line: At 100 (customizable color).
Stop Loss Line: At 95 (customizable color).
TP1 Line: At 105 (1:1 Risk-Reward).
TP2 Line: At 110 (1:2 Risk-Reward).
TP3 Line: At 115 (1:3 Risk-Reward).
Short Trade Example:
Enable Short Trade: Check the box.
Set Entry Price: 200.
Set Stop Loss: 205.
The indicator will draw the following lines:
Entry Line: At 200 (customizable color).
Stop Loss Line: At 205 (customizable color).
TP1 Line: At 195 (1:1 Risk-Reward).
TP2 Line: At 190 (1:2 Risk-Reward).
TP3 Line: At 185 (1:3 Risk-Reward).
Notes:
Ensure that you input valid and realistic price levels for Entry and Stop Loss.
The indicator will only display lines if both the Entry Price and Stop Loss are non-zero.
Use this indicator for planning trades visually but always confirm levels with your trading strategy.
Disclaimer: This indicator is a tool to assist in trading. Use it with proper risk management and your own due diligence.
Lot Size & Risk Calculator (All Pairs)this indicator is designed to simplify and optimize risk management. It automatically calculates the ideal lot size based on your account balance, risk percentage, and defined entry and exit levels. Additionally, it includes visual tools to represent stop-loss (SL) and take-profit (TP) levels, helping you trade with precision and consistency.
WHAT IS THIS INDICATOR FOR?
This indicator is essential for traders who want to:
 
 Maintain consistent risk in their trades.
 Quickly calculate lot sizes for Forex, XAUUSD, BTCUSD, and US100.
 Visualize key levels (Entry, SL, and TP) on the chart.
 Monitor potential losses and gains in real time.
 
 COMPATIBLE ASSETS 
The Lot Size Calculator works with the following assets:
 
 Forex: Standard currency pairs.
 XAUUSD: Gold versus the US dollar.
 BTCUSD: Bitcoin versus the US dollar.
 US100: Nasdaq 100 index.
 
Calculations adjust automatically based on the selected asset.
 TAKE-PROFIT (TP) LEVELS 
  
The indicator allows you to define up to three take-profit levels:
 
 TP1
 TP2
 TP3
 .
Each level is configurable based on your exit strategy.
 DASHBOARD 
  
The dashboard is a visual tool that consolidates key information about your trade:
 
 Account balance: Total amount available in your account.
 Lot size: Calculated based on your risk and parameters.
 Potential loss (SL): Amount you could lose if the price hits your stop-loss.
 Potential gain (TP): Expected profit if the take-profit level is reached.
 
 
SETTINGS 
  
The indicator offers multiple configurable options to adapt to your trading style:
Levels
 
 Entry: Initial trade price.
 Stop-Loss (SL): Maximum allowed loss level.
 Take-Profit (TP): Up to three configurable levels.
 
 Risk Management
 
 Account balance ($): Enter your total available balance.
 Risk percentage: Define how much you're willing to risk per trade
 .
 Visual Options
 
 Visualization style: Choose between simple lines or visual fills.
 Colors: Customize the colors of lines and labels.
 
Dashboard Settings
 
 Statistics: Enable or disable key data display.
 Size and position: Adjust the dashboard's size and location on the chart.
 
HOW TO CHANGE AN ENTRY?
 
 Open the indicator settings in TradingView and entering the new data manually
 Removing and re-adding the indicator to the chart
SL ManagerSTOP LOSS MANAGER 
 Overview: 
The "SL Manager" indicator is designed to assist traders in managing their stop loss (SL) and take profit (TP) levels for both long and short positions. This tool helps you visualize intermediate levels, enhancing your trading decisions by providing crucial information on the chart.
 Usage: 
This indicator is particularly useful for traders who want to manage their trades more effectively by visualizing potential adjustment points for their stop loss and take profit levels. It helps in making informed decisions to maximize profits and minimize risks by providing clear levels to take partial profits and adjust stop losses.
 Features: 
 Position Input:  Select between "long" and "short" positions.
 Entry Price:  Specify the entry price of your trade.
 Take Profit:  Define the price level at which you want to take profit.
 Stop Loss:  Set the stop loss price level to manage your risk.
 Intermediate Levels: 
For both long and short positions, the indicator calculates and plots the following intermediate levels:
 50% Take Profit (TP 50%):  Midway between the entry price and the take profit level, where you can take partial profits and move your SL up to the 25% mark.
 75% Take Profit (TP 75%):  Three-quarters of the way from the entry price to the take profit level, where you can take partial profits and move your SL to breakeven.
 Stop Loss Move to 25% (SL Move to 25%):  A level where the stop loss can be adjusted to lock in profits.
 Visualization: 
The indicator plots the calculated levels directly on the chart, provided the data for the current day is available. Different color codes and line styles distinguish between the various levels:
 TP 50% and TP 75%  are plotted in  green. 
 SL Move to 25%  is plotted in  red .
 Entry/Breakeven  is plotted in  blue.
Tetuan SniperThe TEMA and EMA Crossover Alert with SL, TP, and Order Signal strategy combines the power of Triple Exponential Moving Average (TEMA) and Exponential Moving Average (EMA) to generate high-quality trading signals. This strategy is designed to provide clear entry and exit points, manage risk through dynamic Stop Loss (SL) and Take Profit (TP) levels, and optimize trade sizes based on account balance and risk tolerance.
Key Features:
EMA and TEMA Crossover:
The strategy identifies potential buy and sell signals based on the crossover of EMA and TEMA. A buy signal is generated when TEMA crosses above EMA, and a sell signal is generated when TEMA crosses below EMA.
Dynamic Stop Loss (SL) and Take Profit (TP):
Stop Loss levels are dynamically set based on a user-defined number of pips below (for buy orders) or above (for sell orders) the lowest or highest point since the crossover.
Take Profit levels are dynamically adjusted using another TEMA, providing a flexible exit strategy that adapts to market conditions.
Lot Size Calculation:
The strategy calculates the optimal lot size based on the account balance, risk percentage per trade, and the number of maximum open orders. For JPY pairs, the lot size is adjusted by dividing by 100 to account for the different pip value.
The lot size is rounded to two decimal places for better readability and precision.
Visual Alerts and Labels:
Clear visual alerts and labels are provided for each buy and sell signal, including the recommended SL, TP, and lot size. The labels are placed in a way to avoid overlapping important chart elements.
Trend Visualization:
The area between the TEMA and EMA is colored to indicate the trend, with green for bullish trends and red for bearish trends, making it easy to visualize the market direction.
Inputs:
SL Points: Number of pips for the Stop Loss.
EMA Period: Period for the Exponential Moving Average.
TEMA Period: Period for the Triple Exponential Moving Average.
Account Balance: The total account balance for calculating the lot size.
Risk Percentage: The percentage of the account balance to risk per trade.
Take Profit TEMA Period: Period for the TEMA used to set Take Profit levels.
Lot per Pip Value: The value of 1 pip per lot.
Maximum Open Orders: The maximum number of open orders to split the balance among.
Example Usage
This strategy is suitable for traders who want to automate their trading signals and manage risk effectively. By combining TEMA and EMA crossovers with dynamic SL and TP levels and precise lot size calculation, traders can achieve a disciplined and methodical approach to trading.
Alert Sender Library [TradingFinder]Library   "AlertSenderLibrary_TradingFinder" 
🔵 Introduction 
The "Alert Sender Library" is a management and production program for "Alert Messages" that enables the creation of unique messages for any type of signal generated by indicators or strategies.
These messages include the direction of the signal, symbol, time frame, the date and time the condition was triggered, prices related to the signal, and a personal message from you. To make better and more optimal use of this "library", you should carefully study " Key Features" and "How to Use".
🔵 Key Features 
 Automatic Detection of Appropriate Type :
Using two parameters, "AlertType" and "DetectionType", which you must enter at the beginning into the "AlertSender" function, the type of the alert message is determined. 
For example, if you select one of the "DetectionType"s such as "Order Block Signal", "Signal", and "Setup", your alert type will be chosen based on "Long" and "Short". Whether it's "Long" or "Short" depends on the "AlertType" you have set to either "Bullish" or "Bearish".
 Automatic Symbol Detection :
Whenever you add an alert for a specific symbol, if you want the name of that symbol to be in your message text, you must manually write the name of the symbol in your message. One of the capabilities of the "Alert Sender" is the automatic detection of the symbol and adding it to the message text.
 Automatic Time Frame Detection :
When adding your alert, the "Alert Sender" detects the time frame of the symbol you intend to add the alert for and adds it to the text. This feature is very practical and can prevent traders from making mistakes. 
For example, a trader might add alerts for a specific symbol using a specific indicator in different time frames, taking the main signal in the 1-hour time frame and only a confirmation signal in the 15-minute time frame. This feature helps to identify in which time frame the signal is set.
 Detection of Date and Time When the Signal is Triggered :
You can have the date and time at the moment the message is sent. This feature has various uses. For example, if you use the Webhook URL feature to send messages to a Telegram channel, there might be issues with alert delivery on your server, causing delays, and you might receive the message when it has lost its validity.
 With this feature, you can match the sending time of the message from TradingView with the receipt time in your messenger and detect if there is a delay in message delivery.
 Important :
You can also set the Time Zone you wish to receive the date and time based on.
 Display of "Key Prices" :
Key prices can vary based on the type of signals. For example, when the "DetectionType" is in "Order Block Signal" mode, the key prices are the "Distal" and "Proximal" prices. Or if the "DetectionType" is in "Setup" mode, the key prices are "Entry", "Stop Loss", and "Take Profit".
 Receipt of Personal "Messages" :
You can enter your personal message using "input.string" or "input.text_area" in addition to the messages that are automatically created.
 Beautiful and Functional Display of Messages :
The titles of messages sent by "AlertSender" are displayed using related emojis to prevent mistakes due to visual errors, enhancing beauty.
  
  
🔵 How to Use 
🟣 Familiarity with Function and Parameters 
 AlertSender(Condition, Alert, AlertName, AlertType, DetectionType, SetupData, Frequency, UTC, MoreInfo, Message, o, h, l, c, Entry, TP, SL, Distal, Proximal)
 Parameters:
  - Condition (bool)
  - Alert (string)
  - AlertName (string)
  - AlertType (string)
  - DetectionType (string)
  - SetupData (string)
  - Frequency (string)
  - UTC (string)
  - MoreInfo (string)
  - Message (string)
  - o (float)
  - h (float)
  - l (float)
  - c (float)
  - Entry (float)
  - TP (float)
  - SL (float)
  - Distal (float)
  - Proximal (float) 
To add "Alert Sender Library", you must first add the following code to your script.
 import TFlab/AlertSenderLibrary_TradingFinder/1 
🟣 Parameters 
 "Condition" : This parameter is a Boolean. You need to set it based on the condition that, when met (or fired), you want to receive an alert. The output should be either "true" or "false".
 "Alert" : This parameter accepts one of two inputs, "On" or "Off". If set to "On", the alarm is active; if "Off", the alarm is deactivated. This input is useful when you have numerous alerts in an indicator or strategy and need to activate only a few of them. "Alert" is a string parameter.
 Alert = input.string('On', 'Alert',  , 'If you turn on the Alert, you can receive alerts and notifications after setting the "Alert".', group = 'Alert') 
 "AlertName" : This is a string parameter where you can enter the name you choose for your alert.
 AlertName = input.string('Order Blocks Finder  ', 'Alert Name', group = 'Alert') 
 "AlertType" : The inputs for this parameter are "Bullish" or "Bearish". If the condition selected in the "Condition" parameter is of a bullish bias, you should set this parameter to "Bullish", and if the condition is of a bearish bias, it should be set to "Bearish". "AlertType" is a string parameter.
 "DetectionType" : This parameter's predefined inputs include "Order Block Signal", "Signal", "Setup", and "Analysis". You may provide other inputs, but some functionalities, like "Key Price", might be lost. "DetectionType" is a string parameter.
 "SetupData" : 
If "DetectionType" is set to "Setup", you must specify "SetupData" as either "Basic" or "Full". In "Basic" mode, only the "Entry" price needs to be defined in the function, and "TP" (Take Profit) and "SL" (Stop Loss) can be any number or NA. In "Full" mode, you need to define "Entry", "SL", and "TP". "Setup" is a string parameter.
 "Frequency" : This string parameter defines the announcement frequency. Choices include: "All" (activates the alert every time the function is called), "Once Per Bar" (activates the alert only on the first call within the bar), and "Once Per Bar Close" (the alert is activated only by a call at the last script execution of the real-time bar upon closing). The default setting is "Once per Bar".
 Frequency = input.string('Once Per Bar', 'Message Frequency',  , 'The triggering frequency. Possible values are: All (all function calls trigger the alert), Once Per Bar (the first function call during the bar triggers the alert), Per Bar Close (the function call triggers the alert only when it occurs during the last script iteration of the real-time bar, when it closes). The default is alert.freq_once_per_bar.', group = 'Alert') 
 "UTC" : With this parameter, you can set the Time Zone for the date and time of the alert's dispatch. "UTC" is a string parameter and can be set as "UTC-4", "UTC+1", "UTC+9", or any other Time Zone.
 UTC = input.string('UTC', 'Show Alert time by Time Zone', group = 'Alert') 
 "MoreInfo" : This parameter can take one of two inputs, "On" or "Off", which are strings. Additional information, including "Time" and "Key Price", is included. If set to "On", this information is received; if "Off", it is not displayed in the sent message.
 MoreInfo = input.string('On', 'Display More Info',  , group = 'Alert') 
 "Message" : This parameter captures the user's personal message through an input and displays it at the end of the sent message. It is a string input.
 MessageBull = input.text_area('Long Position', 'Long Signal Message', group = 'Alert') MessageBear = input.text_area('Short Position', 'Short Signal Message', group = 'Alert') 
 "o"  (Open Price): A floating-point number representing the opening price of the candle. This input is necessary when the "DetectionType" is set to "Signal". Otherwise, it can be any number or "na".
 "h"  (High Price): A float variable for the highest price of the candle. Required when "DetectionType" is "Signal"; in other cases, any number or "na" is acceptable.
 "l"  (Low Price): A float representing the lowest price of the candle. This field must be filled if "DetectionType" is "Signal". If not, it can be any number or "na".
 "c"  (Close Price): A floating-point variable indicating the closing price of the candle. Needed for "Signal" type detections; otherwise, it can take any value or "na".
 "Entry" : A float variable indicating the entry price into a trading setup. This is relevant when "DetectionType" is in "Setup" mode. In other scenarios, it can be any number or "na". It denotes the price at which the trade setup is entered.
 "TP"  (Take Profit): A float that is necessary when "DetectionType" is "Setup" and "SetupData" is "Full". Otherwise, it can be any number or "na". It signifies the price target for taking profits in a trading setup.
 "SL"  (Stop Loss): A float required when "DetectionType" is "Setup" and "SetupData" is "Full". It can be any number or "na" in other cases. This value represents the price at which a stop loss is set to limit losses.
 "Distal" : A float important for "Order Block Signal" detection. It can be any number or "na" if not in use. This variable indicates the price reaching the distal line of an order block.
 "Proximal" : A float needed for "Order Block Signal" detection mode. It can take any value or "na" otherwise. It marks the price reaching the proximal line of an order block.
CCI based support and resistance strategy
 WARNING: 
Commissions and slippage has not been considered! Don’t take it easy adding commissions and slippage could turns a fake-profitable strategy to a real disaster.
We consider account size as 10k and we enter 1000 for each trade.
Less than 100 trades is too small sample community and it’s not reliable, Also the performance of the past do not guarantee future performance. This result was handpicked by author and will differ by other timeframes, instruments and settings.
 *PLEASE SHARE YOUR SETTINGS THAT WORK WITH THE COMMUNITY. 
 Introduction: 
The CCI-based dynamic support and resistance is a "Bands and Channels" kind of indicator consisting an upper and lower band. This is a strategy which uses CCI-based (Made by me) indicator to execute trades.
SL and TP are calculated based on max ATR during last selected time period. You can edit strategy settings using "Ksl", "Ktp" and the other button for time period. “KSL” and “KTP” are 2.5 and 5 by default.
Bands are calculated regarding CCI previous high and low pivot. CCI length, right pivot length and left pivot length are 50.
A dynamic support and resistance has been calculated using last upper-cci minus a buffer and last lower-cci plus the buffer. The buffer is 10.
If "Trend matter?" button is on you can detect trend by color of the upper and lower line. Green is bullish and red is bearish! "Trend matter?" is on.
The "show mid?" button makes mid line visible, which is average of upper and lower lines, visible. The button is not active by default.
Reaction to the support could be a buy signal while a reaction to the resistance could interpreted as a sell signal.
 How this strategy work? 
Donald Lambert, a technical analyst, created the CCI, or Commodity Channel Index, which he first published in 1980. CCI is calculated regarding CCI can be used both as trend-detector or an oscillator. As an oscillator most traders believe in static predefined levels. Overbought and oversold candles which are clear in the chart could be used as sell and buy signals.
During my trading career I’ve noticed that there might be some reversal points for the CCI. I believe CCI could have to potential to reverse more from lately reversal point. Of course, just like other trading strategies we are talking about probabilities. We do not expect a win trade each time.
On price chart
Now this the question! What price should the instrument reach that CCI turns to be equal to our reversing aim for CCI? Imagine we have found last important bearish reversal of CCI in 200. Now, if we need the CCI to be 200 what price should we wait for?
How to calculate?
This is the CCI formula:
CCI = (Typical Price - SMA of TP) / (0.015 x Mean Deviation)
Where, Typical Price (TP) = (High + Low + Close)/3
For probable reversing points, high and low pivots of 50 bars have been used.
So we do have an Upper CCI and a Lower CCI. They are valid until the next pivot is available.
By relocating factors in CCI formula you can reach the “Typical Price”.
“
Typical Price = CCI (0.015 * Mean Deviation) + SMA of TP
So we could have a Support or Resistance by replacing CCI with Upper and Lower CCI.
A buy signal is valid if the trend is bullish (or “trend matter” is off) and lowest low of last 2 candles is lower than support and close is greater than both support and open.
A Sell signal is produced in opposite situation.
There are 2+1 options for trend!
Trend matter box is on by default, which means we’ll just open trades in direction of the trend. It’s available to turn it off.
Other 2 options are cross and slope. Cross calculated by comparing fast SMA and slow SMA. The slope one differentiate slow SMA to last “n” one.
Considering last day and today highest ATR as the ATR to calculating SL and TP is our unique technique.
Euclidean Distance Predictive Candles [SS]Finally releasing this, its been in the works for the past 2 weeks and has undergone many iterations.
I am not sure if I am 100% happy with it yet, but I guess its best to release and get feedback to make improvements.
So this is the Euclidean distance predictive candle indicator and what it does is exactly what it sounds like, it uses Euclidean distance to identify similar candles and then plot the candles and range that immediately proceeded like candles. 
While this is using a general machine learning/data science approach (Euclidean distance), I do not employ the KNN (Nearest Neighbors) algo into this. The reason being is it simply offered no predictive advantage than isolating for the last case. I tried it, I didn't like it, the results were not improve and, at times, acutally hindered so I ditched it. Perhaps it was my approach but using some other KNN indicators, I just don't really find them all that more advantageous to simply relying on the Law of Large Numbers and collecting more data rather than less data (which we will get into later in this explanation).
So using this indicator: 
There is a lot of customizability here. And the reason is, not all settings are going to work the same for all tickers. To help you narrow down your parameters, I have included various backtest results that show you how the model is performing. You see in the AMZN chart above, with the current settings, it is performing optimally, with a cumulative range pass of 99% (meaning that, of all the cases, the indicator accurately predicted the next day high OR low range 99% of the time), and the ability to predict the candle slightly over 52%. 
The recommended settings, from me, are as follows:
So these are generally my recommended settings.
 Euclidian Tolerance:  This will determine the parameters to look for similar candles. In general, the lower the tolerance, the greater the precision.  I recommend keeping it between 0.5, for tickers with larger prices (like ES1! futures or NQ1!) or 0.05 for tickers with lower TPs, like SPY or QQQ. 
If the ED Tolerance is too extreme that the indicator cannot find identical setups, it will alert you:
But in general, the more precise you can get it, the better. 
 Anchor Type:   You will see the option to anchor by "Predicted Open" or by "Previous Close". I suggest sticking with anchoring by predicted open. All this means is, it is going to anchor your range, candle, high and low targets by the predicted open price. Anchoring by previous close will anchor by the close of yesterday. Both work okay, but in general the results from anchoring to predicted open have higher pass rates and more accurately depict the candle. 
 Euclidean Distance Measurement Type:    You can choose to measure by candle body or from high to low wicks. I haven't played around with measuring from high to low wicks all that much, because candle body tends to do the job. But remember, ED is a neutral measurement. Which means, its not going to distinguish between a red or green candle, just the formation of the candle. Thus, I tend to recommend, pragmatically, not to necessarily rely on the candle being red or green, but one the formation of the candle (where are the wicks going, are there more bearish wicks or bullish wicks) etc. Examples will follow. 
 Range Prediction Type:   You can filter the range prediction type by last instance (in which, it will pull the previous identical candle and plot the next candle that followed it, adjusted for the current ranges) or "Average of All Cases". So this is where we need to talk a little bit about the law of large numbers.
In general, in statistics, when you have a huge amount of random data, the law of large numbers stipulates that, within this randomness should be repeated events. This is why sometimes chart patterns work, sometimes they don't. When we filter by the average of all cases, we are relying on the law of large numbers. In general, if you are getting good Backtest readings from Last Instance, then you don't need to use this function. But it provides an alternative insight into potential candle formations next day. Its not a bad idea to compare between the two and look for similarities and differences. 
So now that we have covered the boring details, let's get into how to use the indicator and some examples. 
So the indicator is plotting the range and candle for the next day. As such, we are not looking at the current candle being plotted, but we are looking at the previous candle (see image below for example):
The green arrow shows the prediction for Friday, along with the corresponding result. The purple arrow shows the prediction for Monday which we have yet to realize.
So remember when you are using this, you need to look at the previous candle, and not the candle that it is currently plotting with realtime data, because it is plotting for the next candle. 
If you are plotting by last instance, the indicator will tell you which day it is pulling its data from if you have opted to toggle on the demographic data:
You can see the green arrow pointing to the date where it is pulling from. This data serves as the example candle with the candle proceeding this date being the anchored candle (or the predicted candle). 
 Price Targets and Probability: 
In the chart, you can see the green arrow pointing to the green portion of the table. In this table, it will give you the current TPs. These represent the current time target price, which means, the TPs shown here are for Friday. On Monday, the table will update with the TPs for Monday, etc. If you want to view the TPs in advance, you can view them from the actual candle itself. 
Below the TPs, you see a bullish 7:6. It means, in a total of 13 cases, the next candle was bullish 7 times and bearish 6 times. Where do we see the number of cases? In the demographic table as well:
Auxiliary functions 
Because you are using the previous candle, if you want to avoid confusion, you can have the indicator plot the price targets over the predicted candle, to anchor your attention so to speak. Simply select "Label" in the "Show Price Targets" section, which will look like this:
You can also ask the indicator to plot the demographic data of Higher High, Low, etc. information. What this does is simply looks at all the cases and plots how many times higher highs, lows, lower lows, highs etc. were made:
This will just count all of the cases identified and plot the number of times higher highs, lows, etc. were made. 
Concluding Remarks 
This is a kind of complex indicator and I can appreciate it may take some getting used to.
I will try to post a tutorial video at some point next week for it, so stay tuned for that.
But this isn't designed to make your life more complicated, just to help give you insights into potential outcomes for the next day or hour or 5 minute (it can be used on all timeframes). 
If you find it helpful, great! If not, that's okay, too :-).
Please be aware, this is not my forte of indicators. I am not a data scientist or programmer. My background is in Epi and we don't use these types of data science approaches, so if you have any suggestions or critiques, feel free to share them below. 
Otherwise, I hope you enjoy!
Take care everyone and safe trades! 
 
X48 - Strategy | BreakOut & Consecutive (11in1) + Alert | V.1.2================== Read This First Before Use This Strategy ============== 
 *********** Please be aware that this strategy is not a guarantee of success and may lead to losses.
*********** Trading involves risk and you should always do your own research before making any decisions. 
 ================= Thanks Source Script and Explain This Strategy =================== 
► Description
Write a detailed and meaningful description that allows users to understand how your script is original, what it does, how it does it and how to use it
This Strategy Are Combine   Strategy and   Indicators   Alert Function For Systematic Trading User.
  Strategy List, Thanks For Original Source Script  ,  From Tradingview Build-in Script   From fmzquant Github 
//   Channel BreakOut Strategy : Calculate BreakOut Zone For Buy and Sell.
//   Consecutive Bars UP/Down Strategy : The consecutive bars up/down strategy is a trading strategy used to identify potential buy and sell signals in the stock market. This strategy involves looking for a series of bars (or candles) that are either all increasing or all decreasing in price. If the bars are all increasing, it can be a signal to buy, and if the bars are all decreasing, it can be a signal to sell. This strategy can be used on any timeframe, from a daily chart to an intraday chart.
//   15m Range Length SD : Range Of High and Low Candle Price and Lookback For Calculate Buy and Sell.
  Indicators Are Simple Source Script (Almost I'm Chating With CHAT-GPT and Convert pinescript V4 to V5 again for complete almost script and combine after) 
//   SwingHigh and SwingLow Plot For SL (StopLoss by Last Swing).
//   Engulfing and 3 Candle Engulfing Plot.
//   Stochastic RSI for Plot and Fill Background Paint and Plot TEXT For BULL and BEAR TREND.
//   MA TYPE MODE are plot 2 line of MA Type (EMA, SMA, HMA, WMA, VWMA) for Crossover and Crossunder.
//   Donchian Fans MODE are Plot Dot Line With Triangle Degree Bull Trend is Green Plot and Bear Trend is Red Plot.
//   Ichimoku Cloud Are Plot Cloud A-B For Bull and Bear Trend.
//   RSI OB and OS for TEXT PLOT 'OB' , 'OS' you will know after OB and OS, you can combo with other indicators that's make you know what's the similar trend look like?
//   MACD for Plot Diamond when MACD > 0 and MACD < 0, you can combo with other indicators that's make you know what's the similar trend look like?
  Alert Can Alert Sent When Buy and Sell or TP and SL, you can adjust text to alert sent by your self or use default setting. 
 ========== Let'e Me Explain How To Use This Strategy ============= 
 ========== Properties Setting ========== 
// Capital : Default : 1,000 USDT For Alot Of People Are Beginner Investor = It's Capital Your Cash For Investment
// Ordersize : Default Are Setting 5% / Order   We Call Compounded
 ========== INPUT Setting ========== 
// First Part Use Must Choose Checkbox For Use   of   Strategy and Choose TP/SL by Swing or % (can choose both)
// In Detail Of Setting Are Not Too Much, Please Read The Header Of Setting Before Change The Value
// For The Indicator In List You Want To Add Just Check ✅ From MODE Setting, It's Show On Your Chart
// You Can Custom TP/SL % You Want
 ========== ##### No trading strategy is guaranteed to be 100% successful. ###### ========= 
 For Example In My Systematic Trading 
 
 Select 1/3 Strategy Setting TP/SL % Match With Timeframe TP Long Are Not Set It's Can 161.8 - 423.6% but Short Position Are Not Than 100% Just Fine From Your Aset
 Choose Indicators For Make Sure Trend and Strategy are the same way like Strategy are Long Position but MACD and Sto background is bear. that's mean this time not open position.
 Donchian Fans is Simple Support and Ressistant If You Don't Know How To Plot That's, This indicator plot a simple for you ><.
 Make Sure With Engulfing and 3 Candle Engulfing If You Don't Know, What's The Engulfing, This Indicator are plot for you too ><.
 For a Big Trend You can use Ichimoku Cloud For Check Trend, Candle Upper Than Cloud or Lower Than Cloud for Bull and Bear Trend. 
Obj_XABCD_HarmonicLibrary   "Obj_XABCD_Harmonic" 
Harmonic XABCD Pattern object and associated methods. Easily validate, draw, and get information about harmonic patterns. See example code at the end of the script for details.
 init_params(pct_error, pct_asym, types, w_e, w_p, w_d) 
  Create a harmonic parameters object (used by xabcd_harmonic object for pattern validation and scoring).
  Parameters:
     pct_error : Allowed % error of leg retracement ratio versus the defined harmonic ratio 
     pct_asym : Allowed leg length/period asymmetry % (a leg is considered invalid if it is this % longer or shorter than the average length of the other legs)
     types : Array of pattern types to validate (1=Gartley, 2=Bat, 3=Butterfly, 4=Crab, 5=Shark, 6=Cypher)
     w_e : Weight of ratio % error (used in score calculation, dft = 1)
     w_p : Weight of PRZ confluence (used in score calculation, dft = 1)
     w_d : Weight of Point D / PRZ confluence (used in score calculation, dft = 1)
  Returns: harmonic_params object instance. It is recommended to store and reuse this object for multiple xabcd_harmonic objects rather than creating new params objects unnecessarily.
 init(xX, xY, aX, aY, bX, bY, cX, cY, dX, dY, params, tp, p) 
  Initialize an xabcd_harmonic object instance. 
       If the pattern is valid, an xabcd_harmonic object instance is returned. If you want to specify your
       own validation and scoring parameters, you can do so by passing a harmonic_params object (params).
       Or, if you prefer to do your own validation, you can explicitly pass the harmonic pattern type (tp)
       and validation will be skipped. You can also pass in an existing xabcd_harmonic instance if you wish
       to re-initialize it (e.g. for re-validation and/or re-scoring).
  Parameters:
     xX : Point X bar index
     xY : Point X price/level
     aX : Point A bar index
     aY : Point A price/level
     bX : Point B bar index
     bY : Point B price/level
     cX : Point C bar index
     cY : Point C price/level
     dX : Point D bar index
     dY : Point D price/level
     params : harmonic_params used to validate and score the pattern. Validation will be skipped if a type (tp) is explicitly passed in.
     tp : Pattern type
     p : xabcd_harmonic object instance to initialize (optional, for re-validation/re-scoring)
  Returns: xabcd_harmonic object instance if a valid harmonic, else na
 get_name(p) 
  Get the pattern name
  Parameters:
     p : Instance of xabcd_harmonic object
  Returns: Pattern name (string)
 get_symbol(p) 
  Get the pattern symbol
  Parameters:
     p : Instance of xabcd_harmonic object
  Returns: Pattern symbol (1 byte string)
 get_pid(p) 
  Get the Pattern ID. Patterns of the same type with the same coordinates will have the same Pattern ID.
  Parameters:
     p : Instance of xabcd_harmonic object
  Returns: Pattern ID (string)
 set_target(p, target, target_lvl, calc_target) 
  Set value for a target. Use the calc_target parameter to automatically calculate the target for a specific harmonic ratio.
  Parameters:
     p : Instance of xabcd_harmonic object
     target : Target (1 or 2)
     target_lvl : Target price/level (required if calc_target is not specified)
     calc_target : Target to auto calculate (required if target is not specified)
                 Options:  
  Returns: Target price/level (float)
 erase_pattern(p) 
  Erase the pattern
  Parameters:
     p : Instance of xabcd_harmonic object
  Returns: p
 draw_pattern(p) 
  Draw the pattern
  Parameters:
     p : Instance of xabcd_harmonic object
  Returns: Pattern lines 
 
 erase_label(p) 
  Erase the pattern label
  Parameters:
     p : Instance of xabcd_harmonic object
  Returns: p
 draw_label(p, txt, tooltip, clr, txt_clr) 
  Draw the pattern label. Default text is the pattern name.
  Parameters:
     p : Instance of xabcd_harmonic object
     txt : Label text
     tooltip : Tooltip text
     clr : Label color
     txt_clr : Text color
  Returns: Label
 harmonic_params 
  Validation and scoring parameters for a Harmonic Pattern object (xabcd_harmonic)
  Fields:
     pct_error : 		Allowed % error of leg retracement ratio versus the defined harmonic ratio 
     pct_asym 
     types 
     w_e 
     w_p 
     w_d 
 xabcd_harmonic 
  Harmonic Pattern object
  Fields:
     bull : 			Bullish pattern flag 
     tp 
     xX 
     xY 
     aX 
     aY 
     bX 
     bY 
     cX 
     cY 
     dX 
     dY 
     r_xb 
     re_xb 
     r_ac 
     re_ac 
     r_bd 
     re_bd 
     r_xd 
     re_xd 
     score 
     score_eAvg 
     score_prz 
     score_eD 
     prz_bN 
     prz_bF 
     prz_xN 
     prz_xF 
     t1Hit : 		Target 1 flag
     t1 
     t2Hit 
     t2 
     sHit : 			Stop flag
     stop : 			Stop level
     entry : 		Entry level
     eHit 
     eX 
     eY 
     pLines 
     pLabel 
     pid 
     params
Ichimoku Long and Short StrategyThis is a script which tell u when all the parameters in the ichimoku are positive or negative this to open a long or short.
Conditions to show a long:
-Ichimoku cloud in green
-Price Close above Ichimoku cloud
-Lagging span above cloud
-Conversion line above base line
Conditions to show a short:
-Ichimoku cloud in red
-Price close below Ichimoku cloud
-Lagging span below cloud
-Conversion line below base line
Dont take this as principal signal to take longs and shorts. Create your own strategy and dont trust 100% in te indicator.
For highers TF use highers TP and SL and for lowest TF use lowest TP and SL.
This is te settings i use :
15M TF
Conversion line: 9
Base line: 26
Lagging span: 52
displacement: 26
TP: 5%
SL: 3%
1H TF
Conversion line: 9
Base line: 26
Lagging span: 52
displacement: 26
TP: 8%
SL: 4%
If u find better settings pls share ir with us.
TF = Time Frame
TP = Take Profit
SL = Stop Loss
---MERZI---
72s Strat: Backtesting Adaptive HMA+ pt.1This is a follow up to my previous publication of  Adaptive HMA+  few months ago, as a mean to provide some kind of initial backtesting tools. Which can be use to explore many possible strategies, optimise its settings to better conform user's pair/tf, and hopefully able to help tweaking your general strategy.
If you haven't read the study or use the indicator, kindly go  here  first to get the overall idea.
The first strategy introduce in this backtest is one most basic already described in the study; buy/sell is when movement is there and everything is on the right side; When RSI has turned to other side, we can use it as exit point (if in profit of course, else just let it hit our TP/SL, why would we exit before profit). Also, base on RSI when we make entry, we can further differentiate type of signals. --Please check all comments in code directly where the  signals ,  entries , and  exits  section are. 
Second additional strategy to check; is when we also use second faster Adaptive HMA+ for exit. So this is like a double orders on a signal but with different exit-rule (/more on this on snapshots below). Alternatively, you can also work the code so to only use this type of exit. 
There's also an additional feature which you can enable its visuals, the  Distance Zone , is to help measuring price distance to our xHMA+. It's just a simple atr based envelope really, I already put the sample code in study's comment section, but better gonna update it there directly for non-coder too, after this.
In this sample I use  Lot  for order quantity size just because that's what I use on my broker. Also what few friends use while we forward-testing it since the study is published, so we also checked/compared each profit/loss report by real number. To use default or other unit of measurement, change the entry code accordingly.
If you change your order size, you should also change the  commission  in Properties Tab. My broker commission is 5 USD per order/lot, so in there with example order size 0.1 lot I put commission 0.5$ per order (I'll put 2.5$ for 0.5 lot, 10$ for 2 lot, and so on). Crypto usually has higher charge. --It is important that you should fill it base on your broker. 
 SETTINGS 
I'm trying to keep it short. Please explore it further again. (Beginner should also first get acquaintance with terms use here.)
 
 ORDERS:  
 Base Minimum Profit Before Exit:  
The number is multiplier of ongoing ATR. Means that when basic exit condition is met, algo will check whether you're already in minimum profit or not, if not, let it still run to TP or SL, or until it meets subsequent exit condition, then it will check again.  
 Default Target Profit:  
Multiplier of ATR at signal. If reached before any  eligible exit condition  is met, exit TP.
 Base StopLoss Point:  
You can change directly in code to use other like ATR Trailing SL, fix percent SL, or whatever. In the sample, 4 options provided.
 Maximum StopLoss:  
This is like a safety-net, that if at some point your chosen SL point from input above happens to be exceeding this maximum input that you can tolerate, then this max point is the one will be use as SL.
 Activate 2nd order...:  
The additional doubling of certain buy/sell with different exits as described above. If enable, you should also set pyramiding to at least: 2. If not, it does nothing.
 ADAPTIVE HMA+ PERIOD 
Many users already have their own settings for these. So in here I only sample the default as first presented in the study. Make it to your adaptive.
 MARKET MOVEMENT 
(1) Now you can check in realtime how much slope degree is best to define your specific pair/tf is out of congestion (yellow) area. And (2) also able to check directly what ATR lengths are more suitable defining your pair's volatility.
 DISTANCE ZONE 
Distance Multiplier. Each pair/tf has its own best distance zone (in xHMA+ perspective). The zone also determine whether a signal should appear or not. (Or what  type  of signal, if you wanna go more detail in constructing your strategy)
 
 USAGE 
(Provided you already have your own comfortable settings for minimum-maximum period of Adaptive HMA+. Best if you already have backtested it manually too and/or apply as an add-on to your working strategy)
1. In our experiences, first most important to define is both elements in the  Market Movement Settings . These also tend to be persistent for whole season since it's kinda describing that pair/tf overall behaviour. Don't worry if you still get a low Profit Factor here, but by tweaking you should start to see positive changes in one of Max Drawdown and Net Profit, or Percent Profitable.
2. Afterwards, find your pair/tf  Distance Zone . When optimising this, what we seek is just a "not to bad" equity curves to start forming. At least Max Drawdown should lessen more. Doesn't have to be great already, but should be better, no red in Net Profit. 
3. Then go manage the "Trailing Minimum Profit", TP, SL, and max SL. 
4. Repeat 1,2,3. 👻
5. Manage order size, commission, and/or enable double-order (need pyramiding) if you like. Check if your equity can handle max drawdown before margin call.
6. After getting an acceptable backtest result, go to  List of Trades  tab and find the biggest loss or when many sequencing loss in a row happened. Click on it to go to exact point on chart,  observe why the signal failed and get at least general idea how it can be prevented . The rest is yours, you should know your pair/tf more than other.
You can also re-explore your minimum-maximum period for both Major and minor xHMA+.
Keep in mind that all numbers in Setting are conceptually in a form of  range . You don't want to get superb equity curves but actually a "fragile" , means one can easily turn it to disaster just by changing only a fraction in one/two of the setting. 
---
If you just wanna test the strength of the indicator alone, you can disable "Use StopLoss" temporarily while optimising settings. 
Using no SL might be tempting in overall result data in some cases, but NOTE: It is  not  recommended to not using SL, don't forget that we deliberately enter when it's in high volatility. If want to add flexibility or trading for long-term, just maximise your SL. ie.: chose SL Point>ATR only and set it maximum. (Check your max drawdown after this).
      I think this is quite important specially for beginners, so here's an example; Hypothetically in below scenario, because of some settings, the buy order after the loss sell signal didn't appear. Let's say if our initial capital only 1000$ using leverage and order size 0,5 lot (risky position sizing already), moreover if this happens at the beginning of your trading season,  that's half of account gone already in one trade . Your max SL should've made you exit after that pumping bar.
  
The Trailing Minimum Profit is actually look like this. Search in the code if you want to plot it. I just don't like too many lines on chart.
  
To maximise profit we can try enabling double-order. The only added rule coded is: RSI should rising when buy and falling when sell. 2nd signal will appears above or below default buy/sell signal. (Of course it's also prone to double-loss, re-check your max drawdown after. Profit factor play its part in here for a long run). Snapshot in comparison:
  
Two default sell signals on left closed at RSI exit, the additional sell signal closed later on when price crossover minor xHMA+. On buy side, price haven't met our minimum profit when first crossunder minor xHMA+. If later on we hit SL on this "+buy" signal, at least we already profited from default buy signal. You can also consider/treat this as multiple TP points. 
For longer-term trading, what you need to maximise is the  Minimum Profit , so it won't exit whenever an exit condition happened, it can happen several times before reaching minimum profit. Hopefully this snapshot can explain:
  
Notice in comparison default sell and buy signal now close in average after 3 days. What's best is when we also have confirmation from higher TF. It's like targeting higher TF by entering from smaller TF. 
As also mention in the study, we can still experiment via original HMA by putting same value for minimum-maximum period setting. This is experimental EU 1H with Major xHMA+: 144-144, Flat market 13, Distance multiplier 3.6, with 2nd order activated.
  
Kiwi was a bit surprising for me. It's flat market is effectively below 6, with quite far distance zone of 3.5. Probably because I'm using big numbers in adaptive period.
  
---
The result you see in strategy tester report below for EURUSD 15m is using just default settings you see in code, as follow:
 
  0,1 lot for each order (which is the smallest allowed by my broker).
  No pyramiding. Commission: 0.5 usd per order. Slippage: 3
  Opening position is only using basic strategy #1 (RSI exit). Additional exit not activated.
  Minimum Profit: 1. TP: 3. 
  SL use: Half-distance zone. Max SL: 4.5.
  Major xHMA+: 172-233. minor xHMA+: 89-121
  Distance Zone Multiplier: 2.7
  RSI: Standard 14.
 
(From our forward-testing, the difference we get from net profit is because of the spread, our entry isn't exactly at the close/open price. Not so much though, but not the same. If somebody can direct me to any example where we can code our entry via current bid/ask price, that would be awesome!)
It's already a long post (sorry), think I'm gonna pause here. Check out the code :)
---
DISCLAIMER:  Past performance is no guarantee of future results , and so on.. you know the drill ;)
Please read whole description first before using, don't take 1-2 paragraph and claim it's the whole logic, you are responsible of your own actions and understanding.
Full strategy AllinOne with risk management MACD RSI PSAR ATR MAHey, I am glad to present you one of the strategies where I put a lot of time in it.
This strategy can be adapted to all type of timecharts like scalping, daytrading or swing.
The context is the next one :
First we have the ATR to calculate our TP/SL points. At the same time we have another rule once we enter(we enter based on % risk from total equity, in this example 1%, at the same time, lowest ammount for this example is 0.1 lots, but can be modified to 0.01), so we can exit both by tp/sl points, or by losing 1% of our equity or winning 1% of our total equity. It's dinamic.
The strategy is made from
Trend direction :
PSAR
First confirmation point :
Crossover between 10EMA and Bollinger bands middle point
Second confirmation
MACD histogram
Third confirmation
RSI overbought/oversold levels
For entries : we check trend with psar, then once ema cross bb middle point, we confirm together with rsi level for overbought/oversold  and macd histogram ( > 0 or <0).
We exit, when we have opposite sign, like from buy to sell or sell to buy, or when we reach tp/sl points, or when we reach % basaed equity points.
It can be changed to be fixed lots, or fixed tp/sl , you just have to uncomment the size from entries, and tp/sl lines.
At the same time, it has the possibility if one desires, to trade only concrete forex session like european, asian and so on for intraday trading.
Hope you enjoy it.
Let me know how it goes.
APEX - Tester - Buy/Sell Strategies - BasicThis is a simple study for backtesting your strategy for the APEX trading bot. It encorporates the following strategies and script created individually :
 -  Moving averages  - 
 -  Bollinger Bands  -  
 -  MACD  - 
 -  RSI  - 
 -  SRSI  - 
 -  Stochastic  - 
 -  CCI  - 
 -  Percentage Change  - 
 -  VWAP  - 
 Be aware that the buy points will in no way be exactly the same as APEX. Some buys will be missed by apex (Spikes). 
It also encorporates basic riskmangement:
 
 TP - Take profit 
 SL - Stop Loss
 TSL - Trailing Stop Loss
 please select at minimum TP and SL combination or TSL (only TP alone wont be enough)
 
Additional information:
 
  green buy triangle is the basic buy strategy
  green sell is casue by TP TSL
  orange sell is casue by sell strategy
  orange sell is casue by sell strategy
  SL red line
  TP green line
  TSL purple
 
 - Riskmanagement thanks to JustUncleL
 - Added S/R lines thanks to buydipsonly ( blue and yellow line )
PatternLibrary   "Pattern" 
Pattern object definitions and functions. Easily draw and keep track of patterns, legs, and points.
Supported pattern types:
Type			Leg validation		# legs
"xabcd"			Direction			3 or 4 (point D not required)
"zigzag"		Direction			>= 2
"free"			None				>= 2
Summary of exported types and associated methods/functions:
type point					A point on the chart (x,y)
draw_label()			Draw a point label
erase_label()			Erase a point label
type leg					A pattern leg (i.e. point A to point B)
leg_init()				Initialize/instantiate a leg
draw()					Draw a leg
erase()					Erase a leg
leg_getLineTerms()		Get the slope and y-intercept of a leg
leg_getPrice()			Get price (Y) at a given bar index (X) within a leg
type pattern				A pattern (set of at least 2 connected legs)
pattern_init()			Initialize/instantiate a pattern
draw()					Draw a pattern
erase()					Erase a pattern
*See bottom of the script for example usage*
 erase_label(this) 
  Delete the point label
  Parameters:
     this (point) : Point
  Returns: Void
 draw_label(this, position, clr, transp, txt_clr, txt, tooltip, size) 
  Draw the point label
  Parameters:
     this (point) : Point
     position (string) 
     clr (color) 
     transp (float) 
     txt_clr (color) 
     txt (string) 
     tooltip (string) 
     size (string) 
  Returns: line
 leg_init(a, b, prev, next, line) 
  Initialize a pattern leg
  Parameters:
     a (point) : Point A (required)
     b (point) : Point B (required)
     prev (leg) : Previous leg
     next (leg) : Next leg
     line (line) : Line
  Returns: New instance of leg object
 erase(this) 
  Delete the pattern leg
  Parameters:
     this (leg) : Leg
  Returns: Void
 erase(this) 
  Delete the pattern lines
  Parameters:
     this (pattern) : Pattern
  Returns: Void
 draw(this, clr, style, transp, width) 
  Draw the pattern leg
  Parameters:
     this (leg) : Leg
     clr (color) : Color
     style (string) : Style ("solid", "dotted", "dashed", "arrowleft", "arrowright")
     transp (float) : Transparency
     width (int) : Width
  Returns: line
 draw(this, clr, style, transp, width) 
  Draw the pattern
  Parameters:
     this (pattern) : Pattern
     clr (color) : Color
     style (string) : Style ("solid", "dotted", "dashed", "arrowleft", "arrowright")
     transp (float) : Transparency
     width (int) : Width
  Returns: line 
 leg_getLineTerms(this) 
  Get the slope and y-intercept of a leg
  Parameters:
     this (leg) : Leg
  Returns:  
 leg_getPrice(this, index) 
  Get the price (Y) at a given bar index (X) within the leg
  Parameters:
     this (leg) : Leg
     index (int) : Bar index
  Returns: Price (float)
 pattern_init(legs, tp, name, subType, pid) 
  Initialize a pattern object from a given set of legs
  Parameters:
     legs (array) : Array of pattern legs (required)
     tp (string) : Pattern type ("zigzag", "xabcd", or "free". dft = "free")
     name (string) : Pattern name
     subType (string) : Pattern subtype
     pid (string) : Pattern Identifier string
  Returns: New instance of pattern object, if one was successfully created
 pattern_init(points, tp, name, subType, pid) 
  Initialize a pattern object from a given set of points
  Parameters:
     points (array) 
     tp (string) : Pattern type ("zigzag", "xabcd", or "free". dft = "free")
     name (string) : Pattern name
     subType (string) : Pattern subtype
     pid (string) : Pattern Identifier string
  Returns: New instance of pattern object, if one was successfully created
 point 
  A point on the chart (x,y)
  Fields:
     x (series int) : 				Bar index (x coordinate)
     y (series float) 
     label (series label) 
 leg 
  A pattern leg (point A to point B)
  Fields:
     a (point) : 				Point A
     b (point) 
     deltaX (series int) 
     deltaY (series float) 
     prev (leg) 
     next (leg) 
     retrace (series float) 
     line (series line) 
 pattern 
  A pattern (set of at least 2 connected legs)
  Fields:
     legs (array) 
     type (series string) 
     subType (series string) 
     name (series string) 
     pid (series string)
Dammu AI ADVANCED PRO1. Indicator Overview
Name: Dammu
Type: Overlay indicator (draws on price chart)
Purpose: Combines SuperTrend, SMA/EMA trends, Swing/Structure analysis, Order Blocks, Fair Value Gaps, High/Low levels, TP/SL labels, and alerts.
Pine Script Version: v5
2. SuperTrend Module
Computes SuperTrend line using ATR and sensitivity.
Signals:
Bullish: Price crosses above SuperTrend.
Bearish: Price crosses below SuperTrend.
Plots buy/sell labels 🚀🐻 based on SMA comparison and SuperTrend cross.
3. SMA/EMA Trend Components
SMA8 & SMA9: Used for additional trend confirmation.
EMA lines: Multiple EMAs with different multipliers for trend detection.
Trend Cloud: Uses Hull MA for trend smoothing.
4. Risk Management
TP/SL Levels: Automatic calculation of stop-loss and take-profit (TP1, TP2, TP3).
Configurable ATR-based risk percentage.
Lines and labels drawn for visual TP/SL.
5. Chart Features
Smooth Range Filter: Filters noise for trend detection.
Colored Trend Cloud: Upward trend = cyan, downward = red.
Sideways Market: ADX filter to color bars purple if trend is weak/sideways.
Bar Colors: Green/red based on SuperTrend signals.
6. Swing & Structure Analysis
Detects Swing Highs/Lows, labels as HH, LH, LL, HL.
Detects CHoCH (Change of Character) or BOS (Break of Structure).
Can show internal or swing structures with configurable label size and color.
7. Order Blocks (Smart Money Concepts)
Detects Internal Order Blocks (iOB) and Swing Order Blocks (OB).
Stores top/bottom/left/time/type in arrays.
Colors and shows boxes based on bullish/bearish type.
Automatically deletes OB if price breaks the block.
8. Fair Value Gaps (FVG)
Identifies gaps between candles as potential trading zones.
Configurable bullish/bearish colors and extension bars.
9. EQH/EQL (Equal Highs/Lows)
Detects equal highs/lows using a threshold.
Plots dotted lines and labels EQH/EQL.
10. High/Low Levels MTF
Optional plotting of previous daily, weekly, monthly highs/lows.
11. Premium/Discount Zones
Plots Premium, Discount, and Equilibrium Zones.
Colors: Premium = red, Discount = green, Equilibrium = gray.
12. Alerts
Buy/Sell alerts for:
SuperTrend crossover
BOS/CHoCH (swing/internal)
EQH/EQL triggers
13. Miscellaneous
Configurable visuals: line style, label size, transparency.
Adjustable volatility filters, ATR lengths, smoothing constants.
Integrated risk & reward visualization.
✅ In short:
This is an all-in-one Smart Money + Trend indicator with SuperTrend signals, swing/structure detection, order blocks, FVGs, EQH/EQL, TP/SL visualization, and optional alerts. It’s designed for both trend-following and order-block-based trading.
If you want, I can make a super-short 1-paragraph version that summarizes it even faster for quick reference.
ATR Adaptive (auto timeframe)This indicator automatically adjusts the Average True Range (ATR) period based on the current chart timeframe, helping traders define dynamic Stop Loss (SL) and Take Profit (TP) levels that adapt to market volatility.
The ATR measures the average range of price movement over a defined number of bars. By using adaptive periods, the indicator ensures that volatility is interpreted consistently across different timeframes — from 1-minute charts to daily or weekly charts.
It plots two main levels on the chart:
🔴 Low – ATR × Multiplier → Suggested Stop Loss (below the candle’s low)
🟢 High + ATR × Multiplier → Suggested Take Profit or trailing level (above the candle’s high)
Optional additional lines show ATR-based TP levels calculated from the current close.
💡 How to use
Select your desired ATR multiplier (e.g., 1.3× for SL, 1.0× for TP).
The script automatically detects the chart timeframe and uses an appropriate ATR length (e.g., ATR(30) on M5, ATR(21) on H1, ATR(14) on Daily).
Use the plotted levels to:
Set Stop Loss just below the red ATR band (for long trades).
Set Take Profit near or slightly below the green ATR band (for short trades, reverse logic).
⚙️ Why it helps
Maintains consistent volatility-based risk across multiple timeframes.
Avoids arbitrary fixed SL/TP values.
Makes the trading strategy more responsive in high-volatility markets and more conservative when volatility contracts.
Particularly useful for intraday and swing trading, where volatility varies significantly between sessions.
Magracia Entry-Exit 5 Min Time frame//------------------------------------------------------------------------------------------------------
// 🧭 Indicator Description
//------------------------------------------------------------------------------------------------------
// 📘 Overview:
// This indicator is a modified version of the LuxAlgo pattern logic designed to detect
// high-probability **RBD (Rally–Base–Drop)** and **DBR (Drop–Base–Rally)** reversal structures 
// directly on the current candle. It automatically identifies potential BUY and SELL zones, 
// plots corresponding trade signals, and dynamically calculates **Take Profit (TP)** and **Stop Loss (SL)** levels.
//
// The goal of this tool is to give clear, visually guided trade entries and exits that
// follow price structure and momentum changes without repainting historical data.
//
//------------------------------------------------------------------------------------------------------
// 🧩 How It Works:
// • **RBD (Rally–Base–Drop)** → Indicates a bearish reversal (SELL signal)
// • **DBR (Drop–Base–Rally)** → Indicates a bullish reversal (BUY signal)
// • Optional **RBR / DBD** continuation patterns can be toggled on for trend continuation setups.
// • When a signal is detected, the script automatically places:
//     ▫ A BUY or SELL marker at the candle
//     ▫ Dynamic TP (green dotted line) and SL (red dotted line) levels
//     ▫ An EXIT marker when either TP or SL is reached
//
//------------------------------------------------------------------------------------------------------
// ⚙️ Inputs:
// • Enable or disable individual pattern types (RBD, RBR, DBD, DBR)
// • Toggle continuation patterns (RBR/DBD)
// • Customize Take Profit and Stop Loss percentages
// • Adjust rally/drop bar colors for easier pattern visualization
//
//------------------------------------------------------------------------------------------------------
// 🧠 Usage Tips:
// • Works best on volatile pairs and short–term timeframes (1m to 15m)
// • Can be combined with volume or trend filters for stronger confirmation
// • When used on higher timeframes (e.g., 4H+), increase TP/SL percentage range
//
//------------------------------------------------------------------------------------------------------
// ⚠️ Notes:
// • Signals are plotted **in real-time on the current candle** (not delayed).
// • This indicator is for visual and educational use only and does not guarantee profitability.
// • For optimal results, combine it with proper risk management and confirmation indicators.
//
//------------------------------------------------------------------------------------------------------
// © Gideon (CC BY-NC-SA 4.0 Licensed)
//------------------------------------------------------------------------------------------------------
ORB Pro w/ Filters + Debug + ORB Fib + Golden Pocket + HTF Trend🚀 ORB Pro – Advanced Opening Range Breakout System
A professional ORB indicator with built-in filters, retest confirmation, EMA/HTF trend alignment, and automatic risk/reward targets. Designed to eliminate false breakouts and give traders clean LONG/SHORT signals with Fibonacci and debug overlays for maximum precision.
This script is an advanced Opening Range Breakout (ORB) system designed for futures, indices, and options traders who want more precision, cleaner entries, and higher win probability. It combines classic ORB logic with modern filters, Fibonacci confluence, and higher-timeframe trend confirmation.
The indicator automatically:
Plots the ORB box based on user-defined NY session times (default: 9:30–9:45 EST).
Generates long/short signals when price breaks the ORB range, with optional conditions like:
Candle close outside the range
Retest confirmation (with tolerance %)
Volume spike validation
EMA trend alignment
Higher-timeframe EMA slope alignment
Cooldown filters to prevent over-trading
Integrates Fibonacci retracements & extensions from the ORB box for confluence levels.
Includes Golden Pocket (0.5–0.618) retests for precision entries
Risk/Reward visualization — automatically plots stop loss and take profit levels based on user-defined R:R or fixed % levels.
Debug mode overlay to show why a signal is blocked (e.g., low volume, ORB too small, too late, wrong trend).
This tool is built for scalpers, day traders, and 0DTE options traders who need both flexibility and discipline.
⚙️ Inputs & Features
ORB Settings
ORB Start & End Time (NY) → Default: 9:30–9:45
Require Candle Close → Ensures breakouts are confirmed, not wick traps.
Retest Confirmation → Optional retest before entry (tolerance % adjustable).
Filters
Volume Spike → Validates breakouts only with above-average volume.
EMA Trend Filter → Confirms trade direction with EMA slope.
Higher Timeframe Trend → Optional (e.g., 15m ORB with 1h EMA alignment).
Cooldown Bars → Prevents consecutive false signals.
ORB Size Filter → Blocks signals when ORB is too small/too large.
Fibonacci Levels
Retracements: 0.236, 0.382, 0.5, 0.618, 0.786
Extensions: 1.272, 1.618
Golden Pocket Retest filter for high-probability trades
Risk Management
R:R Stops/Targets → Automatically plots SL/TP levels.
Custom Stop % / Take Profit % if not using R:R
Debug Overlay → Explains why signals are blocked
🧑💻 How to Use
Load the indicator on your chart (works best on 1m, 5m, and 15m).
Adjust ORB window (default 9:30–9:45 EST).
Select filters (candle close, retest, volume, EMA, HTF trend).
Watch for Long/Short labels outside ORB box with filters aligned.
Manage trades using plotted SL/TP levels or your own Webull/R:R calculator.
✅ Best Use Cases
Futures (NQ1!, ES1!)
ETFs (QQQ, SPY, IWM)
0DTE Options Trading
Scalping around market open
⚠️ Disclaimer
This tool is for educational purposes only. It does not constitute financial advice. Trading carries risk, and past performance does not guarantee future results. Always test on paper trading before using real capital.
-----------------------------------------
ORB Pro w/ Filters + Debug + ORB Fib + Golden Pocket + HTF Trend
A professional Opening Range Breakout (ORB) toolkit designed for intraday traders who want precision entries, risk-managed exits, and layered confirmation filters. Built for futures, stocks, and ETFs (e.g. NQ, ES, QQQ).
🔎 Core Logic
This script plots and trades breakouts from the Opening Range (9:30 – 9:45 NY time), then applies multiple confirmation filters before signaling a LONG or SHORT setup:
ORB Box: Defines the first 15 minutes of market activity (customizable).
Breakout Candle Confirmation: Requires a candle close outside the ORB box.
Retest Confirmation: Price must retest the ORB edge within tolerance before triggering.
Trend Filter: EMA confirmation to align trades with intraday trend.
Higher-Timeframe Trend Filter: Optional (default: 45-minute EMA) to avoid countertrend trades.
Fibonacci Levels: Auto-plot retracements (0.236 → 0.786) for confluence and trade management.
Golden Pocket Retest (Optional): Adds an extra precision filter at 0.5–0.618 retracement.
⚙️ Default Settings (Optimized for Beginners)
These are the pre-configured inputs so traders can load and trade immediately:
ORB Session: 9:30 – 9:45 NY
✅ Require Candle Close Outside ORB
✅ Require Retest Confirmation (tolerance 0.333%)
❌ Require Volume Spike (off by default, optional toggle)
✅ Require EMA Trend (50 EMA intraday)
✅ Require Higher-TF Trend (45m, EMA 21)
❌ Higher-TF EMA slope required (off)
✅ Cooldown Between Signals (10 bars)
ORB % Range: Min 0.3%, Max 0.5%
Max Minutes After ORB: 180
✅ ORB-based Risk/Reward Stops & Targets (default: 2R)
Stop Loss: 0.5% (if not R:R)
Take Profit: 1% (if not R:R)
✅ Debug Overlay (shows why signals are blocked)
✅ Fibonacci Retracements Plotted
❌ Extensions (off by default, toggle if needed)
✅ Golden Pocket Retest available, tolerance 0.11 (optional)
📈 Signals
Green "LONG" Label: Valid breakout above ORB with trend confirmation.
Red "SHORT" Label: Valid breakdown below ORB with trend confirmation.
Blocked (debug text): Signal suppressed by filters (low volume, too late, no retest, etc.).
🎯 Trade Management
Default R:R is 2:1 (stop at ORB edge, TP projected).
For manual trading (e.g., Webull, IBKR), you can use the plotted TP/SL boxes directly.
Fibonacci + Golden Pocket give additional profit-taking levels and retest filters.
✅ Best Practices
Use 15m chart for main ORB entries.
Confirm direction with HTF trend (45m EMA by default).
Avoid signals blocked by “Low Volume” or “Too Late” (debug helps identify).
Adjust ORB % range for asset volatility (tight for ETFs, wider for futures).
🚀 Why ORB Pro?
This is more than a standard ORB indicator. It’s a professional breakout system with filters designed to avoid false breakouts, automatically handle risk/reward, and guide traders with clear visual signals. Perfect for both systematic day traders and discretionary scalpers who want structure and confidence.
👉 Recommended starting point:
Load defaults → trade the 15m ORB with EMA + HTF filters on → let the script handle retests and stop/target placement.
Iani SMC Sniper XAU v2.2 (Long+Short + News Countdown, v6)Iani SMC Sniper v2.6 — Anytime • Auto Pip • FVG 50% • OB • News Panel
Smart-Money Concepts made simple for intraday XAU/USD (works on any symbol).
Finds BOS, 50% FVG “sniper” entries, optional Order Blocks, London H/L, news countdown, and a mini info panel.
What it does
BOS (Break of Structure): detects bullish/bearish BOS after London sweep logic.
FVG 50% entries: plots precise long/short entry dots at the midpoint of the gap.
Auto TP/SL: TP = RR × risk, SL below/above recent swing with a small buffer.
Order Blocks (optional): marks the last opposite candle after BOS and alerts on OB revisit.
London High/Low: tracks session range; session filter is optional.
News countdown: shows next event time and minutes left (user-selectable timezone).
Mini Panel: top-left table with Trend (last BOS), Next news, R:R, Pip size.
Inputs (key)
Auto pip size: uses syminfo.mintick. Manual override available.
Risk:Reward (RR): default 2.0.
Pivot length: swing sensitivity.
Sessions: enable if you want signals only 12:00–20:00 (symbol timezone). Off = anytime.
News timezone: pick your own (e.g., Europe/Brussels, America/New_York).
Absolute & daily times: add your events (strings like 2025-09-17 20:00 or 14:30,16:00…).
Show labels/levels/OBs: toggle on/off.
Alerts included
BOS Bullish / BOS Bearish
BUY Entry / SELL Entry (return to 50% FVG)
Bullish OB revisit / Bearish OB revisit
TP Long/Short reached, SL Long/Short hit
NEWS WARNING (warning window only; does not block signals)
To use: Add Alert → Condition: this indicator → choose any of the alertconditions.
Best use
Bias: H1 for structure.
Execution: M15 (standard) or M5 (aggressive).
Works great on XAUUSD, but is symbol-agnostic (auto pip adapts).
Notes
News times display in the timezone you pick in settings.
OBs are a simple implementation meant for quick visual guidance.
Labels: BUY/SELL near entries, TP/SL on set and when hit, BOS up/down.
Risk disclaimer
This tool is for education only. Not financial advice. Backtest and manage risk.






















