Momentum Channel - [Volume Filter]The indicator incorporates a volume filter to ensure that the RSI only moves when the volume is above the moving average of the volume.
The filtered RSI is then used to calculate the Bollinger Bands and moving averages, providing insights into the market dynamics.
It also gives you insight into the bigger timeframes so you can monitor momentum!
Volume Filter Length: Input parameter for the length of the volume filter moving average.
Overview of code:
rsiPeriod: Input parameter for the RSI period.
bandLength: Input parameter for the length of the Bollinger Bands.
lengthrsipl: Input parameter for the length of the fast moving average (MA) on the RSI.
volumeFilterLength: Input parameter for the length of the volume filter moving average.
volumeAvg: Calculates the moving average of the volume using the ta.sma() function with the specified volume filter length.
filteredRsi: Uses the ta.valuewhen() function to obtain the RSI value only when the volume is greater than or equal to the volume moving average. This creates a filtered RSI based on the volume filter.
offs: Calculates the offset value for the Bollinger Bands. It is derived by multiplying 1.6185 with the standard deviation of the filtered RSI using the ta.stdev() function.
Oscillators
Normalized KAMA Oscillator | Ikke OmarThis indicator demonstrates the creation of a normalized KAMA (Kaufman Adaptive Moving Average) oscillator with a table display. I will explain how the code works, providing a step-by-step breakdown. This is personally made by me:)
Input Parameters:
fast_period and slow_period: Define the periods for calculating the KAMA.
er_period: Specifies the period for calculating the Efficiency Ratio.
norm_period: Determines the lookback period for normalizing the oscillator.
Efficiency Ratio (ER) Calculation:
Measures the efficiency of price changes over a specified period.
Calculated as the ratio of the absolute price change to the total price volatility.
Smoothing Constant Calculation:
Determines the smoothing constant (sc) based on the Efficiency Ratio (ER) and the fast and slow periods.
The formula accounts for the different periods to calculate an appropriate smoothing factor.
KAMA Calculation:
Uses the Exponential Moving Average (EMA) and the smoothing constant to compute the KAMA.
Combines the fast EMA and the adjusted price change to adapt to market conditions.
Oscillator Normalization:
Normalizes the oscillator values to a range between -0.5 and 0.5 for better visualization and comparison.
Determines the highest and lowest values of the KAMA within the specified normalization period.
Transforms the KAMA values into a normalized range.
By incorporating the Efficiency Ratio, smoothing constant, and normalization techniques, the indicator actually allows for the identification of trends on different timeframes, even in extreme market conditions.
The normalization makes it much more adaptive than if you were to just use a normal KAMA line. This way you actually get a lot more data by looking at the histogram, rather than just the KAMA line.
I essentially made the KAMA into an oscillator! Please ask if you want me to code another indicator
I hope you enjoyed this.
Please ask if you have any questions<3
Forex RadarForex Radar Indicator: A Powerful Tool for Analyzing Currency Strength and Weakness
Introduction
The Forex Radar Indicator is an innovative tool that provides a visual representation of the relative strength and weakness of various currencies in the Forex market. This indicator is designed to help traders identify potential trading opportunities by analyzing the performance of different currency pairs. In this blog post, we will explore the features and benefits of the Forex Radar Indicator, and explain how to use it effectively in your trading strategy.
Features of the Forex Radar Indicator
1. Spider Plot Visualization
The Forex Radar Indicator uses a spider plot to display the relative strength and weakness of various currencies. A spider plot is a graphical representation of multivariate data, in which each variable is plotted on a separate axis that radiates from the center of the plot. The data points are connected by lines, forming a web-like pattern that makes it easy to compare the performance of different currencies.
2. Customizable Color Scheme
The Forex Radar Indicator allows users to customize the color scheme for each currency, making it easy to identify individual currencies on the spider plot. This feature can be particularly helpful for traders who prefer specific colors for each currency, or who want to use a color scheme that matches their trading platform or charting tools.
3. EMA Divergence and RSI Style Selection
The Forex Radar Indicator offers users the flexibility to choose between two different styles: EMA divergence and RSI. The EMA divergence style displays the difference between a short-term and long-term exponential moving average, while the RSI style shows the relative strength index of the currency pairs. By selecting the preferred style, traders can customize the indicator to suit their specific trading style and strategy.
4. Flexible Input Parameters
The Forex Radar Indicator offers flexible input parameters, allowing users to customize the indicator according to their trading preferences. These parameters include the length of the moving average, the filter value for the moving average, and the normalization length. By adjusting these parameters, traders can fine-tune the indicator to suit their specific trading style and strategy.
Using the Forex Radar Indicator in Your Trading Strategy
The Forex Radar Indicator can be a valuable tool in any trading strategy, as it provides a visual representation of the currency strength and weakness. Here are some tips on how to use the Forex Radar Indicator effectively in your trading:
1. Identify Currency Strength and Weakness
The main purpose of the Forex Radar Indicator is to help traders identify the strength and weakness of various currencies. By analyzing the spider plot, traders can quickly determine which currencies are performing well and which are underperforming. This information can be used to identify potential trading opportunities, as traders can focus on currency pairs that feature a strong currency against a weak one.
2. Choose Between EMA Divergence and RSI Style
Depending on your trading style and strategy, you can choose between the EMA divergence and RSI style options provided by the Forex Radar Indicator. Both styles offer valuable insights into currency strength and weakness, but they may highlight different aspects of the market. By selecting the style that best aligns with your trading approach, you can maximize the effectiveness of the indicator in your trading strategy.
3. Combine with Other Technical Analysis Tools
While the Forex Radar Indicator provides valuable insights into currency strength and weakness, it is important to remember that no single indicator can provide a complete picture of the market. To improve the accuracy and effectiveness of your trading strategy, consider combining the Forex Radar Indicator with other technical analysis tools, such as trend lines, support and resistance levels, and other indicators.
Conclusion
The Forex Radar Indicator is a powerful tool that can help traders gain a better understanding of the relative strength and weakness of various currencies in the Forex market. By incorporating the Forex Radar Indicator into your trading strategy, you can quickly identify potential trading opportunities and make more informed trading decisions. With its customizable color scheme, EMA divergence and RSI style options, and flexible input parameters, the Forex Radar Indicator is a versatile tool that can be adapted to suit any trading style or strategy.
Radar RiderThe Radar Rider indicator is a powerful tool that combines multiple technical indicators into a single spider plot, providing traders with a comprehensive view of market conditions. This article will delve into the workings of each built-in indicator and their arrangement within the spider plot. To better understand the structure of the script, let's first examine some of the primary functions and how they are utilized in the script.
Normalize Function: normalize(close, len)
The normalize function takes the close price and a length as arguments and normalizes the price data by scaling it between 0 and 1, making it easier to compare different indicators.
Exponential Moving Average (EMA) Filter: bes(source, alpha)
The EMA filter is used to smooth out data using an exponential moving average, with the given alpha value defining the level of smoothing. This helps reduce noise and enhance the trend-following characteristics of the indicators.
Maximum and Minimum Functions: max(src) and min(src)
These functions find the maximum and minimum values of the input data over a certain period, respectively. These values are used in the normalization process and can help identify extreme conditions in the market.
Min-Max Function: min_max(src)
The min-max function scales the input data between 0 and 100 by dividing the difference between the data point and the minimum value by the range between the maximum and minimum values. This standardizes the data, making it easier to compare across different indicators.
Slope Function: slope(source, length, n_len, pre_smoothing = 0.15, post_smoothing = 0.7)
The slope function calculates the slope of a given data source over a specified length, and then normalizes it using the provided normalization length. Pre-smoothing and post-smoothing values can be adjusted to control the level of smoothing applied to the data before and after calculating the slope.
Percent Function: percent(x, y)
The percent function calculates the percentage difference between two values, x and y. This is useful for comparing the relative change in different indicators.
In the given code, there are multiple indicators included. Here, we will discuss each of them in detail.
EMA Diff:
The Exponential Moving Average (EMA) Diff is the difference between two EMA values of different lengths. The EMA is a type of moving average that gives more weight to recent data points. The EMA Diff helps traders identify trends and potential trend reversals. In the code, the EMA Diff is calculated using the ema_diff() function, which takes length, close, filter, and len_norm as parameters.
Percent Rank EMA Diff:
The Percent Rank EMA Diff is the percentage rank of the EMA Diff within a given range. It helps traders identify overbought or oversold conditions in the market. In the code, the Percent Rank EMA Diff is calculated using the percent_rank_ema_diff() function, which takes length, close, filter, and len_norm as parameters.
EMA Diff Longer:
The EMA Diff Longer is the difference between two EMA values of different lengths, similar to EMA Diff but with a longer period. In the code, the EMA Diff Longer is calculated using the ema_diff_longer() function, which takes length, close, filter, and len_norm as parameters.
RSI Filter:
The Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. The RSI Filter is the RSI value passed through a filter to smooth out the data. In the code, the RSI Filter is calculated using the rsi_filter() function, which takes length, close, and filter as parameters.
RSI Diff Normalized:
The RSI Diff Normalized is the normalized value of the derivative of the RSI. It helps traders identify potential trend reversals in the market. In the code, the RSI Diff Normalized is calculated using the rsi_diff_normalized() function, which takes length, close, filter, len_mad, and len_norm as parameters.
Z Score:
The Z Score is a statistical measurement that describes a value's relationship to the mean of a group of values. In the context of the code, the Z Score is calculated for the closing price of a security. The z_score() function takes length, close, filter, and len_norm as parameters.
EMA Normalized:
The EMA Normalized is the normalized value of the EMA, which helps traders identify trends and potential trend reversals in the market. In the code, the EMA Normalized is calculated using the ema_normalized() function, which takes length, close, filter, and len_norm as parameters.
WMA Volume Normalized:
The Weighted Moving Average (WMA) Volume Normalized is the normalized value of the WMA of the volume. It helps traders identify volume trends and potential trend reversals in the market. In the code, the WMA Volume Normalized is calculated using the wma_volume_normalized() function, which takes length, volume, filter, and len_norm as parameters.
EMA Close Diff Normalized:
The EMA Close Diff Normalized is the normalized value of the derivative of the EMA of the closing price. It helps traders identify potential trend reversals in the market. In the code, the EMA Close Diff Normalized is calculated using the ema_close_diff_normalized() function, which takes length, close, filter, len_mad, and len_norm as parameters.
Momentum Normalized:
The Momentum Normalized is the normalized value of the momentum, which measures the rate of change of a security's price. It helps traders identify trends and potential trend reversals in the market. In the code, the Momentum Normalized is calculated using the momentum_normalized() function, which takes length, close, filter, and len_norm as parameters.
Slope Normalized:
The Slope Normalized is the normalized value of the slope, which measures the rate of change of a security's price over a specified period. It helps traders identify trends and potential trend reversals in the market. In the code, the Slope Normalized is calculated using the slope_normalized() function, which takes length, close, filter, and len_norm as parameters.
Trend Intensity:
Trend Intensity is a measure of the strength of a security's price trend. It is based on the difference between the average of price increases and the average of price decreases over a given period. The trend_intensity() function in the code calculates the Trend Intensity by taking length, close, filter, and len_norm as parameters.
Volatility Ratio:
The Volatility Ratio is a measure of the volatility of a security's price, calculated as the ratio of the True Range (TR) to the Exponential Moving Average (EMA) of the TR. The volatility_ratio() function in the code calculates the Volatility Ratio by taking length, high, low, close, and filter as parameters.
Commodity Channel Index (CCI):
The Commodity Channel Index (CCI) is a momentum-based oscillator used to help determine when an investment vehicle is reaching a condition of being overbought or oversold. The CCI is calculated as the difference between the mean price of a security and its moving average, divided by the mean absolute deviation (MAD) of the mean price. In the code, the CCI is calculated using the cci() function, which takes length, high, low, close, and filter as parameters.
These indicators are combined in the code to create a comprehensive trading strategy that considers multiple factors such as trend strength, momentum, volatility, and overbought/oversold conditions. The combined analysis provided by these indicators can help traders make informed decisions and improve their chances of success in the market.
The Radar Rider indicator is a powerful tool that combines multiple technical indicators into a single, easy-to-read visualization. By understanding the inner workings of each built-in indicator and their arrangement within the spider plot, traders can better interpret market conditions and make informed trading decisions.
Spider VisionSpider Vision is an indicator that I created for trading view, which consists of a spider chart with 7 indicators built into it. This chart provides a visual representation of how these indicators are behaving, allowing traders to quickly assess the current market conditions.
The chart displays the following indicators:
RSI (Relative Strength Index): This is a momentum indicator that measures the strength of a security's price action. When the RSI is above 70, it is considered overbought, and when it is below 30, it is considered oversold.
Stochastic: This is another momentum indicator that compares the closing price of a security to its price range over a given time period. When the stochastic is above 80, it is considered overbought, and when it is below 20, it is considered oversold.
Momentum: This is a simple indicator that measures the change in a security's price over a given time period. When the momentum is positive, it indicates that the price is increasing, and when it is negative, it indicates that the price is decreasing.
BBW (Bollinger Bands Width): This indicator measures the width of the Bollinger Bands, which are a popular technical analysis tool used to identify potential trends and reversals. When the BBW is high, it suggests that the market is volatile, and when it is low, it suggests that the market is quiet.
DTO (Detrended Price Oscillator): This indicator measures the difference between the price of a security and its moving average. When the DTO is positive, it indicates that the price is above its moving average, and when it is negative, it indicates that the price is below its moving average.
Chop Zone: This indicator measures the choppiness of the market by comparing the average true range (ATR) to the difference between the high and low prices over a given time period. When the chop zone is high, it suggests that the market is choppy, and when it is low, it suggests that the market is trending.
Chaikin Oscillator: This is an oscillator that measures the accumulation/distribution of a security. When the Chaikin Oscillator is positive, it indicates that there is buying pressure in the market, and when it is negative, it indicates that there is selling pressure.
To use this indicator, traders can simply add it to their TradingView chart and adjust the input parameters to suit their trading style. The scale parameter can be used to adjust the size of the spider chart, while the color parameters can be used to customize the appearance of the chart. Traders can also adjust the length of each indicator to suit their preference.
Overall, the Spider Vision indicator provides a convenient way for traders to quickly assess the current market conditions and make more informed trading decisions.
JS-TechTrading: Supertrend-Strategy_Basic versionAre you looking for a reliable and profitable algorithmic trading strategy for TradingView? If so, you might be interested in our Supertrend basic strategy, which is based on three powerful indicators: Supertrend (ATR), RSI and EMA.
Supertrend is a trend-following indicator that helps you identify the direction and strength of the market. It also gives you clear signals for entry and exit points based on price movements.
RSI is a momentum indicator that measures the speed and change of price movements. It helps you filter out false signals and avoid overbought or oversold conditions.
EMA is a moving average indicator that smooths out price fluctuations and shows you the long-term trend of the market. It helps you confirm the validity of your trades and avoid trading against the trend.
Our Supertrend basic strategy combines these three indicators to give you a simple yet effective way to trade any market. Here's how it works:
- For long trades, you enter when the price is above Supertrend and pulls back below it (the low of the candle crosses Supertrend) and then rebounds above it (the high of the next candle goes above the pullback candle). You exit when the price closes below Supertrend or when you reach your target profit or stop loss.
- For short trades, you enter when the price is below Supertrend and pulls back above it (the high of the candle crosses Supertrend) and then drops below it (the low of the next candle goes below the pullback candle). You exit when the price closes above Supertrend or when you reach your target profit or stop loss.
- You can also use RSI and EMA filters to improve your results. For long trades, you only enter if RSI is above 50 and price is above 200 EMA. For short trades, you only enter if RSI is below 50 and price is below 200 EMA.
- You can set your stop loss and target profit as a percentage of your entry price or based on other criteria. You can also adjust the parameters of each indicator according to your preferences and risk tolerance.
Our Supertrend basic strategy is easy to use and has been tested on various markets and time frames. It can help you capture consistent profits while minimizing your losses.
Kalman RSIThis is a simplified version of Kalman RSI by onegreencandle.
Simplifications:
It shows the indicator for a single configurable length with a default of 14.
It does not color by region.
It allows selecting the source, with a default of close . The version by onegreencandle uses ohlc4 instead. Note that both versions also use high and low .
It uses the newer version (5) of Pine Script.
It sets bands at 85 and 15.
S & R RSi stratIn this updated version, a trend filter is applied using the Simple Moving Average (SMA) on the 4-hour timeframe. The trend is considered up when the 50-period SMA is below the 200-period SMA (ta.sma(trendFilterSource, 50) < ta.sma(trendFilterSource, 200)).
The buy condition (buyCondition) is triggered when the RSI crosses above the oversold threshold (ta.crossover(rsi, oversoldThreshold)), the trend filter confirms an uptrend (isUptrend is true), and the close price is greater than or equal to the support level (close >= supportLevel).
The sell condition (sellCondition) is triggered when the RSI crosses below the overbought threshold (ta.crossunder(rsi, overboughtThreshold)), the trend filter confirms a downtrend (isUptrend is false), and the close price is less than or equal to the resistance level (close <= resistanceLevel).
With this implementation, the signals will only be generated in the direction of the trend on the 4-hour timeframe.
ATR OSC and Volume Screener (ATROSCVS)In today's world of trading, having the right tools and indicators can make all the difference. With the vast number of cryptocurrencies available, I've found it challenging to keep track of the market's overall direction and make informed decisions. That's where the ATR OSC and Volume Screener comes in, a powerful Pine Script that I use to identify potential trading opportunities across multiple cryptocurrencies, all in one convenient place.
This script combines two essential components: the ATR Oscillator (ATR OSC) and a Volume Screener. It is designed to work with the TradingView platform. Let me explain how this script works and how it benefits my trading.
Firstly, the ATR Oscillator is an RSI-like oscillator that performs better under longer lookback periods. Unlike traditional RSI, the ATR OSC doesn't lose its min and max ranges with a long lookback period, as the scale remains intact. It calculates the true range by considering the high, low, open, and close prices of a financial instrument, and uses this true range instead of the standard deviation in a modified z-score calculation. This unique approach helps provide a more precise assessment of the market's volatility.
The Volume Screener, on the other hand, helps me identify unusual trading volumes across various cryptocurrencies. It employs a normalized volume calculation method, effectively filtering out outliers and highlighting potentially significant trading opportunities.
One feature I find particularly impressive about the ATR OSC and Volume Screener is its versatility and the way it displays information using color gradients. With support for over 30 different cryptocurrencies, including popular options like Bitcoin (BTC), Ethereum (ETH), Ripple (XRP), and Dogecoin (DOGE), I can monitor a wide range of markets simultaneously. The color gradient on the grid is visually appealing and makes it easy to identify the strength of the indicators for each cryptocurrency, allowing me to make quick comparisons and spot potential trading opportunities.
The customizable input options allow me to fine-tune the script to suit my individual trading preferences and strategies. In summary, the ATR OSC and Volume Screener has been an invaluable tool for me as I navigate the ever-evolving world of cryptocurrencies. By combining the power of the ATR Oscillator with a robust Volume Screener, this Pine Script makes it easier than ever to identify promising trading opportunities and stay ahead of the game.
The color gradient in the ATR OSC and Volume Screener is essential for visually representing the data on the heatmap. It uses a range of colors to indicate the strength of the indicators for each cryptocurrency, making it easier to understand the market dynamics at a glance.
In the heatmap, the color gradient typically starts from a cooler color, such as blue or green, at the lower extremes (low ATR OSC values) and progresses towards warmer colors, like yellow, orange, or red, as the ATR OSC values approach the upper extremes (high ATR OSC values). This color-coding system enables me to quickly identify and interpret the data without having to examine individual numerical values.
For example, cooler colors (blue or green) might represent lower values of the ATR Oscillator, suggesting oversold conditions in the respective cryptocurrencies. On the other hand, warmer colors (yellow, orange, or red) indicate higher ATR OSC values, signaling overbought market conditions. This visual representation allows me to make rapid comparisons between different cryptocurrencies and spot potential trading opportunities more efficiently.
By utilizing the color gradient in the heatmap, the ATR OSC and Volume Screener simplifies the analysis of multiple cryptocurrencies, helping me to quickly identify market trends and make better-informed trading decisions.
I highly recommend testing the ATR OSC and Volume Screener and seeing the difference it can make in your trading decisions. Happy trading!
EMA bridge and dashboard with color coding.
Summary:
This is a custom moving average indicator script that calculates and plots different Exponential Moving Averages (EMAs) based on user-defined input values. The script also displays MACD and RSI, and provides a table that displays the current trend of the market in a color-coded format.
Explanation:
- The script starts by defining the name of the indicator and the different inputs that the user can customize.
- The inputs include bridge values for three different EMAs (high, close, and low), and four other EMAs (5, 50, 100, and 200).
- The script assigns values to these inputs using the `ta.ema()` function.
- Additionally, the script calculates EMAs for higher timeframes (3m, 5m, 15m, and 30m).
- The script then plots the EMAs on the chart using different colors and line widths.
- The script defines conditions for going long or short based on the crossover of two EMAs.
- It plots triangles above or below bars to indicate the crossover events.
- The script also calculates and displays the RSI and MACD of the asset.
- Finally, the script creates a table that displays the current trend of the market in a color-coded format. The table can be positioned on the top, middle, or bottom of the chart and on the left, center, or right side of the chart.
Parameters:
- i_ema_h: Bridge value for high EMA (default=34)
- i_ema_c: Bridge value for close EMA (default=34)
- i_ema_l: Bridge value for low EMA (default=34)
- i_ema_5: Value for 5-period EMA (default=5)
- i_ema_50: Value for 50-period EMA (default=50)
- i_ema_100: Value for 100-period EMA (default=100)
- i_ema_200: Value for 200-period EMA (default=200)
- i_f_ema: Value for fast EMA used in MACD calculation (default=9)
- i_s_ema: Value for slow EMA used in MACD calculation (default=21)
- fastInput: Value for fast length used in MACD calculation (default=7)
- slowInput: Value for slow length used in MACD calculation (default=14)
- tableYposInput: Vertical position of the table (options: top, middle, bottom; default=middle)
- tableXposInput: Horizontal position of the table (options: left, center, right; default=right)
- bullColorInput: Color of the table cell for a bullish trend (default=green)
- bearColorInput: Color of the table cell for a bearish trend (default=red)
- neutColorInput: Color of the table cell for a neutral trend (default=white)
- neutColorLabelInput: Color of the label for neutral trend in the table (default=fuchsia)
Usage:
To use this script, simply copy and paste it into the Pine Editor on TradingView. You can then customize the input values to your liking or leave them at their default values. Once you have added the script to your chart, you can view the EMAs, MACD, RSI, and trend table on the chart. The trend table provides a quick way to assess the current trend of the market at a glance.
Intrabar Run Count Indicator [tbiktag]• OVERVIEW
Introducing the Intrabar Run Count Indicator , a tool designed to detect potential non-randomness in intrabar price data. It utilizes the statistical runs test to examine the number of sequences ( runs ) of positive and negative returns in the analyzed price series. As deviations from random-walk behavior of returns may indicate market inefficiencies , the Intrabar Run Count Indicator can help traders gain a better understanding of the price dynamics inside each chart bar and make more informed trading decisions.
• USAGE
The indicator line expresses the deviation between the number of runs observed in the dataset and the expected number of runs under the hypothesis of randomness. Thus, it gauges the degree of deviation from random-walk behavior. If, for a given chart bar, it crosses above the critical value or crosses below the negative critical value, this may indicate non-randomness in the underlying intrabar returns. These instances are highlighted by on-chart signals and bar coloring. The confidence level that defines the critical value, as well as the number of intrabars used for analysis, are selected in the input settings.
It is important to note that the readings of the Intrabar Run Count Indicator do not convey directional information and cannot predict future asset performance. Rather, they help distinguish between random and potentially tradable price movements, such as breakouts, reversals, and gap fillings.
• DETAILS
The efficient-market hypothesis implies that the distribution of returns should be random, reflecting the idea that all available information is already priced into the asset. However, in practice, financial markets may not always be perfectly efficient due to factors such as market frictions, information asymmetry, and irrational behavior of market participants. As a result, inefficiency (non-randomness) can occur, potentially creating opportunities for trading strategies.
To search for potential inefficiencies, the Intrabar Run Count Indicator analyzes the distribution of the signs of returns. The central assumption underlying the indicator's logic is that if the asset price follows a random-walk pattern, then the probability of the next return being positive or negative (i.e., the next price value being larger or smaller than the current value) follows a binomial distribution. In this case, the number of runs is also a random variable, and, for a large sample, its conditional distribution is approximately normal with a well-defined mean and variance (see this link for the exact expressions). Thus, the observed number of runs in the price series is indicative of whether or not the time series can be regarded as random. In simple words, if there are too few runs or too many runs, it is unlikely a random time series. A trivial example is a series with all returns of the same sign.
Quantitatively, the deviation from randomness can be gauged by calculating the test statistic of the runs test (that serves as an indicator line ). It is defined as the absolute difference between the observed number of runs and the expected number of runs under the null hypothesis of randomness, divided by the standard deviation of the expected number of runs. If the test statistic is negative and exceeds the negative critical value (at a given confidence level), it suggests that there are fewer runs than expected for a random-walking time series. Likewise, if the test statistic exceeds the positive critical value, it is indicative of more runs than expected for a random series. The sign of the test statistic can also be informative, as too few runs can be sometimes indicative of mean-reverting behavior.
• CONCLUSION
The Intrabar Run Count Indicator can be a useful tool for traders seeking to exploit market inefficiencies and gain a better understanding of price action within each chart bar. However, it is important to note that the runs test only evaluates the distributional properties of the data and does not provide any information on the underlying causes of the non-randomness detected. Additionally, like any statistical test, it can sometimes produce false-positive signals. Therefore, this indicator should be used in conjunction with other analytical techniques as part of a trading strategy.
True Range OscHey fellow traders! I've just published a new indicator called the True Range Oscillator. It's designed to help you better understand price movements and volatility. The indicator calculates the average true range of the price data and uses a modified z-score-like approach to normalize it. The main difference is that it uses true range instead of standard deviation for normalization.
This oscillator identifies the highest and lowest values within a specified range, excluding any outliers based on standard deviations. It then scales the output between 0 and 100, so you can easily see how the current price action compares to its historical range. You can use the True Range Oscillator to spot potential trend reversals and overbought/oversold conditions.
Here are some features to explore:
Customize your price data source (open, high, low, or close).
Adjust the length and smoothing settings for the average true range calculation.
Find outliers with standard deviations, and tweak the outlier_level and dev_lookback options.
Visualize price action with plotted lines for the upper range (70), lower range (30), and center line (50), along with a shaded area between the upper and lower ranges for added clarity.
I hope you find this indicator useful in your trading journey!
Volume Flow OscillatorIntroducing the "Volume Flow Oscillator" indicator, a powerful and adaptable tool that incorporates the PeacefulIndicators library to analyze price movement strength and volume in the market. This indicator is designed to assist you in detecting potential opportunities and improving your trading analysis.
The Volume Flow Oscillator indicator offers the following features:
Adjustable input parameters, allowing you to modify the source (HLCC4 by default) and the short length to match your trading style and preferences.
A visually appealing display, with the Volume Flow Oscillator line in orange, a zero line in gray, and filled areas between the 70 and -70 levels in blue, making it easy to interpret the indicator's signals.
The core functionality of the Volume Flow Oscillator indicator is powered by the volume_flow_oscillator function from the PeacefulIndicators library, ensuring accurate and reliable results.
To start using the Volume Flow Oscillator indicator in your trading analysis, simply add the script to your chart and customize the input parameters as needed. We hope this script, built upon the PeacefulIndicators library, proves to be a valuable addition to your trading strategy.
Adaptive MACDIntroducing the "Adaptive MACD" indicator, an innovative and user-friendly script that utilizes the PeacefulIndicators library to provide traders with a dynamic and responsive version of the classic MACD indicator. This script effectively adapts the MACD calculation to account for the dominant market cycle, offering improved signals to help you make better-informed trading decisions.
The Adaptive MACD indicator incorporates the following features:
A selection of customizable input parameters, allowing you to adjust the short length, long length, signal length, and the dynamic high and low values to suit your individual trading preferences.
A visually appealing and informative display, using different colors to highlight MACD line crossovers and histogram bars, making it easier to interpret the indicator's signals.
The core functionality of the Adaptive MACD is powered by the macdDynamicLength function from the PeacefulIndicators library, ensuring accurate and reliable calculations.
To start using the Adaptive MACD indicator in your trading analysis, simply add the script to your chart, and customize the input parameters as needed. We hope this script, built upon the PeacefulIndicators library, proves to be a valuable addition to your trading strategy.
Put to Call Ratio CorrelationHello!
Excited to share this with the community!
This is actually a very simple indicator but actually usurpingly helpful, especially for those who trade indices such as SPX, IWM, QQQ, etc.
Before I get into the indicator itself, let me explain to you its development.
I have been interested in the use of option data to detect sentiment and potential reversals in the market. However, I found option data on its own is full of noise. Its very difficult if not impossible for a trader to make their own subjective assessment about how option data is reflecting market sentiment.
Generally speaking, put to call ratios generally range between 0.8 to 1.1 on average. Unless there is a dramatic pump in calls or puts causing an aggressive spike up to over this range, or fall below this range, its really difficult to make the subjective assessment about what is happening.
So what I thought about trying to do was, instead of looking directly at put to call ratio, why not see what happens when you perform a correlation analysis of the PTC ratio to the underlying stock.
So I tried this in pinescript, pulling for Tradingview's ticker PCC (Total Equity Put to Call Ratio) and using the ta.correlation function against whichever ticker I was looking at.
I played around with this idea a bit, pulled the data into excel and from this I found something interesting. When there is a very significant negative or positive correlation between PTC ratio and price movement, we see a reversal impending. In fact, a significant negative or positive correlation (defined as a R value of 0.8 or higher or -0.8 or lower) corresponded to a stock reversal about 92% of the time when data was pulled on a 5 minute timeframe on SPY.
But wait, what is a correlation?
If you are not already familiar, a correlation is simply a statistical relationship. It is defined with a Pearson R correlation value which ranges from 0 (no correlation) to 1 (significant positive correlation) and 0 to -1 (significant negative correlation).
So what does positive vs negative mean?
A significant positive correlation means the correlation is moving the same as the underlying. In the case of this indicator, if there is a significant positive correlation could mean the stock price is climbing at the same time as the PTC ratio.
Inversely, it could mean the stock price is falling as well as the PTC ratio.
A significant negative correlation means the correlation is moving in the opposite direction. So in this case, if the stock price is climbing and the PTC ratio is falling proportionately, we would see a significant negative correlation.
So how does this work in real life?
To answer this, let's get into the actual indicator!
In the image above, you will see the arrow pointing to an area of significant POSITIVE correlation.
The indicator will paint the bars on the actual chart purple (customizable of course) to signify this is an area of significant correlation.
So, in the above example this means that the PTC ratio is increase proportionately to the increase in the stock price in the SAME direction (Puts are going up proportionately to the stock price). Thus, we can make the assumption that the underlying sentiment is overwhelmingly BEARISH. Why? Because option trading activity is significantly proportionate to stock movement, meaning that there is consensus among the options being traded and the movement of the market itself.
And in the above example we will see, the stock does indeed end up selling:
In this case, IWM fell roughly 1 point from where there was bearish consensus in the market.
Let's use this same trading day and same example to show the inverse:
You will see a little bit later, a significant NEGATIVE correlation developed.
In this case identified, the stock wise RISING and the PTC ratio was FALLING.
This means that Puts were not being bought up as much as calls and the sentiment had shifted to bullish .
And from that point, IWM ended up going up an additional 0.75 points from where there was a significant INVERSE correlation.
So you can see that it is helpful for identifying reversals. But what is also can be used for is identifying areas of LOW conviction. Meaning, areas where there really is no relationship between option activity and stock movement. Let's take spy on the 1 hour timeframe for this example:
You can see in the above example there really is no consensus in the option trading activity with the overarching sentiment. The price action is choppy and so too is option trading activity. Option traders are not pushing too far in one direction or the other. We can also see the lack of conviction in the option trading activity by looking at the correlation SMA (the white line).
When a ticker is experiencing volatile and good movement up and down, the SMA will generally trade to the top of the correlation range (roughly + 1.0) and then make a move down to the bottom (roughly - 1.0), see the example below:
When the SMA is not moving much and accumulating around the centerline, it generally means a lot of indecision.
Additional Indicator Information:
As I have said, the indicator is very simple. It pulls the data from the ticker PCC and runs a correlation assessment against whichever ticker you are on.
PCC pulls averaged data from all equities within the market and is not limited to a single equity. As such, its helpful to use this with indices such as SPY, IWM and QQQ, but I have had success with using it on individual tickers such as NVDA and AMD.
The correlation length is defaulted to 14. You can modify it if you wish, but I do recommend leaving it at this as the default and the testing I have done with this have all been on the 14 correlation length.
You can chose to smooth the SMA over whichever length of period you wish as well.
When the indicator is approaching a significant negative or positive relationship, you will see the indicator flash red in the upper or lower band to signify the relationship. As well, the chart will change the bar colour to purple:
Everything else is pretty straight forward.
Let me know your questions/comments or suggestions around the indicator and its applications.
As always, no indicator is meant to provide a single, reliable strategy to your trading regimen and no indicator or group of indicators should be relied on solely. Be sure to do your own analysis and assessments of the stock prior to taking any trades.
Safe trades everyone!
Dynamic Stop Loss DemoWhat does this script do ?
This script is for pine script programmers and explains how to implement a dynamic stop-loss strategy. It is different from trailing stop-loss. Trailing stop-loss can only set the retracement value, but this script can take profit on part of the position at a fixed price and allows users to decide whether to take profit on all positions based on whether a certain track is breached or other conditions author want. In this demo, it use rsi crossover and crossunder to decide the strategy condition, and use close price as open price, and use lowest low / highest high as stop price, and use 1.5 risk ratio to calculate the fixed first profit price. It will take 50% position size when the first profit price was reached. Then it will close all rest positions when the inverse condition come out or the dynamic stop(calculated by ATR) breached or when the price back to the open price or the stop price.
How is this script implemented
When start strategy by strategy.entry , it gives a custom id which contains direction, openPrice, stopPrice, profitPrice, qty, etc. It can be get from the global variable strategy.posiition_entry_name .
RDX Relative Directional IndexRDX Relative Directional Index, Strength + Direction + Trend. This indicator is the combination of RSI and DMI or ADX. RDX aims at providing Relative direction of the price along with strength of the trend. This acts as both RSI and Average Directional Index. as the strength grows the RSI line becomes wider and when there is high volatility and market fluctuation the line becomes thinner. Color decides the Direction. This indicator provides sideways detection of RSI signal.
RDX Width: This determines the strength of RSI and Strength of ADX, The strength grows RDX band grows wider, as strength decreases band shrinks and merge into the RSI line. for exact working simply disable RSI plot on the indicator. when there is no strength the RSI vanishes..
Technical:
RSI : with default 14 period
ADX : Default 14 period
RDX=RSI+(ADX-20)/5
Color Code:
Red: Down Direction
Green: Up Direction
Sideways:
A rectangular channel is plotted on RSI 50 Level
Oversold Overbought:
Oversold and Overbought Levels are plotted for normal RSI Oversold and Overbought detection.
Buy/Sell:
Buy sell signals from ADX crossover are plotted and its easy to determine
Strength + Direction + Trend in one go
Hope the community likes this...
Contibute for more ideas and indicators..
RiverFlow ADX ScreenerRiverFlow ADX Screener, Scans ADX and Donchian Trend values across various Timeframes. This screener provides support to the Riverflow indicator. Riverflow concept is based on Two indicators. Donchian Channel and ADX or DMI.
How to implement?
1.Donchian Channel with period 20
2. ADX / DMI 14,14 threshold 20
Entry / Exit:
1. Buy/Sell Signal from ADX Crossovers.
2. Trend Confirmation Donchian Channel.
3. Major Trend EMA 200
Buy/Sell:
After a buy/sell is generated by ADX Crossover, Check for Donchian Trend. it has to be in same direction as trend. for FTT trades take 2x limit. for Forex and Stocks take 1:1.5, SL must be placed below recent swing. One can use Riverflow indicator for better results.
ADX Indicator is plotted with
Plus: Green line
Minus: Red Line
ADX strength: plotted as Background area.
TREND: Trend is represented by Green and Red Area around Threshold line
Table:
red indicates down trend
green indicates up trend
grey indicates sideways
Weak ADX levels are treated sideways and a channel is plotted on ADX and PLUS and MINUS lines . NO TRADES are to be TAKEN on within the SIDEWAYS region.
Settings are not required as it purely works on Default settings. However Donchian Length can be changed from settings.
Timeframes below 1Day are screened. Riverflow strategy works on timeframe 5M and above timeframe. so option is not provided for lower timeframes.
Best suits for INTRADAY and LONG TERM Trading
RSI-ROC Momentum AlertThis is the RSI-ROC Momentum Alert trading indicator, designed to help traders identify potential buy and sell signals based on the momentum of price movements.
The indicator is based on two technical indicators: the Rate of Change (ROC) and the Relative Strength Index (RSI). The ROC measures the speed of price changes over a given period, while the RSI measures the strength of price movements. By combining these two indicators, this trading indicator aims to provide a comprehensive view of the market momentum.
An RSI below its oversold level, which shows as a green background, in addition to a ROC crossing above its moving average (turns green) signals a buying opportunity.
An RSI above its overbought level, which shows as a red background, in addition to a ROC crossing below its moving average (turns red) signals a selling opportunity.
Traders can use this indicator to identify potential momentum shifts and adjust their trading strategies accordingly.
The ROC component of the indicator uses a user-defined length parameter to calculate the ROC and a simple moving average (SMA) of the ROC. The color of the ROC line changes to green when it is above the ROC SMA and to red when it is below the ROC SMA. The ROC SMA color changes whether it's above or below a value of 0.
The RSI component of the indicator uses a user-defined length parameter to calculate the RSI, and user-defined RSI Low and RSI High values to identify potential buy and sell signals. When the RSI falls below the RSI Low value, a green background color is applied to the chart to indicate a potential buy signal. Conversely, when the RSI rises above the RSI High value, a red background color is applied to the chart to indicate a potential sell signal.
This indicator is intended to be used on any time frame and any asset, and can be customized at will.
LowFinder_PyraMider_V2This strategy is a result of an exploration to experiment with other ways to detect lows / dips in the price movement, to try out alternative ways to exit and stop positions and a dive into risk management. It uses a combination of different indicators to detect and filter the potential lows and opens multiple positions to spread the risk and opportunities for unrealized losses or profits. This script combines code developed by fellow Tradingview community_members.
LowFinder
The lows in the price movement are detected by the Low finder script by RafaelZioni . It finds the potential lows based on the difference between RSI and EMA RSI. The MTF RSI formula is part of the MTFindicators library developed by Peter_O and is integrated in the Low finder code to give the option to use the RSI of higher timeframes. The sensitivity of the LowFinder is controlled by the MA length. When potential lows are detected, a Moving Average, a MTF Stochastic (based the the MTFindiicators by Peter_O) and the average price level filter out the weak lows. In the settings the minimal percentage needed for a low to be detected below the average price can be specified.
Order Sizing and Pyramiding
Pyramiding, or spreading multiple positions, is at the heart of this strategy and what makes it so powerful. The order size is calculated based on the max number of orders and portfolio percentage specified in the input settings. There are two order size modes. The ‘base’ mode uses the same base quantity for each order it opens, the ‘multiply’ mode multiplies the quantity with each order number. For example, when Long 3 is opened, the quantity is multiplied by 3. So, the more orders the bigger the consecutive order sizes. When using ‘multiply’ mode the sizes of the first orders are considerably lower to make up for the later bigger order sizes. There is an option to manually set a fixed order size but use this with caution as it bypasses all the risk calculations.
Stop Level, Take Profit, Trailing Stop
The one indicator that controls the exits is the Stop Level. When close crosses over the Stop Level, the complete position is closed and all orders are exited. The Stop Level is calculated based on the highest high given a specified candle lookback (settings). There is an option to deviate above this level with a specified percentage to tweak for better results. You can activate a Take Profit / Trailing Stop. When activated and close crosses the specified percentage, the Stop Level logic changes to a trailing stop to gain more profits. Another option is to use the percentage as a take profit, either when the stop level crosses over the take profit or close. With this option active, you can make this strategy more conservative. It is active by default.
And finally there is an option to Take Profit per open order. If hit, the separate orders close. In the current settings this option is not used as the percentage is 10%.
Stop Loss
I published an earlier version of this script a couple of weeks ago, but it got hidden by the moderators. Looking back, it makes sense because I didn’t pay any attention to risk management and save order sizing. This resulted in unrealistic results. So, in this script update I added a Stop Loss option. There are two modes. The ‘average price’ mode calculates the stop loss level based on a given percentage below the average price of the total position. The ‘equity’ mode calculates the stop loss level based on a given percentage of your equity you want to lose. By default, the ‘equity’ mode is active. By tweaking the percentage of the portfolio size and the stop loss equity mode, you can achieve a quite low risk strategy set up.
Variables in comments
To sent alerts to my exchange I use a webhook server. This works with a sending the information in the form of a comment. To be able to send messages with different quantities, a variable is added to the comment. This makes it possible to open different positions on the exchange with increasing quantities. To test this the quantities are printed in the comment and the quantities are switched off in the style settings.
This code is a result of a study and not intended for use as a worked out and full functioning strategy. Use it at your own risk. To make the code understandable for users that are not so much introduced into pine script (like me), every step in the code is commented to explain what it does. Hopefully it helps.
Enjoy!
VWAP+15EMA with RSIVWAP+EMA+RSI Strategy for the group MelléCasH
This strategy will enter a long position when the closing price is above both the VWAP and the 15 EMA, and the RSI is above the specified overbought level. It will exit the position when the price falls by the specified stop loss percentage, rises by the specified take profit percentage, or when the trailing stop loss (which trails the highest price achieved after the position was entered by the specified percentage) is hit. The VWAP, EMA, and RSI indicators are also plotted on the chart for reference.
Moonhub IndexMoonhub Index combines several popular technical indicators to create an aggregated index that aims to give a clearer overall picture of the market. The index takes into account the current market condition (trending, ranging, or volatile) to adjust its calculations accordingly.
The indicators used in this composite index are:
Hull Moving Average (HMA)
Fisher Transform (FT)
Williams Alligator
Moving Average Convergence Divergence (MACD)
Average True Range (ATR)
On-Balance Volume (OBV)
Money Flow Index (MFI)
Accumulation/Distribution (AD)
Pivot Points
True Strength Index (TSI)
Volume-Weighted Average Price (VWAP)
The script calculates the values of each indicator and then normalizes and weighs them according to predefined weights. The composite index is formed by summing the weighted values of each indicator. The final Moon Index is plotted on the chart, along with several other related lines like the exponential moving averages (EMA) and simple moving averages (SMA) of the index.
This custom index can be used by traders to get a more comprehensive view of the market and make better-informed trading decisions based on the combined insights of multiple indicators.
Moonhub Cycle IndexMoonhub Cycle Index is a composite index derived from three popular technical analysis indicators: Moving Average Convergence Divergence (MACD), Schaff Trend Cycle (STC), and Detrended Price Oscillator (DPO). The indicator is designed to help identify potential trends and market sentiment by combining the unique characteristics of each indicator.
Key components of the indicator include:
Input Parameters:
COEMA Length (len_DIema): The length of the Exponential Moving Average (EMA) applied to the Custom Index. Default is set to 9.
COSMA Length (len_DIsma): The length of the Simple Moving Average (SMA) applied to the Custom Index. Default is set to 30.
Indicators:
MACD: A momentum oscillator that shows the relationship between two moving averages of a security's price. It is calculated using the difference between the 12-period and 26-period EMA, and a 9-period EMA (signal line) of the MACD.
STC: A cyclic indicator that identifies cyclical trends in the market. It is calculated using the Stochastic oscillator formula applied to the close, high, and low prices over a 10-period lookback window.
DPO: A price oscillator that eliminates the trend from price data to focus on underlying cycles. It is calculated using a custom function that shifts the price by half the length and subtracts the SMA from the shifted price.
Custom Index: The composite index is calculated by taking the average of the MACD line, STC, and DPO.
COEMA and COSMA: Exponential and Simple Moving Averages applied to the Custom Index using the lengths specified by the input parameters (len_DIema and len_DIsma).
Plots: The Custom Index, COEMA, and COSMA are plotted with different colors and line widths to visualize their interaction and provide insights into potential market trends.
This Custom Index Indicator can be useful for traders who want to analyze the market using a combination of these indicators to make more informed decisions. It can also help identify potential trends and market sentiment by combining the unique characteristics of each indicator.