Virat Bharat Nifty Banknifty scalping indicatorsthis indicator is only for buy signala and only for intraday trading and this is only for educational purpose
Patrones de gráficos
Kamal 8 Tick Trading Setup//@version=5
indicator("Kamal 8 Tick Trading Setup", overlay=true)
// Define the length for the lookback period
length = 8
// Calculate the highest high and lowest low of the previous 'length' candles, excluding the current candle
highestHigh = ta.highest(high , length)
lowestLow = ta.lowest(low , length)
// Initialize a variable to track the current position
var int position = 0 // 0 = no position, 1 = buy, -1 = sell
// Generate Buy and Sell signals
buySignal = (close > highestHigh) and (position != 1)
sellSignal = (close < lowestLow) and (position != -1)
// Update the position variable
if (buySignal)
position := 1
if (sellSignal)
position := -1
// Plot Buy and Sell signals on the chart
plotshape(series=buySignal, location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=sellSignal, location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Debugging plots to check the highest high and lowest low
plot(highestHigh, color=color.blue, title="Highest High")
plot(lowestLow, color=color.orange, title="Lowest Low")
!! 🔥 Breakout Strategy with Trailing StopThis breakout strategy identifies trading opportunities when the price moves beyond the highest high or lowest low of the last N lookback bars and uses a trailing stop-loss mechanism for risk management. The strategy works best on TSLA (5 min or 1-hour chart) and NQ (15 min chart) and enforces a 1-hour cooldown between trades.
Key Features:
✅ Breakout Entry:
Buy if price breaks above the previous high by a certain breakout percentage.
Sell if price breaks below the previous low by a certain breakout percentage.
✅ Trailing Stop-Loss for Exits:
Activates only after reaching 1% profit.
Dynamically follows the price to lock in profits.
✅ Trade Cooldown:
Prevents re-entering a trade for 1 hour after an entry.
✅ Customizable Inputs:
Adjustable lookback period, breakout threshold, stop-loss percentage, and trailing stop percentage.
📊 Best for volatile assets like TSLA and NQ (15 min, 1 hour) on short to medium timeframes! 🚀
Discount/Premium OTE LevelsThis indicator is created to identify discount/premium areas to provide additional confluence to trades taken. The underlying theory is that the trades taken in discounted areas are likely to have less risk due to a smaller stop loss and a higher reward/risk ratio.
The indicator operates by first identifying a zone between the last major swing high and low. These highs and lows are determined as price points that at the extremes within the number of bars to the left, as defined by the "Swing Sensitivity" setting.
Once a price zone is established, the indicator verifies that the zone meets the minimum size in points as configured via the "Minimum size" setting to be considered tradable. Zones that are too small may not provide a sufficient range even for scalping. The default value is 42 points based on Nasdaq, which means that the distance between inner most OTE levels (0.382 and 0.618) is at least 10 points.
When a valid zone is identified, it is then subdivided into areas of interest based on OTE levels, which can be configured/adjusted via the "Levels to Draw" setting. These levels represent the midpoint (50%), which distinguishes between premium and discount, and the three OTE levels 0.79, 0.705, 0.618, above the 50% for discount and below the 50% for premium.
For example, if a zone is formed initially by a swing low followed by a swing high with the assumption that the draw is higher, the indicator can be used to formulate long positions from below the 50% level starting at 0.38 OTE level, or ideally at 0.295 OTE level using 0 as a stop loss. Alternatively, if the 50% level is not yet tapped, short scalp positions can be made from 0.79-0.618 OTE levels with 50% as a partial or TP target.
See for long/short example
Typically, the indicator will show only a single zone. However, there may be cases with two zones: one larger parent zone containing a smaller, valid price zone within itself.
The indicator will automatically invalidate and remove the zone once the high/low of the zone is invalidated.
Configuration:
The indicator provides several visualization options for customization, including:
Color settings for OTE levels, with separate settings for edge/50% color, premium, and discount levels.
Settings for line style for OTE levels.
Settings to determine whether to show prices on level labels.
Settings to decide if lines should be extended to the right.
Smoothed Heiken Ashi Strategy Overlay ZonesThe Smoothed Heiken Ashi Strategy Overlay Zones is a custom TradingView indicator designed to refine trend analysis and provide clear buy/sell signals by leveraging smoothed Heiken Ashi calculations.
Key Features:
✅ Smoothed Heiken Ashi Candles
Traditional Heiken Ashi values are enhanced using a multi-layered EMA smoothing technique, reducing market noise and providing a clearer trend direction.
✅ Buy & Sell Zone Visualization
Background Color Highlights:
🟩 Green for Bullish Trends
🟥 Red for Bearish Trends
✅ Trade Signals & Alerts
🔼 Buy Signal: Triggers when a bullish trend starts.
🔽 Sell Signal: Activates when a bearish trend begins.
🔔 Custom Alerts: Notifies traders when buy or sell zones are activated.
This indicator is ideal for trend-following traders looking for a smoother representation of price action while reducing false signals in volatile markets.
Stratégie E.M.S (M1)Stratégie E.M.S (M15-M1) - L'arme ultime pour le XAU/USD 🔥
( A combiner avec : Stratégie E.M.S (M15) sinon ça ne fonctionne pas)
La Stratégie E.M.S (East - Money - Stratégie) est une méthode de trading avancée conçue pour capturer les retournements puissants sur le marché, en particulier sur le XAU/USD (Or). Elle combine le timeframe M15 et M1 pour une précision chirurgicale, permettant d'exploiter les meilleurs points d'entrée tout en minimisant les faux signaux.
📌 Pourquoi la Stratégie E.M.S est ultra-efficace ?
✅ Double Confirmation (M15 + M1) → On attend une structure claire en M15 avant d'entrer en M1, garantissant une meilleure validation du signal.
✅ Repérage des Retournements Puissants → Attente de deux bougies consécutives dans une direction, suivie d’une bougie de retournement pour confirmer le changement de tendance.
✅ Entrée sur Retracement Optimal → L’entrée ne se fait pas immédiatement, mais après la validation complète d’une bougie englobante ou semi-englobante. Cela permet de réduire les faux signaux et d’optimiser les points d’entrée.
✅ Stop Loss & Take Profit Stratégiques → SL placé 5 pips sous la mèche de la bougie de signal et TP en ratio 1:3 pour maximiser le rendement.
✅ Une efficacité redoutable sur le XAU/USD → Cette stratégie a montré des performances exceptionnelles sur l’Or grâce à sa volatilité et ses retracements bien définis.
🎯 Comment ça fonctionne en 3 étapes ?
1️⃣ Repérer une tendance avec deux bougies successives de la même couleur sur le timeframe M15.
2️⃣ Attendre une bougie de retournement M15 (rouge après deux vertes ou verte après deux rouges).
3️⃣ Passer en M1 et entrer sur une bougie englobante ou semi-englobante dans la bonne direction.
🎯 Un SELL se déclenche si la dernière bougie M15 était rouge et une bougie englobante baissière apparaît en M1.
🎯 Un BUY se déclenche si la dernière bougie M15 était verte et une bougie englobante haussière apparaît en M1.
📈 Résumé des avantages :
✅ Stratégie simple et adapté aux débutants.
✅ Identification rapide des retournements les plus puissants.
✅ Ratio risque/récompense optimal (SL court, TP large).
✅ Filtrage intelligent des faux signaux avec les bougies englobantes.
✅ Parfaitement adaptée au scalping agressif en M1.
🔥 La Stratégie E.M.S n’est pas une simple méthode… C’est une approche redoutable qui exploite la dynamique des marchés avec une précision absolue et sans analyse.
📌 Prêt à l’essayer sur le XAU/USD ? 🚀💰
Trend Lines by Pivots (Enhanced)### **📌 Detailed Explanation of the TradingView Indicator Code**
This **Pine Script v5** indicator automatically **detects trend lines** based on pivot highs and pivot lows. It helps traders visualize **support and resistance levels** using dynamic trend lines.
---
## **🔹 How the Indicator Works**
The indicator identifies **key pivot points** in price action and then **draws trend lines** connecting them. It works as follows:
1. **Detects Pivot Highs and Lows**:
- A **pivot high** is a local maximum where the price is higher than surrounding bars.
- A **pivot low** is a local minimum where the price is lower than surrounding bars.
2. **Stores the Last Two Pivot Points**:
- The script remembers the last **two pivot highs** and **two pivot lows**.
- These points are used to **draw resistance and support lines** dynamically.
3. **Plots Resistance and Support Lines**:
- The script continuously **updates** and **extends** the trend lines to the right as new pivots are found.
- **Red Line (Resistance):** Connects the last two pivot highs.
- **Green Line (Support):** Connects the last two pivot lows.
---
## **🔹 Code Breakdown**
### **1️⃣ Inputs for User Customization**
```pinescript
leftLen = input.int(2, "Left Pivot Length")
rightLen = input.int(2, "Right Pivot Length")
highLineColor = input.color(color.red, "Resistance Line Color")
lowLineColor = input.color(color.green, "Support Line Color")
```
- **leftLen & rightLen:** Define how many bars on the left and right should be used to confirm a pivot.
- **highLineColor:** Sets the color of the resistance trend line (default: **red**).
- **lowLineColor:** Sets the color of the support trend line (default: **green**).
---
### **2️⃣ Detect Pivot Highs & Lows**
```pinescript
pivotHigh = ta.pivothigh(leftLen, rightLen)
pivotLow = ta.pivotlow(leftLen, rightLen)
```
- `ta.pivothigh(leftLen, rightLen)`: Detects a **pivot high** if it's the highest price in a certain range.
- `ta.pivotlow(leftLen, rightLen)`: Detects a **pivot low** if it's the lowest price in a certain range.
---
### **3️⃣ Store the Last Two Pivot Points**
#### **🔺 Storing Resistance (Pivot Highs)**
```pinescript
var float lastPivotHigh1 = na
var int lastPivotHighIndex1 = na
var float lastPivotHigh2 = na
var int lastPivotHighIndex2 = na
```
- These variables store **the last two pivot highs** and their **bar indices** (position on the chart).
#### **🔻 Storing Support (Pivot Lows)**
```pinescript
var float lastPivotLow1 = na
var int lastPivotLowIndex1 = na
var float lastPivotLow2 = na
var int lastPivotLowIndex2 = na
```
- These variables store **the last two pivot lows** and their **bar indices**.
---
### **4️⃣ Update Pivot Points When New Ones Are Found**
#### **Updating Resistance (Pivot Highs)**
```pinescript
if not na(pivotHigh)
lastPivotHigh2 := lastPivotHigh1
lastPivotHighIndex2 := lastPivotHighIndex1
lastPivotHigh1 := pivotHigh
lastPivotHighIndex1 := bar_index - rightLen
```
- If a new **pivot high** is found:
- The **previous pivot** becomes `lastPivotHigh2`.
- The **new pivot** becomes `lastPivotHigh1`.
- The index (`bar_index - rightLen`) marks where the pivot occurred.
#### **Updating Support (Pivot Lows)**
```pinescript
if not na(pivotLow)
lastPivotLow2 := lastPivotLow1
lastPivotLowIndex2 := lastPivotLowIndex1
lastPivotLow1 := pivotLow
lastPivotLowIndex1 := bar_index - rightLen
```
- Similar to pivot highs, this section updates **pivot lows** dynamically.
---
### **5️⃣ Create and Update Trend Lines**
#### **🔺 Drawing the Resistance Line**
```pinescript
var line highLine = na
if not na(lastPivotHigh2) and not na(lastPivotHigh1)
if na(highLine)
highLine := line.new(lastPivotHighIndex2, lastPivotHigh2, lastPivotHighIndex1, lastPivotHigh1, color=highLineColor, extend=extend.right)
else
line.set_xy1(highLine, lastPivotHighIndex2, lastPivotHigh2)
line.set_xy2(highLine, lastPivotHighIndex1, lastPivotHigh1)
line.set_color(highLine, highLineColor)
```
- If **two pivot highs** exist:
- **First time:** Creates a new **resistance line** connecting them.
- **Updates dynamically:** Adjusts the line when a new pivot appears.
#### **🔻 Drawing the Support Line**
```pinescript
var line lowLine = na
if not na(lastPivotLow2) and not na(lastPivotLow1)
if na(lowLine)
lowLine := line.new(lastPivotLowIndex2, lastPivotLow2, lastPivotLowIndex1, lastPivotLow1, color=lowLineColor, extend=extend.right)
else
line.set_xy1(lowLine, lastPivotLowIndex2, lastPivotLow2)
line.set_xy2(lowLine, lastPivotLowIndex1, lastPivotLow1)
line.set_color(lowLine, lowLineColor)
```
- Same logic applies for **support levels**, creating or updating a **green trend line**.
---
## **🔹 How to Use This Indicator**
1. **Apply the script in TradingView**:
- Open **Pine Script Editor** → Paste the code → Click **"Add to Chart"**.
2. **Interpret the Lines**:
- **Red line (Resistance):** Price may struggle to break above it.
- **Green line (Support):** Price may bounce off it.
3. **Trading Strategy**:
- **Breakout Strategy:**
- If the price **breaks resistance**, expect a bullish move.
- If the price **breaks support**, expect a bearish move.
- **Reversal Trading:**
- Look for **bounces off support/resistance** for potential reversals.
---
## **🔹 Key Features of This Indicator**
✅ **Automatically detects pivot highs and lows.**
✅ **Draws real-time trend lines for support and resistance.**
✅ **Updates dynamically with new price action.**
✅ **Customizable settings for pivot sensitivity and colors.**
This indicator is useful for **trend traders, breakout traders, and support/resistance traders**. 🚀
Let me know if you need **further improvements or additional features!** 😊
Ultimate T3 Fibonacci for BTC Scalping. Look at backtest report!Hey Everyone!
I created another script to add to my growing library of strategies and indicators that I use for automated crypto trading! This strategy is for BITCOIN on the 30 minute chart since I designed it to be a scalping strategy. I calculated for trading fees, and use a small amount of capital in the backtest report. But feel free to modify the capital and how much per order to see how it changes the results:)
It is called the "Ultimate T3 Fibonacci Indicator by NHBprod" that computes and displays two T3-based moving averages derived from price data. The t3_function calculates the Tilson T3 indicator by applying a series of exponential moving averages to a combined price metric and then blending these results with specific coefficients derived from an input factor.
The script accepts several user inputs that toggle the use of the T3 filter, select the buy signal method, and set parameters like lengths and volume factors for two variations of the T3 calculation. Two T3 lines, T3 and T32, are computed with different parameters, and their colors change dynamically (green/red for T3 and blue/purple for T32) based on whether the lines are trending upward or downward. Depending on the selected signal method, the script generates buy signals either when T32 crosses over T3 or when the closing price is above T3, and similarly, sell signals are generated on the respective conditions for crossing under or closing below. Finally, the indicator plots the T3 lines on the chart, adds visual buy/sell markers, and sets alert conditions to notify users when the respective trading signals occur.
The user has the ability to tune the parameters using TP/SL, date timerames for analyses, and the actual parameters of the T3 function including the buy/sell signal! Lastly, the user has the option of trading this long, short, or both!
Let me know your thoughts and check out the backtest report!
UT Bot Alerts + Bollinger BandsCombination of UT Bot with BB for trend identifier and possible reversal
5-Min Trendline Breakout Based on H1 S/R [ABU SETTS]Trail, just wrote and still doing tuning.
What Changed?
Fixed plotshape Size Argument:- Added a switch statement to convert the input string (breakout_label_size) into a const string (label_size).
This ensures the size argument in plotshape receives a valid const string.
Improved Flexibility: - The breakout_label_size input now works correctly with plotshape and label.new.
How to Use
Adjust the Pivot Length, Slope Multiplier, and other inputs to customize the script.
Use the Breakout Label Size dropdown to select the size of the breakout labels (tiny, small, or normal).
Toggle Show Only Confirmed Breakouts to filter out unconfirmed signals.
Buy/Sell/Reversal with Support/Resistance & TrendlineIf the price is above the moving average and a bullish engulfing pattern forms, a BUY signal will appear.
If the price is below the moving average and a bearish engulfing pattern forms, a SELL signal will appear.
Swing Highs and Lows will be marked as RES and SUP, respectively.
Trendlines will be drawn between significant highs or lows.
Even vs Odd Weeks Performance█ OVERVIEW
The Even vs Odd Weeks Performance indicator is designed to visualise and compare the performance of even-numbered weeks versus odd-numbered weeks. This indicator explores one of the many calendar based anomalies that exist in financial markets.
In the context of financial analysis, a calendar based anomaly refers to patterns or tendencies that are linked to specific time periods, such as days of the week, weeks of the month, or months of the year. This indicator helps explore whether such a calendar based anomaly exists between even and odd weeks.
By calculating cumulative weekly performance and counting the number of weeks with positive returns, it provides a clear snapshot of whether one set of weeks tends to outperform the other, potentially highlighting a calendar based anomaly if a significant difference is observed.
█ FEATURES
Customisable time window through input settings.
Tracks cumulative returns for even and odd weeks separately.
Easily adjust table settings like position and font size via input options.
Clear visual distinction between even and odd week performance using different colours.
Built-in error checks to ensure the indicator is applied to the correct timeframe.
█ HOW TO USE
Add the indicator to a chart with a Weekly timeframe.
Choose your start and end dates in the Time Settings.
Enable or disable the performance table in the Table Settings as needed.
View the cumulative performance, with even weeks in green and odd weeks in red.
Even vs Odd Days Performance█ OVERVIEW
The Even vs Odd Days Performance indicator is designed to visualise and compare the performance of even-numbered days versus odd-numbered days. This indicator explores one of the many calendar based anomalies that exist in financial markets.
In the context of financial analysis, a calendar based anomaly refers to patterns or tendencies that are linked to specific time periods, such as days of the week, weeks of the month, or months of the year. This indicator helps explore whether such a calendar based anomaly exists between even and odd days.
By calculating cumulative daily performance and counting the number of days with positive returns, it provides a clear snapshot of whether one set of days tends to outperform the other, potentially highlighting a calendar based anomaly if a significant difference is observed.
█ FEATURES
Customisable time window through input settings.
Tracks cumulative returns for even and odd days separately.
Easily adjust table settings like position and font size via input options.
Clear visual distinction between even and odd day performance using different colours.
Built-in error checks to ensure the indicator is applied to the correct timeframe.
█ HOW TO USE
Add the indicator to a chart with a Daily timeframe.
Choose your start and end dates in the Time Settings.
Enable or disable the performance table in the Table Settings as needed.
View the cumulative performance, with even days in green and odd days in red.
SMA Crossover Strategy by AARYAN Buy Signal: When the 50-period SMA crosses above the 200-period SMA
Sell Signal: When the 50-period SMA crosses below the 200-period SMA
This script also includes:
✔️ Visual buy/sell markers on the chart
✔️ Alerts for buy and sell signals
✔️ Backtesting capability to analyze past performance
Three Bar Reversal & Pattern Signals with TP, SL This indicator identifies a "Three Bar Reversal" pattern and provides buy/sell signals along with stop-loss (SL), take-profit (TP), and entry prices based on mean reversion. Here’s a breakdown of how it works:
Inputs:
Text Size: The user can choose the size of the label text displayed on the chart, with options like tiny, small, normal, large, and huge.
Buy/Sell Label Colors: Users can set the colors for the buy and sell labels.
Buy/Sell Text Colors: The user can set the text color for the buy and sell labels.
Identifying Reversal Patterns:
Bullish Reversal: The indicator looks for a bullish reversal pattern where:
The first bar (index 2) is bullish (close > open).
The second bar (index 1) has a low price lower than the first bar.
The close of the current bar is higher than the high of the second bar.
Bearish Reversal: A bearish reversal is identified when:
The first bar (index 2) is bearish (close < open).
The second bar (index 1) has a high price higher than the first bar.
The close of the current bar is lower than the low of the second bar.
Mean Reversion (SMA) Calculation:
The script calculates a 20-period simple moving average (SMA) of the close prices (mean_price), which is used as a reference for setting stop-loss and take-profit levels.
Risk to Reward Ratio (1:1.5):
The risk-to-reward ratio is set at 1.5:1. This means the take-profit target is 1.5 times the distance from the entry price to the stop-loss.
Stop-Loss and Take-Profit Calculation:
Buy Signal:
Stop-Loss is placed 1% below the mean price.
Take-Profit is calculated based on the risk-to-reward ratio from the entry price.
Sell Signal:
Stop-Loss is placed 1% above the mean price.
Take-Profit is calculated similarly based on the risk-to-reward ratio.
Creating Labels:
When a bullish or bearish reversal pattern is detected:
A label is drawn on the chart showing the entry price, TP, and SL for the trade.
Alerts are triggered when a buy or sell signal is detected, displaying the relevant entry, TP, and SL levels.
Line Drawing:
A blue line is drawn at the low price of the reversal pattern to visually represent the reversal point.
In summary, the indicator combines a reversal pattern detection (Three Bar Reversal) with mean reversion, setting stop-loss and take-profit levels based on the 20-period moving average and a defined risk-to-reward ratio. Labels with the trade details (entry, TP, SL) are plotted, and alerts are triggered whenever a reversal pattern is identified.
[COG] Adaptive Squeeze Intensity 📊 Adaptive Squeeze Intensity (ASI) Indicator
🎯 Overview
The Adaptive Squeeze Intensity (ASI) indicator is an advanced technical analysis tool that combines the power of volatility compression analysis with momentum, volume, and trend confirmation to identify high-probability trading opportunities. It quantifies the degree of price compression using a sophisticated scoring system and provides clear entry signals for both long and short positions.
⭐ Key Features
- 📈 Comprehensive squeeze intensity scoring system (0-100)
- 📏 Multiple Keltner Channel compression zones
- 📊 Volume analysis integration
- 🎯 EMA-based trend confirmation
- 🎨 Proximity-based entry validation
- 📱 Visual status monitoring
- 🎨 Customizable color schemes
- ⚡ Clear entry signals with directional indicators
🔧 Components
1. 📐 Squeeze Intensity Score (0-100)
The indicator calculates a total squeeze intensity score based on four components:
- 📊 Band Convergence (0-40 points): Measures the relationship between Bollinger Bands and Keltner Channels
- 📍 Price Position (0-20 points): Evaluates price location relative to the base channels
- 📈 Volume Intensity (0-20 points): Analyzes volume patterns and thresholds
- ⚡ Momentum (0-20 points): Assesses price momentum and direction
2. 🎨 Compression Zones
Visual representation of squeeze intensity levels:
- 🔴 Extreme Squeeze (80-100): Red zone
- 🟠 Strong Squeeze (60-80): Orange zone
- 🟡 Moderate Squeeze (40-60): Yellow zone
- 🟢 Light Squeeze (20-40): Green zone
- ⚪ No Squeeze (0-20): Base zone
3. 🎯 Entry Signals
The indicator generates entry signals based on:
- ✨ Squeeze release confirmation
- ➡️ Momentum direction
- 📊 Candlestick pattern confirmation
- 📈 Optional EMA trend alignment
- 🎯 Customizable EMA proximity validation
⚙️ Settings
🔧 Main Settings
- Base Length: Determines the calculation period for main indicators
- BB Multiplier: Sets the Bollinger Bands deviation multiplier
- Keltner Channel Multipliers: Three separate multipliers for different compression zones
📈 Trend Confirmation
- Four customizable EMA periods (default: 21, 34, 55, 89)
- Optional trend requirement for entry signals
- Adjustable EMA proximity threshold
📊 Volume Analysis
- Customizable volume MA length
- Adjustable volume threshold for signal confirmation
- Option to enable/disable volume analysis
🎨 Visualization
- Customizable bullish/bearish colors
- Optional intensity zones display
- Status monitor with real-time score and state information
- Clear entry arrows and background highlights
💻 Technical Code Breakdown
1. Core Calculations
// Base calculations for EMAs
ema_1 = ta.ema(close, ema_length_1)
ema_2 = ta.ema(close, ema_length_2)
ema_3 = ta.ema(close, ema_length_3)
ema_4 = ta.ema(close, ema_length_4)
// Proximity calculation for entry validation
ema_prox_raw = math.abs(close - ema_1) / ema_1 * 100
is_close_to_ema_long = close > ema_1 and ema_prox_raw <= prox_percent
```
### 2. Squeeze Detection System
```pine
// Bollinger Bands setup
BB_basis = ta.sma(close, length)
BB_dev = ta.stdev(close, length)
BB_upper = BB_basis + BB_mult * BB_dev
BB_lower = BB_basis - BB_mult * BB_dev
// Keltner Channels setup
KC_basis = ta.sma(close, length)
KC_range = ta.sma(ta.tr, length)
KC_upper_high = KC_basis + KC_range * KC_mult_high
KC_lower_high = KC_basis - KC_range * KC_mult_high
```
### 3. Scoring System Implementation
```pine
// Band Convergence Score
band_ratio = BB_width / KC_width
convergence_score = math.max(0, 40 * (1 - band_ratio))
// Price Position Score
price_range = math.abs(close - KC_basis) / (KC_upper_low - KC_lower_low)
position_score = 20 * (1 - price_range)
// Final Score Calculation
squeeze_score = convergence_score + position_score + vol_score + mom_score
```
### 4. Signal Generation
```pine
// Entry Signal Logic
long_signal = squeeze_release and
is_momentum_positive and
(not use_ema_trend or (bullish_trend and is_close_to_ema_long)) and
is_bullish_candle
short_signal = squeeze_release and
is_momentum_negative and
(not use_ema_trend or (bearish_trend and is_close_to_ema_short)) and
is_bearish_candle
```
📈 Trading Signals
🚀 Long Entry Conditions
- Squeeze release detected
- Positive momentum
- Bullish candlestick
- Price above relevant EMAs (if enabled)
- Within EMA proximity threshold (if enabled)
- Sufficient volume confirmation (if enabled)
🔻 Short Entry Conditions
- Squeeze release detected
- Negative momentum
- Bearish candlestick
- Price below relevant EMAs (if enabled)
- Within EMA proximity threshold (if enabled)
- Sufficient volume confirmation (if enabled)
⚠️ Alert Conditions
- 🔔 Extreme squeeze level reached (score crosses above 80)
- 🚀 Long squeeze release signal
- 🔻 Short squeeze release signal
💡 Tips for Usage
1. 📱 Use the status monitor to track real-time squeeze intensity and state
2. 🎨 Pay attention to the color gradient for trend direction and strength
3. ⏰ Consider using multiple timeframes for confirmation
4. ⚙️ Adjust EMA and proximity settings based on your trading style
5. 📊 Use volume analysis for additional confirmation in liquid markets
📝 Notes
- 🔧 The indicator combines multiple technical analysis concepts for robust signal generation
- 📈 Suitable for all tradable markets and timeframes
- ⭐ Best results typically achieved in trending markets with clear volatility cycles
- 🎯 Consider using in conjunction with other technical analysis tools for confirmation
⚠️ Disclaimer
This technical indicator is designed to assist in analysis but should not be considered as financial advice. Always perform your own analysis and risk management when trading.
Optimized Smart Money Concept for BTCUSDThis indicator is designed to detect breakouts based on a simplified version of the Smart Money Concept (SMC) for BTCUSD and uses risk/reward calculations for trade management. Here's how it works:
1. Input Parameters:
Risk/Reward Ratio: This determines the target profit relative to the stop loss. For BTCUSD, the default is set to a 2:1 ratio (i.e., for every dollar risked, the target profit is two dollars).
Lookback Period for Swing High/Low: This is the number of bars used to look back to identify the highest high and lowest low, which help in determining the stop-loss levels. A larger lookback is used to account for BTCUSD's volatility.
2. Breakout Pattern:
Bullish Breakout Condition:
The first candle (index 2) is bearish (close < open).
The second candle (index 1) is bullish (close > open).
The third candle is also bullish (close > open), and it closes higher than the second candle.
Bearish Breakout Condition:
The first candle (index 2) is bullish (close > open).
The second candle (index 1) is bearish (close < open).
The third candle is also bearish (close < open), and it closes lower than the second candle.
3. Swing Points for Stop Loss:
Lowest Low (Long Stop Loss): The lowest low over the defined lookback period.
Highest High (Short Stop Loss): The highest high over the defined lookback period.
4. Stop Loss and Take Profit Calculation:
For Long (Buy) Trades:
Stop Loss is placed at the lowest low over the lookback period.
Take Profit is calculated by adding the difference between the entry price (current close) and the stop loss, multiplied by the risk/reward ratio (e.g., 2:1).
For Short (Sell) Trades:
Stop Loss is placed at the highest high over the lookback period.
Take Profit is calculated by subtracting the difference between the entry price and the stop loss, multiplied by the risk/reward ratio.
5. Conditions for Buy and Sell:
A buy condition is triggered when the bullish breakout pattern occurs.
A sell condition is triggered when the bearish breakout pattern occurs.
6. Plotting Buy/Sell Signals:
When a long (buy) condition is met, a label is placed below the candlestick with the entry price, take-profit (TP), and stop-loss (SL) levels. A line is drawn connecting the label to the low of the candlestick.
When a short (sell) condition is met, a label is placed above the candlestick with the entry price, TP, and SL levels. A line is drawn connecting the label to the high of the candlestick.
7. Breakout Debugging:
The indicator uses plotshape() to visually mark where bullish and bearish breakout patterns are detected on the chart with green (bullish) and red (bearish) shapes, respectively.
In Summary:
The indicator looks for specific bullish and bearish breakout patterns, calculates the stop-loss and take-profit levels based on swing points and a risk/reward ratio, and then plots buy/sell labels on the chart with the corresponding entry, TP, and SL values. It also provides a visual marker for each breakout pattern detected for debugging or confirmation purposes.
Machine Learning Moving Average [Seeds]Aprendendo a analisar e programar indicadores para dar suporte em negociações no mercado Forex.
NFP High/Low LevelsChart the last 12 NFP Day High and Low values automatically.
Review and update indicator settings accordingly.
*Feel free to use/edit/improve
*shoutout to DeepSeek for coding help
b1r1nc1 - AI Trade Strategy v1RSI Entry Logic
In this script, you are going long when RSI crosses under 30. This means RSI has just moved below 30 from above (i.e., entering oversold territory). Typically, some traders prefer going long when RSI crosses above 30 (rebound from oversold). Your approach is contrarian—entering as soon as RSI becomes oversold. That may be intentional, but make sure it aligns with your trading logic.
Exit Logic
Similarly, you exit a long either when RSI crosses above 50 or the trend flips to bearish. You may want to experiment with different thresholds (e.g., RSI crossing back above 30 or 40) to see which performs best historically.
Stop/Take Profit
You used strategy.exit() with stop and limit parameters. This will submit both orders (stop and limit) at once. If you prefer the built-in stop_loss or profit_target approach, you could replace them. Both work well; it’s personal preference.
If you want to see your stop and TP lines drawn on the chart, you can use the optional plot(...) statements. They’ll appear only for active positions.
Trend Definition
You’re using a simple 50/200 SMA cross to define bullish/bearish. That’s a classic approach, but you can also experiment with EMAs or different lengths (e.g., 20/50 or 20/100) to find a better fit for your market or timeframe.
Date Range
The date range is set from 2018 to 2069, which is quite wide. It’s perfectly fine, but if your backtests only go so far, you can tighten those timestamps as needed.
Performance & Optimization
If you plan on heavily optimizing (e.g., searching for the best RSI length, ATR multipliers, etc.), you can expose them as inputs and run TradingView’s strategy tester optimizations. It helps to keep code clean and ensure each parameter is an input for easier tweaking.
SmartTrend Pro by YaseenTrend Analyzer by Yaseen
🚀 Unlock the Power of Multi-Timeframe Trend Analysis!
Trend Analyzer by Yaseen is a powerful multi-timeframe trading tool designed to help traders identify trend shifts and execute precise entries with confidence. This script combines EMA crossovers, MACD signals, and 200 EMA trend confirmation to generate high-probability buy and sell signals.
🔹 Key Features:
✅ Multi-Timeframe Analysis: Uses 30-minute EMA crossovers & MACD confirmation for robust trend detection.
✅ Trend Filtering: Ensures trades align with the 200 EMA to avoid counter-trend setups.
✅ Dynamic Stop-Loss & Take-Profit: ATR-based T1, T2, and SL levels automatically adapt to volatility.
✅ Support & Resistance Levels: Automatically plots key 50-bar highs & lows for additional confluence.
✅ Custom Alerts: Get notified when a buy/sell signal, target, or stop-loss is triggered.
✅ Clean Visuals: Signals and targets are clearly displayed, with color-coded trend backgrounds.
📈 Ideal for traders looking to refine entries, manage risk effectively, and follow the trend with confidence.