Индикаторы и стратегии
Average Rupee Volume ScannerScript for scanning the stocks based on the Average Rupee volumes in crores , wherein both number of days and Average Rupee volumes in crores are user configurable
EMA21 and EMA55 CrossoverTradingView will trigger when the 21-period Exponential Moving Average (EMA21) crosses the 55-period Exponential Moving Average (EMA55). The code includes basic alerts for both the crossover and crossunder events.
Open-Close Range ComparisonTo find out stocks having range expansion.
Can be used as breakout for entering
Williams Fractals and AlligatorThe "Williams Fractals and Alligator" indicator is a technical analysis tool that combines two essential concepts: Williams Fractals and the Alligator oscillator, which help traders identify potential reversal points and trends in price action.
Components of the Indicator:
Fractals:
Definition: Fractals are patterns that indicate price reversals. An up fractal is formed when there is a high point surrounded by lower highs, while a down fractal is formed with a low point surrounded by higher lows.
User Input: The user can define the period for identifying fractals via an input parameter (n). The default value is set to 2.
Calculation Logic: The indicator uses nested loops to compare the current price against previous and subsequent prices based on the specified period. If the conditions for a fractal are met, it generates a signal.
Alligator:
Definition: The Alligator indicator consists of three lines: the Jaw, Teeth, and Lips, which represent different smoothed moving averages of the price.
User Input: Users can customize the length and offset of each of the Alligator lines:
Jaw Length: Default value of 13
Teeth Length: Default value of 8
Lips Length: Default value of 5
Offsets for each line adjust how far ahead the lines are plotted.
Calculation Logic: The indicator employs a custom Smoothed Moving Average (SMMA) function to calculate the values of the Jaw, Teeth, and Lips using the price source (typically the average of the high and low).
Plotting:
The indicator plots up fractals as upward triangles above the price bars (in teal) and down fractals as downward triangles below the price bars (in red).
The Alligator lines are plotted in different colors:
Jaw: Blue
Teeth: Red
Lips: Green
Each line is plotted with the ability to offset visually on the chart.
Purpose of the Indicator:
The primary use of this indicator is to identify potential entry and exit points in trading based on the fractal patterns while considering the prevailing trend indicated by the Alligator’s three lines.
Up fractals may signal potential buy opportunities, especially when positioned in an uptrend indicated by the Alligator lines.
Conversely, down fractals may signal potential sell opportunities, particularly in a downtrend.
Conclusion:
The "Williams Fractals and Alligator" indicator serves as a comprehensive tool for traders, combining fractal-based reversal signals with trend-following dynamics through the Alligator oscillator, thereby enhancing decision-making in trading strategies.
ATR ReadoutDisplays a readout on the bottom right corner of the screen displaying ATR average (not of the individual candlestick, but of the current rolling period, including the candlestick in question).
Due to restrictions with Pine Script (or my knowledge thereof) only the current and previous candlestick data is shown, rather than the one currently hovered over.
The data is derived via the standard calculation for ATR.
Using this, one can quickly and easily get the proper data needed to calculate one's stop loss, rather than having to analyze the line graph of the basic ATR indicator.
Settings are implemented to change certain variables to your liking.
{Scalping 20-30 pips for TFF Traders}I am not suggest use indicator.
Use indicator 20-30pips only.
SMC Reading strategy
BTC Trendline Strategy - 1min - One DirectionBTC Trendline Strategy - 1min - One DirectionBTC Trendline Strategy - 1min - One DirectionBTC Trendline Strategy - 1min - One DirectionBTC Trendline Strategy - 1min - One DirectionBTC Trendline Strategy - 1min - One DirectionBTC Trendline Strategy - 1min - One Direction
Waddah Attar Explosion V6 [Enhanced]Modified from the original @LazyBear code, with the following improvements:
* updated for Pine Script v6
* added customization for input values, including bar color
* added normalisation for all values to provide scale consistency
* added signal markers
* added alert code
The Waddah Attar Explosion (WAE), second panel from top, is a technical analysis indicator that combines trend detection, momentum, and volatility to identify potential trading opportunities. The main components of this indicator are:
1. Trend Component (t1):
Calculated using the difference between two EMAs (fast and slow)
Shows trend direction and strength
Positive values indicate uptrend, negative values indicate downtrend
The sensitivity multiplier amplifies these movements
2. Explosion Component (e1):
Based on Bollinger Bands width (difference between upper and lower bands)
Measures market volatility
Wider bands indicate higher volatility
Used to gauge potential for significant price movements
3. Dead Zone:
Calculated using moving average of True Range
Acts as a noise filter
Helps eliminate false signals in low-volatility periods
The visual elements are explained as follows:
A. Green/Red Columns:
Green columns: Upward trend movement (t1 > 0)
Red columns: Downward trend movement (t1 < 0)
Height indicates strength of the movement
B. Yellow Line (Explosion Line):
Shows the volatility component (e1)
Higher values suggest increased market volatility
Used to confirm signal strength
C. Blue Cross (Dead Zone):
Filters out weak signals
Signals should exceed this level to be considered valid
Buy Signals occur when:
* Green column is increasing
* Movement exceeds dead zone
* Momentum strength is above threshold
* Indicates potential upward price movement
Sell Signals occur when:
* Red column is increasing
* Movement exceeds dead zone
* Momentum strength is above threshold
* Indicates potential downward price movement
Key Features of this Version compared to the @LazyBear code:
Normalization Options:
Can normalize values between 0-1
Helps compare across different timeframes/instruments
Option for fixed or adaptive maximum values
Momentum Calculation:
Based on trend strength relative to volatility
Scaled based on explosion line range
Helps confirm signal strength
Signal Visualization:
Triangle markers for buy/sell signals
Labels showing momentum strength
Helps identify key trading opportunities
Usage Tips:
Signal Confirmation:
Wait for columns to exceed dead zone
Check explosion line for volatility confirmation
Verify momentum strength
Consider multiple timeframe analysis
Parameter Adjustment:
Adjust sensitivity based on trading style
Modify EMA lengths for different timeframes
Fine-tune dead zone multiplier for noise filtering
Risk Management:
Use with other indicators for confirmation
Consider market conditions and volatility
Don't rely solely on indicator signals
The WAE indicator is particularly useful for:
* Identifying trend reversals
* Measuring trend strength
* Filtering out noise
* Confirming breakout movements
* Gauging market volatility
Same date previous years Linesshows the same day of all previous years on a chart, you can utilize the year and month input functions to compare today's date with past years.
Same date previous years Linesshows the same day of all previous years on a chart, you can utilize the year and month input functions to compare today's date with past years.
Debug Buy/Sell Signals with Woodies CCI FilterThe script implements a trading strategy using Bollinger Bands combined with Woodies CCI (Commodity Channel Index) as a filter.
Script này triển khai một chiến lược giao dịch sử dụng Bollinger Bands kết hợp với chỉ báo CCI (Commodity Channel Index) của Woodies làm bộ lọc
EMA 24/52//@version=5
indicator(title="EMA 24/52", overlay=true)
fast = ta.ema(close, 24)
slow = ta.ema(close, 52)
plot(fast, color=color.blue)
plot(slow, color=color.red)
AI Trends Indicator//@version=5
indicator("AI Trends Indicator", overlay=true)
// Input parameters
ai_ticker = input.symbol("NASDAQ:AI", title="AI Stock/ETF Ticker")
short_ma_length = input.int(20, title="Short MA Length")
long_ma_length = input.int(50, title="Long MA Length")
rsi_length = input.int(14, title="RSI Length")
rsi_overbought = input.int(70, title="RSI Overbought Level")
rsi_oversold = input.int(30, title="RSI Oversold Level")
// Data source
ai_close = request.security(ai_ticker, timeframe.period, close)
// Moving averages
short_ma = ta.sma(ai_close, short_ma_length)
long_ma = ta.sma(ai_close, long_ma_length)
// RSI
rsi = ta.rsi(ai_close, rsi_length)
// Buy/sell conditions
buy_signal = ta.crossover(short_ma, long_ma) and rsi < rsi_oversold
sell_signal = ta.crossunder(short_ma, long_ma) and rsi > rsi_overbought
// Plot signals
plot(short_ma, color=color.blue, title="Short MA")
plot(long_ma, color=color.red, title="Long MA")
plotshape(buy_signal, style=shape.labelup, location=location.belowbar, color=color.green, title="Buy Signal")
plotshape(sell_signal, style=shape.labeldown, location=location.abovebar, color=color.red, title="Sell Signal")
// Background color for overbought/oversold RSI zones
bgcolor(rsi > rsi_overbought ? color.new(color.red, 90) : na, title="Overbought Zone")
bgcolor(rsi < rsi_oversold ? color.new(color.green, 90) : na, title="Oversold Zone")
// Alerts
alertcondition(buy_signal, title="Buy Alert", message="Buy signal triggered for {{ticker}}")
alertcondition(sell_signal, title="Sell Alert", message="Sell signal triggered for {{ticker}}")
3D christmas treeThis script draws a rotating 3D Christmas tree with a star on a chart, using cylindrical and spherical coordinate systems. Decorations like bells, gifts, and reindeer are randomly placed on the tree using a pseudo-random number generator. The tree's appearance is customizable with adjustable parameters such as height, viewing angle, and decoration density. Please zoom out on the chart for a better view.
VWAPVILVWAPVIL is a TradingView script that calculates and displays the Volume Weighted Average Price (VWAP) on a chart, helping traders identify key levels based on trading volume. By showing where most of the trading activity occurs, it allows for quick assessment of whether the price is trending above or below its average, supporting both short-term and intraday trading strategies.
[Au Linear Regression Buy-Sell-V1]### English Version:
#### Title: **Linear Regression Buy-Sell Strategy with Stop Loss and Take Profit Levels**
This script, designed for the TradingView platform, implements a **Linear Regression** based trading strategy with **buy and sell signals**, **stop loss** and **take profit** levels, and **cooldown periods** between signals. It aims to provide traders with an automated mechanism to make entry and exit decisions, based on the trend direction indicated by the slope of the regression line.
---
#### **1. Input Settings**
The script begins with several configurable inputs:
- **Regression Period** (`regression_period`): The number of bars used to calculate the linear regression line, which helps to determine the price trend.
- **Signal Sensitivity** (`signal_threshold`): A threshold that adjusts the sensitivity of the buy and sell signals based on the slope of the regression line.
- **Stop Loss Percentage** (`stop_loss_percent`): The percentage of price movement at which the trade will be closed to minimize losses.
- **Take Profit Percentage** (`profit_target_percent`): The percentage of price movement at which the trade will be closed to secure profits.
- **Cooldown Period** (`cooldown_period`): A time (in bars) that must pass before a new signal can trigger.
- **Alert Deviation** (`alert_deviation`): The tolerance for deviations around the stop loss and take profit levels to trigger alerts.
---
#### **2. Linear Regression Calculation**
A **Linear Regression Line** is calculated using the `ta.linreg` function, which gives a smooth representation of the price trend over a specified number of bars. The **slope** of this line is then calculated by comparing the current regression value to the previous value.
---
#### **3. Cooldown Control**
This section prevents consecutive signals from being triggered too quickly by introducing a cooldown period between buy and sell signals. The script tracks the bar index of the last signal and ensures that no new signal is given until the cooldown period has passed.
---
#### **4. Buy and Sell Signals**
The script generates buy and sell signals based on the slope of the regression line:
- **Buy Signal**: When the slope is greater than the sensitivity threshold (`signal_threshold`), and a cooldown period has passed.
- **Sell Signal**: When the slope is less than the negative sensitivity threshold, and a cooldown period has passed.
Once a signal is generated, the script tracks the bar index of that signal to ensure the cooldown is respected.
---
#### **5. Stop Loss and Take Profit Levels**
The script sets **stop loss** and **take profit** levels upon signal generation:
- **Stop Loss**: For a long position, the stop loss is set to a percentage below the entry price. For a short position, the stop loss is set to a percentage above the entry price.
- **Take Profit**: For a long position, the take profit is set to a percentage above the entry price. For a short position, it is set to a percentage below the entry price.
Once the price hits the stop loss or take profit levels, the entry price is reset, effectively closing the trade.
---
#### **6. Plotting the Signals and Lines**
The script plots the **linear regression line**, **buy** (green triangle), and **sell** (red triangle) signals on the chart. Additionally, it plots the **stop loss** (red line) and **take profit** (green line) levels when an active trade is ongoing.
---
#### **7. Alerts**
The script can send alerts when:
- A **buy signal** is triggered.
- A **sell signal** is triggered.
- The price approaches the **stop loss** or **take profit** levels, based on the **alert deviation** setting.
---
### Turkish Version:
#### Başlık: **Doğrusal Regresyon Al-Sat Stratejisi ile Zarar Durdurma ve Kar Alma Seviyeleri**
Bu betik, **TradingView** platformu için tasarlanmış olup, **doğrusal regresyon** tabanlı bir ticaret stratejisi sunmaktadır. Bu strateji, **al ve sat sinyalleri**, **zarar durdurma** ve **kar alma** seviyeleri ile **sinyaller arasında bekleme süreleri** sağlar. Amaç, yatırımcılara regresyon çizgisinin eğimine dayalı bir şekilde, ticaret kararlarını otomatikleştirerek giriş ve çıkış noktalarını belirlemelerine yardımcı olmaktır.
---
#### **1. Giriş Ayarları**
Betik, birkaç yapılandırılabilir girdi ile başlar:
- **Regresyon Periyodu** (`regression_period`): Regresyon çizgisinin hesaplanacağı bar sayısı. Bu, fiyatın trendini belirlemekte kullanılır.
- **Sinyal Hassasiyeti** (`signal_threshold`): Regresyon çizgisinin eğimine göre al ve sat sinyallerinin hassasiyetini ayarlar.
- **Zarar Durdurma Yüzdesi** (`stop_loss_percent`): Fiyatın belirli bir yüzdesi kadar hareket ettiğinde ticaretin kapatılacağı seviyeyi belirtir.
- **Kar Alma Yüzdesi** (`profit_target_percent`): Fiyatın belirli bir yüzdesi kadar hareket ettiğinde ticaretin kapatılacağı seviyeyi belirtir.
- **Bekleme Süresi** (`cooldown_period`): Yeni bir sinyalin oluşmadan önce beklenmesi gereken zaman (bar cinsinden).
- **Sapma Toleransı** (`alert_deviation`): Zarar durdurma ve kar alma seviyelerinde uyarı tetiklenmesi için belirli bir sapma toleransını ayarlamak için kullanılır.
---
#### **2. Doğrusal Regresyon Hesaplama**
**Doğrusal Regresyon Çizgisi**, `ta.linreg` fonksiyonu kullanılarak hesaplanır ve bu çizgi, belirli bir bar sayısı boyunca fiyatın trendini yumuşatarak gösterir. Bu çizginin **eğimi**, şu anki regresyon değeri ile önceki regresyon değeri karşılaştırılarak hesaplanır.
---
#### **3. Bekleme Süresi Kontrolü**
Bu bölüm, al ve sat sinyallerinin çok hızlı bir şekilde tekrarlanmaması için bir bekleme süresi ekler. Betik, son sinyalin bar indeksini takip eder ve yeni bir sinyalin verilmesi için bekleme süresinin geçmesini sağlar.
---
#### **4. Al ve Sat Sinyalleri**
Betik, regresyon çizgisinin eğimine dayalı olarak al ve sat sinyalleri üretir:
- **Al Sinyali**: Eğimin sinyal hassasiyetini (`signal_threshold`) aşması durumunda ve bekleme süresi tamamlandığında al sinyali verilir.
- **Sat Sinyali**: Eğimin negatif sinyal hassasiyetini geçmesi durumunda ve bekleme süresi tamamlandığında sat sinyali verilir.
Bir sinyal verildikten sonra, betik sinyalin bar indeksini kaydederek bekleme süresi koşulunu takip eder.
---
#### **5. Zarar Durdurma ve Kar Alma Seviyeleri**
Betik, sinyal oluşturulduğunda **zarar durdurma** ve **kar alma** seviyelerini belirler:
- **Zarar Durdurma**: Uzun pozisyon için, zarar durdurma seviyesi giriş fiyatının belirli bir yüzdesi kadar altında belirlenir. Kısa pozisyon için ise bu seviye, giriş fiyatının belirli bir yüzdesi kadar üstünde belirlenir.
- **Kar Alma**: Uzun pozisyon için, kar alma seviyesi giriş fiyatının belirli bir yüzdesi kadar üstünde belirlenir. Kısa pozisyon için ise bu seviye giriş fiyatının belirli bir yüzdesi kadar altında belirlenir.
Fiyat, zarar durdurma veya kar alma seviyelerine ulaşırsa, giriş fiyatı sıfırlanır ve ticaret kapatılır.
---
#### **6. Sinyalleri ve Çizgileri Görselleştirme**
Betik, **doğrusal regresyon çizgisini**, **al** (yeşil üçgen) ve **sat** (kırmızı üçgen) sinyallerini grafikte gösterir. Ayrıca, aktif bir ticaret varsa, **zarar durdurma** (kırmızı çizgi) ve **kar alma** (yeşil çizgi) seviyelerini de gösterir.
---
#### **7. Uyarılar**
Betik aşağıdaki durumlarda uyarılar gönderebilir:
- Bir **al sinyali** tetiklendiğinde.
- Bir **sat sinyali** tetiklendiğinde.
- Fiyat, **zarar durdurma** veya **kar alma** seviyelerine yaklaşırsa, belirlenen **sapma toleransı** çerçevesinde.
---
This script can be utilized by traders who prefer to automate their entry and exit points based on a regression-based trend analysis, while also setting predefined risk management levels through stop loss and take profit settings.
5EMA : Power Of Stocks (SHORT)This indicator is based on the original strategy by Subasish Pani, also known as Power of Stock. It’s designed for traders who focus on scalping and short setups, leveraging the 5 EMA as the mean point of price. The strategy aims to identify potential price reversals when the price moves away from its mean and shows signs of losing momentum in an uptrend.
How It Works
The 5 EMA serves as a reference for the mean price. This indicator focuses on price action around the 5 EMA to identify high-probability short setups. The key concept is to spot moments where the price appears overextended above the 5 EMA and prepares for a potential reversal.
Key Elements of the Strategy:
Qualifying Candle:
The candle must close above the 5 EMA, reinforcing the uptrend scenario.
The candle’s low must not touch the 5 EMA, showing the price is extended from its mean.
Entry Signal:
A short trade is triggered when the price breaks below the low of the qualifying candle.
This breakdown indicates a potential reversal and weakening of the uptrend.
Risk Management:
Stop-loss is set above the high of the qualifying candle.
Take-profit levels are determined using support zones or a predefined risk-to-reward ratio.
Features
Automatic Detection: The indicator identifies qualifying candles and marks them on the chart.
Breakdown Alerts: Receive alerts when the price breaks below the qualifying candle's low for potential entry opportunities.
Customizable Settings: Adjust the EMA length and other parameters to suit your trading style or different market conditions.
Multi-Market Compatibility: Works on stocks, forex, indices, and cryptocurrencies.
Who Should Use This Indicator?
This tool is ideal for scalpers and short-term traders looking for a systematic approach to capitalize on reversals in uptrending markets. Whether you’re trading stocks, forex, or crypto, this strategy offers a disciplined way to time your short entries.
Note: Always test any trading strategy in a demo environment and backtest thoroughly before applying it in live markets. Risk management is crucial in scalping strategies to protect your capital.
Ichimoku Cloud StrategyThis strategy utilizes the Ichimoku Cloud, a popular technical analysis tool, to identify trend direction and trade signals. The core idea of this strategy is to use the Leading Span A (LeadLine1) and Leading Span B (LeadLine2) as the key decision-making components for entries and exits.