Smoother Momentum Stops [Loxx]Smoother Momentum Stops (SMS) is a dynamic tool that combines the logic of momentum and moving averages to create an overlay of the market price and generate potential trade signals. The original idea for this indicator comes from the beloved and esteemed trading indicator guru Mladen Rakic.
Understanding the Framework
The SMS incorporates various aspects of technical analysis, including momentum calculation, several types of moving averages, and an intelligent stop-and-reverse system that determines when to enter and exit trades.
The indicator initiates by defining the color scheme for visualization, specifically green for bullish trends and red for bearish trends. It further utilizes the 'smmom' and 'fema' functions to calculate smoothed momentum and fast exponential moving averages, respectively. The values computed by these functions are central to the signal generation process.
Momentum Calculation
The 'smmom' function serves to calculate a smoother momentum by taking a source (such as the closing price) and a period as inputs. This function employs a complex algorithm involving exponential moving averages (EMA), wherein two EMAs are calculated with different smoothing factors, and the difference between the two results is returned as the output. This smooth momentum calculation assists in eliminating unnecessary noise from the market and delivers more reliable momentum readings.
Moving Averages Computation
One key feature of the SMS is the ability to select from five different moving average types: Exponential Moving Average (EMA), Fast Exponential Moving Average (FEMA), Linear Weighted Moving Average (LWMA), Simple Moving Average (SMA), and Smoothed Moving Average (SMMA). The 'variant' function assigns the chosen method to the '_avg' variable, which is then used in the trade signal logic.
Trade Signal Generation
SMS employs a complex yet robust mechanism for generating trade signals. A stop-and-reverse system is established, which works on the principle of momentum. If the smoothed momentum is positive, an upper stop is determined and if the momentum is negative, a lower stop is defined.
The process continues by defining long and short entry conditions. The indicator goes long when an upper stop exists, and the previous bar had a lower stop, signifying a shift in momentum. The short entry condition is the opposite: the indicator goes short when a lower stop exists, and the previous bar had an upper stop. Alerts are generated for each of these conditions, helping traders to take timely action.
Visual Representation and UI Options
In terms of visual representation, the indicator plots upper and lower stops, employing green color for upper and red for lower stops. If the option to color bars is chosen, the entire bar is colored green or red, based on whether an upper or lower stop exists. This feature allows traders to visually comprehend market conditions better. Support and reisstance levels are also provided for visual context.
Conclusion
The Smoother Momentum Stops indicator is a potent tool for traders seeking to optimize their trading strategies. It blends the fundamentals of momentum and moving averages, resulting in a robust system that provides clear, reliable, and timely trading signals. By adjusting the smoothing type and period parameters, traders can customize the indicator to fit various market conditions and asset types, thereby adding a layer of flexibility to their trading strategies.
The use of a stop-and-reverse system adds a layer of risk management by offering precise entry and exit points based on momentum shifts. These stops are not just mere levels of entries or exits, but they reflect the undercurrent of the market's momentum, thus providing a dynamic framework to make informed trading decisions.
Additionally, the SMS indicator offers visual simplicity. The color-coded bars and distinct symbols for long and short positions make it easier for traders to interpret the signals and market direction quickly. Combined with the alert system, it ensures that traders never miss an important trading opportunity.
Finally, the power of the SMS indicator lies in its adaptability and comprehensive approach. By providing a selection of moving averages and an intelligent momentum-based system, it encapsulates various aspects of market behavior. As such, it is a useful tool not just for momentum traders, but for any trader who understands the significance of moving averages and momentum in predicting market movements.
In conclusion, the Smoother Momentum Stops indicator stands as an innovative, adaptable, and powerful tool for the modern trader. Its blend of flexibility, dynamic risk management, and straightforward visualization offer a comprehensive solution for traders looking to navigate the complex world of financial markets. With a detailed understanding of its workings as presented in this essay, traders can harness its full potential to optimize their strategies, manage risk, and achieve their trading objectives.
Jalur dan Saluran
Nexus Blast Trading Strategy [Kaspricci]Nexus Blast Trading Strategy - Kaspricci
This indicator shows the different sessions during the day (London session, New York AM session, New York PM session and Asian session) by adding vertical lines and draws horizontal lines for the high and low during each session. Furthermore those lines turn red once the price has taken this high or low. Blue lines indicate liquidity not yet taken.
On top the indicator draws boxes of different color to indicate bullish and bearish Fair Value Gaps (FVG).
Happy to receive your feedback. Please leave a comment for bugs as well as ideas for improvement.
General Settings
Time Zone - used for marking sessions and end of day.
Sessions
Sessions - start and end time for each session based on set time zone
Number of Days back - for how many days in the past the startegy will draw strategy highs and lows. Theres is a maximum of 50 days defined.
FVG Settings
Threshold in Ticks - you can hide very small FVGs by increasing this threshold
FVG Colors - colors used for the bearish and bullish FVG box
This script is for educational purposes only! It is not meant to be a financial advice.
PS: The former strategy script was removed by TV, as it would violate several rules according to them.
Machine Learning : Torben's Moving Median KNN BandsWhat is Median Filtering ?
Median filtering is a non-linear digital filtering technique, often used to remove noise from an image or signal. Such noise reduction is a typical pre-processing step to improve the results of later processing (for example, edge detection on an image). Median filtering is very widely used in digital image processing because, under certain conditions, it preserves edges while removing noise (but see the discussion below), also having applications in signal processing.
The main idea of the median filter is to run through the signal entry by entry, replacing each entry with the median of neighboring entries. The pattern of neighbors is called the "window", which slides, entry by entry, over the entire signal. For one-dimensional signals, the most obvious window is just the first few preceding and following entries, whereas for two-dimensional (or higher-dimensional) data the window must include all entries within a given radius or ellipsoidal region (i.e. the median filter is not a separable filter).
The median filter works by taking the median of all the pixels in a neighborhood around the current pixel. The median is the middle value in a sorted list of numbers. This means that the median filter is not sensitive to the order of the pixels in the neighborhood, and it is not affected by outliers (very high or very low values).
The median filter is a very effective way to remove noise from images. It can remove both salt and pepper noise (random white and black pixels) and Gaussian noise (randomly distributed pixels with a Gaussian distribution). The median filter is also very good at preserving edges, which is why it is often used as a pre-processing step for edge detection.
However, the median filter can also blur images. This is because the median filter replaces each pixel with the value of the median of its neighbors. This can cause the edges of objects in the image to be smoothed out. The amount of blurring depends on the size of the window used by the median filter. A larger window will blur more than a smaller window.
The median filter is a very versatile tool that can be used for a variety of tasks in image processing. It is a good choice for removing noise and preserving edges, but it can also blur images. The best way to use the median filter is to experiment with different window sizes to find the setting that produces the desired results.
What is this Indicator ?
K-nearest neighbors (KNN) is a simple, non-parametric machine learning algorithm that can be used for both classification and regression tasks. The basic idea behind KNN is to find the K most similar data points to a new data point and then use the labels of those K data points to predict the label of the new data point.
Torben's moving median is a variation of the median filter that is used to remove noise from images. The median filter works by replacing each pixel in an image with the median of its neighbors. Torben's moving median works in a similar way, but it also averages the values of the neighbors. This helps to reduce the amount of blurring that can occur with the median filter.
KNN over Torben's moving median is a hybrid algorithm that combines the strengths of both KNN and Torben's moving median. KNN is able to learn the underlying distribution of the data, while Torben's moving median is able to remove noise from the data. This combination can lead to better performance than either algorithm on its own.
To implement KNN over Torben's moving median, we first need to choose a value for K. The value of K controls how many neighbors are used to predict the label of a new data point. A larger value of K will make the algorithm more robust to noise, but it will also make the algorithm less sensitive to local variations in the data.
Once we have chosen a value for K, we need to train the algorithm on a dataset of labeled data points. The training dataset will be used to learn the underlying distribution of the data.
Once the algorithm is trained, we can use it to predict the labels of new data points. To do this, we first need to find the K most similar data points to the new data point. We can then use the labels of those K data points to predict the label of the new data point.
KNN over Torben's moving median is a simple, yet powerful algorithm that can be used for a variety of tasks. It is particularly well-suited for tasks where the data is noisy or where the underlying distribution of the data is unknown.
Here are some of the advantages of using KNN over Torben's moving median:
KNN is able to learn the underlying distribution of the data.
KNN is robust to noise.
KNN is not sensitive to local variations in the data.
Here are some of the disadvantages of using KNN over Torben's moving median:
KNN can be computationally expensive for large datasets.
KNN can be sensitive to the choice of K.
KNN can be slow to train.
Bollingersupport&resistance"When the price breaks through the Bollinger Bands' overbought zone, and the new candlestick's price returns to within the Bollinger Bands, resistance appears. The resistance level is set at the highest point of the previous candlestick. The close of the next candlestick determines whether the resistance is valid. If the second point is confirmed, the resistance is valid.
When the price breaks through the Bollinger Bands' oversold zone, and the new candlestick's price returns to within the Bollinger Bands, support appears. The support level is set at the lowest point of the previous candlestick. The close of the next candlestick determines whether the support is valid. If the second point is confirmed, the support is valid.
This indicator is useful for intuitively observing the emergence or confirmation of resistance and support signals, and it's helpful for intuitively reviewing past historical resistance and support."
Session Tick-BoxThe "Session Tick-Box" is designed to display session-related information on the chart (HIGH/LOW box). Here's a breakdown of its features and functionalities:
Session Settings:
You can specify different sessions such as the Cash Session, Asian Session, European Session, and Offset Session using the input.session() function.
The sat.session_tick() function is used to calculate the low, high, fill color, open bar status, and session open status for each session.
Display Settings:
You have the option to show a new daily session using the separateDays input. The background color for the new session can be customized using the Day_Bg input.
The colorDays input allows you to enable or disable coloring the background based on different days of the week.
You can customize the colors for the Cash, Asian, European, and Offset sessions using the respective color inputs.
Other Features:
The indicator calculates the percentage change between the low and high of each session using the sat.AbsPercentChange() function.
Labels are added to mark the high and low points of the sessions.
A vertical line is drawn between the low and high points of each session using the line.new() function.
The fill() function is used to create a shaded area between the low and high lines of each session.
Overall, the "Session Tick-Box" indicator provides visual representation and analysis of different sessions on the chart, including their respective ranges and percentage changes.
Bollinger Bands Lab - by InFinitoVariation of the Moving Average Lab that includes Bollinger Bands functionality for any manually created Moving Average. It includes:
- Standard Deviations for any MA
- Fixed Symmetrical Deviations for any MA that remain at a constant % away from the MA
- The same Moving Average creation settings from the Moving Average Lab
"The Moving Average Lab allows to create any possible combination of up to 3 given MAs. It is meant to help you find the perfect MA that fits your style, strategy and market type.
This script allows to average, weight, double and triple multiple types and lengths of Moving Averages
Currently supported MA types are:
SMA
EMA
VWMA
WMA
SMMA (RMA)
HMA
LSMA
DEMA
TEMA
Features:
- Double or Triple any type of Moving Average using the same logic used for calculating DEMAs and TEMAs
- Average 2 or 3 different types and lengths of Moving Average
- Weight each MA manually
- Average up to 3 personalized MAs
- Average different Moving Averages with different length each "
The preview screenshot shows:
- The combination of:
- 200 LSMA - Weight: 1
- 200 HMA - Weight: 2
- 200 VWMA - Weight: 1 - Double
- The regular Bollinger Band setting, 2 standard deviations
- Two fixed symmetrical deviations at 15% and 20% away from the XMA
actic-fibbA fibbonacci based bollinger band. Up and down trading arrows are generated based on crossover and crossunder of 200 day vma
Cuban's Range Reclaim [CE]Cuban's Range Reclaim is an indicator that minimizes the time that traders need to spend manually adjusting the range extremes and identifying range deviations.
By tracking the previous levels of the range, the indicator then signals to the trader when price trades back below that level, and assigns a 'Range High' or 'Range Low' print to the deviation. When there is a potential break in the trend, the indicator also prints a 'Pivot' label.
Among other features, the indicator tracks the midline of the range excluding the deviations, giving a far more accurate trend line with less signal noise than regular donchian channels.
There is also the option to view dynamic supply and demand within the channel, plus midlines for the supply and demand, and for a regular channel.
Within the user inputs, the indicator also allows the user to adjust the following:
Source input for range level confirmations
Period for range lookback
Supply and demand sensitivity
TO DO:
Allow for color changes within the Style menu
Gann Angles EnterpriseThe Gann Angles indicator is a tool based on the methods developed by William Delbert Gann. It is designed to analyze and forecast price movements in financial markets. The indicator automatically calculates the angle scale using Gann, Herzhik, Heliker, and Borovski methods. Additionally, users have the option to manually input their own angle scale.
The Gann methods and those of his followers are based on representing price movements as geometric shapes such as triangles, squares, and circles. Gann believed that price movements adhere to certain patterns and that future changes can be predicted based on these geometric forms.
The Gann Angle indicator allows users to identify the angles of trend and their strength. It plots template lines with different angles of inclination on the price chart, representing support and resistance levels. These levels can be used to determine entry and exit points in the market, as well as to set stop-loss and profit levels.
When automatically calculating the angle scale, the indicator takes into account various factors such as the current trend, market volatility, and the period of analyzed data. It applies relevant formulas and algorithms to determine optimal angles of inclination and create a fan-like pattern of angles.
However, the indicator also provides the option for users to manually input their own angle scale. This allows analysts or traders to customize the indicator according to their own preferences and strategies.
Overall, the Gann Angle indicator is a powerful tool for technical analysis in financial markets. It helps identify key support and resistance levels and provides information about the trend and its strength. Combining the automatic calculation of the angle scale with the option to input a manual scale gives users flexibility and adaptability in using the indicator. They can consider their own preferences, experience, and unique market conditions when determining angles of inclination and support/resistance levels.
It is important to note that the effectiveness of the Gann Angle indicator, whether using an automatic or manual scale, depends on proper analysis and interpretation of the results. Users should have knowledge and understanding of Gann's methods to make informed decisions based on the data provided by the indicator.
In conclusion, the Gann Angle indicator with automatic and manual angle scale calculation provides users with a powerful tool for analyzing and forecasting price movements in financial markets. It combines the fundamental principles of William Delbert Gann's methods with flexibility and customization to meet the needs of various traders and analysts.
The different methods of calculating the scale give traders the flexibility to choose the follower's school they prefer.
The features of the indicator include:
Mandatory knowledge of Gann's methods.
Use as a template for drawing angles and fan patterns.
Selection of scale calculation options:
Heliker
Herzhik
Gann
Borovski
Manual input of the scale
Working principle:
The indicator is used as a template.
After installing the indicator and configuring it, the trader needs to draw a trend line (or a pre-drawn fan) along the desired angle(s).
Without changing the inclination, the trader simply moves this line to the desired extreme for further analysis.
Bollinger Bands and SMA Channel Buy and Sell
This Indicator is a combination of a standard BB indicator incorporated with a SSL Channel by ErwinBeckers which is Simple Moving average with a length of set at 10 (Default) and calculates the high and low set for the default 10 to form a Channel.
The Settings for the Bollinger Band is the standard settings on a normal Bollinger Band - Length 20, source close and Standard dev 2
The setting for the SMA is length 10 and the high and low calculated or that length to form a channel.
The SMA Channel gives a green line for the Up channel and the Red line for the down Channel.
The basis of the indicator is that the Candle close above the Basis line of the BB and the SMA green line will give a buy indicator
and the same for Sell indicator the candle close below the basis BB and the SMA line Red will give a Sell indicator.
Please note that this indicator is a mix of 2 basic indicators found in Trading view, giving Buy and Sell indicators to make things easier to not look for this visually.
This code will be open source for anyone to use or back test or use it for whatever they want.
This code is for my own personal trading and cannot be relied upon. This indicator cannot be used and cannot guarantee anything, and caution should always be taken when trading. Use this with other indicators to give certanty.
Again use this for Paper Trading only.
I want to thank TradingView for its platform that facilitates development and learning.
Visible Range Linear Regression Channel [vnhilton](OVERVIEW)
This indicator calculates the linear regression channel for the visible bars shown on the chart instead of the traditional fixed length linear regression channel TradingView provides (and is more accurate I believe). Inspired by TradingView's Linear Regression Channel and Visible Average Price indicator, and the DAS Trader linear regression indicator.
(FEATURES)
- Ability to extend lines to the right
- Show/hide individual lines
- Adjust standard deviation of bands
- Adjust line style and width of basis and band lines
- Change individual line colours and plot fills between the lines
(DIFFERENCES)
If you compare this indicator to TradingView's Linear Regression Channel, you will notice some differences (as of 11th June, 2023). Differences and reasons are:
1) The intercept is wrong. The formula TradingView uses to calculate the intercept includes the addition of the gradient, which I believe is incorrect. Difference #2 is also why the intercept is wrong. This indicator omits that addition. This was verified by comparing the gradient calculated in this indicator with the gradient determined by Excel with the same data.
2) The gradient is "wrong". In quotations as essentially TradingView's code attempts to find the line of best fit, with the y-axis on the most recent bar instead of the oldest bar. This leads to the gradient being the opposite to the gradient found in this indicator, which isn't wrong, but the later formula used to calculate the intercept doesn't take this into account, resulting in an incorrect intercept value. The gradient and intercept values in this indicator matches those found in Excel.
3) Standard deviation bands of both indicators. I believe the code TradingView uses to calculate standard deviation is incorrect (basing this just through visuals). This indicator uses the array.stdev function to find the correct value (verified with Excel numbers).
Stochastic Momentum Channel with Volume Filter [IkkeOmar]A stochastic version of my momentum channel volume filter
The "Stochastic Momentum" indicator combines the concepts of Stochastic and Bollinger Bands to provide insights into price momentum and potential trend reversals. It can be used to identify overbought and oversold conditions, as well as potential bullish and bearish signals.
The indicator calculates a Stochastic RSI using the RSI (Relative Strength Index) of a given price source. It applies smoothing to the Stochastic RSI values using moving averages to generate two lines: the %K line and the %D line. The %K line represents the current momentum, while the %D line represents a filtered version of the momentum.
Additionally, the indicator plots Bollinger Bands around the moving average of the Stochastic RSI. The upper and lower bands represent levels where the price is considered relatively high or low compared to its recent volatility. The distance between the bands reflects the current market volatility.
Here's how the indicator can be interpreted:
Stochastic Momentum (%K and %D lines):
When the %K line crosses above the %D line, it suggests a potential upward move or bullish momentum.
When the %K line crosses below the %D line, it indicates a potential downward move or bearish momentum.
The color of the plot changes based on the relationship between the %K and %D lines. Green indicates %K > %D, while red indicates %K < %D.
Bollinger Bands (Upper and Lower Bands):
When the price crosses above the upper band, it suggests an overbought condition, indicating a potential reversal or pullback.
When the price crosses below the lower band, it suggests an oversold condition, indicating a potential reversal or bounce.
To identify potential upward moves, consider the following conditions:
If the price is not in a contraction phase (the bands are not narrowing), and the price crosses above the lower band, it may signal a potential upward move or bounce.
If the %K line crosses above the %D line while the %K line is below the upper band, it may indicate a potential upward move.
To identify potential downward moves, consider the following conditions:
If the price is not in a contraction phase (the bands are not narrowing), and the price crosses below the upper band, it may signal a potential downward move or pullback.
If the %K line crosses below the %D line while the %K line is above the lower band, it may indicate a potential downward move.
Code explanation
Input Variables:
The input function is used to create customizable input variables that can be adjusted by the user.
smoothK and smoothD are inputs for the smoothing periods of the %K and %D lines, respectively.
lengthRSI represents the length of the RSI calculation.
lengthStoch is the length parameter for the stochastic calculation.
volumeFilterLength determines the length of the volume filter used to filter the RSI.
Source Definition:
The src variable is an input that defines the price source used for the calculations.
By default, the close price is used, but the user can choose a different price source.
RSI Calculation:
The rsi1 variable calculates the RSI using the ta.rsi function.
The RSI is a popular oscillator that measures the strength and speed of price movements.
It is calculated based on the average gain and average loss over a specified period.
In this case, the RSI is calculated using the src price source and the lengthRSI parameter.
Volume Filter:
The code calculates a volume filter to filter the RSI values based on the average volume.
The volumeAvg variable calculates the simple moving average of the volume over a specified period (volumeFilterLength).
The filteredRsi variable stores the RSI values that meet the condition of having a volume greater than or equal to the average volume (volume >= volumeAvg).
Stochastic Calculation:
The k variable calculates the %K line of the Stochastic RSI using the ta.stoch function.
The ta.stoch function takes the filtered RSI values (filteredRsi) as inputs and calculates the %K line based on the length parameter (lengthStoch).
The smoothK parameter is used to smooth the %K line by applying a moving average.
The d variable represents the %D line, which is a smoothed version of the %K line obtained by applying another moving average with a period defined by smoothD.
Momentum Calculation:
The kd variable calculates the average of the %K and %D lines, representing the momentum of the Stochastic RSI.
Bollinger Bands Calculation:
The ma variable calculates the moving average of the momentum values (kd) using the ta.sma function with a period defined by bandLength.
The offs variable calculates the offset by multiplying the standard deviation of the momentum values with a factor of 1.6185.
The up and dn variables represent the upper and lower bands, respectively, by adding and subtracting the offset from the moving average.
The Bollinger Bands provide a measure of volatility and can indicate potential overbought and oversold conditions.
Color Assignments:
The colors for the plot and Bollinger Bands are assigned based on certain conditions.
If the %K line is greater than the %D line, the plotCol variable is set to green. Otherwise, it is set to red.
The upCol and dnCol variables are set to different colors based on whether the fast moving average (fastMA) is above or below the upper and lower bands, respectively.
Plotting:
The Stochastic Momentum (%K) is plotted using the plot function with the assigned color (plotCol).
The upper and lower Bollinger Bands are plotted using the plot function with the respective colors (upCol and dnCol).
The fast moving average (fastMA) is plotted in black color to distinguish it from the bands.
The hline function is used to plot horizontal lines representing the upper and lower bands of the Stochastic Momentum.
The code combines the Stochastic RSI, Bollinger Bands, and color logic to provide visual representations of momentum and potential trend reversals. It allows traders to observe the interaction between the Stochastic Momentum lines, the Bollinger Bands, and price movements, enabling them to make informed trading decisions.
Scalp Tool
This script is primarily intended as a scalping tool.
The theory of the tool is based on the fact that the price always returns to its mean.
Elements used:
1. VWMA as a moving average. VWMA is calculated once based on source close and once based on source open.
2. the bands are not calculated like the Bollinger Band, but only a settlement is calculated for the lower bands based on the Lows and for the upper bands based on the Highs. Thus the bands do not become thicker or thinner, but remain in the same measure to the mean value above or below the price.
3. a volume filter on simple calculation of a MA with deviation. Therefore, it can be identified if a volume breakout has occurred.
4. support and resistance zones which are calculated based on the highs and lows over a certain length.
5. RSI to determine oversold and overbought zones. It also tries to capture the momentum by using a moving average (variable selectable) to filter the signals. The theory is that in an uptrend the RSI does not go below 50 and in a downtrend it does not go above 50.
However, this can be very different depending on the financial instrument.
Explanation of the signals:
The main signal in this indicator Serves for pure short-term trading and is generated purely on the basis of the bands and the RSI.
Only the first bands are taken into account.
Buy signal is generated when the price opens below the lower band 1 and closes above the lower band 1 or the RSI crosses a value of 25 from bottom to top.
Sell signal is generated when the price opens above the Upper Band 1 and closes below the Upper Band 1 or the RSI crosses a value of 75 from top to bottom.
The position should be closed when the price hits the opposite band. Alternatively, it can also be closed at the mean.
Other side signals:
1. breakouts:
The indicator includes 2 support and resistance zones, which differ only in length. For the breakout signals, the short version of the R/S is used. A signal is generated when the price breaks through the zones with increased volume. It is then assumed that the price will continue to follow the breakout.
The values of the S/R are adjustable and marked with "BK".
The value under Threshold 2 defines the volume breakout. 4 is considered as the highest value. The smaller the value, the smaller the volume must be during a breakout.
2. bounce
If the price hits a S/R (here the long variant is used with the designation "Support" or "Resistance") and makes a wick with small volume, the script assumes a bounce and generates a Sell or Buy signal accordingly.
The volume can be defined under "Threshold".
The S/R according to the designation as well.
Combined signals:
If the value of the S/R BK and the S/R is the same and the bounce logic of the S/R BK applies and an RSI signal is also generated, a signal is also plotted.
Here the idea was to get very strong signals for possible swing entries.
4. RSI Signals
The script contains two RSI.
RSI 1:
Bullish signal is generated when the set value is crossed from the bottom to the top.
Bearish signal is generated when the set value is crossed from the top to the bottom.
RSI 2:
Bullish signal is generated when the set value is crossed from the top to the bottom.
Bearish signal is generated when the set value is crossed from bottom to top.
For RSI 2 the theory is taken into account according to the description under Used elements point 5
Optical trend filter:
Also an optical trend filter was generated which fills the bands accordingly.
For this the VWMA is used and the two average values of the band.
Color definition:
Gray = Neutral
Red = Bearish
Green = Bullish
If the mean value is above the VWMA and the mean value based on the closing price is above the mean value based on the open price, the band is colored green. It is a bullish trend
If the mean value is below the VWMA and the mean value based on the closing price is below the mean value based on the open price, the band is colored red.
The band is colored gray if the mean value is correspondingly opposite. A sideways phase is assumed.
The script was developed on the basis of the pair BTCUSD in the 15 minute chart and the settings were defined accordingly on it. The display of S/R for forex pairs does not work correctly and should be hidden. The logic works anyway.
When using the script, all options should first be set accordingly to the asset and tested before trading afterwards. It applies of course also here that there is no 100% guarantee.
Also, a strong breakout leads to false signals and overheating of the indicator.
Multi Bollinger Bands with Over ZoneThis indicator is called "Multi Bollinger Bands with Over Zone". The indicator uses linear regression to calculate the regression line and standard deviation to calculate the upper and lower deviation lines. It also plots filled areas between the deviation lines to highlight overbought and oversold zones.
The indicator has several customizable inputs, including the length of the regression period, depth, and deviations used to calculate the deviation lines.
The regression line is plotted in green color with circle markers. The upper and lower deviation lines are plotted in blue and red colors, respectively. The area between the deviation lines is filled with light blue color for the overbought zone and light pink color for the oversold zone.
This indicator helps traders in identifying trends and potential price reversals. When the price is above the upper deviation line, it indicates a potential overbought zone, while when the price is below the lower deviation line, it indicates a potential oversold zone.
Please note that this indicator is only a tool for analysis and does not provide direct trading signals. It is important to combine this indicator with additional analysis and appropriate trading strategies.
FalconRed VIXThe FalconRed Vix indicator is a trading tool designed to provide insights into the potential price range of the Nifty 50 index in India. It utilizes the IndiaVix value, which represents the annual percentage change of the Nifty 50 price. By analyzing the IndiaVix, the FalconRed Vix indicator helps traders determine the upper and lower price thresholds within which the Nifty 50 could potentially trend over the course of a year.
For example, if the Nifty 50 is currently at 18,500 and the IndiaVix is 10, it suggests that, at the given level of volatility, the Nifty 50 may experience price fluctuations of up to 10% in either direction over the course of a year. Consequently, the price range projected by the FalconRed Vix indicator would be between 16,650 and 20,350.
The indicator further extends its analysis to shorter time frames, including monthly, weekly, daily, hourly, 6-hour, 15-minute, 5-minute, and 1-minute intervals. By considering the Vix level, the FalconRed Vix indicator calculates the respective price ranges for these time frames.
When viewing the indicator on a chart, traders can observe a range band surrounding the current Nifty 50 price. The top line represents the upper threshold of the Nifty 50 price, while the bottom line represents the lower threshold, both based on the Vix level. This range band assists in determining potential selling points for out-of-the-money (OTM) options and aids in identifying entry or exit points for options and futures trading.
Traders can analyze the upper and lower threshold lines by drawing horizontal or trend lines, which can help identify potential breakouts or breakdowns. Furthermore, this analysis can assist in setting target prices and stop losses based on trend analysis.
It is important to note that the FalconRed Vix indicator is not a technical indicator used for determining stock buy or sell signals. Rather, it focuses on defining the potential price range based on the Vix level, which in turn aids in planning trading strategies such as short strangles, iron condors, and others.
Donchian Volatility Indicator - Adaptive Channel WidthThis indicator is designed to help traders assess and analyze market volatility. By calculating the width of the Donchian channels, it provides valuable insights into the range of price movements over a specified period. This indicator helps traders identify periods of high and low volatility, enabling them to make more informed trading decisions.
The indicator is based on the concept of Donchian channels, which consist of the highest high and lowest low over a specified lookback period. The channel width is calculated as the difference between the upper and lower channels. A wider channel indicates higher volatility, suggesting potentially larger price movements and increased trading opportunities. On the other hand, a narrower channel suggests lower volatility, indicating a relatively calmer market environment with potentially fewer trading opportunities.
The adaptive aspect of the indicator refers to its ability to adjust the width of the channels dynamically based on market conditions. The indicator calculates the width of the channels using the Average True Range (ATR) indicator, which measures the average range of price movements over a specified period. By multiplying the ATR value with the user-defined ATR multiplier, the indicator adapts the width of the channels to reflect the current level of volatility. During periods of higher volatility, the channels expand to accommodate larger price movements, providing a broader range for assessing volatility. Conversely, during periods of lower volatility, the channels contract, reflecting the narrower price ranges and signaling a decrease in volatility. This adaptive nature allows traders to have a flexible and responsive measure of volatility, ensuring that the indicator reflects the current market conditions accurately.
To provide further insights, the indicator includes a signal line. The signal line is derived from the channel width and is calculated as a simple moving average over a specified signal period. This signal line acts as a reference level, allowing traders to compare the current channel width with the average width over a given time frame. By assessing whether the current channel width is above or below the signal line, traders can gain additional context on the volatility level in the market.
The colors used in the Donchian Volatility Indicator - Adaptive Channel Width play a vital role in visualizing the volatility levels:
-- Lime Color : When the channel width is above the signal line, it is colored lime. This color signifies that volatility has entered the market, indicating potentially higher price movements and increased trading opportunities. Traders can pay closer attention to the lime-colored channel width as it may suggest favorable conditions for trend-following or breakout trading strategies.
-- Fuchsia Color : When the channel width is below the signal line, it is colored fuchsia. This color represents relatively low volatility, suggesting a calmer market environment with potentially fewer trading opportunities. Traders may consider adjusting their strategies during periods of low volatility, such as employing range-bound or mean-reversion strategies.
-- Aqua Color : The signal line is represented by the aqua color. This color allows traders to easily identify the signal line amidst the channel width. The aqua color provides a visual reference for the average channel width and helps traders assess whether the current width is above or below this average.
The Donchian Volatility Indicator - Adaptive Channel Width has several practical applications for traders:
-- Volatility Assessment : Traders can use this indicator to assess the level of volatility in the market. By observing the width of the Donchian channels and comparing it to the signal line, they can determine whether the current volatility is relatively high or low. This information helps traders set appropriate expectations and adjust their trading strategies accordingly.
-- Breakout Trading : Wide channel widths may indicate an increased likelihood of price breakouts. Traders can use the Donchian Volatility Indicator - Adaptive Channel Width to identify potential breakout opportunities. When the channel width exceeds the signal line, it suggests a higher probability of significant price movements, potentially signaling a breakout. Traders may consider entering trades in the direction of the breakout.
-- Risk Management : The indicator can assist in setting appropriate stop-loss levels based on the current volatility. During periods of high volatility (lime-colored channel width), wider stop-loss orders may be warranted to account for larger price swings. Conversely, during periods of low volatility (fuchsia-colored channel width), narrower stop-loss orders may be appropriate to limit risk in a more range-bound market.
While the Donchian Volatility Indicator - Adaptive Channel Width is a valuable tool, it is important to consider its limitations:
-- Lagging Indicator : The indicator relies on historical price data, making it a lagging indicator. It provides insights based on past price movements and may not capture sudden changes or shifts in volatility. Traders should be aware that the indicator may not generate real-time signals and should be used in conjunction with other indicators and analysis tools.
-- False Signals : Like any technical indicator, the Donchian Volatility Indicator - Adaptive Channel Width is not immune to generating false signals. Traders should exercise caution and use additional analysis to confirm the signals generated by the indicator. Considering the broader market context and employing risk management techniques can help mitigate the impact of false signals.
-- Market Conditions : Market conditions can vary, and volatility levels can differ across different assets and timeframes. Traders should adapt their strategies and consider other market factors when interpreting the signals provided by the indicator. It is crucial to avoid relying solely on the indicator and to incorporate a comprehensive analysis of the market environment.
In conclusion, this indicator is a powerful tool for assessing market volatility. By examining the width of the Donchian channels and comparing it to the signal line, traders can gain insights into the level of volatility and adjust their trading strategies accordingly. The color-coded representation of the channel width and signal line allows for easy visualization and interpretation of the volatility dynamics. Traders should utilize this indicator as part of a broader trading approach, incorporating other technical analysis tools and considering market conditions for a comprehensive assessment of market volatility.
Ruthless Support and Resistance ConformationThe Ruthless Support and Resistance Conformation (SRC) indicator is designed to identify and confirm support and resistance levels in the price chart. It utilizes an exponential moving average (EMA) and calculates the angle between the current EMA value and a previous EMA value over a specified length.
The indicator visually represents the conformation of support and resistance levels by plotting colored backgrounds on the chart. When the angle of the EMA surpasses the upper threshold, indicating a strong upward movement, the background color turns red. Conversely, when the angle drops below the lower threshold, indicating a significant downward movement, the background color turns green. In areas where the angle remains within the thresholds, the background color is set to a lighter shade.
Traders can utilize this indicator to identify potential areas of support and resistance based on the conformation of the EMA angle. The upper threshold can indicate potential resistance levels, while the lower threshold can indicate potential support levels.
To provide additional clarity, the indicator also includes horizontal lines representing the upper and lower thresholds on the chart, allowing traders to visually gauge the conformation against these levels.
Please note that this indicator should be used in conjunction with other technical analysis tools and indicators to make well-informed trading decisions. It is recommended to customize the length, thresholds, and other parameters of the indicator based on individual trading strategies and preferences.
Trend hunter strategy - buy & sellThe indicator combines multiple technical indicators and conditions to generate buy and sell signals.
Here's how the indicator works and how to use it:
Strategy Selection:
The indicator provides a dropdown menu to choose the type of strategy. The available options are "Pullback" and "Simple."
Supertrend Settings:
The Supertrend indicator is used to identify the trend direction.
The indicator takes two input parameters:
ATR Length: Specifies the length of the Average True Range (ATR) used in the Supertrend calculation. The default value is 10.
Factor: Specifies the factor used in the Supertrend calculation. The default value is 3.0.
EMA Settings:
The indicator also includes an Exponential Moving Average (EMA) condition.
You can enable or disable the EMA condition using the "Ema Condition On/Off" checkbox.
If enabled, the indicator calculates an EMA based on the close price.
You can specify the length of the EMA using the "Ema Length" input parameter. The default value is 200.
RSI Settings:
The Relative Strength Index (RSI) indicator is used to generate additional conditions.
You can enable or disable the RSI condition using the "Rsi Condition On/Off" checkbox.
If enabled, the indicator calculates the RSI based on the close price.
You can specify the length of the RSI using the "Rsi Length" input parameter. The default value is 14.
Additionally, you can set the overbought and oversold levels for the RSI using the "RSI BUY Level" and "RSI SELL Level" input parameters, respectively. The default value for both is 50.
Final Conditions:
The indicator combines the Supertrend, EMA, and RSI conditions to generate buy and sell signals.
The specific conditions depend on the chosen strategy:
For the "Simple" strategy, the buy condition is when the Supertrend is in an up trend, not in a previous long position, the RSI is above the overbought level, and the close price is above the EMA.
For the "Pullback" strategy, the buy condition is when there is a cross under of the previous low with the Supertrend, the Supertrend is in an up trend, the RSI is above the overbought level, and the close price is above the EMA.
The sell conditions are the opposite of the respective buy conditions.
Backtest Period:
You can specify the start and end dates for the backtesting using the "Start calculations from" and "End calculations" inputs, respectively. The default start date is "2005-01-01" and the default end date is "2045-03-01." (this is work in progress) Still working on the table part, it is a bit tricky.
Trade Direction:
You can choose the trade direction using the "Trade Direction" input parameter. The available options are "Long," "Short," and "Both."
Depending on the selected trade direction, the indicator will generate signals accordingly.
Visual Display:
The indicator plots the Supertrend line on the price chart.
Buy signals are shown as green labels below the price bars.
Sell signals are shown as red labels above the price bars.
Adjust the input parameters according to your preferences, and then apply the indicator to a chart to see the generated signals. Please note that this indicator should be used for educational purposes only and should be thoroughly tested before using it for real trading.
Volatility-Based Mean Reversion BandsThe Volatility-Based Mean Reversion Bands indicator is a powerful tool designed to identify potential mean reversion trading opportunities based on market volatility. The indicator consists of three lines: the mean line, upper band, and lower band. These bands dynamically adjust based on the average true range (ATR) and act as reference levels for identifying overbought and oversold conditions.
The calculation of the indicator involves several steps. The average true range (ATR) is calculated using a specified lookback period. The ATR measures the market's volatility by considering the range between high and low prices over a given period. The mean line is calculated as a simple moving average (SMA) of the closing prices over the same lookback period. The upper band is derived by adding the product of the ATR and a multiplier to the mean line, while the lower band is derived by subtracting the product of the ATR and the same multiplier from the mean line.
Interpreting the indicator is relatively straightforward. When the price approaches or exceeds the upper band, it suggests that the market is overbought and may be due for a potential reversal to the downside. On the other hand, when the price approaches or falls below the lower band, it indicates that the market is oversold and may be poised for a potential reversal to the upside. Traders can look for opportunities to enter short positions near the upper band and long positions near the lower band, anticipating the price to revert back towards the mean line.
The bar color and background color play a crucial role in visualizing the indicator's signals and market conditions. Lime-colored bars are used when the price is above the upper band, indicating a potential bearish mean reversion signal. Conversely, fuchsia-colored bars are employed when the price is below the lower band, suggesting a potential bullish mean reversion signal. This color scheme helps traders quickly identify the prevailing market condition and potential reversal zones. The background color complements the bar color by providing further context. Lime-colored background indicates a potential bearish condition, while fuchsia-colored background suggests a potential bullish condition. The transparency level of the background color is set to 80% to avoid obscuring the price chart while still providing a visual reference.
To provide additional confirmation for mean reversion setups, the indicator incorporates the option to use the Relative Strength Index (RSI) as a confluence factor. The RSI is a popular momentum oscillator that measures the speed and change of price movements. When enabled, the indicator checks if the RSI is in overbought territory (above 70) or oversold territory (below 30), providing additional confirmation for potential mean reversion setups.
In addition to visual signals, the indicator includes entry arrows above or below the bars to highlight the occurrence of short or long entries. When the price is above the upper band and the confluence condition is met, a fuchsia-colored triangle-up arrow is displayed above the bar, indicating a potential short entry signal. Similarly, when the price is below the lower band and the confluence condition is met, a lime-colored triangle-down arrow is displayed below the bar, indicating a potential long entry signal.
Traders can customize the indicator's parameters according to their trading preferences. The "Lookback Period" determines the number of periods used in calculating the mean line and the average true range (ATR). Adjusting this parameter can affect the sensitivity and responsiveness of the indicator. Smaller values make the indicator more reactive to short-term price movements, while larger values smooth out the indicator and make it less responsive to short-term fluctuations. The "Multiplier" parameter determines the distance between the mean line and the upper/lower bands. Increasing the multiplier widens the bands, indicating a broader range for potential mean reversion opportunities, while decreasing the multiplier narrows the bands, indicating a tighter range for potential mean reversion opportunities.
It's important to note that the Volatility-Based Mean Reversion Bands indicator is not a standalone trading strategy but rather a tool to assist traders in identifying potential mean reversion setups. Traders should consider using additional analysis techniques and risk management strategies to make informed trading decisions. Additionally, the indicator's performance may vary across different market conditions and instruments, so it's advisable to conduct thorough testing and analysis before integrating it into a trading strategy.
Complete Discrete Fourier Transform ToolkitThis is an expansion from my Discrete Fourier Transform Overlay indicator which offers various features that may be useful for traders wishing to apply frequency analysis or integral transform to their trading. For those unfamiliar with the concept, the discrete Fourier transform decomposes wave or wave-like data into functions depending on frequency. This can be helpful in demonstrating or interpreting trends and periodic frequencies in time-series price data, or oscillating indicators.
This toolkit has the following features:
Fourier bands (deviation cloud): The deviation cloud expresses the uncertainty in the DFT algorithm, as well as the relative change in frequency of the curve.
Fourier supertrend: The supertrend is applied as a product of the DFT algorithm, instead of onto the price data itself. This filters the supertrend from infrequent periodicities. For trading, this means that the supertrend will not be affected by false breakouts or breakdowns. See the image below for an example:
Future updates may include:
Projection of the probabilistic uncertainty principle. In a nutshell, the concept can be used to project uncertainties forwards through price data to forecast the path of least resistance, or, the most probable frequency.
Machine learning capabilities. Justin Doherty has done the Pine Script community a great service in introducing kNN algorithms with Lorentzian distance calculations; however, this is only the start of relativistic mechanics that can be applied to time series data. The DFT algorithm essentially filters data into its periodicities; this data can be inserted into a relativistic kNN algorithm - Lorenz or otherwise - to possibly improve accuracy.
3 Fib EMAs To Scalp Them AllThe "3 Fib EMAs To Scalp Them All" was made in order to clear up when we should look for shorts, longs, or walk away. Also it can alert you when a trend starts, or when there is a possible reversal. I use it for scalping/day trading in 5m-1h timeframes.
1. EMAs: By default, the indicator uses Fibonacci numbers (21, 55, 233), but you can change them.
2. Color Changes: The color of the Micro EMA line changes depending on its relation to the Mid and Macro EMAs.
When Micro EMA < Mid < Macro EMA, it turns red, indicating a potential bearish trend - that's when you should look for shorts
When Micro EMA > Mid > Macro EMA, it turns green, indicating a potential bullish trend - that's when you should look for longs
A white Micro EMA is when you need to take some rest, enjoy your coffee, and avoid overtrading.
3. Signals: The indicator provides visual signals in the form of diamonds and crosses and corresponding alert signals.
A red diamond above the bar signals a potential beginning of a downtrend
A red cross above the bar signals the end of the downtrend and can be used as a signal for a possible reversal up/breakout.
A green diamond below the bar signals a potential beginning of a downtrend,
A green cross below the bar signals the end of the uptrend and can be used as a signal for a possible reversal down/breakout.
4. Alerts: For algo traders and people who prefer to stay away from the monitor... there are alerts for every signal.
Friendly note: Don't blindly follow the signals for your long and short entries. The signals only pop up when the EMA cross value gets a confirmation. A smart move would be to wait for a retracement to the EMA line and use momentum indicators like market cipher B to pinpoint those ideal entry points.
EMAflowPRO -Ranges-DISCLAIMER: Always, please keep in mind that market conditions change, past results cannot guarantee the same results in the future.
EMAflowPRO - Ranges-
EMAflowPRO ranges indicator will detect key movements in the market that fit certain conditions and based on that create key tradable zones by providing dynamic and static range levels.
Before reading further please take a look at the indicator values names on the right in the main chart above - these names are linked to the content below when we talk about range structure. The examples included in charts are linked to the area we're discussing (if something was said - most likely closest chart demonstrates it - Also arrows present entries; can be limit or can be market buy/sell in to the wicks.)
Let's find out what indicator does...
Static range logic:
Indicator uses combination of market timing indicators (counting relationship between candles) , fisher transform, stoch rsi, bollinger bands to detect important market price action that show strenght - based on that it will project a static range where key goal is to predict where market will be extremely oversold, extremely overbought or where market could change bias etc.
The setups it provides are very similar to those that come out of harmonic patterns - but it was developed with unique approach without knowing what harmonic patterns are.. so it's not completly the same.
Range is represented by 3 tradable areas (actual trade ideas on charts - arrow points towards a level - on the right there is a scale with a number- limit order can be placed there )
Top of the range - It serves as a shorting area or if top is converted to support can also signal a potential breakout or start of new trend.
Example of a short the top of the range:
29732 - is area where wicks can be sold in to , or limit sell is placed - with higher leverage sl should be tight, with lower sell orders can be spread out up to the middle with sl just above 30500, targets can be choosen based on the provious range top as % moves point.
Example of longing the levels on the recent rise - price staying above middle of the top of the range keeps bias on the upside and potentially signals a break out or start of new trend
Uppper, Middle, Lower part of the range: Sideway area - middle of the range decides direction , above favors the upper levels , below favors the lower levels.
Very nice example where white line is middle of the range and shows that even in strong trend - range projection is able to accurately predict key pullback areas that provide substantial gain. See image below - again settign limit orders where middle of the range is allows you to get a comfortable entry with very big risk reward ratio.
Bottom of the range - market is extremely oversold
Spx example of our recent range from last year's summer - again chart includes both EMAflow indicator and EMAflow ranges as all indicators are extremely complementary and present two sides of the medal sideway and trend view.
Chart only contains ranges but shows the same pair and time:
If price goes below middle of the bottom of the range it could signal a break down or start of new bearish trend.
Dynamic range logic
Since sometimes static range gets broken out or is not respected and the price action is not yet sufficient to generated a new one we included a dynamic supply demand part where dynamic range is generated working in a similar way but does add clarity when static range fails.
example of this can be seen when ftx caused a btc dump we broke through the bottom of the range but dynamic range later showed us new bottom we could trade.
Confluence between both can also provide even more sure levels to place limit orders or to market buy or sell when wicks in to that area occurs.
Minuses:
Since ranges tend to work best when market is sideway - a second part is recommended with EMAflowPRO where focus on moving averages helps you navigate stronger trends.
Not all tfs are well synced with ranges on various assets so you will need to flip through few ones to find the best timeframes that historically worked the best - if you come across an asset that doens't look good you should just change timeframe to higher until you see something that fits or change asset until you get something that looks clear.
Settings:
EMAflow - Ranges - allows you to preset minimum potential of a trade setup you want to look for - default is 6% that ensures you can get a good setup on lower and higher tfs.
tlc with False BreakoutThe strategy aims to identify a trend line channel with the potential for a false breakout. Here's an explanation of the strategy:
The script starts by defining the input parameters. The lookback parameter determines the number of previous bars to consider for detecting the trend lines, and the threshold parameter controls the sensitivity of the trend line detection.
The script then initializes variables to store the trend lines, tap count, and the false breakout signal.
Inside the loop, the script iterates over the specified number of bars (lookback) to identify the trend lines. It checks if the current high is greater than the previous and next highs to identify an upper trend line and sets it using the line.new function. Similarly, it checks if the current low is smaller than the previous and next lows to identify a lower trend line and sets it.
The script also keeps track of the price levels of the upper and lower trend lines using the variables upperTrendLinePrice and lowerTrendLinePrice. These price levels are obtained using the line.get_y1 function.
After the fourth tap (when tapCount is equal to 4), the script checks if the current close price is above the upper trend line or below the lower trend line. If this condition is met, it sets the falseBreakout variable to true, indicating a potential false breakout.
Finally, the script plots a shape marker (plotshape) when a false breakout occurs. This is represented by an orange label displayed below the bar.
At the end of the script, the line.delete function is used to remove the old trend lines when the script reaches the last bar (barstate.islast).
By using this strategy, you can visually identify trend line channels where the upper and lower lines touch higher highs or lower highs and higher lows or lower lows. Additionally, it provides a false breakout signal when the price breaks above the upper trend line or below the lower trend line on the fifth tap.