OPEN-SOURCE SCRIPT

Buy/Sell Signals (MACD + RSI) 1H

This is a Pine Script indicator for TradingView that plots Buy/Sell signals based on the combination of MACD and RSI indicators on a 1-hour chart.

Description of the Code:
Indicator Setup:

The script is set to overlay the Buy/Sell signals directly on the price chart (using overlay=true).
The indicator is named "Buy/Sell Signals (MACD + RSI) 1H".
MACD Settings:

The MACD (Moving Average Convergence Divergence) uses standard settings of:
Fast Length: 12
Slow Length: 26
Signal Line Smoothing: 9
The MACD line and the Signal line are calculated using the ta.macd() function.
RSI Settings:

The RSI (Relative Strength Index) is calculated with a 14-period setting using the ta.rsi() function.
Buy/Sell Conditions:

Buy Signal:
Triggered when the MACD line crosses above the Signal line (Golden Cross).
RSI value is below 50.
Sell Signal:
Triggered when the MACD line crosses below the Signal line (Dead Cross).
RSI value is above 50.
Signal Visualization:

Buy Signals:
Green "BUY" labels are plotted below the price bars where the Buy conditions are met.
Sell Signals:
Red "SELL" labels are plotted above the price bars where the Sell conditions are met.
Chart Timeframe:

While the code itself doesn't enforce a specific timeframe, the name indicates that this indicator is intended to be used on a 1-hour chart.
To use it effectively, apply the script on a 1-hour chart in TradingView.
How It Works:
This indicator combines MACD and RSI to generate Buy/Sell signals:
The MACD identifies potential trend changes or momentum shifts (via crossovers).
The RSI ensures that Buy/Sell signals align with broader momentum (e.g., Buy when RSI < 50 to avoid overbought conditions).
When the defined conditions for Buy or Sell are met, visual signals (labels) are plotted on the chart.
How to Use:
Copy the code into the Pine Script editor in TradingView.
Save and apply the script to your 1-hour chart.
Look for:
"BUY" signals (green): Indicating potential upward trends or buying opportunities.
"SELL" signals (red): Indicating potential downward trends or selling opportunities.
This script is simple and focuses purely on providing actionable Buy/Sell signals based on two powerful indicators, making it ideal for traders who prefer a clean chart without clutter. Let me know if you need further customization!






buy_signalsdeadcrossgolden-crossMoving Average Convergence / Divergence (MACD)Relative Strength Index (RSI)sell_signals

Skrip open-source

Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Inggin menggunakan skrip ini pada chart?

Pernyataan Penyangkalan