[KL] Bollinger bands + RSI StrategyThis strategy is based on two of my previous scripts, one called “RSI14 + 10”; the other one called “Bollinger Bands Consolidation”. At its core, it combines the main setups from each of those two scripts but excludes the auxiliary features that were considered as experimental. This strategy will identify periods of squeeze, and then enter long during consolidation with a trailing stop loss set.
Primary indicator will be the Bollinger Bands. By comparing the width of the BBs with the ATR of the same lookback period (i.e. 2 standard deviations of the 20 recent closing prices vs ATR(20) x2), we begin to look for confirmation for entry whenever the standard deviation of prices is less than the ATR. This can be seen visually in the plots (i.e. default gray lines representing ATRx2 relative to BB center line).
Confirmation for entry will be the RSIs (slow-14, and fast-10). If both are upward sloping, then we assume prices are in an uptrend and may eventually break above upper band. RSIs are typically in mid-range when prices are consolidating, therefore no need to measure it.
Exits will happen in two cases, (1) when trailing stop loss hits, or (2) when RSIs signal that the instrument is overbought. No. 1 is self-explanatory. No. 2 happens, when RSI14 reaches above 70 (can be changed), followed by RSI10 catching up and surpassing RSI14.
Ortalama Gerçek Aralık (ATR)
(JS) Interchanging ATR & VWAP BandsOkay so this is pretty simple, but I think it's a great tool for day trading especially. I just took the default VWAP and Keltner channel scripts and combined them together.
The top option allows you to choose which one you'd prefer to use, "Use ATR instead of VWAP" .
The next options, "ATR Source", "KC Length", and "ATR Length" are the parameters for the ATR Bands.
"Number of Bands" allows you to choose how many bands you'd like to be on display (you can choose 1-8).
"Use Expoential MA" and "Band Style" are more default parameters from Keltner Channels used to set up the ATR Bands.
The "ATR Bands" are just stacked Keltner Channels separated by 1 ATR each, whereas the "VWAP Bands" are separated by standard deviation just like the default script from Trading View.
In these example chart, you can see the weekly VWAP with 8 deviation bands and 5 ATR bands with Keltner Channels.
CRYPTO 3EMA Strategy with Take Profit & Stop Loss based on ATRSimple 3 EMA Strategy with plotted Take Profit and Stop Loss
Entry condition:
- Middle EMA cross above the Slow EMA
- Set take profit and stop loss exit conditions based on ATR Indicator
Exit condition:
- Fast EMA cross below the Middle EMA
Double Average True Range - Taylor V1Double ATR Line, Assist on Trend, Volume and Unnormal Price Movement.
- Fast Line ATR
- Slow Line ATR
1) Able to Change The ATR = Period
2) Able to Change The ATR = Moving Average Type
ATR Break on chartThis script is putting one of my old trading method, ATR Break, on chart.
It used to win many times in Dukascopy strategy contest a few years ago.
Pine script is quite easy to learn and very powerful. So I coded it to have a quick view for ATR break on chart.
The rule is simple:
- Current close - open / Previous ATR(5) > alertlevel (1.2), long signal
- Current open - close / Previous ATR(5) > alertlevel (1.2), short signal
The script will display label on the chart with the value of abs(close - open) / Previous ATR(5) to feel the strength.
I used to use the method on 5-min even 1-min chart. SL for 200 points and TP for 5-10 points
Average Trading Range Percentage
Average high/low trading range for the current timeframe.
Daily high/low trading range.
VixFixLinReg-StrategyThis idea came up while discussing about strategies with one of the trading enthusiast from tradingview community.
Strategy basically uses existing script of Vix Fix by Chris Moody:
VixFix is a great indicator for finding the market bottoms. But, sometimes it generates signal too early. But, we can apply linear regression on vix fix to find vix fix top to make timing much better.
Entry condition:
Wait for Vix fix bar to turn lime.
Once vix fix is turned lime, then wait for linear regression (shown below 0) to turn lime from green. This indicates VIX-Fix has started declining.
Go long once above two conditions are satisfied
Exit Condition:
ATR Based Stop
Applied only if linear regression is green - which means VixFix rising.
Note: This is ideal for identifying market bottom. May not yield good results on individual stocks.
Baus BandsThe Baus Bands are a simplified version of another one of my trend following indicators, the Neapolitan Bands. This version only shows the trend trading zones in green and red. An additional 21 EMA with an ATR band was added as part of my own trend trading rules using these bands.
How do I read this indicator?
Is the blue band between and not touching the green or red clouds? The condition is ranging.
Is the blue band touching the green cloud? The condition is a bullish trend.
Is the blue band touching the red cloud? The condition is a bearish trend.
The trend trading rules are exactly the same as the default Neapolitans, but include an extra condition.
A trend has started once 2 conditions are met:
Price has entered either trending cloud.
The 21 EMA ATR band in blue is within the same cloud.
With those conditions met, if you expect the trend to continue, trade pull-backs to the blue band in the direction of the trending cloud.
Isn't this just a 21 EMA trading pull-backs strategy?
No. The 21 EMA alone is not sufficient in my opinion to define a range or trend technically. Always buying the 21 EMA pull-back, especially in a range, is not a great strategy by itself unless you've already identified price as trending. Baus Bands adds that trend identification.
Why make this?
Baus Bands show the conditions I personally use for catching trends and identifying ranges with these indicators, and shows only the information I use.
What's the purpose of the ATR band around the 21 EMA?
Sometimes price will open and close below the 21 EMA and cause some technical analysts will say the trend is over. I added the ATR specifically to get a volatility based, upper and lower bound range around the 21 EMA. that way I have an acceptable price range where price could move past the 21 EMA and still keep a trend valid using similar rules. I then saw that so long this ATR band (not the 21 EMA itself) was touching those trending clouds, then the trend has a good chance of continuing as long as that was true.
Roc & Atr
Roc & Atr Orders
My indicator, where I compare the 20 bar change percentage with the 14 bar atr band, I hope it will be useful to everyone. the green zones can be interpreted as BUY and the red zone as SELL zone. In graphs with high motion and low atr, the channel narrowing can be interpreted as BUY and the channel opening as SELL.
No indicator shows you the right way ... The best way is your own thoughts
ATR Daily Levels Band NakitxuAverage True Range
What Is the Average True Range (ATR)?
The average true range (ATR) is a technical analysis indicator, that measures market volatility by decomposing the entire range of an asset price for that period.
The true range indicator is taken as the greatest of the following: current high less the current low; the absolute value of the current high less the previous close; and the absolute value of the current low less the previous close.
The ATR is then a moving average, generally using 14 days, of the true ranges.
This script is an especial request of a TradingView user.
Shows 5 levels based on ATR daily, plotted in wherever timeframe you are using:
level 1: prv day ATR + prv day close
level 2: prv day ATR + prv day high
level 3: level 2 - prv day ATR
level 4: prv day close - prv day ATR
level 5: prv day low - prv day
Only show the levels if you are in a timeframe daily or lower than daily.
Reversal with Bollinger Bands + RSI + ADX + ATR (Upgraded)Hi,
Welcome to my 4th script.
Someone asked me some questions about the Bollinger Band strategy I previously published. When I went back to my published script I couldn't help myself but simply try and make it better. Which I did.
Since I've published that script, I've gained much more knowledge about how Pinescript functions. As well as gaining more and more knowledge about how the markets are structered etc.
In this reversal script we use 4 indicators to determine good entry signals, we determine whether the market is ranging or trending and we still only want to take trades in the direction of the "trend".
Bollinger Bands are used for our entry signal. When price hits either side of the band, we wait for a reverse candlestick before we enter a position.
RSI is used to determine if we're in a trending market or in a ranging market. You can adjust the values in the inputs. You can determine the minimum RSI value and the maximum RSI value.
ADX is used the same way as RSI, you can adjust the value in the inputs. You can determine the minimum ADX value.
Last but not least we use two EMA's, a 200 EMA and 100 EMA. Both are adjustable through the inputs. I used two EMA's because I noticed when using this strategy that we'd enter a new position often after having a bad trade. Using two EMA's might clean up some signals, in my case with EUR/USD on a 15m timeframe, it didn't clean up enough signals.
All the default values are pretty decent but might require some finetuning on a certain instrument. Don't overfit the strategy though, that'll only give you bad signals in the future.
Then we are off to our exit signals.
Initially I wanted to incorporate my previous Bollinger Band exit signals as well, but it was too much of a hassle to make the script work as intended so I left it out. If you want to use those exit signals, just find my other script.
When we're in a position and price crosses the opposite band, we wait for a reverse candlestick before we exit the position.
Additionally we want our losses to be as small as possible, so we use RSI to signal us when the market is, or starts to, trend against us. This is where you use the minimum and maximum exit values. So when RSI crosses over or under that value, it'll exit the position.
Furthermore, we use the ATR indicator to set our stop loss, which is pretty basic stuff. You can adjust the ATR multiplier in the inputs. Disabling "Use Trailing Stop?" is really inadvisable unless you know this script inside out as your only exit signals will be opposite Bollinger Band Cross and RSI overbought / oversold areas.
[KL] Bollinger Bands Consolidation StrategyThis strategy will enter into long position based on the volatility of prices implied by indicators of (a) Bollinger bands, and (b) ATR.
Application of Bollinger bands ("BOLL")
Using plain vanilla settings for BOLL (i.e. 20 period moving average, and 2 standard deviations of closing prices), we are interested to know about the shape of the area that is bounded by the upper and lower bands.
In theory, consolidation happens when volatility of price decreases. Visually speaking, this is represented by the narrowing of the upper/lower bands. This strategy considers the narrowing of BOLL bands as the primary indicator for long-entry.
Application of ATRs (as confirmations)
Firstly, to confirm that BOLL bands are narrowing (as mentioned above), the ATR at a potential point of entry is compared against the standard deviation of prices over BOLL's lookback periods. Once again, visualizing the shape of BOLL bands during consolidation, we assume the lines begin to squeeze when the distance between the center line and upper/lower band is less than two current ATRs.
Secondly, this strategy looks into the moving average of ATRs to assure that prices are not too choppy when entering into market. If the moving average of ATR decreases at a point in time such that all the above conditions are met, then we can assert that the volatility of price is decreasing.
Thirdly, ATR is used for determining the size of our trailing stop loss. We will keep the multiplier fixed at two.
Overbought/Oversold BandsThe basis of this script is my "Hybrid Overbought/Oversold Detector" which uses many different oscillators to confirm overbought/oversold conditions. The main idea is to generate higher and lower bands around the desired moving average using an average of the volatility (ATR) and the standard deviation (StDev), of course by interfering detected overbought/oversold condition.
Simply put, the more the asset become overvalued/undervalued, the tighter the channel would be and every breakout of the bands announces a return back into the channel in near future.
By default, the multiplier of the standard deviation in the indicator settings is set to 2 which means only less than 5% of price actions would appear outside the bands. Also the default multiplier of the ATR is set to 3 which leads to some similar result, but to achieve more strict results setting StDev multiplier to 3 and ATR multiplier to 4 would be useful.
The type of the central moving average could be picked up from 6 different types which are:
- SMA (Simple Moving Average)
- EMA (Exponential Moving Average)
- HMA (Hull Moving Average)
- LSMA (Least Squares Moving Average)
- TMA (Triangular Moving Average)
- MAEMA (My Personalized Momentum Adjusted EMA)
The latter one leads to a useful combination of the channel with the momentum.
Also the script has multi-timeframe features and the user could apply calculations from other time frames to the current chart.
Hope the idea would be helpful!
Advanced Average True RangeThis indicator allows you to improve your stop loss placement. It displays two lines based on the ATR ( Average True Range ), an upper line based on the current price + ATR and a lower line based on the current price - ATR. The ATR is multiplied by 2 but you can change this in the indicator settings.
Dziwne MFI Overlay (with highlight)It is simply your traditional MFI , except that your 50 line became the actual price.
Why and how could it be useful? This indicator helps to spot more easily and efficiently divergences .
You could also use it for trend reversals as you usually do with your 50 line, but I would suggest to set a higher length for the MFI, like 155 or something like that.
ATR Stop BandView ATR Stop in a different timeframe, the default timeframe is 1D, the default ATR multiplier is 60%.
upperStop = current high + dayATR * 60%;
lowerStop = current low - dayATR * 60%;
ATR trailing Stop Loss tight to slack [Takazudo]This is a demo of ATR based trailing Stop Loss.
This SL strategy uses 2 types of ATR based SL.
tight SL as initial (ATR * 1.5)
slack SL as trailing (ATR * 4)
When any entry singal occurs by the buy/sell conditions, this SL strategy uses the "tight SL" as the initial SL.
Then the SL will chase the price as trailing SL. However, this strategy uses the "slack SL" in this trailing phase.
So you can set the tight SL first.
Then SL will chase the price as the slack one.
Note: The entry strategy in this script is not intented to win. Check the result. Be careful. Just a module of my strategy.
Kagi Implementation (+ATR)My Own Kagi Indicator Implementation!
I couldn't find anywhere on the internet a simple implementation of the Kagi indicator (apart from a seemingly complicated JavaScript implementation).
So I decided to implement it myself and test it against the built-in Kagi indicator calculated by the built-in security function - They ended up exactly the same! (You can see my orange plot completely covers the security's purple plot)
My calculations are based on this article from a site called "euroland", the article is called "Kagi Chart" (I can't post the link because of TradingView restrictions)
Bonus: The built-in kagi indicator uses only Fixed Amount Reversal Size. One that is interested in an ATR Reversal Size can modify the calculation a bit (see script's comments) to easily create and use it.
Some interesting info about the security function I discovered while doing this script:
After I implemented it I noticed that my calculations are the same except the fact that all my values are delayed by 1 bar (relative to the security's indicator). After some research I discovered that the security function uses future data in it's calculation and therefore it cannot be trusted for testing live-trading strategies, unless it is given the appropriate parameters (see script for example).
Have fun trading and don't lose money!
ATR For Stop Loss (Overlay)This script is an enhancement of ATR Indicator.
It is used to determine the stop loss position by using the ATR indicator, in conjunction with the low of the candle.
Formula = Stop Loss = Lowest(Lowest Length) - (ATR Multiplier * ATR (Smoothing, Length))
However, the user needs to manually identify the swing low for a better stop loss placement.
Parameter Information :
- Length : Period to calculate the average true range.
- Smoothing : The method used for averaging.
- ATR Multiplier : Multiplier factor to determine the Stop Loss from the lowest reference point. (1 ATR Multiplier means the stop loss would be = Low - ATR)
- Lowest Length : A total number of candle to determine the lowest reference point. (1 means only using the latest candle's low as a lowest reference point)
Have fun and good luck!
Trend Surfers - Premium Breakout + AlertsTrend Surfers - Premium Breakout Strategy with Alerts
I am happy today to release the first free Trend Surfers complete Breakout Strategy!
The strategy includes:
Entry for Long and Short
Stoploss
Position Size
Exit Signal
Risk Management Feature
How the strategy works
This is a Trend Following strategy. The strategy will have drawdowns, but they will be way smaller than what you would go through with buy and old.
As a Trend Following strategy, we will buy on strength, when a breakout occurs. And sell on weakness.
The strategy includes a FIX Stoploss determined by an ATR multiple and a trailing Stoploss/Takeprofit also determined by an ATR multiple.
You can also manage your risk by entering the maximum % you are willing to risk on every trade. Additionally, there is an option to enter how many pairs you will be trading with the strategy. This will change your position size in order to make sure that you have enough funds to trade all your favorite pairs.
Use the strategy with alerts
This strategy is alert-ready. All you have to do is:
Go on a pair you would like to trade
Create an alert
Select the strategy as a Trigger
Wait for new orders to be sent to you
Every Entry (Long/Short) will include:
Market Entry (Enter position NOW!)
Stoploss price
Position Size
Leverage
* If you do not wish to use leverage, you can multiply the Position Size by the Leverage. But doing that, you might end up with a position greater than your equity. Trading on Futures is better in order to have accurate risk management.
Exit signals:
When you receive an exit signal, you need to close the position ASAP. If you want to keep your results as close as possible to the backtest results, you need to execute quickly and follow what the strategy is telling you.
Do not try to outsmart the strategy
Leave your emotion out of trading! If you trust the strategy, you will have way better returns than if you try to outsmart it. Follow each signal you receive even if it doesn't seem logical at the moment.
Become a machine that executes. Don't look at fundamentals. Follow the trend! Trust the strategy!
I hope you enjoy it!