Linear Channel - Scalp Strategy 15MSimple way how to use Linear Regression for trading.
What we use:
• Linear Regression
• HMA as a trend filter
Logic:
Firstly we make simple linear regression moving. It is the white line which appears on the chart.
Then we make second line (named: band2) on the chart by multiplying linreg and value difference.
The third step is to ad HMA as a trend filter.
The trade open when price is below band2, but still upper than Hullma. The trade close when price again upper than linreg.
Bands
34 EMA Bands [v2]Updating an older concept here with some more oversold/overbought zones.
Pretty self explanatory, red zone indicate overbought zones and green zone is a oversold. Often, price likes to bounce off of the lower bounds of these zones, but it can sometimes extend all the way through the zone onto the upper boundary.
There are many lines to this indicator, i prefer using it with all the lines off except the outermost ones. However, you can edit it if it suits you better.
Source code is open, so any suggestions to improve its accuracy are welcome :)
34 EMA BandsThis is quite a simple script, just plotting a 34EMA on high's and low's of candles. Appears to work wonders though, so here it is.
There is some //'d code which I haven't finished working on, but it looks to be quite similar to Bollinger Bands, just using different math rather than standard deviations from the mean.
The bands itself is pretty self explanatory, price likes to use it as resistance when under it, it can trade inside it and it can use the upper EMA as support when in a strong upward trend.
Jurik Bands//A follow up for my JMA script. This script is inspired by (and dedicated to) closure of sales (today, Oct 20 '21) of the famous Jurik Research.
...
Jurik Research, the real people who been doing real things by using the real instruments, while many others been reading books "How to become a billionaire in 2 days", watching 5687 hours videos of how to use RSI , and studying+applying machine learning to everything cuz suddenly it became trendy xD
...
In my JMA script I've said that JMA takes into account volatility. But how exactly? In fact, it's based on smth called Jurik Bands. Thing is they can be/should be used as an independent instrument. I won't lie, I've developed smth very similar myself for mean-reverting purposes, but we ain't gonna talk about this now (my stuff is much simpler, saying bye-bye to entropy).
...
The code is on purpose in Pine4, because lmao I'm not gonna call my stuff "Indicators", they don't "Indicate" anything. And it's on purpose doesn't follow any "coding conventions" made by geeks to make their stuff look more important. My conventions are simple: less code as possible and as simple as possible so we can actually do business based on these instruments.
...
Live Long And Prosper
Box-Cox Log BandsExperimental:
Uses the Box-Cox Transformer with a deflection on the inversion to create log bands.
to be used in log scaled charts.
Ultimate Moving Average Bands [CC+RedK]The Ultimate Moving Average Bands were created by me and @RedKTrader and this converts our Ultimate Moving Average into volatility bands that use the same adaptive logic to create the bands. I have enabled everything to be fully adjustable so please let me know if you find a more useful setting than what I have here by default. I'm sure everyone is familiar with volatility bands but generally speaking if a price goes above the volatility bands then this is either a sign of an extremely strong uptrend or a potential reversal point and vice versa. I have included strong buy and sell signals in addition to normal ones so darker colors are strong signals and lighter colors are normal ones. Buy when the lines turn green and sell when they turn red.
Let me know if there are any other scripts you would like to see me publish!
SOFTENED RSI DİFFRACTİON BANDSThis indicator takes the moving averages of the rsi values, gives signals in the lower and upper breaks, prevents the rsi upper threshold from signaling above a certain rsi value, as the rsi upper threshold value increases, the number of signals increases and the number of risky signals also increases. As the rsi upper threshold value decreases, the signals decrease and become better quality You can determine the most appropriate threshold value according to the commodity type.
bu indikatör rsi değerlerinin hareketli ortalamalarını alır alttan ve üstten kırılımlarında sinyal verir rsi üst eşiği belli bir rsi değerinin üstünde sinyal vermesini engeller rsi üst eşik değeri arttıkça sinyal sayısı artar aynı zamanda riskli sinyal sayısıda artar rsi üst eşik değeri azaldıkça sinyaller azalır ve daha kaliteli hale gelir emtia tipine göre en uygun eşik değerini belirleyebilirsiniz.
Combo Backtest 123 Reversal & STARC BandsThis is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
A type of technical indicator that is created by plotting two bands around
a short-term simple moving average (SMA) of an underlying asset's price.
The upper band is created by adding a value of the average true range
(ATR) - a popular indicator used by technical traders - to the moving average.
The lower band is created by subtracting a value of the ATR from the SMA.
STARC is an acronym for Stoller Average Range Channels. The indicator is
named after its creator, Manning Stoller.
WARNING:
- For purpose educate only
- This script to change bars colors.
Moving Average Band Width [CC]The Moving Average Band Width was created by Vitali Apirine (Stocks and Commodities Aug 2021 pg 25) and this is of course an extension based on my previous Moving Average Bands script. For those of you that aren't aware, the Band Width indicator is an indicator that tells you how close the upper and lower bands are to each other which is a great determination of how volatility is increasing or decreasing. This acts as both a trend indicator and a volatility indicator. I have included strong buy and sell signals in addition to normal ones so stronger signals are darker in color and normal ones are lighter. A great buy signal is when you are in an uptrend (so the line is green already) and the indicator line is moving up which means strong underlying volatility.
Let me know if there are any other indicators or scripts you would like to see me publish!
VWAP St. Dev BandsThis indicator allows you to add up to 3 volatility bands to VWAP based on its Standard Deviation.
Best use is for intraday but you can choose higher timeframes too.
For day trading a band of 3 standard deviations usually works well as an overbought/oversold region, allowing for mean reversion trading, but you are free to come up with your own strategies.
Enjoy!
Dual Mean Reversion Channel (adjusted lower band)This is a public and open-source lighter version compared to the "Overextended Price Channel" which is provided complimentaty to the Trend Insight System.
Introduction :
Channels are very useful tools to assess overextended price, volatility and upcoming retracement or impulsive moves (such as Bollinger Band squeezes). It is an indispensable addition to any trader using Mean Reversion theory for a scalp-trade or swing-trade.
This script contains :
- 2 channels Keltner-style, using the True Range for volatility
- customizable volatility (channel width) and smoothing period
- a standard selection of moving average ; SMA, EMA, VWMA
- an embedded readjustment of the lower bands to avoid the drop on a logarithmic scale (see explanation below)
Why another channel indicator ?
I have found most conventional channels to be either not based on "proper" volatility (e.g. standard deviation of price action for Bollinger Band), or the bottom channel to be ill adapted to the logarithmic scale and plunges to 0 on some high volatility periods, messing with readability on logarithmic auto-scaled chart.
Also, I find the channels to be most useful when superimposed with another one of longer length; especially a pair of channels with a 50 and 200 period moving average respectively. Mean Reversion traders that mostly trade the 50 and 200 SMA/EMA know what I am talking about as having a channel helps to have a better visual for a proper of entry and exit point.
Disclaimer :
This indicator was originally intended to be used along with the Trend Insight System to improve performance, and the default configuration mostly backtested on BTCUSD.
Please use with caution, proper risk management and along with your favorite oscillator, candlestick reading and signals system.
Some explanation :
Based on Mean Reversion paradigm, everything has a tendency to revert back to the mean :
- when the price enters the upper channel, it is supposed to be (or start getting) overbought as the market is getting overheated, thus prone to correction,
- on the other hand, when the price enters the lower channel, it is supposed to be (or getting) oversold and the market looks favorable for a buy-in.
Depending on the trading style used, a trader will usually either wait until the price leaves the channel towards the mean before taking action (conservative style) or you will set limit orders inside the channel as you expect a reversion to the mean (more agressive/risky style).
With two channels, more complex (and maybe precise) rules can be built to optimize one's trading strategy.
Important notes :
In the end, sticking with 50/200 length and a single setting on volatility might be wiser, be wary of overoptimization which is risky at best and counter productive at worst (according to legendary traders such as Mark Douglas). Even if, needless to say, the volatility needs to be adjusted between a nascent and volatile market (such as crypto) compared to standard call markets that are much less volatile.
End notes :
It will always be considered a work in progress to help bring out the best of trading with channels, any comment and suggestion are welcomed.
BANDSTrend indicator. It is based on a simple moving average, the maximum and minimum of this moving average for the period. When the moving average coincides with its maximum for the period , the trend is rising, when the moving average coincides with its minimum for the period, the trend is falling. The optimal periods should be selected for each timeframe and trading instrument.
Moving Average Bands [CC]The Moving Average Bands were created by Vitali Apirine (Stocks and Commodities July 2021 pg 16) and this is a very handy trend following indicator that will give you the overall trend of the underlying stock. As the bands rise then the stock is in an uptrend and as they fall then it is a downtrend. If the bands stay flat then it is a sideways and/or choppy market. I did change the middle band from what he originally authored because I believe this gives more accurate buy and sell signals so keep that in mind. Feel free to use a different moving average than the original exponential moving average in the formula. As always buy when the indicator lines turn green and sell when they turn red.
Let me know if there are any other indicators you would like to see me publish!
Supertrend BandsSupertrend Bands
What is the Supertrend indicator?
"The Supertrend indicator is a trend following overlay on your trading chart, much like a moving average, that shows you the current trend direction.
The indicator works well in a trending market but can give false signals when a market is trading in a range.
It uses the ATR (average true range) as part of its calculation which takes into account the volatility of the market. The ATR is adjusted using the multiplier setting which determines how sensitive the indicator is."
"For the basic Supertrend settings, you can adjust period and factor:
- The period setting is the lookback for the ATR calculation
- Factor is the what the ATR is multiplied by to offset the bands from price"
How to use this indicator
This indicator is inspired by a strategy I found. It includes four Supertrend indicators, each with different settings that displays trend strength and support/resistance zones. The default settings are optimal for cryptocurrency but do work quite well for traditional also. I highly recommend you try experimenting with different settings, increasing them to suit the instrument.
The bands are set from low to high, Band 1 being the fastest and Band 4 being the slowest. Band 4 is the one that sets the overall trend so when price is above Band 4, the trend is bullish and vice versa. Trend is strongest when price is above/below Band 1 and gets weaker as it filters through each band. Band 4 provides the strongest support/resistance and if that breaks the trend flips.
In the menu, you will see an option called "Remove Anti Trend?". It is enabled by default and it removes any bearish/resistance bands when the trend is up and any bullish/support bands when the trend is down. When turned off, it will show all Supertrend Bands as they are by default.
Bar Colors
Bar colors are optional and they reflect the current trend strength based on the Supertrend bands.
Alternate ways of using this indicator
You could leave everything as default or you can display individual bands. For instance, because I use many overlay indicators, most of the time I turn off all the bands and only show bar colors:
You can also turn off Bands 1 and 2 and only show the two slowest lengths:
This removes the noise of the two faster Supertrends.
Or just show the two fastest bands:
Any suggestions to improve this indicator are most welcome :)
GMS: GW-VWAPAlright, as per usual with these, I end up adapting an existing indicator to what I want to accomplish. So this is based off the built in VWAP indicator. I added in the gummy worm to easily identify the trend, as well as the related bands to identify potential areas to either reverse position or to trim an existing one.
The middle part of the bands are the gummy worm version of VWAP. It is the VWAP using the high and another VWAP using the low. The black line is HL2 VWAP (technically 3 VWAPs).
The bands follow what I was mentioning above. So the outer most part of the bands are the high & low VWAP (with the same multiplier) and the inner bands are the HL2 VWAP.
Of course you can set whatever input source you want for these. The default is how I use it. If you want to get rid of the bar color just go to the indicator settings and un-select it at the bottom.
Source code is open so feel free to poke around.
Hope this helps,
Andre
EMA 730 Ribbon MTF - Support and ReistanceThe EMA 730 line is a great way to show dynamic support and resistance . Price action travels "through" this line on each timeframe. This script pulls the EMA 730 Line from multiple timeframes so a trader can visually see price action bounce between support and resistance lines. Lower bands (white lines) can be turned off using "tickbox" in settings. EMA length can also be adjusted in settings. Some charts may work better with a length of 750.
Example of EMA Bands on lower timeframe.
Inverse BandsI'm very new to trading. I've been toying with moving averages to trigger swing trades and wanted an indicator that would swell when price moves sideways and squeeze when price is trending.
So this is the inverse of the popular Bollinger Bands indicator. It makes a very easy identifier for price breakout when paired with your favorite fast moving average. When MA falls outside the bands, it indicates an emerging trend. Still requires some curve fitting, but it is a work in progress.
I hope this isn't a direct copy of something I am not aware of.
Rate Of Change Bands [CC]The Rate Of Change Bands were created by Vitali Apirine (Stocks and Commodities March 2021 pg 14) and this indicator is a great method to not only check the momentum but also check the trend strength as well. I have color coded the lines so buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you want me to publish!
2 Multi-Timeframe Bollinger BandsThis is two separate Bollinger bands in one study. Customizable middle BB line type ( SMA , EMA , VWMA ), legnth, colors, and deviations provided at .5 increments.
Someone else has a very similar Bollinger Band study but the code was hidden, so I figured I would remake as a learning challenge since I'm new to pinescript and this is the best way to learn it imo.
There will be updates to this script in the future but for now it serves its purpose lol. Publishing this version early as I wanted to give some friends access to it
In terms of usage, I like 4h 50 SMA alot . Having two sets of Bollinger bands is nice so you can turn one off or swap between time frames and such. In terms of techniques using both bbands, I haven't really played with it too much yet but simple things like 1h 50sma bbands expanding past the 4h 50sma bbands probably indicate an exaggerated move in that specific time frame, etc etc.
Hope this helps!
VWMACDV2 w/Intraday Intensity Index Histogram & VBCB Hello traders! In this script i tried to combine Kıvanç Özbilgiç's Volume Based Coloured Bars, Volume Weighted Macd V2 and Intraday Intensity Index developed by Dave Bostian and added to Tradingview by Kıvanç Özbilgiç. Let's see what we got here;
VBCB, Paints candlestick bars according to the volume of that bar. Period is 30 by default. If you're trading stocks, 21 should be better.
Volume Weighted Macd V2, "Here in this version; Exponential Moving Averages used and Weighted by Volume instead of using only vwma (Volume Weighted Moving Averages)." Says, Kıvanç Özbilgiç.
III, "A technical indicator that approximates the volume of trading for a specified security in a given day. It is designed to help track the activity of institutional block traders and is calculated by subtracting the day's high and low from double the closing price, divided by the volume and multiplied by the difference between the high and the low."
*Histogram of vwmacd changes color according to the value of III. (Green if positive, yellow if negative value)*
VWMACD also comes with the values of 21,13,3... Which are fibonacci numbers and that's how i use it. You can always go back to the good old 26,12,9.
Other options according to the fibonacci numbers might be= 21,13,5-13,8,3-13,8,5... (For shorter terms of trading)
Trading combined with the bollinger bands is strongly advised for both VWMACD and III. VBCB is just the candy on top :)
Enjoy!
Adjustable MA & Alternating Extremities [LuxAlgo]Returns a moving average allowing the user to control the amount of lag as well as the amplitude of its overshoots thanks to a parametric kernel. The indicator displays alternating extremities and aims to provide potential points where price might reverse.
Due to user requests, we added the option to display the moving average as candles instead of a solid line.
Settings
Length: MA period, refers to the number of most recent data points to use for its calculation.
Mult: Multiplicative factor for each extremity.
As Smoothed Candles: Allows the user to show the MA as a series of candles instead of a solid line.
Show Alternating Extremities : Determines whether to display the alternating extremities or not.
Lag: Controls the amount of lag of the MA, with higher values returning a MA with more lag.
Overshoot: Controls the amplitude of the overshoots returned by the MA, with higher values increasing the amplitude of the overshoots.
Usage
Moving averages using parametric kernels allows users to have more control over characteristics such as lag or smoothness; this can greatly benefit the analyst. A moving average with reduced lag can be used as a leading moving average in a MA crossover system, while lag will benefit moving averages used as slow MA in a crossover system.
Increasing 'Lag' will increase smoothness while increasing 'overshoot' will reduce lag.
The following indicator puts more emphasis on its alternating extremities, an upper extremity will be shown once the high price crosses the upper extremity, while a low extremity will be shown once the low price crosses the lower extremity. These can be interpreted like extremities of a band indicator.
The MA using a length value of 200 with a multiplicative factor of 1.
In general, extremities will effectively return points where price might potentially bounce in ranging markets while closing prices under trending markets will often be found above an upper extremity and under a lower extremity.
Reducing the lag of the moving average allows the user to obtain a more timely estimate of the underlying trend in the price, with a better fit overall. This allows the user to obtain potentially pertinent extremities where price might reverse upon a break, even under trending markets.
In the above chart, the price initially breaks the upper extremity, however, we can observe that the upper extremity eventually reaches back the price, goes above it, provides a resistance, and effectively indicates a reversal.
Users can plot candles from the moving average, these are fairly similar to heikin-ashi candles in the sense that CandleOpen(t) ≠ CandleClose(t-1) , each point of the candle is calculated as follows for our indicator:
Open = Average between MA(t-1) and MA(t-2)
High = MA using the high price as input
Low = MA using the low price as input
Close = MA using the closing price as input
Details
Lag is defined as the effect of moving averages to reflect past price variations instead of new ones, lag can be observed by the user and is the main cause of false signals. Lag is proportional to the degree of filtering returned by the moving average.
Overshooting is a common effect encountered in non-lagging moving averages, and is defined as the tendency of a moving average to exceed a maximum level (or minimum level, which can be defined as undershooting )
MA and rolling maximum/minimum, both using a length of 50 bars. While we can think of lag as a cost of smoothness, we can think of overshooting as a cost for reduced lag on some occasions.
Explaining the kernel design behind our moving average requires understanding of the logic behind lag reduction in moving averages. This can prove to be complex for non informed users, but let's just focus on the simpler part; moving averages can be defined as a weighted sum between past prices and a set of coefficients (kernel).
MA(t) = b(0)C(t) + b(1)C(t-1) + b(2)C(t-2) + ... + b(n-1)C(t-n-1)
Where n is the period of the moving average. Lag is (non optimally) reduced by "underweighting" past prices - that is multiplying them by negative numbers.
The kernel used in our moving average is based on a modified sinewave. A weighted sum making use of a sinewave as a kernel would return an oscillator centered at 0. We can divide this sinewave by an increasing linear function in order to obtain a kernel allowing us to obtain a low lag moving average instead of a centered oscillator. This is the main idea in the design of the kernel used by our moving average.
The kernel equation of our moving average is:
sin(2πx^α)(1 - x^β)
With 1>x>0 , and where α controls the lag, while β controls the overshoot amplitude.
Using this equation we can obtain the following kernels:
Here only α is changed, while β is equal to 1. Values to the left would represent the coefficients for the most recent prices. Notice how the most significant coefficients are given to the oldest prices in the case where α increases.
Higher overshoot would require more negative values, this is controlled by β
Here only β is changed, while α is equal to 1. Notice how higher values return lower negative coefficients. This effectively increases the overshoots amplitude in our moving average. We can decrease α in order for these negative coefficients to underweight more recent values.
Using α = 0 allows us to simplify the kernel equation to:
1 - x^β
Using this kernel we can obtain more classical moving averages, this can be seen from the following results:
Using β = 1 allows us to obtain a linearly decreasing kernel (the one of a WMA), while increasing allows the kernel to converge toward a rectangular kernel (the one of SMA).
Moving Average BandsUse this script to find buy and sell zones for BTC based on momentum of the move relative to the average asset price over a given period. The script plots a series of offset bands above and below the Simple Moving Average. When price crosses another band further from the SMA, the background is rendered brighter. The brighter the background, the stronger the buy and sell signal is, as the expectation is that price wants to return to the SMA. Settings are adjustable to fine tune to various time frames and assets. Good settings for BTC Daily are length 30, layers at 10, 20, 30, and 40.
On 1H BTC/USD I use length 200, layers at 5, 10, 15, 20 to find decent swing trading opportunities.
On BTC/USD 1D chart, combine with Bitcoin Logarithmic Growth Curve from @mabonyi (original by @quantadelic )for confluence of very reliable signals.