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)
Indicators and strategies
BybitPerpsArrayLibrary "BybitPerpsArray"
f_getSymbolsForGroup(groupName)
Parameters:
groupName (string)
Contains all of the BYBIT Perp charts- use function to call them in groups
Gold Trading Signals 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)
// شرط خرید (Buy Signal)
buyCondition = ta.crossover(macdLine, signalLine) and close > ema50 and close > ema200 and rsi > 50
// شرط فروش (Sell Signal)
sellCondition = ta.crossunder(macdLine, signalLine) and close < ema50 and close < ema200 and rsi < 50
// واگراییها
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) // واگرایی منفی
// نمایش سیگنالها
plotshape(buyCondition or divBull, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal")
plotshape(sellCondition or divBear, 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)
SAR + RSI Strategy with SMA risk controlThis strategy first identifies RSI oversold or overbought and then within 1-3 candles of this condition looks for SAR signal and opens a trade accordingly. When the prices goes back to the 21 candle simple movin average, this closes the trade.
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.
Custom MAFACustom indicator of fang stocks to track other similar ETF's and see fi there are any arbitrage opportunities.
10-Point LinesPlace a line at each 10 points level.
Find support and resistant levels at fixed price points.
-RS
NVN FVG Buy/Sell ZonesThis TradingView Pine Script identifies Fair Value Gaps (FVGs) based on volume conditions and marks the first retracement into those zones. It detects bullish and bearish FVGs by checking if the middle candle’s volume higher than the first and last candles and above the 6-period moving average. The script highlights Sell FVGs in red and Buy FVGs in green while labeling the first retracement into each zone. Additionally, it filters signals to appear only before 2 PM Indian market time for better trade relevance.
Supertrend + Moving AverageSupertrend indicator with a Moving Average (MA) to provide trading signals and trend analysis. Below is a detailed description of the script:
Indicator Overview
Name: Supertrend + Moving Average
Purpose: This indicator overlays the Supertrend and Moving Average on the price chart to help identify trends, potential buy/sell signals, and trend direction changes.
Overlay: The indicator is plotted directly on the price chart (overlay = true).
Inputs
Supertrend Inputs:
ATR Period: The period for calculating the Average True Range (ATR). Default is 10.
Source: The price source for Supertrend calculations. Default is hl2 (the average of high and low prices).
ATR Multiplier: A multiplier applied to the ATR to determine the Supertrend bands. Default is 3.0.
Change ATR Calculation Method: A toggle to switch between using ta.atr() or ta.sma(ta.tr) for ATR calculation. Default is true (uses ta.atr()).
Show Buy/Sell Signals: A toggle to display buy/sell signals on the chart. Default is true.
Highlighter On/Off: A toggle to enable/disable highlighting of the uptrend and downtrend areas. Default is true.
Moving Average Inputs:
MA Period: The period for the Moving Average. Default is 50.
MA Type: The type of Moving Average to use. Options are SMA (Simple Moving Average) or EMA (Exponential Moving Average). Default is SMA.
Calculations
Supertrend Calculation:
The ATR is calculated using either ta.atr() or ta.sma(ta.tr) based on the Change ATR Calculation Method input.
Upper (up) and lower (dn) bands are calculated using the formula:
up = src - Multiplier * atr
dn = src + Multiplier * atr
The trend direction is determined based on the price crossing the upper or lower bands:
trend = 1 for an uptrend.
trend = -1 for a downtrend.
Moving Average Calculation:
The Moving Average is calculated based on the selected type (SMA or EMA) and period.
Plotting
Supertrend:
The upper band (up) is plotted as a green line during an uptrend.
The lower band (dn) is plotted as a red line during a downtrend.
Buy signals are displayed as green labels or circles when the trend changes from downtrend to uptrend.
Sell signals are displayed as red labels or circles when the trend changes from uptrend to downtrend.
The background is highlighted in green during an uptrend and red during a downtrend (if highlighting is enabled).
Moving Average:
The Moving Average is plotted as a blue line on the chart.
Alert Conditions
Buy Signal: Triggers when the Supertrend changes from a downtrend to an uptrend.
Sell Signal: Triggers when the Supertrend changes from an uptrend to a downtrend.
Trend Direction Change: Triggers when the Supertrend direction changes (from uptrend to downtrend or vice versa).
Key Features
Combines Supertrend and Moving Average for enhanced trend analysis.
Customizable inputs for ATR period, multiplier, and Moving Average type/period.
Visual buy/sell signals and trend highlighting.
Alert conditions for real-time notifications.
This script is useful for traders who want to identify trends, confirm signals with a Moving Average, and receive alerts for potential trading opportunities.
Price in BTC (x1000)I'm not a coder. I just knocked this together with AI
Shows how the current asset performed relative to BTC (COINBASE:BTCUSD) on the current timeframe
Works with assets priced in USD, USDT and USDC but you can easily add more
Had to multiply the price by 1000 to mitigate leading zeros and improve compatibility with low-denomination assets (e.g. PEPE)
MAs and crossovers included
Feel free to use it however you want
Trader's Mantra"A customizable trading psychology overlay that displays motivational reminders, current symbol information, and trading principles directly on the chart to help traders maintain focus, discipline, and emotional control."
Quad Rotation - 4 Stochastics Overlay with ABCD Detection"Quad Rotation - 4 Stochastics Overlay with ABCD Detection" is a momentum indicator combining four separate Stochastics and an ABCD pattern detection system.
Each Stochastic uses different parameter settings to capture potential rotation points in market momentum.
When three or more (this number is user customizable) of these Stochastics simultaneously slope downward above the 80 level (or slope upward below the 20 level), the chart background highlights in red (bearish) or green (bullish), indicating a multi-Stochastic momentum signal.
Additionally, the script tracks Stochastic #4 to detect an ABCD pattern:
Long Pattern (A-B) triggers if Stochastic #4 remains above 90 for a specified number of bars (abBars).
Short Pattern (C-D) triggers if Stochastic #4 remains below 10 for a specified number of bars (cdBars).
Visual markers (green X for long setups, red X for short setups) appear on the chart once these conditions are met. Users can enable alerts to receive real-time notifications whenever momentum signals or ABCD patterns occur.
This combination of multi-Stochastic momentum and ABCD detection helps traders gauge potential trend exhaustion and reversal points with greater confidence.
TFEX Futures Strategy with Volume Profile//@version=5
strategy("TFEX Futures Strategy with Volume Profile", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// กำหนดพารามิเตอร์
fastLength = input.int(9, title="Fast MA Length")
slowLength = input.int(21, title="Slow MA Length")
rsiLength = input.int(14, title="RSI Length")
overbought = input.float(70, title="Overbought Level")
oversold = input.float(30, title="Oversold Level")
vpLength = input.int(20, title="Volume Profile Length") // ความยาวของ Volume Profile
// คำนวณ Moving Averages
fastMA = ta.sma(close, fastLength)
slowMA = ta.sma(close, slowLength)
// คำนวณ RSI
rsi = ta.rsi(close, rsiLength)
// สัญญาณ Moving Average Crossover
maCrossover = ta.crossover(fastMA, slowMA) // Fast MA ข้าม Slow MA ขึ้น (สัญญาณ Buy)
maCrossunder = ta.crossunder(fastMA, slowMA) // Fast MA ข้าม Slow MA ลง (สัญญาณ Sell)
// สัญญาณ RSI
rsiBuySignal = rsi < oversold // RSI ต่ำกว่า Oversold (สัญญาณ Buy)
rsiSellSignal = rsi > overbought // RSI สูงกว่า Overbought (สัญญาณ Sell)
// Volume Profile
var float vpHigh = na
var float vpLow = na
if bar_index == last_bar_index - vpLength
vpHigh = ta.highest(high, vpLength)
vpLow = ta.lowest(low, vpLength)
// แสดง Volume Profile Zone
bgcolor(bar_index >= last_bar_index - vpLength ? color.new(color.blue, 90) : na, title="Volume Profile Zone")
// เงื่อนไขการเทรดด้วย Volume Profile
volumeProfileFilter = close > vpLow and close < vpHigh // ราคาปิดอยู่ในโซน Volume Profile
// เงื่อนไขการเทรด
if (maCrossover and rsiBuySignal and volumeProfileFilter)
strategy.entry("Buy", strategy.long)
label.new(bar_index, low, text="Buy", style=label.style_label_up, color=color.green, textcolor=color.white, size=size.small)
if (maCrossunder and rsiSellSignal and volumeProfileFilter)
strategy.entry("Sell", strategy.short)
label.new(bar_index, high, text="Sell", style=label.style_label_down, color=color.red, textcolor=color.white, size=size.small)
// แสดง Moving Averages บนกราฟ
plot(fastMA, title="Fast MA", color=color.blue, linewidth=2)
plot(slowMA, title="Slow MA", color=color.red, linewidth=2)
// แสดง RSI บนกราฟ
hline(overbought, "Overbought", color=color.red)
hline(oversold, "Oversold", color=color.green)
plot(rsi, title="RSI", color=color.purple, linewidth=2)
Enhanced Candle Statistics This custom Pine Script indicator calculates and displays key percentiles and averages for both the body and combined wick size of candles, helping traders judge market dynamics in real time.
Optimized Trading Day Probability - Start of DayDaily chart
chance of red/green close based on historical data
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.
Pivots @carlosk26🔍 Características Principales
Detección de Pivots:
Identifica pivots altos y bajos utilizando un rango de velas configurable.
Los pivots se detectan cuando una vela es el máximo o mínimo de un número específico de velas a la izquierda y a la derecha.
Marcado Visual:
Los pivots altos se marcan con un círculo rojo encima de la vela.
Los pivots bajos se marcan con un círculo verde debajo de la vela.
Etiquetas Informativas:
Muestra una etiqueta en el gráfico con el último pivot detectado.
Las etiquetas incluyen el tipo de pivot (alto o bajo) y su ubicación exacta.
⚙️ Parámetros Configurables
Velas a la izquierda: Número de velas a la izquierda para detectar un pivot (por defecto: 5).
Velas a la derecha: Número de velas a la derecha para detectar un pivot (por defecto: 5).
Advanced Multi-Strategy Trading SystemTrade with the trend: The strategy uses EMAs, RSI, and MACD to identify the trend and momentum, helping you enter trades that align with the broader market movement.
Risk management: You can control your risk with dynamic position sizing, stop loss, and take profit levels. The trailing stop ensures that you lock in profits as the market moves in your favor.
Strategy Execution: When the buy or sell signals appear, the strategy will automatically enter trades for you. The script calculates optimal position sizes and manages the trades based on your predefined risk parameters.
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! 🙏🏽🔥
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.
Multi-SMA (10 21 50 200 300)Displays 10, 21, 50, 200, and 300-period Simple Moving Averages on the chart.
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.
Advanced Order Blocks with VolumeAdvanced Order Blocks with Volume Indicator
This professional-grade indicator combines order block detection with sophisticated volume analysis to identify high-probability trading opportunities. It automatically detects and displays bullish and bearish order blocks formed during consolidation periods, enhanced by three distinct volume calculation methods (Simple, Relative, and Weighted).
Key Features:
- Smart consolidation detection with customizable thresholds
- Volume-filtered order blocks to avoid false signals
- Automatic order block mitigation tracking
- Clear visual presentation with volume metrics
- Flexible customization options for colors and parameters
Settings:
Core Parameters:
- Consolidation Threshold %: Sets the maximum price range (0.1-1.0%) for detecting consolidation zones
- Lookback Period: Number of bars (2-10) to analyze for consolidation patterns
Volume Analysis:
- Volume Calculation Method: Choose between Simple (basic average), Relative (compared to average), or Weighted (prioritized recent volume)
- Volume Lookback Period: Historical bars (5-100) used for volume analysis
- Volume Threshold Multiplier: Minimum volume requirement (1.0-5.0x) for valid order blocks
Visual Settings:
- Bullish/Bearish OB Color: Background colors for order blocks
- Bullish/Bearish OB Text Color: Colors for volume information display
Perfect for traders focusing on institutional price levels and volume-based trading strategies. The indicator helps identify potential reversal zones with strong institutional interest, validated by significant volume conditions.