AI Signals//@version=5
indicator("AI Signals", overlay=true)
// Import external data (e.g., CSV uploaded to TradingView's server)
var data = request.security(symbol="NASDAQ:YOUR_DATA_SOURCE", timeframe="D", expression=close)
// Define buy/sell signals
buy_signal = data == 1
sell_signal = data == -1
// Plot arrows on the chart
plotshape(buy_signal, style=shape.triangleup, color=color.green, location=location.belowbar, size=size.small)
plotshape(sell_signal, style=shape.triangledown, color=color.red, location=location.abovebar, size=size.small)
אינדיקטורים ואסטרטגיות
Drawdown from All-Time High (%)This indicator calculates and displays the drawdown percentage from the all-time high of the price. It helps traders visualize how far the current price is from its peak, making it a valuable tool for analyzing market trends, identifying retracements, and assessing risk.
Fractal Time/Price Scaling Invariance//@version=6
indicator("Fractal Time/Price Scaling Invariance", overlay=true, shorttitle="FTSI v1.2")
// Zeitliche Oktaven-Konfiguration
inputShowTimeOctaves = input(true, "Zeit-Oktaven anzeigen")
inputBaseTime1 = input.int(8, "Basisintervall 1 (Musikalische Oktave)", minval=1)
inputBaseTime2 = input.int(12, "Basisintervall 2 (Alternative Sequenz)", minval=1)
// Preis-Fraktal-Konfiguration
inputShowPriceFractals = input(true, "Preis-Fraktale anzeigen")
inputFractalDepth = input.int(20, "Fraktal-Betrachtungstiefe", minval=5)
// 1. Zeitliche Fraktale mit skaleninvarianter Oktavstruktur
if inputShowTimeOctaves
// Musikalische Oktaven (8er-Serie)
for i = 0 to 6
timeInterval1 = inputBaseTime1 * int(math.pow(2, i))
if bar_index % timeInterval1 == 0
line.new(bar_index, low - syminfo.mintick, bar_index, high + syminfo.mintick, color=color.new(color.blue, 70), width=2)
// Alternative Sequenz (12er-Serie)
for j = 0 to 6
timeInterval2 = inputBaseTime2 * int(math.pow(3, j))
if bar_index % timeInterval2 == 0
line.new(bar_index, low - syminfo.mintick, bar_index, high + syminfo.mintick, color=color.new(color.purple, 70), width=2)
// 2. Korrigierte Preis-Fraktal-Erkennung
var fractalHighArray = array.new_line()
var fractalLowArray = array.new_line()
if inputShowPriceFractals
// Fractal Detection (korrekte v6-Syntax)
isFractalHigh = high == ta.highest(high, 5)
isFractalLow = low == ta.lowest(low, 5)
// Zeichne dynamische Fraktal-Linien
if isFractalHigh
line.new(bar_index , high , bar_index + inputFractalDepth, high , color=color.new(color.red, 80), style=line.style_dotted)
if isFractalLow
line.new(bar_index , low , bar_index + inputFractalDepth, low , color=color.new(color.green, 80), style=line.style_dotted)
// Array-Bereinigung
if array.size(fractalHighArray) > 50
array.remove(fractalHighArray, 0)
if array.size(fractalLowArray) > 50
array.remove(fractalLowArray, 0)
// 3. Dynamische Übergangszonen (Hesitationsbereiche)
transitionZone = ta.atr(14) * 2
upperZone = close + transitionZone
lowerZone = close - transitionZone
plot(upperZone, "Upper Transition", color.new(color.orange, 50), 2)
plot(lowerZone, "Lower Transition", color.new(color.orange, 50), 2)
// 4. Skaleninvariante Alarmierung
alertcondition(ta.crossover(close, upperZone), "Breakout nach oben", "Potenzielle Aufwärtsbewegung!")
alertcondition(ta.crossunder(close, lowerZone), "Breakout nach unten", "Potenzielle Abwärtsbewegung!")
EMA/SMA 9/20/50/200 + TrailStop4 wichtige EMA/SMA und der ATR TrailStop in einem Indikator zusammengefasst.
Der ATR Trailing Stops Indikator ist eine Kombination aus der ATR (Average True Range) und einem Trailing Stop. Die Average True Range ist eine Volatilitätsmessung und kann entweder über 14 Tage oder 21 Tage eingestellt werden.
Average Volatility Over N Days (XAUUSD & Forex)The indicator displays the average range of daily candles over an N-period.
Magic Strategy SabaBasic with engulf & EMA200 & RSI. chart above EMA200, RSI above 50% and every time see engulf you can buy
TKT - Alert Candle with RSI and MA ConditionsTKT Strategy PSX
This strategy will work on most of the PSX stocks.
Rules for this strategy are:
1, Price close above MA 45.
2, Price close above MA 200.
3, RSI cross 60 to upword ( RSI settings, Upper=60, Mid=50, Lower=40)
Once all these points are meet then you can buy that stock on next day if it cross last day high and sustain.
Pin Bar Signal with SMA, Bollinger Bands, RSI and MACD FiltersThis script is designed to identify Pin Bar patterns on a price chart and generate buy/sell signals based on additional filters such as SMA, Bollinger Bands, RSI, and MACD. It also includes optional stop-loss and take-profit levels. Below is a breakdown of the script's functionality:
---
**Key Features**
1. **Pin Bar Detection**:
- **Bullish Pin Bar**: Lower shadow is at least twice the size of the upper shadow and body.
- **Bearish Pin Bar**: Upper shadow is at least twice the size of the lower shadow and body.
2. **Filters**:
- **SMA Filter**: Ensures the price is above/below the SMA for buy/sell signals.
- **Bollinger Bands Filter**: Ensures the price is below the lower band for buy signals or above the upper band for sell signals.
- **RSI Filter**: Ensures RSI is oversold for buy signals or overbought for sell signals.
- **MACD Filter**: Ensures the MACD line is above the signal line for buy signals or below for sell signals.
3. **Stop Loss and Take Profit**:
- Calculates stop-loss and take-profit levels as a percentage of the entry price.
- Visualizes these levels on the chart.
4. **Visual and Audio Alerts**:
- Plots buy/sell signals on the chart.
- Triggers alerts for buy/sell signals.
---
**Inputs**
- **Enable/Disable Filters**: Allows users to toggle SMA, Bollinger Bands, RSI, and MACD filters.
- **SMA Length**: Period for the Simple Moving Average.
- **Bollinger Bands Settings**: Length and standard deviation for Bollinger Bands.
- **RSI Settings**: Length, overbought, and oversold levels.
- **MACD Settings**: Fast, slow, and signal lengths.
- **Stop Loss & Take Profit**: Percentage levels for SL and TP.
---
**Calculations**
1. **SMA**: Calculates the Simple Moving Average.
2. **Bollinger Bands**: Computes the basis (SMA), standard deviation, and upper/lower bands.
3. **RSI**: Calculates the Relative Strength Index.
4. **MACD**: Computes the MACD line, signal line, and histogram.
5. **Pin Bar Conditions**: Determines bullish and bearish Pin Bars based on shadow and body sizes.
---
**Signals**
- **Buy Signal**: Bullish Pin Bar + SMA filter (if enabled) + Bollinger Bands filter (if enabled) + RSI filter (if enabled) + MACD filter (if enabled).
- **Sell Signal**: Bearish Pin Bar + SMA filter (if enabled) + Bollinger Bands filter (if enabled) + RSI filter (if enabled) + MACD filter (if enabled).
---
**Visualization**
- **Buy/Sell Signals**: Labels are plotted on the chart for buy/sell signals.
- **SMA and Bollinger Bands**: Plotted on the chart if enabled.
- **Stop Loss and Take Profit**: Stepped lines are plotted on the chart if enabled.
---
**Alerts**
- Triggers an alert when a buy or sell signal is detected.
---
**Usage**
1. Add the script to your TradingView chart.
2. Customize the input settings (e.g., SMA length, RSI levels, etc.).
3. Enable/disable filters as needed.
4. Monitor buy/sell signals and SL/TP levels on the chart.
---
**Example Scenario**
- If a bullish Pin Bar forms, the price is above the SMA, below the lower Bollinger Band, RSI is oversold, and MACD line is above the signal line, a buy signal is generated. The script will plot a "BUY" label, trigger an alert, and display the stop-loss and take-profit levels.
---
**Improvements**
1. **Additional Filters**: Add more indicators (e.g., Volume, ATR) for better signal confirmation.
2. **Customizable Alerts**: Allow users to customize alert messages.
3. **Backtesting**: Integrate backtesting functionality to evaluate the strategy's performance.
4. **Multi-Timeframe Analysis**: Add support for multi-timeframe analysis.
---
This script is a robust tool for traders who use Pin Bars in combination with other technical indicators to make informed trading decisions.
EymenYapayZeka2RSI, piyasanın aşırı alım veya aşırı satım koşullarını belirler. RSI periyodu, varsayılan olarak 14 gün olarak ayarlanmıştır.
EMA ise son kapanış fiyatlarının ağırlıklı ortalamasıdır ve genellikle trendin yönünü belirlemek için kullanılır. EMA periyodu 50 olarak ayarlanmıştır.
Alım ve Satım Sinyalleri:
Al Sinyali (Buy Signal): RSI, 30 seviyesini yukarı keserse ve fiyat, EMA'nın üzerinde kalıyorsa, bu bir alım sinyali oluşturur.
Sat Sinyali (Sell Signal): RSI, 70 seviyesini aşağı keserse ve fiyat, EMA'nın altında kalıyorsa, bu bir satış sinyali oluşturur.
Grafikteki Çizimler:
EMA, mavi renkte ve kalın çizgiyle grafikte gösterilir.
Alım sinyali, grafikte yeşil renkte, "AL" yazılı bir etiketle ve aşağıda belirir.
Satım sinyali, kırmızı renkte, "SAT" yazılı bir etiketle ve yukarıda belirir.
Kullanım:
Bu indikatör, kullanıcıya potansiyel alım ve satım fırsatlarını basit bir şekilde gösterir.
Risk Yönetimi: Alım ve satım sinyalleri, yalnızca teknik analizde bir yardımcı araçtır. Yatırımcılar, her zaman risk yönetimi stratejilerini göz önünde bulundurmalıdır.
Bu indikatör, özellikle basit ve hızlı analiz yaparak ticaret kararlarını desteklemek isteyenler için uygun bir araçtır.
EMA50150 with SMA150 Stop-loss and Re-Entry #gangesThis strategy is a trading system that uses Exponential Moving Averages (EMA) and Simple Moving Averages (SMA) to determine entry and exit points for trades. Here's a breakdown of the key components and logic:
Key Indicators:
EMA 50 (Exponential Moving Average with a 50-period window): This is a more responsive moving average to recent price movements.
EMA 150 (Exponential Moving Average with a 150-period window): A slower-moving average that helps identify longer-term trends.
SMA 150 (Simple Moving Average with a 150-period window): This acts as a stop-loss indicator for long trades.
User Inputs:
Start Date and End Date: The strategy is applied only within this date range, ensuring that trading only occurs during the specified period.
Trade Conditions:
Buy Signal (Long Position):
A buy is triggered when the 50-period EMA crosses above the 150-period EMA (indicating the price is gaining upward momentum).
Sell Signal (Short Position):
A sell is triggered when the 50-period EMA crosses below the 150-period EMA (indicating the price is losing upward momentum and moving downward).
Stop-Loss for Long Positions:
If the price drops below the 150-period SMA, the strategy closes any long positions as a stop-loss mechanism to limit further losses.
Re-Entry After Stop-Loss:
After a stop-loss is triggered, the strategy monitors for a re-entry signal:
Re-buy: If the price crosses above the 150-period EMA from below, a new long position is triggered.
Re-sell: If the 50-period EMA crosses below the 150-period EMA, a new short position is triggered.
Trade Execution:
Buy or Sell: The strategy enters trades based on the conditions described and exits them if the stop-loss conditions are met.
Re-entry: After a stop-loss, the strategy tries to re-enter the market based on the same buy/sell conditions.
Risk Management:
Commission and Slippage: The strategy includes a 0.1% commission on each trade and allows for 3 pips of slippage to account for real market conditions.
Visuals:
The strategy plots the 50-period EMA (blue), 150-period EMA (red), and 150-period SMA (orange) on the chart, helping users visualize the key levels for decision-making.
Date Range Filter:
The strategy only executes trades during the user-defined date range, which helps limit trades to a specific period and avoid backtesting errors on irrelevant data.
Stop-Loss Logic:
The stop-loss is triggered when the price crosses below the 150-period SMA, closing the long position to protect against significant drawdowns.
Overall Strategy Goal:
The strategy aims to capture long-term trends using the EMAs for entry signals, while protecting profits through the stop-loss mechanism and offering a way to re-enter the market after a stop-loss.
Price Ratio of Two StocksFormula that plots the price ratio between two stocks.
Price ratio defined as: Price of stock 1/Price of stock 2
If the ratio increases, it means stock 1 is becoming more expensive relative to stock 2, and vice versa.
Bollinger Bands ±1σ/±2σ/±3σBollinger Bands (BB) are constructed using the following formula:
±1σ: Simple Moving Average (SMA) ± Standard Deviation
±2σ: Simple Moving Average ± (Standard Deviation × 2)
±3σ: Simple Moving Average ± (Standard Deviation × 3)
The probability of price movement staying within each band is as follows:
±1σ: 68.26%
±2σ: 95.44%
±3σ: 99.74%
Buy/Sell AlgoThis script is an advanced trading software that harnesses real-time price data to provide the most accurate and timely buy signals:
📊 Real-Time Data: Continuously processes live market data to track price movements and identify key trends.
🔄 Advanced Algorithm: Leverages a dynamic crossover strategy between two moving averages (9-period short MA and 21-period long MA) to pinpoint optimal entry points with precision.
📍 Buy Signals: Automatically generates “BUY” signals when the short-term moving average crosses above the long-term moving average, reflecting a high-probability trend reversal to the upside.
🟩 Visual Indicators: Candle bars are dynamically colored green during bullish signals, providing clear visual confirmation for buyers.
rich's golden crossHow It Works:
Rich's Golden Cross plots clear "BUY" signals on your chart when all conditions align, giving you a strategic edge in the markets. Whether you're a swing trader or a long-term investor, this indicator helps you stay ahead of the curve by filtering out noise and focusing on high-quality setups.
Why Choose Rich's Golden Cross?
Multi-Timeframe Analysis: Combines short-term and long-term trends for better accuracy.
Easy-to-Read Signals: Clear buy alerts directly on your chart.
Customizable: Adjust parameters to suit your trading style.
Take your trading to the next level with Rich's Golden Cross—your ultimate tool for spotting golden opportunities in the market.
Gold Trading Signals m.samimi// Pine Script v5
//@version=5
indicator("Gold Trading Signals", overlay=true)
// تنظیم اندیکاتورها
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
= ta.macd(close, 12, 26, 9)
rsi = ta.rsi(close, 14)
atr = ta.atr(14)
stochRsi = ta.stoch(close, high, low, 14)
volumeProfile = ta.sma(volume, 50)
// محاسبه Bollinger Bands به صورت دستی
bb_middle = ta.sma(close, 20)
bb_upper = bb_middle + 2 * ta.stdev(close, 20)
bb_lower = bb_middle - 2 * ta.stdev(close, 20)
// شرط خرید (Buy Signal)
buyCondition = ta.crossover(macdLine, signalLine) and close > ema50 and close > ema200 and rsi > 50 and stochRsi < 20
// شرط فروش (Sell Signal)
sellCondition = ta.crossunder(macdLine, signalLine) and close < ema50 and close < ema200 and rsi < 50 and stochRsi > 80
// واگراییها
divBull = ta.lowest(close, 5) < ta.lowest(close, 10) and rsi > ta.lowest(rsi, 10) // واگرایی مثبت
divBear = ta.highest(close, 5) > ta.highest(close, 10) and rsi < ta.highest(rsi, 10) // واگرایی منفی
// بررسی شکست مقاومت و حمایت
breakoutUp = close > bb_upper and volume > volumeProfile
breakoutDown = close < bb_lower and volume > volumeProfile
// مدیریت ریسک با ATR
stopLoss = atr * 1.5
riskReward = stopLoss * 2
// نمایش سیگنالها
plotshape(buyCondition or divBull or breakoutUp, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal")
plotshape(sellCondition or divBear or breakoutDown, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal")
// نمایش خطوط EMA
plot(ema50, title="EMA 50", color=color.blue)
plot(ema200, title="EMA 200", color=color.orange)
// نمایش Bollinger Bands
plot(bb_upper, title="BB Upper", color=color.gray)
plot(bb_middle, title="BB Middle", color=color.gray)
plot(bb_lower, title="BB Lower", color=color.gray)
// نمایش ATR
plot(atr, title="ATR", color=color.purple)
7 Trading Setups with Codesit uses 7 indicator breakouts for trading , RSI SMA ORB TRIPLE TOP AND BOTTOM
RGBB EMA StrategyBasic EMA crossover for length 22,55,100 and 200.
Long when all 4 ema in upward trend
Short when all 4 ema in downward trend
Only for educational purpose.
Ali's Favor We are analyzing the 200 SMA, 45 EMA, and 21 EMA to assess market trends. A color-shaded area between the 200 SMA and 45 EMA helps determine whether the trend is bullish (long) or bearish (short).
* Yellow shading signals potential high-momentum moves, highlighting key market activity.
* Green/Red shading indicates a clear directional trend when no transition zone is present.
* A candle indicator (Hammer, Elephant, or 3-Bar) can be toggled on or off for additional insights.
* The 21 EMA plays a crucial role in this strategy, helping to identify optimal entry points when price action interacts with it.
Why 21 you ask?
1. Captures Short-to-Medium-Term Trends
The 21 EMA strikes a balance between short-term (e.g., 9 EMA) and longer-term (e.g., 50 or 200 EMA) trends, making it effective for identifying momentum shifts in various timeframes.
2. Acts as Dynamic Support & Resistance
Many traders watch the 21 EMA as a key decision-making level. When price approaches this moving average:
Uptrend: It often acts as support, providing potential long entry points.
Downtrend: It serves as resistance, indicating possible short opportunities.
3. Used in Momentum-Based Trading Strategies
Professional traders and algos use the 21 EMA to measure momentum. A strong trend often sees price bouncing off the 21 EMA before continuing in the same direction.
4. Works Well with Other EMAs
When paired with other EMAs (like the 45 EMA or 200 SMA), the 21 EMA helps determine:
Trend strength (if price holds above/below it)
Reversal zones (when price deviates far from it)
Breakout confirmation (if price reclaims it after consolidation)
Time Frame:
this can be used with any timeframe because becuase its really just using 21 ema
Other Highlights of 21:
* Triangular Number: 21 is the sum of the first six natural numbers (1+2+3+4+5+6 = 21), making it a triangular number, which appears in many natural patterns.
* Fibonacci Connection: 21 is part of the Fibonacci sequence (0, 1, 1, 2, 3, 5, 8, 13, 21...), a key mathematical pattern found in nature.
* Human Development: It takes approximately 21 days to form a new habit, based on research in psychology and behavioral science.
* Biology: The average human cell cycle lasts about 21 hours, affecting how cells grow and regenerate.
* The Sun moves into a new zodiac sign around the 21st of each month
* 21-Gun Salute: A symbol of high honor in military traditions.
* In numerology, 21 represents success, completion, and transformation.
* Bible & Other Texts: The number appears in religious contexts, symbolizing divine wisdom or judgment.
* Blackjack: The goal of the game is to reach 21.
* The game "21" is a popular street basketball game that helps players develop individual skills
All praise to the Most High, Yahweh, the Creator of all things! 🙌🏽✨
Yahweh's wisdom is seen in everything—from the patterns in nature to the cycles in life and markets. Even numbers like 21, which hold deep mathematical and spiritual significance, are part of His divine order.
If you ever want to explore biblical insights, financial wisdom from scripture, or how faith connects with your trading and decision-making, let me know! Blessings to you! 🙏🏽🔥
Trend Start and Change and Signals by fekonomiTrend Change and Start Signals Indicator
This indicator combines multiple technical analysis tools to generate buy and sell signals based on trend changes and market conditions. It uses the following components:
MACD (Moving Average Convergence Divergence): Identifies trend direction and momentum.
RSI (Relative Strength Index): Measures the speed and change of price movements.
EMA (Exponential Moving Average): Tracks the average price over a specific period, giving more weight to recent prices.
ADX (Average Directional Index): Indicates the strength of a trend.
Ichimoku Cloud: Provides support and resistance levels, trend direction, and momentum.
Volume Increase: Checks for significant increases in trading volume.
How It Works
Buy Signal: Generated when at least three of the following conditions are met:
MACD line crosses above the signal line.
RSI is above 50.
Short EMA crosses above the long EMA and ADX indicates a strong trend.
Price is above the Ichimoku Cloud and volume is significantly higher than the average.
Sell Signal: Generated when at least three of the following conditions are met:
MACD line crosses below the signal line.
RSI is below 50.
Short EMA crosses below the long EMA and ADX indicates a strong trend.
Price is below the Ichimoku Cloud.
Visualization
Buy signals are marked with green "BUY" labels below the bars.
Sell signals are marked with red "SELL" labels above the bars.
The indicator also plots the short and long EMAs, and the Ichimoku Cloud for visual reference.
This indicator helps traders identify potential trend changes and entry/exit points based on a combination of reliable technical indicators.
Feel free to customize the settings to fit your trading strategy! If you have any questions or need further assistance, let me know. Happy trading! 📈
Oops ReversalOpen below prior days low and the Oops is triggered by a reversal through the low of the previous day.