Auto S/R v2This script allows users to plot automatic support and resistance lines on their chart from any timeframe. This allows them to automatically overlay daily support and resistance lines on an intraday chart.
1. First we get a value from a 5 bar pivot.
2. From that pivot we calculate the ATR.
3. We draw lines above and below by either adding or subtracting from our value in step 1.
The user has the option to turn off the price labels, set the number of lines they want displayed, and adjusting the closeness of each line by using the adjuster.
支撐和阻力
Support/Resistance LinesThis script displays support and resistance lines at the levels you enter in the Input Settings. It does not perform the S/R calculations.
It allows you to:
Enter up to 6 support and 6 resistance lines each; any with value of 0 will be hidden
Specify one ticker that it applies to, so the lines will be hidden if you switch charts
Set the text size, color, horizontal offset, and whether to display the price values for each line
Set the color, transparency and line type for the S/R lines
High Volume Price Levels x3This script detects recent huge volume areas to help you finding out good support and resistance levels.
For each of the 3 periods (defaults : 100, 200, 500) a new line will be drawn from the last time the volume amount exceeded n% (default 99%) of the highest volume on the same period, to the next occurence.
Most of time, these lines represent strong support and resistance levels which can be helpful in your technical analysis.
Options:
Volume trigger level: represents the minimum % of the highest volume within the given period on which you want to draw a new price level. (But higher this % is, stronger the levels will be)
Periods: The reference periods for high volume detection.
Show period: Enable/Disable the use of any period.
Period Color: Select a color correspondig to each period.
Show current levels only: Disable drawing of previous levels, to display current levels only.
Extend last level: Extend current lines to right/left/both or none sides of your chart.
Notes:
Sometimes, the last detected level from every periods can be the same at the same moment. In this situation, you'll only see one or two of the lines instead of three.
I'd like to figure out how to continuously draw every interesting levels without making the chart unreadable. Of course this script will be updated if I find a good way to do it.
Feel free to suggest any improvements/modifications.
Example:
Auto TrendLines [HeWhoMustNotBeNamed]I started off with the intention of creating script to identify Wolfe wave projection. But, soon ran into problem with loops. Realized drawing wedge is more difficult than drawing converging triangle. Hence, took a step back and started working on wedges and triangle identification. Ended up with a messy output which looked like this.
Had to take another step back and hence decided to make Trendlines detection script and here we are :)
⬜ Process
▶ Scan pivots which are in trend. This means, series of pivot Highs or pivot lows either in ascending order or descending order.
▶ Draw trend line between each of the pivots in the trend series. For example, if there are 5 pivot high uptrend pivots, draw mXn lines between each of these points.
▶ Select the trend line which is more accurate or stronger. Accuracy is measured by number of candles/wicks touching the line and number of candles which fall outside the line. Stronger trendlines will touch more candles and pivots with less overflow.
▶ Remove all lines except the most accurate one for each direction.
At any point of time, you will see upto 4 trend lines in this script.
▶ Trendline joining pivot highs in uptrending condition
▶ Trendline joining pivot lows in uptrending condition
▶ Trendline joining pivot highs in downtrending condition
▶ Trendline joining pivot lows in downtrending conditions
The older line will remain until the new one comes through of same type. Hence, you will still be able to see uptrending high and low trend lines for downtrending instruments which are created way back!! Also, new trendlines replace old ones only if they are more stronger (connect to more pivots with less overflow)
⬜ Settings
Settings are simple.
User can select preferred Zigzag Length and Search Depth. Higher numbers for these two parameters will present longer term trends whereas lower numbers will display shorter ones.
Trend Lines controlls will allow users to enable/disable specific type of trend line, set color and line style to it.
⬜ Few Examples
▶ Uptrending Market : NASDAQ:NDX
▶ Downtrending Market : NYSE:BABA
▶ Ranging Market : NYSE:PLTR
weekly MapThis indicator shows the highest and lowest level of the previous week in the current week. This area is also divided into 4 sections that can be controlled from the settings section.
[MF] Auto Fibonacci LevelsDescription:
Automatically draw Fibonacci Pivot levels based on the previous (day's, week's or month's)
Range ( High-Low ). The HLC3 is used as the default Pivot level.
Unlike the "Auto Fibonacci Levels", this variation does not update
Levels on current day even if the price goes past the R3/S3 levels.
Timeframes: 1D, 1W, 1M
Range = (High - Low) - From previous Day, Week or month.
FIB LEVELS:
- Yellow = Pivot and Pivot Zone (HLC3 by default)
- red = R1,S1 Levels 0.236 * Range
- Green = R2,S2 Levels 0.368 * Range
- Lime = R3,S3 Levels 0.618 * Range
- Blue = R4,S4 Levels 0.786 * Range
- Gray = R5,S5 Levels 1.000 * Range
- Lime = R6,S6 Levels 1.236 * Range
- Red = R7,S7 Levels 1.382 * Range
- Blue = R8,S8 Levels 1.618 * Range
- Green = R9,S9 Levels 2.000 * Range
CLASSIC LEVELS:
- Yellow = Pivot and Pivot Zone (HLC3)
- Green = R1,S1 Levels (Pivot*2 - Low), (Pivot*2 - High)
- Lime = R2,S2 Levels ( Pivot + Range), ( Pivot - Range)
- Lime = R3,S3 Levels (High + 2*( Pivot - Low)), (Low - 2*(High - Pivot ))
- Blue = R4,S4 Levels (High + 3*( Pivot - Low)), (Low - 3*(High - Pivot ))
Refrences:
- Auto Daily Fib Levels R3.0 by JustUncleL
- Auto Fib by TheYangGuizi
- Monthly Dynamic Range Levels (Fibonaci) V0 by RicardoSantos
Modifications:
- Added next FIB Levels. (changes during the current cycle)
- Added FIB 0.236 Levels
- Added Option to change the colors of the Fib Levels
- Changed Default colors to the colors of Tradingview
- Upgraded to Version4 Pinescript
[CP]Pivot Boss Floor Pivots with ATR Dilation and Dynamic LevelsINTRODUCTION:
Compared to all the Pivot Indicators available on Trading View Public Library, this Floor Pivots Indicator differentiates itself in two major original ways:
Dilates the Pivot Support/Resistance Levels into Support/Resistance Bands based on volatility
Displays the S/R Levels Dynamically , that is, only those levels will be shown that are close enough to the price resulting in much cleaner looking charts.
There were a few features whose logic I had figured out, but I could not implement them due Pine Script’s Limitation (they should really work on increasing Pine Script’s capacity instead of adding more and more features to the language in order to make it look ‘better’):
Showing multiple timeframe pivots at the same time (not possible due to Pine Script’s limitation on the ‘Max Number of Outputs’ )
Automatic Detection of highly profitable Double Hot Pivot Zones (DPZ), also due to the ‘Max Number of Outputs’ limit
GENERAL USER INPUTS:
Most of the settings are self-explanatory, however, a few of them need some explanation:
Show Floor Pivots Dynamically – This will turn ON the dynamic pivot levels, please note that this function will work ONLY IN INTRADAY timeframes.
Dynamic Pivot ATR Period – Period over which the ATR value is calculated to show the pivots dynamically.
ATR Threshold for Dynamic Floor Pivots – Simply put, the indicator will start displaying Pivot Levels if they fall within the 2*ATR distance (default value) of the price. You can increase this number if the volatility increases and vice-versa.
Use ATR to Dilate Intraday Pivot Levels – This will turn ON Floor Pivot Dilation, turning pivot ‘lines’ into ‘bands’ .
ATR Dilation Factor – This number decides the width of the Pivot bands. Larger this number, thicker the bands. Typically, high volatility stocks will require a higher number.
ATR Period – Same as Dynamic Pivot ATR Period, but for Pivot Level Dilation.
INDICATOR USAGE EXAMPLES:
This indicator works great in conjunction with my Pivot Boss Candlestick Scanner indicator.
There are a lot of optimizations I have done in the code, although it looks trivial at first glance, but it's fairly complex.
Feel free to use it and modify it as you wish.
Here are a few examples where the indicator has shown great entries and exits, with the default settings:
NIFTY 5m Chart
Reliance 5m Chart
Tesla 5m Chart
Bitcoin-USDT 15m Chart
FINAL WORDS:
Please understand that I have Cherry Picked the examples to showcase the capability of the indicator and its usage.
DO NOT conflate the accuracy of examples with the accuracy of this indicator.
Once you start using floor pivots, you will realize that a lot of days simply don’t give any high probability setups and you will simply sit out of the market and do nothing (which is a good thing).
If you really want to learn how to use Pivots, read the book ’Secrets of a Pivot Boss’ . This book can change your life.
Linear Regression Histogram [LuxAlgo]This indicator is inspired by traditional statistical histograms. It will return the number of occurrences of price falling within each interval (bins) of the linear regression channel. This can be useful to highlight zones of interest within a trend.
Settings
Length: Number of recent closing prices used for the computation of the linear regression.
Bins Number: Number of intervals constructed from the linear regression channel.
Mult: Multiplicative factor for the RMSE. Controls the width of the linear regression channel.
Src: Input source of the indicator.
Usage
The indicator is constructed by dividing the linear regression channel range into a series of intervals (bins) of equal width. We then count the number of price values falling within each interval.
If a significant number of price values fall within a specific interval then that interval can highlight a potential zone of interest within a trend.
The zone of interest is highlighted in blue.
Compression support&resistance [LM]Hello traders,
I would like to present you Compression support&resistance script. The idea behind is to look for areas of price compression(inside bar candles). Basically the S/R lines are created after three candles that are formed in certain pattern and volume conditions. First candle of pattern is usually the most volatile and fist inside bar after volatile candle high and low creates S/R lines in order to look for breakouts or for future bounces of the S/R line. Also by default volume has to be decreasing from candle to candle, although this condition can be controlled by setting.
It has various settings as my other S/R scripts for multi timeframe analysis. The current timeframe uses line API but for multi timeframe I use plot lines. There are two filters. Volume filter for declining volume of the pattern candles and volatility filter which renders line only in case that pattern occurs after some % change has happened within some lookback period.
Credit also for this indicator goes to @berkek as he took time to explain it to me.
Hope you will enjoy it,
Lukas
Auto Fib Golden Pocket Band - Strategy with Buy Signalsthis strategy is based on the Indicator "Auto Fib Golden Pocket Band - "Autofib Moving Average"
it's the same as the indicator but with:
- the strategy tester included
- several entry Signal filter
- Dynamic SL
Opening Range FibonaccisThis indicator uses the concept of the "Opening Range" to create a Fibonacci zone from the high and low set during a specific time period after open (Defaults to 9:30 - 10:05 AM, EST)
The Opening Range is a popular tool for intraday technical analysis. Price frequently uses these levels as support/resistance, and a breakout from within the range can be a sign of further movement.
The Fibonacci levels are set such that the opening range high/low fall on the +/-0.5 fib. This creates an "extended range" outside of the opening range that may be useful during breakouts.
Auto Support ResistanceAn indicator that draws support, resistance and trend lines automatically based on the high/low and current direction of the asset.
Market Sessions Open/Close LevelsThis indicator displays the market open and close price levels for the main trading sessions (Sydney, Tokyo, Frankfurt, London and New York). The Daily Line changes color depending on if price is trading above or below the level. Feel free to add or replace levels depending on your trading style and trading times.
QFL base scannerThis script is a simple implementation of a QFL (Quickfingers Luc) base scanner.
This QFL base scanner uses a different approach to some other QFL base scanners that are on TradingView. Other TradingView scripts look for a candlestick pattern of two lower lows followed by two higher lows combined with an increase in volume. This can generate some unexpected results where some minor dips can meet the pattern and are marked as a base, but some major dips do not and are ignored.
This QFL base scanner instead looks for the lowest low in a given period and marks it as a base. The longer the period of the lowest low, the more significant the bases will be. Buys are marked when the price has bounced x% above the base and then fallen y% below the base. This approach seems to give more predictable (and tradable) results.
If looking at the past script results, you may think that the script is perfectly timing entry points at the bottom of market dips. This is NOT the case. The script is actually showing buy signals when the price falls y% below the PREVIOUS base. The current base is only retrospectively marked some periods later once the reversal is confirmed. New bases are not tradeable using this script, but a percentage fall from the previous base is.
Enjoy.
RSI Trend LineI took a concept similar to the "Adaptive RSI" to get the RSI overlaid on a price chart. The problem I have with the Adaptive RSI is to me it sticks too closely to price. I wanted something much more visually helpful that can provide actual tradable signals and strategies.
The orange line you are seeing is the "RSI Trend Line"
The further the RSI moves away from a value of 50 (the "zero line"), the more you see this orange line move away from price. This helps visualize the strength of price pushing away from a neutral value to a position of strength or weakness-- if orange is below price then relative strength is high; if orange is above price then relative strength is low. When price is equal to the orange RSI line, the RSI is at a value of 50.
In addition to the trend line, you can enable bands which reflect Overbought and Oversold levels . If you leave the responsiveness to a value of 1.0 and removed any smoothing, these should pretty accurately reflect an actual RSI chart topping the OB and OS lines (default 70 and 30, respectively). (They're still very close with different responsiveness and smoothing values)
The conversion or scaling of RSI value onto price comes with a bit of a quirk which I decided to leave to the user to determine how they want it applied. So the setting "Responsiveness" will impact the sort of aggressiveness of the RSI trend line as well as the the size of the bands. You could think of this in some ways as the OPPOSITE of the multiple setting on a Bollinger or Keltner band-- 1.0 will make for the widest band, 2.0 is the default and my preference, and you can move it up to a value of 5.0.
Here are some examples of how you could use the indicator for trade signals--
And here's my thought on the current state (as of 10/06) on indices with regards to this indicator-
Bitcoin - CME Futures Friday Close
This indicator displays the weekly Friday closing price according to the CME trading hours (Friday 4pm CT).
A horizontal line is displayed until the CME opens again on Sunday 5pm CT.
This indicator is based on the thesis, that during the weekend the Bitcoin price tends to mean reverse to the CME closing price of the prior Friday. The level can also act as support/resistance. This indicator gives a visualization of this key level for the relevant time window.
Furthermore the indicator helps to easily identify, if there is an up or down gap in the CME Bitcoin contract.
CoRA Ribbon - Multiple Compound Ratio Weighted Moving AveragesWhat distinguishes this indicator?
A Compound Ratio Weighted Moving Average ("CoRA") is a Moving Average that, regardless of its length, has very little lag and that can be relied on to accurately track price movements and fluctuations - compared to other types of Moving Averages.
By combining multiple Compound Ratio Weighted Moving Averages you can identify the trend better and more reliably . This is where "CoRA Ribbon" comes in.
The original study, which supported one CoRA Wave, comes from RedKTrader and was introduced as "RedK Compound Ratio Moving Average (CoRa_Wave)” . Thanks to him for the great work!
What was improved or added to this version of the indicator?
With this version of the indicator, up to 5 waves of Compound Ratio Moving Averages with different lengths can be combined and output to one "CoRA Ribbon".
Alerts were implemented. You can be notified e.g. in the event of
changes in direction of each single CoRA Wave
a trend change, which is determined on the basis of all 5 CoRA Waves
A CoRA Wave compared to other Moving Averages - CoRa Waves are less lagging behind
A suggestion for interpretation of “CoRA Ribbon”:
Since CoRA Ribbon can help you to identify the trend better and more reliably, this indicator provides a good baseline for your strategy, but should always be used in conjunction with other indicators or market analysis.
By adjusting the length of each individual wave, you can adapt "CoRA Ribbon" to your trading style - whether it is more aggressive or more cautious.
The following general rules can be formulated:
If the Ribbon changes its color to green, this can be interpreted as a buy signal.
If the Ribbon changes its color to red, this can be interpreted as a sell signal.
Good to know: The default settings have been selected for timeframe lower than 15 minutes. Adjust them and the indicator will do a great job on higher timeframes too. Please remember to test carefully after every change before the changes are applied to your live trading.
Background “Compound Ratio Weighted Average” - provided by "RedKTrader"
A Compound Ratio Weighted Average is a moving average where the weights increase in a "logarithmically linear" way - from the furthest point in the data to the current point.
The formula to calculate these weights work in a similar way to how "compound ratio" works: you start with an initial amount, then add a consistent "ratio of the cumulative prior sum" each period until you reach the end amount. The result is the "step ratio" between the weights is consistent - This is not the case with linear-weighted “Moving Average Weighted” (WMA) or “Exponential Moving Average” (EMA)
For example, if you consider a Weighted Moving Average ( WMA ) of length 5, the weights will be (from the furthest point towards the most current) 1, 2, 3, 4, 5 -- we can see that the ratio between these weights are inconsistent. in fact, the ratio between the 2 furthest points is 2:1, but the ratio between the most recent points is 5:4. the ratio is inconsistent, and in fact, more recent points are not getting the best weights they should get to counter-act the lag effect. Using the Compound Ratio approach addresses that point.
A key advantage here is that we can significantly reduce the "tail weight" - which is "relatively" large in other Moving Averages.
A Compound Ratio Weighted Moving Average is a moving average that has very little lag and that can be relied on to accurately track price movements and fluctuations.
Use or modify the code, invite us for a coffee, ... most importantly: have a lot of fun and success with this indicator
The code is commented - please don't hesitate to use it as needed or customize it further ... and if you are satisfied and even successful with this indicator, maybe buy us a coffee ;-)
The original developer ( RedKTrader ) and I ( consilus ) are curious to see how our indicators will develop through further ideas - so please keep us updated.
ATR Trailing Stops S/R [LM]Hello Traders,
I would like to introduce you ATR Trailing Stops S/R . The idea is to look for important levels that are identified by trailing stop line, where it usualy spents a lot of time without any move usualy turns out to be good level for bounces.
Script for atr trailing line is originaly taken from: script made by @dgmoon
It has various setting
Timeframe and atr settings
Show lines
Extend lines
Line count - how many lines will be rendered
Candle count - how many candles has to trailing line spend at the same level
Colors - controls color of plot and lines
I hope you will enjoy it, as I enjoyed to write it.
Lukas
+ ATR Support and ResistanceThis, a very different script from most of mine, is my attempt at making a useful, and not messy, support and resistance indicator. If you've never looked into trader xkavalis, and his scripts and discord, I would highly recommend it. He talks about "pay attention candles" a lot. It got me thinking about what those are. Best as I can tell all he means by that phrase is large, impulsive candles. Sometimes these lead to break outs of ranges, or they may signal tops, bottoms, or near-tops and bottoms. The only way I could make sense of this in a mathematical way was by using the average true range. Basically, any candle's true range outside of the ATR is considered a "pay attention candle," by my definition.
This script originally began as just a candle coloring exercise with some optional shapes plotted above/below certain candles, but I quickly realized I wanted to draw lines or zones from these candles, so eventually, after many hours spent figuring out and learning 'line.new' and 'box.new' I got things sorted.
Essentially, my line of thinking is that on impulsive candles down, the origin of the impulse is more important than the close (not always of course, as there are no unbreakable rules in what markets can do), and with impulsive candles up, the same theory applies.
So, for upward impulsive candles I've marked out the zone from the open to the low as a support (until broken, in which case it may become resistance). For downward impulsive candles the zone encompasses the open to the high. I've given the option to plot a line from the close for all of these. It's turned off by default as it's just less stuff on the chart, but you may like it.
The line length is customizable in a menu. It does funny things on low timeframes on forex and stock charts (long lines that result in chart compression), but for some reason very rarely on crypto charts. If someone who is smart (not me) and has much experience with pinescript could perhaps help me out with a fix for this, that would be great. I suspect it has something to do with my "bar_index_duration" that I defined using the time function, but I'm not sure how or why.
Line length on time frames of one hour and up it is typically fine.
Use the ATR multiple to change the sensitivity of the indicator. This is basically the determination of when a candle is beyond the ATR. A multiple of two is two times the ATR. With lower volatile pairs you can maybe make this lower. On lower time frames or with more volatile pairs (illiquid alts in particular) a higher multiple might serve better. I find the default 1.75 is mostly acceptable.
As I started this I also thought adding some sort of volume information to the candles might be useful as well, so I added a simple candle coloring feature referencing the OBV and a 21 period EMA. Candles are colored based on the OBV's relation to its moving average.
I added some plot shapes and candle coloring utilizing the RSI as well. Options to turn on or off shapes plotted for overbought and oversold across the top of the chart. The most interesting feature that I implemented here is a support/resistance zone around the centerline of the RSI. If the RSI is between 49 and 51 then you can have optional candle coloring, shapes plotted above the candles, and s/r zones drawn on the chart. In trending markets the centerline of the RSI will frequetly act as support or resistance, so by being alerted of this condition on the chart you can use that with actual levels marked off in order to help make a judgement on a trade. I think it's a nice addition, and an oft overlooked aspect of the usefulness of the RSI.
I've also included a calculation, with candle coloring and/or plot shapes, for something like a stop run on high volume. The calculation for that is in its section below, and should be pretty self explanatory.
Lastly, typing this as I'm posting it, this indicator could also be useful for helping to find placement for trailing a stop. Just a thought!
ROS [Range of Swag]Creates any multitimeframe level and marks opens, highs lows and midpoints
Comes with labels (hidable)
Works on Bar-by-bar replay
Customizable color!
The default 3 ranges are weekly, monthly, and quarterly in that order.
If you want to change the labels change it in the code... or just hide them.
Big thanks to @spacemanbtc @Kriswaters for the code (levels and session breaks) respectively.
Will be looking to improve it
Stochastic RSI+ Support/Resistance (beta)This indicator uses Stochastic RSI+ as a means to determine overbought and oversold conditions which subsequently define recent support and resistance levels.
small channel in 5minThis indicator designed for 5min time-frame.
it detects a candlestick pattern in one hour time-frame and draw a channel based on the detected pattern, where two candles and are covered by the third one , in 5 min time-frame.
the bottom, middle and top of the channel are colored by green, gray and red respectively. this channel may help user to use it as a possible support and resistance region.
(the pattern is defined in line 11 to 13.)
enjoy it