{Gunzo} Trend Sniper (WMA with coefficient)Trend Sniper is a trend-following indicator that sticks closer to the trend than others moving averages as it is using an upgraded weighted moving average implementation.
OVERVIEW :
It is typical to use a moving average indicator (SMA, EMA, WMA or TMA) to identify the trend of an asset. Standard moving averages indicators smooth the price and doesn’t stick very closely to the actual price, showing potential lagging information.
CALCULATION :
In order to have a trendline that sticks to the price, we are going to use a weighted moving average as it puts more weight on recent candles and less on past candles. The weight is usually calculated using the distance from current candle to the other candles used in the calculation. We have the following formula for the standard calculation as implemented in TradingView :
WMA_standard = (Price1 * Weight1 + …… + PriceN * WeightN)) / (Weight1 + …… + WeightN)
This “Trend Sniper” indicator uses an additional coefficient to alter even more the weight of each candle.
WMA_with_coefficient = (Price1 * (Weight1 - Coefficient) + …… + PriceN * (WeightN - Coefficient)) / ((Weight1 - Coefficient) + …… + (WeightN - Coefficient))
SETTINGS :
MA source : Source used for moving average calculation (ex : “close”)
MA length : Length of the moving average. Higher values will give a smoother line, lower values will give a more reactive line.
Use extra smoothing : Enable/disable usage of a EMA to extra smooth the line curve. If activated the indicator may be lagging, but it will also avoid many false buy/sell signals.
MA extra smoothing length : Length of the moving average of the extra smoothing.
Change candle colors : Enable/disable painting the candles of the chart with the colors of the weighted moving average.
Display buy/sell signals : Display buy/sell signals (circles) when the moving average is changing direction
VISUALIZATIONS :
This indicator has 3 possible visualizations :
Moving Average line : the line represents the weighted moving average that is following the price of the asset, when the line goes up we are in a uptrend (green line) when the line goes down we are in a downtrend (red line).
Candle coloring : the color of the moving average line can be applied to the candles of the chart for better readability.
Signals : Buy/Sell signals can be displayed at the bottom of the chart
USAGE :
This indicator can help analyze the trend directional changes :
First of all, if the moving average line is under the price (or above the price), then we can assume that the uptrend is strong (or downtrend is strong).
If the current candle crosses the moving average line, it is the first sign that the trend is weakening and possibly starting to revert.
If the weighted moving average is changing direction, then the trend change is confirmed and the color of the line changes
Cerca negli script per "trendline"
Moritsz's Customized RSIBasically just your standard RSI with a twist. Key differences:
1. Overbought and Oversold levels are moved to a higher and lower level following the nature of cryptocurrency.
2. Added a middle trendline at 50. Above is usually an uptrend, below is a downtrend.
3. Better looking than your typical RSI.
4. Nice pretty colors to please your eyes :)
Enjoy.
Auto Fib Speed Resistance Fans by DGTFibonacci Speed and Resistance Fan is an analytical drawing tool used to indicate the support and resistance levels of an existing trend and the price level at which possible changes in the trend may occur.
A Fibonacci Speed Resistance Fan consists of a trend line drawn between two extreme points - a trough and opposing peak or a peak and opposing trough - on which a set of sequential speed resistance lines are drawn above (which represents time) and below (which represents price). These lines are drawn based on time/price percentages of the distance between the beginning and the end of the trend line.
Speed resistance lines not only help to measure trend corrections but also measure the speed of a trend (the rate at which a trendline ascends or descends)
Traders can use the lines of the Fibonacci Speed and Resistance Fan to predict key points of resistance or support, at which they might expect price trends to reverse. Once a trader identifies patterns within a chart, they can use those patterns to predict future price movements and future levels of support and resistance. Traders use the predictions to time their trades. Key support and resistance levels tend to occur frequently at the 61.8-percent level on both uptrends and downtrends.
Please check for further details in the education post that I will share shortly after this publication :
Nobody appears to know whether Fibonacci tools work because markets exhibit some form of natural pattern or because many investors use Fibonacci ratios to predict price movements, making them a self-fulfilling prophecy.
█ Study OPTIONS
Auto Fibonacci Speed and Resistance Fan , the main aim of the study
- Pivot threshold can be adjusted via “Deviation” and “Depth” input options
- Historical Fans option will allow plotting of Speed and Resistance Fans on previous pivot high/lows
- Ability to set ALERTs for the Speed and Resistance Levels
- Price Grid Lines if extended it will result with Fib Retracement levels
- All lines, line levels are customizable, default values are set exactly to the same with the available Fib Speed and Resistance Fan drawing tool
Zig Zag – Derived from build-in Auto Fib Retracement with some customization options.
Example Usages :
Disclaimer :
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Volume Weighted Directional BiasThis indicator uses a series of five volume weighted moving averages cast out in successive powers of three to calculate a value which expresses the direction and momentum of a trend. It can be used as a contrary indicator to identify waning momentum at the top or bottom of a rally or selloff. It can be used to identify trendline divergence. It can also be used for trend confirmation.
The length of the moving averages can be changed in the indicator inputs, but each should be longer than the previous.
The problem with most trend indicators is that they are either too lagging or too noisy. This indicator seeks to combine smoothed data and a long lookback period with an exponentially forward weighted calculation, making it still very responsive to market changes without too much signal noise.
CT Reverse True Strength Indicator On ChartIntroducing the Caretakers “On Chart” Reverse True Strength Index.
According to Wikipedia….
“The True Strength Index (TSI) is a technical indicator used in the analysis of financial markets that attempts to show both trend direction and overbought/oversold conditions. It was first published William Blau in 1991.
The indicator uses moving averages of the underlying momentum of a financial instrument.
Momentum is considered a leading indicator of price movements, and a moving average characteristically lags behind price.
The TSI combines these characteristics to create an indication of price and direction more in sync with market turns than either momentum or moving average.”
The TSI has a normal range of values between +100 and -100.
Traditionally traders and analysts will consider:
Positives values above 25 to indicate an “overbought” condition
Negative values below -25 to indicate an “oversold” condition
I have reverse engineered the True Strength Index formula to derive 2 new functions.
1) The reverse TSI function is dual purpose which can be used to calculate….
The chart price at which the TSI will reach a particular TSI scale value.
The chart price at which the TSI will equal its previous value.
2) The reverse TSI signal cross function can be used to calculate the chart price at which the TSI will cross its signal line.
I have employed these functions here to return the price levels where the True Strength Index would equal :
Upper alert level ( default 25 )
Zero-Line
Lower alert level ( default -25 )
Previous TSI (eq) value
TSI signal line
In this “On Chart” version of the reverse True Strength Index the crossover levels are displayed both as lines on the chart and via an optional info-box with choice of user selected info.
Chart Line Colors
Upper alert level... ( Fuchsia )
Zero-Line............ ( White )
Lower alert level... ( Aqua )
TSI (eq)...............( TSI (eq) > close..Orange, TSI (eq) < close..Lime )
TSI signal line........( Signal Cross Line > Close..Aqua, Signal Cross Line < Close..Fuchsia )
How to interpret the displayed prices returned from the TSI scale zero line and upper and lower alert levels.
Closing exactly at the given price will cause the True Strength Index value to equal the scale value.
Closing above the given price will cause the True Strength Index to cross above the scale value.
Closing below the given price will cause the True Strength Index to cross below the scale value.
How to interpret the displayed price returned from the TSI (eq)
Closing exactly at the price will cause the True Strength Index value to equal the previous TSI value.
Closing above the price will cause the True Strength Index value to increase.
Closing below the price will cause the True Strength Index value to decrease.
How to interpret the displayed price returned from the TSI signal line crossover.
Closing exactly at the given price will cause the True Strength Index value to equal the signal line.
Closing above the given price will cause the True Strength Index to cross above the signal line.
Closing below the given price will cause the True Strength Index to cross below the signal line.
Common methods to derive signals from the TSI :
Zero-line crossovers
When the CMO crosses above the zero-line, a buy signal is generated.
When the CMO crosses below the zero-line, a sell signal is generated.
“Overbought” and “Oversold” crossovers
When the SMI crosses below -25 and then moves back above it, a buy signal is generated.
When the SMI crosses above +25 and then moves back below it, a sell signal is generated.
What Does the True Strength Index (TSI) Tell You?
The indicator is primarily used to identify overbought and oversold conditions in an asset's price, spot divergence, identify trend direction and changes via the zero-line, and highlight short-term price momentum with signal line crossovers.
Since the TSI is based on price movements, oversold and overbought levels will vary by the asset being traded. Some stocks may reach +30 and -30 before tending to see price reversals, while another stock may reverse near +20 and -20.
Mark extreme TSI levels, on the asset being traded, to see where overbought and oversold is. Being oversold doesn't necessarily mean it is time to buy, and when an asset is overbought it doesn't necessarily mean it is time to sell. Traders will typically watch for other signals to trigger a trade decision. For example, they may wait for the price or TSI to start dropping before selling in overbought territory. Alternatively, they may wait for a signal line crossover.
Signal Line Crossovers
The true strength index has a signal line, which is usually a seven- to 13-period EMA of the TSI line. A signal line crossover occurs when the TSI line crosses the signal line. When the TSI crosses above the signal line from below, that may warrant a long position. When the TSI crosses below the signal line from above, that may warrant selling or short selling.
Signal line crossovers occur frequently, so should be utilized only in conjunction with other signals from the TSI. For example, buy signals may be favoured when the TSI is above the zero-line. Or sell signals may be favoured when the TSI is in overbought territory.
Zero-line Crossovers
The zero-line crossover is another signal the TSI generates. Price momentum is positive when the indicator is above zero and negative when it is below zero. Some traders use the zero-line for a directional bias. For example, a trader may decide only to enter a long position if the indicator is above its zero-line. Conversely, the trader would be bearish and only consider short positions if the indicator's value is below zero.
Breakouts and Divergence
Traders can use support and resistance levels created by the true strength index to identify breakouts and price momentum shifts. For instance, if the indicator breaks below a trendline, the price may see continued selling.
Divergence is another tool the TSI provides. If the price of an asset is moving higher, while the TSI is dropping, that is called bearish divergence and could result in a downside price move. If the TSI is rising while the price is falling, that could signal higher prices to come. This is called bullish divergence.
Divergence is a poor timing signal, so it should only be used in conjunction with other signals generated by the TSI or other technical indicators.
The Difference Between the True Strength Index (TSI) and the Moving Average Convergence Divergence (MACD) Indicator.
The TSI is smoothing price changes to create a technical oscillator. The moving average convergence divergence (MACD) indicator is measuring the separation between two moving averages. Both indicators are used in similar ways for trading purposes, yet they are not calculated the same and will provide different signals at different times.
The Limitations of Using the True Strength Index (TSI)
Many of the signals provided by the TSI will be false signals. That means the price action will be different than expected following a trade signal. For example, during an uptrend, the TSI may cross below the zero-line several times, but then the price proceeds higher even though the TSI indicates momentum has shifted down.
Signal line crossovers also occur so frequently that they may not provide a lot of trading benefit. Such signals need to be heavily filtered based on other elements of the indicator or through other forms of analysis. The TSI will also sometimes change direction without price changing direction, resulting in trade signals that look good on the TSI but continue to lose money based on price.
Divergence also tends to unreliable on the indicator. Divergence can last so long that it provides little insight into when a reversal will actually occur. Also, divergence isn't always present when price reversals actually do occur.
The TSI should only be used in conjunction with other forms of analysis, such as price action analysis and other technical indicators.
This is not financial advice, use at your own risk.
CT Reverse True Strength IndicatorIntroducing the Caretakers Reverse True Strength Index.
According to Wikipedia….
“The True Strength Index (TSI) is a technical indicator used in the analysis of financial markets that attempts to show both trend direction and overbought/oversold conditions. It was first published William Blau in 1991.
The indicator uses moving averages of the underlying momentum of a financial instrument.
Momentum is considered a leading indicator of price movements, and a moving average characteristically lags behind price.
The TSI combines these characteristics to create an indication of price and direction more in sync with market turns than either momentum or moving average.”
The TSI has a normal range of values between +100 and -100.
Traditionally traders and analysts will consider:
Positives values above 25 to indicate an “overbought” condition
Negative values below -25 to indicate an “oversold” condition
I have reverse engineered the True Strength Index formula to derive 2 new functions.
The reverse TSI function is dual purpose which can be used to calculate….
The chart price at which the TSI will reach a particular TSI scale value.
The chart price at which the TSI will equal its previous value.
The reverse TSI signal cross function can be used to calculate the chart price at which the TSI will cross its signal line.
I have employed these functions here to return the price levels where the True Strength Index would equal :
Upper alert level ( default 25 )
Zero-Line
Lower alert level ( default -25 )
Previous TSI (eq) value.
TSI signal line
These crossover levels are displayed via an optional info-box with choice of user selected info.
How to interpret the displayed prices returned from the TSI scale zero line and upper and lower alert levels.
Closing exactly at the given price will cause the True Strength Index value to equal the scale value.
Closing above the given price will cause the True Strength Index to cross above the scale value.
Closing below the given price will cause the True Strength Index to cross below the scale value.
How to interpret the displayed price returned from the TSI (eq)
Closing exactly at the price will cause the True Strength Index value to equal the previous TSI value.
Closing above the price will cause the True Strength Index value to increase.
Closing below the price will cause the True Strength Index value to decrease.
How to interpret the displayed price returned from the TSI signal line crossover.
Closing exactly at the given price will cause the True Strength Index value to equal the signal line.
Closing above the given price will cause the True Strength Index to cross above the signal line.
Closing below the given price will cause the True Strength Index to cross below the signal line.
Common methods to derive signals from the TSI :
Zero-line crossovers
When the CMO crosses above the zero-line, a buy signal is generated.
When the CMO crosses below the zero-line, a sell signal is generated.
“Overbought” and “Oversold” crossover
When the SMI crosses below -25 and then moves back above it, a buy signal is generated.
When the SMI crosses above +25 and then moves back below it, a sell signal is generated.
What Does the True Strength Index (TSI) Tell You?
The indicator is primarily used to identify overbought and oversold conditions in an asset's price, spot divergence, identify trend direction and changes via the zero-line, and highlight short-term price momentum with signal line crossovers.
Since the TSI is based on price movements, oversold and overbought levels will vary by the asset being traded. Some stocks may reach +30 and -30 before tending to see price reversals, while another stock may reverse near +20 and -20.
Mark extreme TSI levels, on the asset being traded, to see where overbought and oversold is. Being oversold doesn't necessarily mean it is time to buy, and when an asset is overbought it doesn't necessarily mean it is time to sell. Traders will typically watch for other signals to trigger a trade decision. For example, they may wait for the price or TSI to start dropping before selling in overbought territory. Alternatively, they may wait for a signal line crossover.
Signal Line Crossovers
The true strength index has a signal line, which is usually a seven- to 13-period EMA of the TSI line. A signal line crossover occurs when the TSI line crosses the signal line. When the TSI crosses above the signal line from below, that may warrant a long position. When the TSI crosses below the signal line from above, that may warrant selling or short selling.
Signal line crossovers occur frequently, so should be utilized only in conjunction with other signals from the TSI. For example, buy signals may be favoured when the TSI is above the zero-line. Or sell signals may be favoured when the TSI is in overbought territory.
Zero-line Crossovers
The zero-line crossover is another signal the TSI generates. Price momentum is positive when the indicator is above zero and negative when it is below zero. Some traders use the zero-line for a directional bias. For example, a trader may decide only to enter a long position if the indicator is above its zero-line. Conversely, the trader would be bearish and only consider short positions if the indicator's value is below zero.
Breakouts and Divergence
Traders can use support and resistance levels created by the true strength index to identify breakouts and price momentum shifts. For instance, if the indicator breaks below a trendline, the price may see continued selling.
Divergence is another tool the TSI provides. If the price of an asset is moving higher, while the TSI is dropping, that is called bearish divergence and could result in a downside price move. If the TSI is rising while the price is falling, that could signal higher prices to come. This is called bullish divergence.
Divergence is a poor timing signal, so it should only be used in conjunction with other signals generated by the TSI or other technical indicators.
The Difference Between the True Strength Index (TSI) and the Moving Average Convergence Divergence (MACD) Indicator.
The TSI is smoothing price changes to create a technical oscillator. The moving average convergence divergence (MACD) indicator is measuring the separation between two moving averages. Both indicators are used in similar ways for trading purposes, yet they are not calculated the same and will provide different signals at different times.
The Limitations of Using the True Strength Index (TSI)
Many of the signals provided by the TSI will be false signals. That means the price action will be different than expected following a trade signal. For example, during an uptrend, the TSI may cross below the zero-line several times, but then the price proceeds higher even though the TSI indicates momentum has shifted down.
Signal line crossovers also occur so frequently that they may not provide a lot of trading benefit. Such signals need to be heavily filtered based on other elements of the indicator or through other forms of analysis. The TSI will also sometimes change direction without price changing direction, resulting in trade signals that look good on the TSI but continue to lose money based on price.
Divergence also tends to unreliable on the indicator. Divergence can last so long that it provides little insight into when a reversal will actually occur. Also, divergence isn't always present when price reversals actually do occur.
The TSI should only be used in conjunction with other forms of analysis, such as price action analysis and other technical indicators.
This is not financial advice, use at your own risk.
Ripster EMA CloudsEMA Cloud By Ripster
EMA Cloud System is a Trading System Invented by Ripster where areas are shaded between two desired EMAs. The concept implies the EMA cloud area serves as support or resistance for Intraday & Swing Trading. This can be utilized effectively on 10 Min for day trading and 1Hr/Daily for Swings. Ripster himself utilizes various combinations of the 5-12, 34-50, 8-9, 20-21 EMA clouds but the possibilities are endless to find what works best for you.
“Ideally, 5-12 or 5-13 EMA cloud acts as a fluid trendline for day trades. 8-9 EMA Clouds can be used as pullback Levels –(optional). Additionally, a high level price over or under 34-50 EMA clouds confirms either bullish or bearish bias on the price action for any timeframe” – Ripster
EMA Cross and MACD Signal CombinedThe rule is simple.
When MACD crosses up, it is supposed to give a buy signal. However, before entering into a Long position, there is a need for a confirmation. This confirmation can be from a down trendline breakout or from another indicator.
In this case, I've chosen the Exponential Moving Average Cross to be as the confirmation.
The Buy Signal will appear when there it fulfills the following conditions:-
i. The MACD line is above the Signal Line
ii. The fast EMA crosses the Slow EMA
The Sell signal will appears when the opposite of the above condition is met.
This indicator is meant for the Swing Trader whom would like to hold a position for a long time.
Koalafied RSI// Concept developed from RSI : The Complete Guide by John Hayden
// RSI is regarded as a momentum indicator. 2:1 momentum is associated with RSI values of 66.67 and 33.33 respectfully. In an Uptrend an RSI value of 40 should not be broken and in a downtrend
// a RSI value of 60 should not be exceeded. 4:1 momentum (RSI values of 80/20) can be associated with extreme market conditions, typically thought of as being Overbought or Oversold.
// Simple divergence provides a strong indication that the preceding trend will resume as soon as the retracement is completed. Multiple long-term divergences (not shown in this indicator)
// increase the likelihood that the preceding trend has ended.
// An Uptrend is indicated when:
// 1. RSI values remain in an 80/40 range
// 2. Presence of bearish divergences
// 3. Hidden bullish divergences are seen
// A Downtrend is indicated when:
// 1. RSI values remain in a 60/20 range
// 2. Presence of bullish divergence
// 3. Hidden bearish divergence is seen
// Personal additions to John Haydens concepts are horizontal pivot breaks and diagonal trendline breaks. The 80/20 line color shows the last break of horizontal pivot points, while the rsi
// line changes color with diagonal breaks. Additional support/resistance is shown by 66.67 and 33.33 lines.
[blackcat] L2 Ehlers Automatic SineTrend Trading SystemLevel: 2
Background
John F. Ehlers introuced Automatic SineTrend Trading System in his "Rocket Science for Traders" chapter 12.
Function
blackcat L2 Ehlers Automatic SineTrend Trading System is used to find proper long and short entries.Dr. Ehlers developed a completely automatic trading system called the SineTrend Automatic System based on the rules in his book. His fundamental approach is to trade using the Trend Mode rules when the market is in a Trend Mode and trade using the Cycle Mode rules when the market is in a Cycle Mode.
Key Signal
Smooth --> 4 bar WMA w/ 1 bar lag
Detrender --> The amplitude response of a minimum-length HT can be improved by adjusting the filter coefficients by
trial and error. HT does not allow DC component at zero frequency for transformation. So, Detrender is used to remove DC component/ trend component.
Q1 --> Quadrature phase signal
I1 --> In-phase signal
Period --> Dominant Cycle in bars
SmoothPeriod --> Period with complex averaging
DCPeriod ---> Dominant Cycle Period
Trendline ---> IT fast line
SmoothPrice ---> IT slow line
Trend ---> Trend identifier: 1 for trend; 0 for cycle.
LeadSine ---> Lead Sine Wave signal
DCSine ---> Sine Wave signal
long ---> long entry signal
short ---> short entry signal
Pros and Cons
100% John F. Ehlers definition translation of original work, even variable names are the same. This help readers who would like to use pine to read his book. If you had read his works, then you will be quite familiar with my code style.
NOTE: Due to limited performance oberved from "Market Mode Identification" part, this trading system I observed was not so powerful.
Remarks
The 11th script for Blackcat1402 John F. Ehlers Week publication.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
[blackcat] L1 ALMA Trend ScalperLevel: 1
Background
The Arnaud Legoux Moving Average (ALMA) indicator was recently added to the family of moving averages. It was developed in 2009 by Arnaud Legous and Dimitrios Kouzis Loukas. Since then, this indicator has gained huge popularity among traders.
ALMA works like any moving average work. However, the calculation of the ALMA is more perfect compared to the moving average. This indicator has minimal lag which makes it a leading indicator in the market. While the SMA, MA, EMA and SMMA signal line is often delayed. The ALMA was designed to address the two critical disadvantages of traditional moving averages, responsiveness and smoothness.
Function
L1 ALMA Trend Scalper is simple but powerful. This indicator makes full use of ALMA's rapid response advantage to provide buying and selling points by winding and crossing two short-term moving averages. A mid-term moving average can provide relatively effective support and pressure. Finally, the function of whale pump detection is simply realized through the characteristics of the moving average.
Key Signal
trendline --> mid term moving average for support and resistance
tradingline ---> basic element for fast line and slow line
fastline ---> fast line for short term
slowline --> slow line for short term
pumpstart ---> simple whale pump zone detection
Pros and Cons
Pros:
1. Simple but clear to see the trend reversals
2. Aux middle term moving average help just whether it is a true or fake breakout
Cons:
1. No advanced trading skill is incorporated
2. Need improvements on sideways.
Remarks
Just be simple but powerful
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
[blackcat] L2 Moving Average OscillatorLevel: 2
Background
OsMA is an abbreviation for the term Moving Average Oscillator (MAO). The OsMA is a technical indicator that shows the difference between an oscillator and its moving average over a period of time. The MACD is the most commonly used oscillator in the OsMA display, although any oscillator can be used. The MACD has a built-in moving average, which is the signal line. The signal line is an intersection of the MACD line. The OsMA is the difference or the distance between these two lines, which are usually drawn as a histogram. It can provide both a trend confirmation and possible trading signals.
Function
L2 Moving Average Oscillator combines advantages of moving average and oscillator. It can effectively reduce statruation effect of an oscillator under extreme market conditions.
Key Signal
fastline --> MAO fast line
slowline --> MAO slow line
trendline --> more stable trend line of fastline
Pros and Cons
Pros:
1. filter out oscillator fake signal with moving average processing
2. it is an oscillator that can detect overbought and oversold zones effectively
Cons:
1. need to select proper trading pair and time frame
Remarks
My first MAO indicator
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Rain On Me V2As promised, here is Rain On Me Indicator V2! As the name suggests, this indicator will rain money down on you. More seriously, Rain On Me V2 is a complete overhaul of the V1.
For those who are new to this indicator or for those who already knew it, here is a complete description of this indicator.
This indicator contains:
-Fully configurable multi-timeframe buy or sell signals based on ATR with the possibility to set the period, deviation, period of the ATR and choose the source or type of signals: RMA, SMA , EMA, WMA, VWMA, SMMA, KMA, TMA, HullMA, DEMA, TEMA, CTI.
-Colouring of candles on ATR. (green and red).
-Buy or sell signals with VPT (based on st_dev) with the possibility of adjusting the period and the multiplier. (Only works in markets with available volume information flows).
-Trend Parabolic SAR (Up / Down) fully configurable.
-Divergences with the possibility of choosing among the following signals: MACD, OBV, RSI, CCI.
-3 Moving averages with the possibility of choosing their values and their type for each one: SMA, EMA, RMA, WMA, VWMA. (default: WMA 1 = 7, WMA 2 = 21 and SMA 3 = 50).
-Fibonacci on 10 levels with level 0 in the middle. This Fibonacci helps a lot as it can make it easy for you to find an entry / exit point, a trend and even where to place your Take Profit and Stop Loss.
-Fully customizable Bollinger Band.
-Fully customizable Ichimoku cloud.
-Multi-timeframe Trendline that tells you the true trend of the current market based on volume. (Only works in markets with available volume information flows). It can change from green (for an uptrend) or red (downtrend) color.
To place an alert, always choose the "Once per bar" option.
You can place alerts on the following options:
-GO Buy / GO Sell (ATR).
-VPT Buy / Sell.
-PSAR (Up / Down).
-Divergences (Bullish / Bearish).
-Crossing of moving averages 1 and 2.
-Fibonacci key levels (0.382, 0.5 and 0.618) for Crossunder and Crossover in an uptrend or downtrend.
You can choose to show or hide from the chart all the options mentioned above.
Never follow buy or sell signals stupidly. Always watch that all the indicators are going in the same direction, that you are not in a range zone, that there is no resistance etc ...
Always wait for confirmation after a buy or sell alert before entering a position to make sure the label stays on the chart and doesn't disappear.
Please feel free to give your ideas, suggestions or bug reports in the comments area to help me improve it.
A BIG THANKS TO QUANTNOMAD FOR GIVING ME ITS AUTHORIZATION TO USE, MODIFY AND REPUBLIC ITS "Ultimate Pivot Points Alerts" script indicator:
Good trade everyone! And remember, money management is the most important!
Trend QualityThe quality of the current trend is calculated by adding or subtracting
one point to the total value depending on the following criteras:
1. EMA-8, MA-20, MA-50, MA-100, MA-200 , each get a point if they are increasing.
2. EMA-8 > MA-20 > MA-20 > MA-50 > MA-100 > MA-200 , each condition that is true gets one point.
On top of the Trend Quality value we apply a "weekly" (5 periods) and
a "monthly" (22 periods) moving average.
When above a value of 5, a strong trend is indicated and hence
a trend following strategy should be used.
Use this to Buy when bouncing back from e.g MA-20 or a confirming
consolidation/candlestick/trendline pattern.
When the trend decreases below Zero a trend shift may have occured.
Idea, curtesy: Tobbe Rosèn
Rainbow Gator - EMAs strategy for Binary OptionThis is an EMAs indicator for Binary Option or Scalping Alert designed for lower Time Frame Trend (2-5minutes).
Although you will find it a useful tool for higher time frames as well.
The Alerts are generated when the fast EMA cross over/under other slower EMAs, you then have the chance to wait for the pullback during the new trend then enter for trend momentum (follow the trend).
Beware when the trend is close to EMA200.
You must draw your SRT (Support-Resistance-Trendline) before looking for setups.
Good luck.
Gap driven intraday trade (better in 15 Min chart)// Based on yesterday's High, Low, today's open, and Bollinger Band (20) in current minute chart,
// Defined intraday Trading opportunity: Stop, Entry, T0, Target (S.E.T.T)
// Back test in 60, 30, 15, 5 Min charts with SPY, QQQ, XOP, AAPL, TSLA, NVDA, UAL
// In 60 and 30 min chart, the stop and target are too big. 5 min is too small.
// 15 min Chart is the best time frame for this strategy;
// -------------------------------------------------------------------------------
// There will be Four lines in this study:
// 1. Entry Line,
// 1.1 Green Color line to Buy, If today's open price above Yesterday's High, and current price below BB upper line.
// 1.2 Red Color line to Short, if today's open price below Yesterday's Low, and current above BB Lower line.
//
// 2. Black line to show initial stop, one ATR in current min chart;
//
// 3. Blue Line (T0) to show where trader can move stop to make even, one ATR in current min chart;
//
// 4. Orange Line to show initial target, Three ATR in current min chart;
//
// Trading opportunity:
// If Entry line is green color, Set stop buy order at today's Open;
// Whenever price is below the green line, Prepare to buy;
//
// If Entry line is Red color, Set Stop short at today's Open;
// Whenever price is above the red line, Prepare to short;
//
// Initial Stop: One ATR in min chart;
// Initial T0: One ATR in min chart;
// Initial Target: Three ATR in min chart;
// Initial RRR: Reward Risk Ratio = 3:1;
//
// Maintain: Once the position moves to T0, Move stop to "Make even + Lunch (such as, Entry + $0.10)";
// Allow to move target bigger, such as, next demand/supply zone;
// When near target or demand/supply zone or near Market close, move stop tightly;
//
// Close position: Limit order filled, or near Market Close, or trendline break;
//
// Key Step: Move stop to "Make even" after T0, Do not turn winner to loser;
// Willing to "in and out" many times in one day, and trade the same direction, same price again and again.
//
// Basic trading platform requests:
// To use this strategy, user needs to:
// 1. Scan Stocks Before market open:
// Prepare a watch list for top 10 ETF and Top 90 stocks which are most actively traded.
// Stock might be limited by price range, Beta, optionable, ...
// Before market open, Run a scan for these stocks, find which has GAP and inside BB;
// create watch list for that day.
//
// 2. Attach OSO and OCO orders:
// User needs to Send Entry, Stop (loss), and limit (target) orders at one time;
// Order Send order ( OSO ): Entry order sends Stop order and limit order;
// Order Cancel order ( OCO ): Stop order and limit order, when one is filled, it will cancel the other instantly;
Donchian TrendHello All,
I think all of you knows Donchian Channels . so I am not going to write about it.
With this indicator I tried to create Trend Lines by using Donchian Channel upper/lower bands. I tried add possible entry levels as well.
How it works ?
- it calculates main trend direction by using the length that is user-defined. so you can change it as you wish
- then it calculates trend direction for 9 lower lengths. if you set the length = 20 then the lengths are 19, 18,...11
- and it checks if the trend directions that came from lower lengths is same or not with main trend direction.
- it changes the trendline color. lighter trend line means stonger trend, darker trend lines means entry points or possible trend reversal.
- it puts entry points by using trend directions that were created by using lower lengths. it gets entry points if high/low touches main trend line as well.
Warning: Arrows are entry points but it may also represents trend reversal. So you should use stoploss line if you decide to take buy/sell positions.
P.S. I didn't backtest it, it's non-repainting, it should be used educational purposes only . I believe it can be improved, so I am open for new ideas to improve it ;)
Enjoy!
Patient Trendfollower (7)(alpha)Patient Trendfollower consists of 21 and 55 EMA, Commodity Channel Index and Supertrend indicator. It confirms a trend and gives you a signal on a pullback. Original creation worked on 1h EURUSD chart.
►Long setup:
• 21 EMA is above 55 EMA, which is above the Supertrend indicator.
• Commodity Channel Index is an oscillator, which prints into the chart if extreme levels are reached. Green is for a level above 100 or below -100, red is above 140 or below -140 and black is above 180 or below -180.
• If 21 EMA > 55EMA > Supertrend and an oversold signal appear, you can buy into the trend.
• When backtesting on 1h EURUSD, profit target 400 pips worked best with a stop-loss below Supertrend's bottom and the size of your spread.
• A picture shows two valid entries.
: This part still malfunctions and shows red dots over some green ones. It is important to disable red ones in the settings to see green ones.
Some more long signals:
Some short signals:
►Backtesting data with default settings and trading only green CCI signals with mentioned risk management strategy:
• 212 closed trades
• 58.96% profitable with average win trade 348 USD and average loss trade 263 USD when only green signals are followed.
• Profit factor 1.903, Sharpee 0.792
• 20 bars is average for all trades, short trades were 18 bars long on average.
With given data, you can see the strategy is profitable by itself. However, original risk management settings do work only on 1h charts of EURUSD and would need to be adjusted for other instruments based on average volatility.
Even though the profitability is low, you can increase your odds by a great margin, if you properly use price action (impulsive and corrective moves, patterns, bar analysis), if you trade when major exchanges are open, you may also use wave analysis such as Elliot Waves or Market Profiles to predict whether the next day might be a trending day. My backtesting program didn't consider these ideas.
Unfortunately, I won't be making backtesting strategy public with it anytime soon, because it still has some parts that do not work. I am ok with that since I understand the code and know what does malfunction and how. Then, there are parts which I am not sure how to fix yet. This is why the indicator is still considered alpha.
In the future when a strategy is published, you will also be able to set your own overbought/oversold values without entering the code itself and probably some other features. But I am not in a hurry for that. You can give me feedback on UX and try to figure out the best setups for other symbols, it might help to improve the automatic testing script when I know what I should achieve. My main point is to make this public for friends who can already be using it on EURUSD at least.
Close doesn't always have to be 400 pips, you might want to close on a logical level such as strong resistance or a trendline too.
Thanks to:
• @everget for providing Supertrend solution.
• Satik FX who hand-tested the system by hand and reported results in this article . He is my main inspiration for creating the complete indicator as one because I want to be able to show and hide it with a single click. My future scripts will also work as a whole strategy each by itself.
• The number in the script's name comes from Satik's numbering. A mentioned article was his seventh shared strategy.
super Z Ok I try to make this indicator to be a super trend based on candles MTF , need to be warned that it can repaint , I did not had time to check this issue so i post it as idea only (if such issue exist let me know )
the trendline is not repaint based on VHMA (or volume HMA ) that i posted last time
So it a cool idea to make the supertrend in this way ,but need to be tested further
signals are based on this supertrend
Voss Strategy (Filter + Trend Indicator) [Bitduke]Created strategy based on Voss Predictive Filter, implemented by TradingView user e2e4mfck.
Voss Predictive Filter
This is a relatively new filter from John F. Ehlers’ article, “A Peek Into The Future .” Ehlers describes the calculation of a new filter that could help signal cyclical turning points in markets.
But filter has a negative group delay and while an indicator based on it cannot actually see into the future, it may provide the trader with signals in advance of other indicators.
In mentioned article he tested filter on SPY and at one point in time "it went into a trend mode in January 2019, and the cycle signal failed miserably, signaling a short position during the runup. <...> The only way to minimize the impact of this condition is to employ an additional trend detector."
Thus I've added another Ehlers' based trend based indicator Instantaneous Trendline (thanks to LazyBear for implementation) to minimize the impact of the trend mode and got a good results on XBTUSD pair 4h.
Backtest :
> Range: 2016 - 2020
> XBTUSD
> 4h
> ~20% drawdown
> Sharpe (0.361, not too impressive)
I think it can be improved with Risk Management system and experimenting with various trend following indicators.
Customizable MACD (how to detect a strong convergence)Helloooo traders
I wondered once if a MACD was based on an EMA/EMA/SMA or SMA/SMA/EMA (or WHATEVA/WHATEVA/WHATEVA).
Seems they're so many alternatives out there.
I decided to empower my audience more by choosing the type of moving averages you want for your MACD.
More options doesn't always mean better performance - but who knows - some might find a config that they like with it for their favorite asset/timeframe.
I added also a multi-timeframe component because I'm a nice guy ^^
Convergence is my BEST friend
An oscillator (like MACD) is to measure how strong a momentum is - generally, traders use those indicators to confirm a trend.
So understand that a MACD (or any other indicator not based on convergence ) won't likely be sufficient for doing great on the market.
Combined with your favorite indicator, however, you may get great results.
My indicators fav cocktail is mixing :
1) an oscillator (momentum confirmation)
2) a trendline/key level break (momentum confirmation)
3) adding-up on a different trading method but still converging with the first entry.
The reason I'm deep with convergence detection is because I'm obsessed with removing those fakeout signals. You know which ones I'm talking about :)
Those trades when the market goes sideways but our capital goes South (pun 100% intended) - 2 days later, the price hasn't changed much but some lost some capital due to fees, being overexposed, buying the top/selling the bottom of a range they didn't identify.
It's publicly known that ranges are the worst traders' enemy. It's boring, not fun, and .... end up moving in the direction we expected when we go to sleep or outside.
NO ONE/BROKER/EX-GF is tracking your computer - I checked also for mine as it happened for me way too often in the past.
I surely preferred blaming a few external unknown conditions than improving my TA back in the days #bad #dave
But my backtest sir...
Our backtests show what they're being told to show . A backtest without a stop-loss/hard exit logic will show incredible results.
Then trying that backtest with live trading is like in the Matrix movie - discovering the real world is tough and we must choose between the blue pill (learning how to evaluate properly risk/opportunity caught) and the red pill (increasing the position sizing, not setting a stop loss, holding the positions hoping for the best)
Last few words
Convergences aren't invented because it's cool to mix indicators with others. (it is actually and even fun)
They're created to remove most of the fakeouts . For those that can't be removed - a strong risk management would cut most of the remaining potential big losses.
No system works 100% of the time - so a convergence system needs a back-up plan in case the converged signal is wrong (could be stop-loss, hard exit, reducing position sizing, ...)
Wishing you the BEST and happy beginning of your week
Daveatt
Mawreez' Aggregated DivergencesAutomatically detect regular and hidden divergences in multiple oscillators and visualize them through creative use of the histogram plot. I've open-sourced the code behind the indicator so that any user or their tech-savvy friend may easily add more oscillators of their choice.
Known bugs:
When two divergences occur within the same lookback period, only the first one is found.
There is some overhead when searching for tops and bottoms.
The oscillator and price source are still allowed to cross the trendline connecting their respective tops and bottoms.
Planned features:
Some mechanism to warn for divergences which are still awaiting confirmation.
More sophisticated method for finding tops and bottoms.
RSI + Composite Index [SHK]One of the most powerful indicator based and divergence strategies i have ever seen was made by Constance Brown.
The Composite Index:
The best way to think of the Composite Index as it applies to the RSI is to think of the RSI as Windows 3.0 and the Composite Index as Windows 10. Constance Brown discovered that the RSI, while it does create and detect divergences, does is not as accurate as it could be. It’s a bit of an oxymoron to say this but the RSI is a momentum indicator without any momentum calculation attached to it. The RSI actually misses a significant amount of important moves and even generates some bad moves. What Constance Brown did with the RSI is to input a momentum calculation within the RSI itself.
Usage:
1. Check hidden and regular divergences on RSI+COMPOSITE_INDEX and PRICE+COMPOSITE_INDEX.
2. After finding divergence wait for COMPOSITE_INDEX to cross under/over it's moving averages to trigger.
Useful Note:
"RSI overbought/oversold as filter", "RSI and COMPOSITE_INDEX trendline as trigger", "RSI 50 Over/Under as trend direction detection", ... can be add to this strategy.
Enjoy!