[blackcat] L3 Counter Peacock Spread█ OVERVIEW
The script titled " L3 Counter Peacock Spread" is an indicator designed for use in TradingView. It calculates and plots various moving averages, K lines derived from these moving averages, additional simple moving averages (SMAs), weighted moving averages (WMAs), and other technical indicators like slope calculations. The primary function of the script is to provide a comprehensive set of visual tools that traders can use to identify trends, potential support/resistance levels, and crossover signals.
█ LOGICAL FRAMEWORK
Input Parameters:
There are no explicit input parameters defined; all variables are hardcoded or calculated within the script.
Calculations:
• Moving Averages: Calculates Simple Moving Averages (SMA) using ta.sma.
• Slope Calculation: Computes the slope of a given series over a specified period using linear regression (ta.linreg).
• K Lines: Defines multiple exponentially adjusted SMAs based on a 30-period MA and a 1-period MA.
• Weighted Moving Average (WMA): Custom function to compute WMAs by iterating through price data points.
• Other Indicators: Includes Exponential Moving Average (EMA) for momentum calculation.
Plotting:
Various elements such as MAs, K lines, conditional bands, additional SMAs, and WMAs are plotted on the chart overlaying the main price action.
No loops control the behavior beyond those used in custom functions for calculating WMAs. Conditional statements determine the coloring of certain plot lines based on specific criteria.
█ CUSTOM FUNCTIONS
calculate_slope(src, length) :
• Purpose: To calculate the slope of a time-series data point over a specified number of periods.
• Functionality: Uses linear regression to find the current and previous slopes and computes their difference scaled by the timeframe multiplier.
• Parameters:
– src: Source of the input data (e.g., closing prices).
– length: Periodicity of the linreg calculation.
• Return Value: Computed slope value.
calculate_ma(source, length) :
• Purpose: To calculate the Simple Moving Average (SMA) of a given source over a specified period.
• Functionality: Utilizes TradingView’s built-in ta.sma function.
• Parameters:
– source: Input data series (e.g., closing prices).
– length: Number of bars considered for the SMA calculation.
• Return Value: Calculated SMA value.
calculate_k_lines(ma30, ma1) :
• Purpose: Generates multiple exponentially adjusted versions of a 30-period MA relative to a 1-period MA.
• Functionality: Multiplies the 30-period MA by coefficients ranging from 1.1 to 3 and subtracts multiples of the 1-period MA accordingly.
• Parameters:
– ma30: 30-period Simple Moving Average.
– ma1: 1-period Simple Moving Average.
• Return Value: Returns an array containing ten different \u2003\u2022 "K line" values.
calculate_wma(source, length) :
• Purpose: Computes the Weighted Moving Average (WMA) of a provided series over a defined period.
• Functionality: Iterates backward through the last 'n' bars, weights each bar according to its position, sums them up, and divides by the total weight.
• Parameters:
– source: Price series to average.
– length: Length of the lookback window.
• Return Value: Calculated WMA value.
█ KEY POINTS AND TECHNIQUES
• Advanced Pine Script Features: Utilization of custom functions for encapsulating complex logic, leveraging TradingView’s library functions (ta.sma, ta.linreg, ta.ema) for efficient computations.
• Optimization Techniques: Efficient computation of K lines via pre-calculated components (multiples of MA30 and MA1). Use of arrays to store intermediate results which simplifies plotting.
• Best Practices: Clear separation between calculation and visualization sections enhances readability and maintainability. Usage of color.new() allows dynamic adjustments without hardcoding colors directly into plot commands.
• Unique Approaches: Introduction of K lines provides an alternative representation of trend strength compared to traditional MAs. Implementation of conditional band coloring adds real-time context to existing visual cues.
█ EXTENDED KNOWLEDGE AND APPLICATIONS
Potential Modifications/Extensions:
• Adding more user-defined inputs for lengths of MAs, K lines, etc., would make the script more flexible.
• Incorporating alert conditions based on crossovers between key lines could enhance automated trading strategies.
Application Scenarios:
• Useful for both intraday and swing trading due to the combination of short-term and long-term MAs along with trend analysis via slopes and K lines.
• Can be integrated into larger systems combining this indicator with others like oscillators or volume-based metrics.
Related Concepts:
• Understanding how linear regression works internally aids in grasping the slope calculation.
• Familiarity with WMA versus SMA helps appreciate why different types of averaging might be necessary depending on market dynamics.
• Knowledge of candlestick patterns can complement insights gained from this indicator.
移动平均线
Multi-Timeframe Pattern & Trend Forecast - Akash 1this indicator forecasts and share signals based on multi timeframe and trends based on EMAs.
U Bot V6This indicator is simply the updated of UT Bot Alerts by QuantNomad.
Credit @QuantNomad
UT Bot indicator was initially developer by Yo_adriiiiaan
The idea of original code belongs HPotter
I translated it from V4 to V5 and V6, for a better alignement with Pine Script requirements.
I publish it in the purpose of integrating it into a strategy that I will publish later, in free access (in the spirit of Tradingview community).
@Naveen-Momentum BuyThis Indicator showing Buy/Sell signals.
RSI(14)>60 BUY and
Macd and RS(55)andRS(21)>Nifty also
Ema's
4 MAsThe 4 MAs indicator is a moving average crossover tool designed to identify market trends and provide potential entry and exit signals. By plotting four simple moving averages (SMAs) of different periods, this indicator helps traders understand both short-term and long-term market dynamics. It is particularly suited for trend-following strategies and can be applied across various timeframes, such as daily, hourly, or intraday charts.
Features:
1. Moving Average Visualization:
- Short-term Moving Averages (MA 5 and MA 10): Highlight short-term market fluctuations.
- Mid-term Moving Average (MA 15): Serves as a reference for medium-term trends.
- Long-term Moving Average (MA 30): Represents the broader market trend.
2. Trend Signal Detection:
- Bullish Signal: When the 5-period moving average crosses above the 30-period moving average (golden cross), a yellow upward arrow is displayed below the price bar, indicating a potential uptrend.
- Bearish Signal: When the 5-period moving average crosses below the 30-period moving average (death cross), a red downward arrow is displayed above the price bar, signaling a potential downtrend.
Key Advantages:
- Multi-timeframe Versatility: Works well on various timeframes, making it suitable for both short-term scalping and long-term trend analysis.
- Simple Visualization: Clear signals and trend identification through color-coded moving averages and signal arrows.
- Customizable: The SMA periods can be adjusted to align with the trader's preferred strategy or market conditions.
Jalambi Paul modelKey Components
Inputs:
Window Length (window): The number of periods for calculating the rolling statistics. Default is set to 50.
Risk Percentage (risk_percentage): The percentage of capital risked per trade. Default is 1.0%.
Stop Loss and Take Profit Levels:
Stop Loss: Default is 2% of the entry price.
Take Profit: Default is 4% of the entry price.
Logarithmic Returns:
Calculates the logarithmic return of the price series using:
log_return
=
log
(
close
close
)
log_return=log(
close
close
)
This helps in normalizing price changes.
Rolling Statistics:
Mean (rolling_mean): Calculated over the rolling window using the Simple Moving Average (SMA).
Standard Deviation (rolling_std): Measured over the rolling window to understand volatility.
Shiryaev-Zhou Index (SZI):
The SZI is a standardized z-score:
SZI
=
log_return
−
rolling_mean
rolling_std
SZI=
rolling_std
log_return−rolling_mean
This metric is used to detect overbought or oversold conditions.
Signal Generation:
Buy Signal (long_signal): Triggered when SZI is below a fixed threshold (-2.0).
Sell Signal (short_signal): Triggered when SZI is above a fixed threshold (2.0).
Visuals on the Chart:
Buy signals are plotted below the price bars with green upward-pointing labels.
Sell signals are plotted above the price bars with red downward-pointing labels.
Trade Execution:
Entry Conditions:
Long positions are opened when long_signal is true.
Short positions are opened when short_signal is true.
Exit Conditions:
Stop Loss and Take Profit levels are calculated based on the entry price and the respective percentage inputs.
Positions are closed automatically when these levels are hit.
Visualization:
Plots the stop-loss (red line) and take-profit (green line) levels on the chart for easier tracking.
EMA Strategy with Price & EMA5 & EMA8 < EMA50 ConditionEMAile al-sat testi gerçekleştirildi.
Stratejiler güncellenmeye devam edecek. vakit olursa tabi
EMA X OverA straightforward indicator that plots two exponential moving averages (EMAs). Upon a crossover between the two EMAs, the chart will display a marker.
Furthermore, when the price closes above or below the long EMA, the chart will also indicate this occurrence with a marker.
Moving Average with Std DeviationsA simple indicator to show a Moving Average with the option to show Standard Deviations of that Moving Average.
When price moves to the outer bands, this can indicate that it is becoming over extended, and may revert back to the mean, have a pull back in a trend, amongst other things.
Created for my own use, but you are welcome to use it if you find it useful.
Thanks!
5 EMA/SMA by LookTajChỉ báo 5 đường MA/EMA
- Đường MA dốc lên thể hiện bằng nét liền
- Đường MA dốc xuống thể hiện bằng nét đứt
- Điểm bắt đầu dốc lên đánh dấu bằng dấu + màu trắng
- Điểm bắt đầu dốc xuống đánh dấu bằng dấu . màu vàng
XRP/USD Scalping Strategy with Alerts
The strategy in your script is designed for scalping XRP/USD, utilizing a combination of Exponential Moving Averages (EMAs), Relative Strength Index (RSI), Volume analysis, and N-Bar detection to identify potential buy and sell signals. It aims to make quick, small profits by taking advantage of short-term price movements. Here's a detailed breakdown:
Key Components of the Strategy:
Exponential Moving Averages (EMAs):
Short EMA (8-period) and Long EMA (21-period) are used to identify the trend.
A buy signal is generated when the Short EMA crosses above the Long EMA (bullish crossover).
A sell signal is generated when the Short EMA crosses below the Long EMA (bearish crossunder).
Relative Strength Index (RSI):
The RSI (with a 14-period) is used to assess whether the market is in an overbought or oversold condition.
For a long position, the strategy checks if the RSI is above 50 to ensure that the market is not in an oversold condition.
For a short position, the strategy checks if the RSI is below 50, which signals a weaker or bearish market.
Volume Analysis:
The strategy checks if the current volume is greater than the average volume over a defined period (20 bars in this case).
Higher volume indicates stronger market participation and gives more confidence in the signals.
N-Bar Detection:
The strategy uses a custom function to detect the price action of the last n bars.
Bullish N-bars: If the lowest low of the last n_bars is higher than the lowest low of the previous 2*n_bars (indicating a bullish reversal pattern).
Bearish N-bars: If the highest high of the last n_bars is lower than the highest high of the previous 2*n_bars (indicating a bearish reversal pattern).
Buy (Long) Condition:
EMA Crossover: The Short EMA crosses above the Long EMA, indicating a potential upward trend.
RSI > 50: The market is not in an oversold state (indicating that the market is bullish).
Volume > Average Volume: The current volume is higher than the average volume, signaling increased market activity.
Bullish N-bars: The price action of the last n_bars shows a bullish reversal, providing additional confirmation for a buy.
Sell (Short) Condition:
EMA Crossunder: The Short EMA crosses below the Long EMA, indicating a potential downward trend.
RSI < 50: The market is not in an overbought state (indicating that the market is bearish).
Volume > Average Volume: The current volume is higher than the average volume, signaling increased market activity.
Bearish N-bars: The price action of the last n_bars shows a bearish reversal, providing additional confirmation for a sell.
Take Profit and Stop Loss:
The strategy includes a take profit and stop loss mechanism to limit the risk and secure profits.
Take Profit: Set at 1.5% of the entry price.
Stop Loss: Set at 0.7% of the entry price.
Alerts:
The strategy has alerts for both buy and sell signals.
When the buy or sell conditions are met, it triggers an alert, sending notifications (pop-up, email, etc.) to the user.
Summary of the Strategy:
Trend Following with EMA: The strategy relies on the crossover of short and long EMAs to determine the trend direction.
Momentum Analysis with RSI: The RSI confirms that the market is not overbought or oversold, ensuring that the trade is made in favorable conditions.
Volume Confirmation: Only signals with increased market participation (higher volume than the average) are considered valid.
Reversal Patterns with N-bars: The N-bar detection adds a layer of confirmation for potential reversals, improving the accuracy of entry signals.
Risk Management: The take profit and stop loss levels are designed to capture small, profitable moves while protecting from large losses.
This scalping strategy aims for quick, small profits with controlled risk, making it suitable for highly liquid markets like XRP/USD. The use of EMAs, RSI, volume analysis, and N-bar patterns increases the reliability of the signals and helps minimize false entries.
Bull Bear Power EMAAdded an EMA moving average to the built-in BBP indicator to facilitate identification of BBP trends
Two MA Crossover Spot Strategy with Summary TableIndicator that uses 2 simple moving averages to buy and sell based on momentum (works best in trending markets, worst in stagnant markets). Summary table gives estimated returns.
For alerts, buy when FastMA crosses above the SlowMA and sell when it crosses below upon candle close.
RMA 15 and RMA 10 Cross Strategy (Exit on Next Signal)
The RMA Cross Strategy involves using two Rolling Moving Averages (RMA), typically one with a short period (e.g., 10) and another with a longer period (e.g., 15). The strategy generates trading signals based on the crossover of these RMAs:
Signals:
Buy Signal: When the RMA with a shorter period (RMA 10) crosses above the RMA with a longer period (RMA 15), indicating an upward trend.
Sell Signal: When the RMA with a shorter period (RMA 10) crosses below the RMA with a longer period (RMA 15), indicating a downward trend.
EMA Squeeze RythmHere's a description of this indicator and its purpose:
This indicator is based on the concept of price consolidation and volatility contraction using multiple Exponential Moving Averages (EMAs). It primarily looks for "squeeze" conditions where the EMAs converge, indicating potential market consolidation and subsequent breakout opportunities.
Key Features:
1. Uses 8 EMAs (20-55 period) to measure price compression
2. Measures the distance between fastest (20) and slowest (55) EMAs in ATR units
3. Identifies four distinct states:
- PRE-SQZE: Initial convergence of EMAs
- SQZE: Tighter convergence
- EXT-SQZE: Extreme convergence (highest probability of breakout)
- RELEASE: EMAs begin to expand (potential breakout in progress)
Best Used For:
- Identifying potential breakout setups
- Finding periods of low volatility before explosive moves
- Confirming trend strength using higher timeframe analysis
- Trading mean reversion strategies during squeeze states
- Catching momentum moves during release states
The indicator works well on any timeframe but is particularly effective on 15M to 4H charts for most liquid markets. It includes higher timeframe analysis to help confirm the broader market context.
Multi-EMA Indicator by Anand Padmanabhan @pBasic indicator which includes 21, 34, 50, 100 and 200 EMA
Higher Timeframe MAsPlots moving averages from a higher timeframe onto the current chart. Each line can have its own MA type and length.
mentor+json+v1.0This script implements a straightforward trend-following strategy based on moving averages (EMAs) and RSI confirmation. It is designed to help traders identify potential trend-based entry and exit points while managing risk with a customizable stop loss.
Key Features:
EMA Crossover: Buy signals occur when the short EMA crosses above the long EMA, and RSI is above a specified level. Sell signals are generated when the short EMA crosses below the long EMA, and RSI is below the specified level.
Stop Loss: A percentage-based stop loss is applied to all trades, ensuring effective risk management. The stop loss level is displayed as a dashed line on the chart.
Customization: Users can adjust the EMA lengths, RSI confirmation level, and stop loss percentage to match their trading strategy.
How to Use:
Add the script to your chart and adjust the inputs in the settings panel:
Short EMA Length: Determines the sensitivity of the short moving average.
Long EMA Length: Controls the trend-following component.
RSI Confirmation Level: Ensures trades are aligned with momentum.
Stop Loss (%): Defines the percentage level at which the stop loss is set.
Observe the buy and sell signals marked on the chart.
Use the stop loss line as a visual guide to manage risk for your trades.
Notes:
This script is intended for educational purposes and backtesting. Use it responsibly and in combination with other analysis techniques.
Always perform thorough backtesting and analysis before applying it to live trading.
Happy trading! 🚀
Critical MA's for Osiris(50, 111, 200)Indicator Name: Critical MAs for Osiris (50, 111, 200)
This indicator plots three critical Simple Moving Averages (SMA) — 50, 111, and 200 periods — directly on the chart. It provides a clear visual representation of these key moving averages, which are widely used for analyzing market trends, identifying potential support and resistance levels, and assessing overall market direction.
Features:
1-Moving Average Calculation:
50-period SMA: Represents the short-term trend.
111-period SMA: Serves as a medium-term trend line.
200-period SMA: Indicates the long-term trend and is often used as a critical benchmark for trend reversals.
2-Visualization:
The 50-period SMA is displayed in blue, providing a quick reference for short-term price movements.
The 111-period SMA is displayed in orange, offering insights into medium-term price behavior.
The 200-period SMA is displayed in red, signifying the long-term market direction.
3-Customizable Parameters:
Each moving average length is defined as a constant, making it easy to adjust the indicator for different strategies.
Use Cases:
-Trend Analysis:
The alignment and slopes of these moving averages help identify the direction of the trend (bullish, bearish, or sideways).
-Support and Resistance:
Price reactions around these moving averages can signal potential support or resistance levels.
-Market Strength:
The position of the price relative to the moving averages can provide insights into the strength or weakness of the current trend.
This indicator is particularly useful for traders seeking to incorporate a multi-timeframe perspective into their trading strategies. It is simple, effective, and applicable across various financial instruments, including stocks, forex, and cryptocurrencies.
Customizable EMA 10/20/50/100/200Here is the updated version of the customizable EMAs. You can adjust the EMAs time frame to whatever you want (1D, 1Min etc.) and it will be plotted on your chart at the timeframe you are on. It is all public source code so feel free to make adjustments or let me know if there is anything you would like me change or add. I personally use it while scalping as I have found Daily EMAs tend to be strong levels of support and resistance.
Adaptive VWAP Bands with Garman Klass VolatilityThis strategy utilizes the volume weighted average price, adjusted by volatility. Standard deviation bands are applied to the MA, if price closes above 1STD this indicates a bullish trend and the strategy goes long. If a close below 1STD the long is closed.
The standard deviation bands are adjusted by volatility using the Garman-Klass volatility formula: portfolioslab.com
The assumption is the more volatile an asset the less price is being accepted in a certain price range and thus the threshold to go long or close a long increases. In the inverse, the less volatile an asset is the more it's being accepted, then the threshold for a bullish breakout is lowered.
[blackcat] L2 Six Round Positioning█ OVERVIEW
The script is an indicator designed to plot the direction (up, down, no change) of several moving averages (MA) on a separate chart, without overlaying the price data. It calculates Simple Moving Averages (SMA) for 3, 5, 8, 34, 60, 120, and 250 periods and uses conditional logic to determine the color and position of the plotted columns based on whether each MA is increasing, decreasing, or unchanged.
█ LOGICAL FRAMEWORK
The script is structured into three main sections:
1 — Input Parameters: None explicitly defined, but the script uses default settings for the indicator function.
2 — Calculations: Computes Simple Moving Averages (SMA) for seven different periods.
3 — Plotting: Uses conditional logic to plot columns representing the direction of each MA, with positions and colors indicating whether the MA is increasing, decreasing, or unchanged.
The flow of data is straightforward: the script calculates the SMAs, determines their direction, sets the appropriate color, and then plots the columns.
█ CUSTOM FUNCTIONS
• No custom functions are defined in this script. All calculations and plotting are done using built-in Pine Script functions such as ta.sma for SMA calculation and plot for plotting.
█ KEY POINTS AND TECHNIQUES
• Use of ta.sma: The script effectively uses the ta.sma function to calculate Simple Moving Averages for different periods.
• Conditional Logic: The script employs conditional logic (ternary operators) to determine the color and position of the plotted columns based on the direction of each MA.
• Plotting with plot: The plot function is used extensively to display the direction of each MA with different colors and positions.
• Color Transparency: The use of color.new with transparency (e.g., color.new(color.green, 50)) allows for visually distinct colors that are not too overpowering.
█ EXTENDED KNOWLEDGE AND APPLICATIONS
• Modifications: The script could be enhanced by adding input parameters to allow users to customize the periods of the moving averages, colors, and transparency levels.
• Extensions: Similar techniques could be applied to other types of moving averages (e.g., EMA, WMA) or to other technical indicators.
• Strategy Development: This indicator could serve as a component in a larger trading strategy by providing insights into the overall trend direction across multiple timeframes.
• Related Concepts: Understanding of moving averages, conditional logic, and plotting techniques in Pine Script would be beneficial for further development and customization of this script.