Crypto Buy/Sell Strategy This script is designed to automatically identify buy and sell signals based on a combination of the MACD and RSI indicators.
How the Script Works:
MACD:
Calculates the difference between the fast (12) and slow (26) exponential moving averages (EMA).
Generates signals based on the crossover of the MACD line and the signal line.
RSI (Relative Strength Index):
Uses a standard period (14) to determine overbought (70) and oversold (30) levels.
A buy signal is generated when RSI falls below the oversold level.
A sell signal is generated when RSI rises above the overbought level.
Signal Criteria:
Buy Signal (BUY):
MACD line crosses above the signal line.
RSI is below the oversold level (30).
Sell Signal (SELL):
MACD line crosses below the signal line.
RSI is above the overbought level (70).
Usage:
This script helps traders quickly identify potential entry and exit points in the market.
Indicators and signals are visualized directly on the chart to facilitate analysis.
Additionally, current RSI and EMA values are displayed to support decision-making.
Suitable For:
Scalping and trend trading.
Instructions:
You can customize the MACD, RSI lengths, and overbought/oversold levels in the script settings.
Этот скрипт разработан для автоматического определения сигналов покупки и продажи на основе комбинации индикаторов MACD и RSI.
Как работает скрипт:
MACD:
Вычисляет разницу между быстрым (12) и медленным (26) экспоненциальными скользящими средними (EMA).
Генерирует сигналы на основании пересечения MACD линии и сигнальной линии.
RSI (Индекс относительной силы):
Использует стандартный период (14) для расчета уровня перекупленности (70) и перепроданности (30).
Сигнал на покупку генерируется, если RSI опускается ниже уровня перепроданности.
Сигнал на продажу генерируется, если RSI поднимается выше уровня перекупленности.
Критерии сигналов:
Сигнал покупки (BUY):
Пересечение MACD линии выше сигнальной линии.
RSI ниже уровня перепроданности (30).
Сигнал продажи (SELL):
Пересечение MACD линии ниже сигнальной линии.
RSI выше уровня перекупленности (70).
Использование:
Этот скрипт помогает трейдерам быстро определять потенциальные точки входа и выхода на рынке.
Индикаторы и сигналы визуализированы на графике, чтобы облегчить анализ.
Дополнительно отображаются текущие значения RSI и EMA для поддержки принятия решений.
Подходит для:
Скальпинга и трендовой торговли.
Инструкция:
Вы можете изменять параметры длины MACD, RSI и уровней перекупленности/перепроданности в настройках скрипта.
Chỉ báo và chiến lược
WMA y EMA in 1 indicatorThis Pine Script code defines a custom indicator for the TradingView platform that combines two widely used moving averages: the Weighted Moving Average (WMA) and the Exponential Moving Average (EMA). The indicator plots both WMA and EMA on the chart, allowing traders to visualize and analyze the trends in the market more effectively. Users can customize the periods and colors of both moving averages through the input settings, making the indicator flexible for various trading strategies. The WMA provides a weighted approach that emphasizes more recent data, while the EMA offers a smoothed curve that reacts faster to price changes.
Demo GPT - MACD and RSI Short Strategy//@version=5
strategy("Demo GPT - MACD and RSI Short Strategy", overlay=true, commission_type=strategy.commission.percent, commission_value=0.1, slippage=3)
// Inputs for start and end dates
start_date = input.time(timestamp("2018-01-01 00:00"), title="Start Date")
end_date = input.time(timestamp("2069-12-31 23:59"), title="End Date")
// Inputs for MACD and RSI
macd_short_length = input.int(12, title="MACD Short Length")
macd_long_length = input.int(26, title="MACD Long Length")
macd_signal_length = input.int(9, title="MACD Signal Length")
rsi_length = input.int(14, title="RSI Length")
rsi_overbought = input.int(70, title="RSI Overbought Level")
// Calculate MACD and Signal Line
= ta.macd(close, macd_short_length, macd_long_length, macd_signal_length)
// Fill gaps in MACD and Signal Line
macd_line := na(macd_line) ? macd_line : macd_line
signal_line := na(signal_line) ? signal_line : signal_line
// Calculate RSI
rsi = ta.rsi(close, rsi_length)
// Fill gaps in RSI
rsi := na(rsi) ? rsi : rsi
// Strategy logic: Short when MACD crosses below Signal Line and RSI is above 70
short_condition = ta.crossover(signal_line, macd_line) and rsi > rsi_overbought
// Ensure the strategy only runs between the selected date range
if (time >= start_date and time <= end_date)
if short_condition
strategy.entry("Short", strategy.short, qty=100)
strategy.close("Short")
// Plotting MACD and RSI for reference
plot(macd_line - signal_line, color=color.red, title="MACD Histogram", linewidth=2)
hline(0, "Zero Line", color=color.gray)
plot(rsi, color=color.blue, title="RSI", linewidth=2)
hline(rsi_overbought, "RSI Overbought", color=color.red)
nikLibraryLibrary "nikLibrary"
TODO: add library description here
fun(x)
TODO: add function description here
Parameters:
x (float) : TODO: add parameter x description here
Returns: TODO: add what function returns
RY-Parabolic Stop and ReverseParabolic Stop and Reverse with Support Resistance (PSAR-SR)
Identify dynamic support and resistance levels based on price movements.
Reduce false signals often generated by the regular PSAR.
Provide more accurate trading decisions by considering previous reversal points as support and resistance.
How Does PSAR-SR Work?
PSAR Reversal Points:
When the regular PSAR generates a reversal signal, the price at that reversal point is used as support (in an uptrend) or resistance (in a downtrend).
Support and Resistance Lines:
Support: A line drawn from the previous PSAR reversal point in an uptrend.
Resistance: A line drawn from the previous PSAR reversal point in a downtrend.
Price often moves sideways between these support and resistance levels before a breakout occurs.
Breakout Above/Below Support and Resistance:
A Buy signal is generated when the price breaks above resistance with a new candle closing above it.
A Sell signal is generated when the price breaks below support with a new candle closing below it.
Strategy Using PSAR-SR
Wait for the Breakout:
Avoid buying or selling immediately when the PSAR gives a signal.
Confirm that the price breaks past the support or resistance levels and forms a new candle outside those lines.
Use Alongside Other Indicators:
PSAR-SR is not recommended as a standalone tool. Use additional confirmation indicators such as:
Moving Average: To identify long-term trends.
RSI or MACD: To confirm momentum or overbought/oversold conditions.
Advantages of PSAR-SR
Reduces False Signals:
By focusing on previous support and resistance levels, PSAR-SR avoids invalid signals.
Helps Identify Breakouts:
It provides better insight for traders to enter the market during valid breakouts.
Limitations of PSAR-SR
Not Suitable for Sideways Markets:
If the price moves sideways for an extended period, the signals may become less effective.
Requires Additional Confirmation:
Should be used in combination with other indicators to improve accuracy.
Conclusion
PSAR-SR is a helpful tool for identifying dynamic support and resistance levels and generating buy/sell signals based on price breakouts. However, it should always be used with additional indicators for confirmation to avoid false trades.
Disclaimer:
Use this indicator at your own risk, and always perform additional analysis before making any trading decisions.
If you'd like further clarification or examples of how to apply this to a chart, feel free to ask! 😊
Correlation Coefficient Master TableThe Correlation Coefficient Master Table is a comprehensive tool designed to calculate and visualize the correlation coefficient between a selected base asset and multiple other assets over various time periods. It provides traders and analysts with a clear understanding of the relationships between assets, enabling them to analyze trends, diversification opportunities, and market dynamics. You can define key parameters such as the base asset’s data source (e.g., close price), the assets to compare against (up to six symbols), and multiple lookback periods for granular analysis.
The indicator calculates the covariance and normalizes it by the product of the standard deviations. The correlation coefficient ranges from -1 to +1, with +1 indicating a perfect positive relationship, -1 a perfect negative relationship, and 0 no relationship.
You can specify the lookback periods (e.g., 15, 30, 90, or 120 bars) to tailor the calculation to their analysis needs. The results are visualized as both a line plot and a table. The line plot shows the correlation over the primary lookback period (the Chart Length), which can be used to inspect a certain length close up, or could be used in conjunction with the table to provide you with five lookback periods at once for the same base asset. The dynamically created table provides a detailed breakdown of correlation values for up to six target assets across the four user-defined lengths. The table’s cells are formatted with rounded values and color-coded for easy interpretation.
This indicator is ideal for traders, portfolio managers, and market researchers who need an in-depth understanding of asset interdependencies. By providing both the numerical correlation coefficients and their visual representation, users can easily identify patterns, assess diversification strategies, and monitor correlations across multiple timeframes, making it a valuable tool for decision-making.
Custom VWAP + ATR (D.Kh)Линии VWAP и ATR на выбранном инструменте ATR (Average True Range) — это индикатор, измеряющий среднюю волатильность цены за определенный период. Он используется для установки стоп-лоссов, определения рыночной волатильности и создания торговых стратегий. Рассмотрим, как его реализовать и использовать.
Normalized Jurik Moving Average [QuantAlgo]Upgrade your investing and trading strategy with the Normalized Jurik Moving Average (JMA) , a sophisticated oscillator that combines adaptive smoothing with statistical normalization to deliver high-quality signals! Whether you're a swing trader looking for momentum shifts or a medium- to long-term investor focusing on trend validation, this indicator's statistical approach offers valuable analytical advantages that can enhance your trading and investing decisions!
🟢 Core Architecture
The foundation of this indicator lies in its unique dual-layer calculation system. The first layer implements the Jurik Moving Average, known for its superior noise reduction and responsiveness, while the second layer applies statistical normalization (Z-Score) to create standardized readings. This sophisticated approach helps identify significant price movements while filtering out market noise across various timeframes and instruments.
🟢 Technical Foundation
Three key components power this indicator are:
Jurik Moving Average (JMA): An advanced moving average calculation that provides superior smoothing with minimal lag
Statistical Normalization: Z-Score based scaling that creates consistent, comparable readings across different market conditions
Dynamic Zone Detection: Automatically identifies overbought and oversold conditions based on statistical deviations
🟢 Key Features & Signals
The Normalized JMA delivers market insights through:
Color-adaptive oscillator line that reflects momentum strength and direction
Statistically significant overbought/oversold zones for trade validation
Smart gradient fills between signal line and zero level for enhanced visualization
Clear long (L) and short (S) markers for validated momentum shifts
Intelligent bar coloring that highlights the current market state
Customizable alert system for both bullish and bearish setups
🟢 Practical Usage Tips
Here's how to maximize your use of the Normalized JMA:
1/ Setup:
Add the indicator to your favorites, then apply it to your chart ⭐️
Begin with the default smoothing period for balanced analysis
Use the default normalization period for optimal signal generation
Start with standard visualization settings
Customize colors to match your chart preferences
Enable both bar coloring and signal markers for complete visual feedback
2/ Reading Signals:
Watch for L/S markers - they indicate validated momentum shifts
Monitor oscillator line color changes for direction confirmation
Use the built-in alert system to stay informed of potential trend changes
🟢 Pro Tips
Adjust Smoothing Period based on your trading style:
→ Lower values (8-12) for more responsive signals
→ Higher values (20-30) for more stable trend identification
Fine-tune Normalization Period based on market conditions:
→ Shorter periods (20-25) for more dynamic markets
→ Longer periods (40-50) for more stable markets
Optimize your analysis by:
→ Using +2/-2 zones for primary trade signals
→ Using +3/-3 zones for extreme market conditions
→ Combining with volume analysis for trade confirmation
→ Using multiple timeframe analysis for strategic context
Combine with:
→ Volume indicators for trade validation
→ Price action for entry timing
→ Support/resistance levels for profit targets
→ Trend-following indicators for directional bias
AVP 259 alertsits a mixture of indicators that merges the famous indicators in one single form to easily get explained with their study and mastery
[2025] Asian Session with Sweeps and Engulfing Candles EU M15
Kailangan ulit habaan 'yung description
Basta Engulfing Candle 'to after Asian Sweep.
Asian High Swept = Look for Bearish engulfing
Asian Low Swept = Look for Bearish engulfing
P'wede mapalitan 'yung Asian Session time, for example gusto mong gawing ibang time ng liquidity. Basta same logic. Tapos mapapalitan rin 'yung Window na maghahanap ng Engulfing. Tapos may daily bias toggle rin tsaka alerts. Good to go na 'to basta backtest
VolumeByTiagoFind where the big money is:
Yellow - Very strong (high probability big players investing)
Red - Strong (high probability big players secundary investiments)
Green - Volatility
White - No important Volatility
VolumeByTiagoFind where the big money is:
Yellow - Very strong (high probability big players investing)
Red - Strong (high probability big players secundary investiments)
Green - Volatility
White - No important Volatility
Day Separator (EST-based)Para kay Kankaku AHAHAHAHA
'Wag mo na pansinin 'tong decription. Dapat lang raw mahaba AHAHAHAHA
HABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Optimized SMA StrategyTest ai script. Trying to figure out how ask for what I want the ai script to do. This us just a test
EMA 9, 21, 200Aquí usamos EMA de 9 velas, para identificar oscilaciones del mercado a corto plazo. EMA de 21 velas sirve para confirmar tendencias; y EMA de 200 velas, destaca por su suavidad y sensibilidad a los cambios. Es ideal para predicciones a corto plazo.
Custom EMA/ATR/Keltner/Bollinger with Squeeze Setup 21-EMA and ATR-Based Analysis
21-EMA (Exponential Moving Average):
Acts as a dynamic support/resistance level.
The price's relationship with the 21-EMA is used to detect trends and potential reversals.
ATR (Average True Range):
Measures volatility.
Used to define price thresholds for buy/sell conditions (e.g., price not more than 1 ATR above 21-EMA for a buy signal).
2. Bollinger Bands and Keltner Channels for Squeeze Setup
Bollinger Bands (BB):
Calculated using a 20-period simple moving average and standard deviations.
Represents high and low volatility zones.
Keltner Channels (KC):
Based on a 20-period EMA and ATR.
Provides narrower channels for price action compared to Bollinger Bands.
Squeeze Condition:
Occurs when Bollinger Bands fall inside Keltner Channels, signaling low volatility.
These periods often precede significant price movements (breakouts).
3. Momentum Indicator (MACD Histogram)
MACD Histogram:
Measures momentum during a squeeze.
Positive histogram values suggest bullish momentum, while negative values suggest bearish momentum.
Used to predict breakout direction from a squeeze.
4. RSI (Relative Strength Index) for Overbought/Oversold Conditions
Buy Signal:
RSI below 50 indicates a potential oversold condition, supporting a buy signal.
Sell Signal:
RSI above 80 indicates overbought conditions, supporting a sell signal.
5. Buy/Sell Signal Conditions
Buy Signal:
Price is not more than 1 ATR above the 21-EMA.
RSI is below 50 (oversold).
Price touches the 21-EMA within a small tolerance.
Squeeze condition is active.
Sell Signal:
Price is 3 ATR above the 21-EMA.
RSI is above 80 (overbought).
Additional Signals:
Buy: Price is 2 standard deviations below the 21-EMA.
Sell: Price is 2 standard deviations above the 21-EMA.
6. Visual Enhancements
Candle Rangethe Candle Range refers to the difference between the high price (High) and the low price (Low) of a specific candle or bar.
Example:
For a given candle on the chart:
The high price is 120.
The low price is 100.
The candle range is 20 (120 - 100).
Uses:
Volatility Measurement: The candle range is often used to assess an asset's volatility over time. For example, averaging candle ranges can indicate the average volatility.
Indicator Development: Many indicators, such as Average True Range (ATR), rely on candle ranges to provide insights about market conditions.
Trade Filters: Candle ranges can act as filters in strategies to avoid trading during periods of low volatility.
Moving Average Ribbon SetThe Moving Average Ribbon is a powerful visualization tool for identifying trends and potential reversals in trading. By using 8 moving averages (MAs), you can enhance its sensitivity and applicability to various trading strategies.
Suggested Configuration for an 8-MA Ribbon:
Short-Term MAs: These react quickly to price changes, helping identify immediate trends.
5-period MA
10-period MA
Medium-Term MAs: These offer a balance between sensitivity and reliability.
20-period MA
30-period MA
Long-Term MAs: These filter out short-term noise, focusing on macro trends.
50-period MA
100-period MA
Extended-Term MAs: These highlight the overarching market sentiment.
150-period MA
200-period MA
Candle Range (High-Low)the Candle Range refers to the difference between the high price (High) and the low price (Low) of a specific candle or bar.
Example:
For a given candle on the chart:
The high price is 120.
The low price is 100.
The candle range is 20 (120 - 100).
Uses:
Volatility Measurement: The candle range is often used to assess an asset's volatility over time. For example, averaging candle ranges can indicate the average volatility.
Indicator Development: Many indicators, such as Average True Range (ATR), rely on candle ranges to provide insights about market conditions.
Trade Filters: Candle ranges can act as filters in strategies to avoid trading during periods of low volatility.
Candle Range (High-Low)the Candle Range refers to the difference between the high price (High) and the low price (Low) of a specific candle or bar.
Example:
For a given candle on the chart:
The high price is 120.
The low price is 100.
The candle range is 20 (120 - 100).
Uses:
Volatility Measurement: The candle range is often used to assess an asset's volatility over time. For example, averaging candle ranges can indicate the average volatility.
Indicator Development: Many indicators, such as Average True Range (ATR), rely on candle ranges to provide insights about market conditions.
Trade Filters: Candle ranges can act as filters in strategies to avoid trading during periods of low volatility.