Custom RSI Buy ConditionRSI (25) is near 30.
RSI (100) is near 40.
The price should be dropping from a previous higher level to a lower one (e.g., from 3125 to 3115/3120).
Patrones de gráficos
RSI Above 25 Buy and Sell ConditionBuy Signal: Triggered when RSI (25) is above 25, and a new candlestick forms.
Sell Signal: Triggered when RSI (25) falls below 75, and a new candlestick forms.
Small Buttons: We will use plotshape with a small size for the labels and make them as
RSI Above 25 Buy ConditionCopy the script and paste it into the Pine Script Editor on TradingView.
Save the script and click "Add to Chart".
You'll see "BUY" and "SELL" labels on the chart when the conditions are met.
You can also set up alerts for when the conditions trigger (Buy or Sell).
RSI Above 25 Buy ConditionCopy the script and paste it into the Pine Script Editor on TradingView.
Save the script and click "Add to Chart".
You'll see "BUY" and "SELL" labels on the chart when the conditions are met.
You can also set up alerts for when the conditions trigger (Buy or Sell).
RSI Strategy with ButtonsCopy and paste this code into TradingView's Pine Script editor.
Save and click "Add to Chart".
You'll see Buy and Sell labels on the chart when the conditions are met.
RSI Strategy with ButtonsCopy and paste this code into TradingView's Pine Script editor.
Save and click "Add to Chart".
You'll see Buy and Sell labels on the chart when the conditions are met.
RSI Strategy with ButtonsCopy and paste this code into TradingView's Pine Script editor.
Save and click "Add to Chart".
You'll see Buy and Sell labels on the chart when the conditions are met.
RSI + Chandelier Exit StrategyHere's a brief version of how to paste and apply the code in TradingView:
Go to TradingView.
Click on "Pine Editor" at the bottom of the screen.
Paste the code into the editor.
Click "Save" and give the script a name.
Click "Add to Chart" to apply it to your chart.
RSI + Chandelier Exit StrategyHere's a brief version of how to paste and apply the code in TradingView:
Go to TradingView.
Click on "Pine Editor" at the bottom of the screen.
Paste the code into the editor.
Click "Save" and give the script a name.
Click "Add to Chart" to apply it to your chart.
Combined RSI StrategyGo to TradingView.
Click on "Pine Editor" at the bottom of the screen.
Paste the code into the editor.
Click "Save" and give the script a name.
Click "Add to Chart" to apply it to your chart.
Now, you'll see the Buy and Sell signals on the chart. Optionally, you can set up alerts for Buy/Sell conditions.
Pro Stock Scanner + MACD# Pro Stock Scanner - Advanced Trading System
### Professional Scanning System Combining MACD, Momentum & Technical Analysis
## 🎯 Indicator Purpose
This indicator was developed to identify high-quality trading opportunities by combining:
- Strong positive momentum
- Clear technical trend
- Significant trading volume
- Precise MACD signals
## 💡 Core Mechanics
The indicator is based on three core components:
### 1. Advanced MACD Analysis (40%)
- MACD line crossover tracking
- Momentum strength measurement
- Positive/negative divergence detection
- Score range: 0-40 points
### 2. Trend Analysis (40%)
- Moving average relationships (MA20, MA50)
- Primary trend direction
- Current trend strength
- Score range: 0-40 points
### 3. Volume Analysis (20%)
- Comparison with 20-day average volume
- Volume breakout detection
- Score range: 0-20 points
## 📊 Scoring System
Total score (0-100) composition:
```
Total Score = MACD Score (40%) + Trend Score (40%) + Volume Score (20%)
```
### Score Interpretation:
- 80-100: Strong Buy Signal 🔥
- 65-79: Developing Bullish Trend ⬆️
- 50-64: Neutral ↔️
- 0-49: Technical Weakness ⬇️
## 📈 Chart Markers
1. **Large Blue Triangle**
- High score (80+)
- Positive MACD
- Bullish MACD crossover
2. **Small Triangles**
- Green: Bullish MACD crossover
- Red: Bearish MACD crossover
## 🎛️ Customizable Parameters
```
MACD Settings:
- Fast Length: 12
- Slow Length: 26
- Signal Length: 9
- Strength Threshold: 0.2%
Volume Settings:
- Threshold: 1.5x average
```
## 📱 Information Panel
Real-time display of:
1. Total Score
2. MACD Score
3. MACD Strength
4. Volume Score
5. Summary Signal
## ⚙️ Optimization Guidelines
Recommended adjustments:
1. **Bull Market**
- Decrease MACD sensitivity
- Increase volume threshold
- Focus on trend strength
2. **Bear Market**
- Increase MACD sensitivity
- Stricter trend conditions
- Higher score requirements
## 🎯 Recommended Trading Strategy
### Phase 1: Initial Scan
1. Look for 80+ total score
2. Verify sufficient trading volume
3. Confirm bullish MACD crossover
### Phase 2: Validation
1. Check long-term trend
2. Identify nearby resistance levels
3. Review earnings calendar
### Phase 3: Position Management
1. Set clear stop-loss
2. Define realistic profit targets
3. Monitor score changes
## ⚠️ Important Notes
1. This indicator is a supplementary tool
2. Combine with fundamental analysis
3. Strict risk management is essential
4. Not recommended for automated trading
## 📈 Usage Examples
Examples included:
1. Successful buy signal
2. Trend reversal identification
3. False signal analysis and lessons learned
## 🔄 Future Updates
1. RSI integration
2. Advanced alerts
3. Auto-optimization features
## 🎯 Key Benefits
1. Clear scoring system
2. Multiple confirmation layers
3. Real-time market feedback
4. Customizable parameters
## 🚀 Getting Started
1. Add indicator to chart
2. Adjust parameters if needed
3. Monitor information panel
4. Wait for strong signals (80+ score)
## 📊 Performance Metrics
- Success rate: Monitor and track
- Best performing in trending markets
- Optimal for swing trading
- Most effective on daily timeframe
## 🛠️ Technical Details
```pine
// Core components
1. MACD calculation
2. Volume analysis
3. Trend confirmation
4. Score computation
```
## 💡 Pro Tips
1. Use multiple timeframes
2. Combine with support/resistance
3. Monitor sector trends
4. Consider market conditions
## 🤝 Support
Feedback and improvement suggestions welcome!
## 📜 License
MIT License - Free to use and modify
## 📚 Additional Resources
- Recommended timeframes: Daily, 4H
- Best performing markets: Stocks, ETFs
- Optimal market conditions: Trending markets
- Risk management guidelines included
## 🔍 Final Notes
Remember:
- No indicator is 100% accurate
- Always use proper position sizing
- Combine with other analysis tools
- Practice proper risk management
// @version=5
// @description Pro Stock Scanner - Advanced trading system combining MACD, momentum and volume analysis
// @author AviPro
// @license MIT
//
// This indicator helps identify high-quality trading opportunities by analyzing:
// 1. MACD momentum and crossovers
// 2. Trend strength and direction
// 3. Volume patterns and breakouts
//
// The system provides:
// - Total score (0-100)
// - Visual signals on chart
// - Information panel with key metrics
// - Customizable parameters
//
// IMPORTANT: This indicator is for educational and informational purposes only.
// Always conduct your own analysis and use proper risk management.
//
// If you find this indicator helpful, please consider leaving a like and comment!
// Feedback and suggestions for improvement are always welcome.
GB_Sir : 15 Min Inside Bar15 Min Inside Bar Setup are fetched by this indicator. Persistent lines are drawn on High and Low of 2nd bar. These lines remains persistent even after changing timeframe of chart to lower time frame.
DayTrade with Gap+EMA+VWAPThis script covers 2 timeframe EMAs along with VWAP from session open to identify day trades. works well with gap movers
Mongoose Signals: Trend & Momentum Hunter
**Mongoose Signals: Trend & Momentum Hunter**
Stay ahead of the market with **Mongoose Signals**, an agile and precise tool designed to detect key **trend reversals** and **momentum shifts**. This script combines the power of:
- **Moving Averages (MA):** Tracks overall trend direction.
- **RSI:** Identifies overbought/oversold conditions and momentum.
- **MACD:** Confirms bullish or bearish momentum changes.
- **Volume Delta:** Ensures signals align with strong market participation.
With built-in **background trend zones** and intuitive **signal markers**, this script is perfect for traders seeking actionable and reliable alerts. Let the mongoose hunt down opportunities for you!
Entry Price % Difference//@version=5
indicator("Entry Price % Difference", overlay=true)
// User input for entry price
entryPrice = input.float(title="Entry Price", defval=100.0, step=0.1)
// Draggable input for profit and stop loss levels
profitLevel = input.float(title="Profit Level (%)", defval=10.0, step=0.1)
stopLossLevel = input.float(title="Stop Loss Level (%)", defval=-10.0, step=0.1)
// User input for USDT amount in the trade
usdtAmount = input.float(title="USDT Amount", defval=1000.0, step=1.0)
// User input for trade type (Long or Short)
tradeType = input.string(title="Trade Type", defval="Long", options= )
// User input for line styles and colors
profitLineStyle = input.string(title="Profit Line Style", defval="Dotted", options= )
profitLineColor = input.color(title="Profit Line Color", defval=color.green)
profitLineWidth = input.int(title="Profit Line Width", defval=1, minval=1, maxval=5)
stopLossLineStyle = input.string(title="Stop Loss Line Style", defval="Dotted", options= )
stopLossLineColor = input.color(title="Stop Loss Line Color", defval=color.red)
stopLossLineWidth = input.int(title="Stop Loss Line Width", defval=1, minval=1, maxval=5)
entryLineColor = input.color(title="Entry Line Color", defval=color.blue)
entryLineWidth = input.int(title="Entry Line Width", defval=1, minval=1, maxval=5)
// User input for label customization
labelTextColor = input.color(title="Label Text Color", defval=color.white)
labelBackgroundColor = input.color(title="Label Background Color", defval=color.gray)
// User input for fee percentage
feePercentage = input.float(title="Fee Percentage (%)", defval=0.1, step=0.01)
// Map line styles
profitStyle = profitLineStyle == "Solid" ? line.style_solid : profitLineStyle == "Dotted" ? line.style_dotted : line.style_dashed
stopLossStyle = stopLossLineStyle == "Solid" ? line.style_solid : stopLossLineStyle == "Dotted" ? line.style_dotted : line.style_dashed
// Calculate percentage difference
livePrice = close
percentDifference = tradeType == "Long" ? ((livePrice - entryPrice) / entryPrice) * 100 : ((entryPrice - livePrice) / entryPrice) * 100
// Calculate profit or loss
profitOrLoss = usdtAmount * (percentDifference / 100)
// Calculate fees and net profit or loss
feeAmount = usdtAmount * (feePercentage / 100)
netProfitOrLoss = profitOrLoss - feeAmount
// Display percentage difference, profit/loss, and fees as a single label following the current price
if bar_index == last_bar_index
labelColor = percentDifference >= 0 ? color.new(color.green, 80) : color.new(color.red, 80)
var label plLabel = na
if na(plLabel)
plLabel := label.new(bar_index + 1, livePrice + (livePrice * 0.005), str.tostring(percentDifference, "0.00") + "% " + "P/L: " + str.tostring(netProfitOrLoss, "0.00") + " USDT (Fee: " + str.tostring(feeAmount, "0.00") + ")",
style=label.style_label_down, color=labelBackgroundColor, textcolor=labelTextColor)
else
label.set_xy(plLabel, bar_index + 1, livePrice + (livePrice * 0.005))
label.set_text(plLabel, str.tostring(percentDifference, "0.00") + "% " + "P/L: " + str.tostring(netProfitOrLoss, "0.00") + " USDT (Fee: " + str.tostring(feeAmount, "0.00") + ")")
label.set_color(plLabel, labelBackgroundColor)
label.set_textcolor(plLabel, labelTextColor)
// Calculate profit and stop loss levels based on trade type
profitPrice = tradeType == "Long" ? entryPrice * (1 + profitLevel / 100) : entryPrice * (1 - profitLevel / 100)
stopLossPrice = tradeType == "Long" ? entryPrice * (1 + stopLossLevel / 100) : entryPrice * (1 - stopLossLevel / 100)
// Plot profit, stop loss, and entry price lines
line.new(x1=bar_index - 1, y1=profitPrice, x2=bar_index + 1, y2=profitPrice, color=profitLineColor, width=profitLineWidth, style=profitStyle)
line.new(x1=bar_index - 1, y1=stopLossPrice, x2=bar_index + 1, y2=stopLossPrice, color=stopLossLineColor, width=stopLossLineWidth, style=stopLossStyle)
line.new(x1=bar_index - 1, y1=entryPrice, x2=bar_index + 1, y2=entryPrice, color=entryLineColor, width=entryLineWidth, style=line.style_solid)
// Show percentage difference in the price scale
plot(percentDifference, title="% Difference on Price Scale", color=color.new(color.blue, 0), linewidth=0, display=display.price_scale)
// Add alerts for profit and stop loss levels
alertcondition(livePrice >= profitPrice, title="Profit Target Reached", message="The price has reached or exceeded the profit target.")
alertcondition(livePrice <= stopLossPrice, title="Stop Loss Triggered", message="The price has reached or dropped below the stop loss level.")
Ema plus DSGreetings everyone! I've been thoroughly enjoying refining this strategy over the past few weeks. After much hard work and dedication, I am finally ready to release it to the public and share what I have been diligently working on.
This strategy enables you to see an entry and exit in a trade. The logic behind this is to identify potential support and resistance levels based on fractal swing highs and swing lows and validate these levels using ATR analysis.
The Ema+ :
This calculates the Exponential Moving Average (EMA) using the “Close” value and length of “50”. It plots the calculated EMA on the chart, The Ema color is determined by a ternary operator that checks if the previous close price is greater than the EMA and the current close price is also greater than the EMA, in which case the color is set to green, otherwise it is set to red.
The Dynamic Structure DS:
Identifies support and resistance zones based on fractal swing highs and swing lows, as well as Average True Range (ATR) analysis. The script takes several user inputs, including the ATR movement required, the lookback period for detecting swing highs and lows, the maximum zone size compared to ATR, the zone update count before reset, and a boolean flag to determine whether to draw the previous structure (i.e., support-turned-resistance and resistance-turned-support).
This script uses the ta.atr() function to calculate the ATR value for a given period (default is 14). It then detects fractal swing highs and swing lows based on the highest and lowest bodies of candles, respectively, within the specified lookback period. If a swing high or swing low is detected, the script calculates the potential resistance and support levels based on the difference between the swing high/low and the previous swing high/low.
It also checks for significant declines and rallies since detecting the swing highs and swing lows, respectively, based on the ATR movement required. If a significant decline or rally is detected, the script stores the previous resistance and support levels in variables and updates the current resistance and support levels in variables.
And It logic for counting the number of times a resistance or support level has been violated without being reset. If a resistance or support level has been violated, the script resets the search for new resistance or support levels.
This script also includes logic for checking if the previous resistance or support level has been violated, and resetting the potential resistance or support levels if they have been. It also includes logic for drawing the previous structure (i.e., support-turned-resistance and resistance-turned-support) based on user input.
Overall, this script aims to identify potential support and resistance levels based on fractal swing highs and swing lows and validate these levels using ATR analysis, while also providing functionality for resetting the search for new levels if the previous levels have been violated.
I sincerely appreciate your efforts in giving my strategy a try. Wishing you the utmost success in your endeavors. Don't forget to follow me for future updates!
Ema plus DS
Greetings everyone! I've been thoroughly enjoying refining this strategy over the past few weeks. After much hard work and dedication, I am finally ready to release it to the public and share what I have been diligently working on.
This strategy enables you to see an entry and exit in a trade. The logic behind this is to identify potential support and resistance levels based on fractal swing highs and swing lows and validate these levels using ATR analysis.
The Ema+ :
This calculates the Exponential Moving Average (EMA) using the “Close” value and length of “50”. It plots the calculated EMA on the chart, The Ema color is determined by a ternary operator that checks if the previous close price is greater than the EMA and the current close price is also greater than the EMA, in which case the color is set to green, otherwise it is set to red.
The Dynamic Structure DS:
Identifies support and resistance zones based on fractal swing highs and swing lows, as well as Average True Range (ATR) analysis. The script takes several user inputs, including the ATR movement required, the lookback period for detecting swing highs and lows, the maximum zone size compared to ATR, the zone update count before reset, and a boolean flag to determine whether to draw the previous structure (i.e., support-turned-resistance and resistance-turned-support).
This script uses the ta.atr() function to calculate the ATR value for a given period (default is 14). It then detects fractal swing highs and swing lows based on the highest and lowest bodies of candles, respectively, within the specified lookback period. If a swing high or swing low is detected, the script calculates the potential resistance and support levels based on the difference between the swing high/low and the previous swing high/low.
It also checks for significant declines and rallies since detecting the swing highs and swing lows, respectively, based on the ATR movement required. If a significant decline or rally is detected, the script stores the previous resistance and support levels in variables and updates the current resistance and support levels in variables.
And It logic for counting the number of times a resistance or support level has been violated without being reset. If a resistance or support level has been violated, the script resets the search for new resistance or support levels.
This script also includes logic for checking if the previous resistance or support level has been violated, and resetting the potential resistance or support levels if they have been. It also includes logic for drawing the previous structure (i.e., support-turned-resistance and resistance-turned-support) based on user input.
Overall, this script aims to identify potential support and resistance levels based on fractal swing highs and swing lows and validate these levels using ATR analysis, while also providing functionality for resetting the search for new levels if the previous levels have been violated.
I sincerely appreciate your efforts in giving my strategy a try. Wishing you the utmost success in your endeavors. Don't forget to follow me for future updates!
DOL, SMT, FVG with Entry/Exit Signals//@version=5
indicator("DOL, SMT, FVG with Entry/Exit Signals", overlay=true)
// تحديد مستوى افتتاح اليوم (DOL)
var float dol = na
if (dayofweek != dayofweek ) // بداية يوم جديد
dol := open
// رسم مستوى DOL
plot(dol, title="Daily Open Level (DOL)", color=color.blue, linewidth=2)
// حساب المقاومات والدعوم
resistance = ta.highest(high, 20) // أعلى مستوى في آخر 20 شمعة
support = ta.lowest(low, 20) // أدنى مستوى في آخر 20 شمعة
plot(resistance, title="Resistance", color=color.red, linewidth=1)
plot(support, title="Support", color=color.green, linewidth=1)
// تحديد فجوات القيمة العادلة (FVG)
fvg_up = high < low and low > high // فجوة صعودية
fvg_down = low > high and high < low // فجوة هبوطية
// تلوين الخلفية بناءً على فجوات FVG
bgcolor(fvg_up ? color.new(color.green, 85) : na, title="Bullish FVG")
bgcolor(fvg_down ? color.new(color.red, 85) : na, title="Bearish FVG")
// مقارنة الأصول لاستخدام SMT
asset1 = request.security("EURUSD", "5", close) // الأصل الأول
asset2 = request.security("GBPUSD", "5", close) // الأصل الثاني
// إشارات SMT - مقارنة القمم والقيعان
smt_bullish = ta.highest(asset1, 10) > ta.highest(asset1 , 10) and ta.highest(asset2, 10) < ta.highest(asset2 , 10)
smt_bearish = ta.lowest(asset1, 10) < ta.lowest(asset1 , 10) and ta.lowest(asset2, 10) > ta.lowest(asset2 , 10)
// إشارات الدخول
if smt_bullish and close > dol
label.new(bar_index, high, "دخول شراء", style=label.style_label_up, color=color.green, textcolor=color.white)
if smt_bearish and close < dol
label.new(bar_index, low, "دخول بيع", style=label.style_label_down, color=color.red, textcolor=color.white)
// إشارات الخروج
if close < support
label.new(bar_index, low, "خروج بيع", style=label.style_label_down, color=color.red, textcolor=color.white)
if close > resistance
label.new(bar_index, high, "خروج شراء", style=label.style_label_up, color=color.green, textcolor=color.white)
DOL, SMT, FVG with Entry/Exit Signals//@version=5
indicator("DOL, SMT, FVG with Entry/Exit Signals", overlay=true)
// تحديد مستوى افتتاح اليوم (DOL)
var float dol = na
if (dayofweek != dayofweek ) // بداية يوم جديد
dol := open
// رسم مستوى DOL
plot(dol, title="Daily Open Level (DOL)", color=color.blue, linewidth=2)
// حساب المقاومات والدعوم
resistance = ta.highest(high, 20) // أعلى مستوى في آخر 20 شمعة
support = ta.lowest(low, 20) // أدنى مستوى في آخر 20 شمعة
plot(resistance, title="Resistance", color=color.red, linewidth=1)
plot(support, title="Support", color=color.green, linewidth=1)
// تحديد فجوات القيمة العادلة (FVG)
fvg_up = high < low and low > high // فجوة صعودية
fvg_down = low > high and high < low // فجوة هبوطية
// تلوين الخلفية بناءً على فجوات FVG
bgcolor(fvg_up ? color.new(color.green, 85) : na, title="Bullish FVG")
bgcolor(fvg_down ? color.new(color.red, 85) : na, title="Bearish FVG")
// مقارنة الأصول لاستخدام SMT
asset1 = request.security("EURUSD", "5", close) // الأصل الأول
asset2 = request.security("GBPUSD", "5", close) // الأصل الثاني
// إشارات SMT - مقارنة القمم والقيعان
smt_bullish = ta.highest(asset1, 10) > ta.highest(asset1 , 10) and ta.highest(asset2, 10) < ta.highest(asset2 , 10)
smt_bearish = ta.lowest(asset1, 10) < ta.lowest(asset1 , 10) and ta.lowest(asset2, 10) > ta.lowest(asset2 , 10)
// إشارات الدخول
if smt_bullish and close > dol
label.new(bar_index, high, "دخول شراء", style=label.style_label_up, color=color.green, textcolor=color.white)
if smt_bearish and close < dol
label.new(bar_index, low, "دخول بيع", style=label.style_label_down, color=color.red, textcolor=color.white)
// إشارات الخروج
if close < support
label.new(bar_index, low, "خروج بيع", style=label.style_label_down, color=color.red, textcolor=color.white)
if close > resistance
label.new(bar_index, high, "خروج شراء", style=label.style_label_up, color=color.green, textcolor=color.white)
Estrategia MACD
Combina señales del MACD con gestión de riesgo ajustable. Opera en cruces del MACD con su línea de señal cuando el histograma confirma la dirección.
Características principales:
Entradas: Cruces de líneas MACD con confirmación de histograma
Stop Loss: Mínimos/máximos de X velas previas
Take Profit: Ratio ajustable respecto al SL
Direcciones: Configurable para largos, cortos o ambos
Timeframe: Compatible con cualquier marco temporal
Parámetros personalizables:
Periodos MACD (12, 26, 9)
Velas para SL
Ratio riesgo/beneficio
Daytrading ES Wick Length StrategyThis Pine Script strategy calculates the combined length of upper and lower wicks of candlesticks and uses a customizable moving average (MA) to identify potential long entry points. The strategy compares the total wick length to the MA with an added offset. If the wick length exceeds the offset-adjusted MA, the strategy enters a long position. The position is automatically closed after a user-defined holding period.
Key Features:
1. Calculates the sum of upper and lower wicks for each candlestick.
2. Offers four types of moving averages (SMA, EMA, WMA, VWMA) for analysis.
3. Allows the user to set a customizable MA length and an offset to shift the MA.
4. Automatically exits positions after a specified number of bars.
5. Visualizes the wick length as a histogram and the offset-adjusted MA as a line.
References:
• Candlestick wick analysis: Nison, S. (1991). Japanese Candlestick Charting Techniques.
• Moving averages: Brock, W., Lakonishok, J., & LeBaron, B. (1992). “Simple Technical Trading Rules and the Stochastic Properties of Stock Returns”. Journal of Finance.
This strategy is suitable for identifying candlesticks with significant volatility and long wicks, which can indicate potential trend reversals or continuations.
Advanced RSI, MACD & Pattern Detection Systemscript which might determine the overbought and oversold zone on the chart while monitoring and analyzing previous movement in the chart. based on every technical aspect of pattern recognition and manipulation , consolidation, support and resistance of past data which could lead to determine the future movement in the chart
MA Crossover Signal// Menentukan versi Pine Script
//@version=5
indicator("MA Crossover Signal", overlay=true)
// Parameter Moving Average
ma_short_length = 9
ma_long_length = 15
// Menghitung Moving Average
ma_short = ta.sma(close, ma_short_length)
ma_long = ta.sma(close, ma_long_length)
// Kondisi Sinyal Buy dan Sell
buy_signal = ta.crossover(ma_short, ma_long)
sell_signal = ta.crossunder(ma_short, ma_long)
// Plot Moving Averages
plot(ma_short, color=color.blue, title="MA 9")
plot(ma_long, color=color.red, title="MA 15")
// Memberikan sinyal pada chart
plotshape(buy_signal, style=shape.labelup, location=location.belowbar, color=color.green, size=size.small, title="Buy Signal", text="BUY")
plotshape(sell_signal, style=shape.labeldown, location=location.abovebar, color=color.red, size=size.small, title="Sell Signal", text="SELL")
// Menambahkan alert
alertcondition(buy_signal, title="Buy Alert", message="MA 9 Crosses Above MA 15")
alertcondition(sell_signal, title="Sell Alert", message="MA 9 Crosses Below MA 15")