User-Inputed Time Range & FibsGreetings Traders! I have decided to release a few scripts as open-source as I'm sure others can benefit from them and perhaps make them better.(Be sure to check my Profile for the other scripts as well: www.tradingview.com).
This one is called User-Inputed Time Range & Fibs.
The idea behind this script is to record the Range Highs and Lows of a User Defined Period, and plot potential Targets based on either Fibonacci Extensions or a Multiple of the Range Size. I created this originally for use with the US Session Initial Balance(From 9:30-10:30AM EST), however it can be set to any time period.
What is Initial Balance? In simple words, Initial Balance (IB) is the price data, which are formed during the first hour of a trading session. Activity of traders forms the so-called Initial Balance at this time. This concept was introduced for the first time by Peter Steidlmayer when he presented the market profile to traders(atas.net).
The IB is monitored as a break-out area for Range Extension traders. The IB High is also seen as an area of resistance and the IB Low as an area of support until it is broken(www.mypivots.com).
As a note, depending on the Time Zone you are in, you may need to manually add or subtract from the Timed Range to match the desired Time. For example in NY Eastern Time, I have to use 8:30-9:30AM to Capture the 9:30-10-30AM IB for ES and NQ. Similarly, I must use 14:30-15:30PM to Capture the 9:30-10-30AM IB for BTC. You will need to make adjustments based on the Time Zone you are located in.
I wanted to give a Special Thanks to @PineCoders for the Custom Rounding Function from Backtesting/Trading Engine--> (), Pinecoders.com for help with Tracking the Highs/Lows--> (www.pinecoders.com), and @TradeChartist for allowing me to use some of the code for the Fibonacci Extensions from his script here--> (). 
If you like User-Inputed Time Range & Fibs, be sure to Like, Follow, and if you have any questions, don't be afraid to drop a comment below.
Rangetrading
Trend-Range IdentifierTrend trading algorithms fail in ranging market and Swing trading algorithm fail in trending market. Purpose of this indicator is to identify if the instrument is trending or ranging so that you can apply appropriate trading algorithm for the market.
 Process: 
 
  ATR is calculated based on the input parameter  atrLength 
  Range/Channel containing upLine and downLine is calculated by adding/subtracting  atrMultiplier  * atr to close price.
  This range/channel will remain same until the price breaks either upLine or downLine.
  Once price crosses one among upLine and downLine, then new upLine/downLine is calculated based on latest close price.
  If price breaks upLine, the trend is considered to be up until the next line break or no lines are broken for  rangeLength  bars. During this state, candles are colored in lime and upLine/downLine are colored in green.
  If price breaks downLine, the trend is considered to be down until the next line break or no lines are broken for  rangeLength  bars. During this state, candles are colored in orange and upLine/downLine are colored in red.
  If close price does not break either upLine or downLine for  rangeLength  bars, then the instrument is considered to be in range. During this state, candles are colored in silver and upLine/downLine are colored in purple.
  In ranging duration, we display one among Keltner Channel, Bollinger Band or Donchian Band as per input parameter :  rangeChannel . Other parameters used for calculation are  rangeLength  and  stdDev 
 
I have not fully optimized parameters. Suggestions and feedback welcome.
SuperTrendRange by DGTSuperTrendRange  study attempts to determine  the state of the market  
•	whether  a well-established bull/bear trend  is present 
•	whether the market is  trading in a range  
SuperTrendRange (STR) takes into account the volatility of the market - further details regarding volatility can be found in the description of “Volatility Bands by DGT” study 
Due to its similarities to SupertTrend (ST) and Parabolic SAR (SAR), I will try to explain by stating differences between them 
SuperTrendRange uses both the ATR (Average True Range) and STDEV (Standard Deviation) as part of its calculations - unlike ST and SAR where they use only ATR 
Sensitivity of the indicator is adjusted using the multiplier setting of both ATR and STDEV 
Additionally, unlike ST, the source of the basis of SuperTrendRange can be selected among the assets price value or its moving average
Source and Length are adjustable too
The SuperTrendRange, like Parabolic SAR indicator, appears on a chart as a series of dots, either above, below or unlike Parabolic SAR both above and below of the asset's price
 A dot placed 
 -	 below  the price when the market is  trending upward   
-	 above  the price when it is  trending downward 
-	 both above and below  when the price starts  moving sideways  – this is a feature that both SuperTrend and Parabolic SAR misses, where they are known to produce false signals and losing trades, whereas SuperTrendRange emphasis the zones of the ranges occurring and in most cases are considered no trade recommended zones. Please note that the range width may vary depending on how the market is volatile.  It is up to the users to trade if it fits their trading strategies
Dots plotted above and below can be assumed as  Support and Resistance  levels    
Example usages – with trading opportunities 
Gold Monthly Chart
Bitcoin Daily Chart
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
Hancock - Renko Brick ProductionThis is the accompanying script that shows how many renko bricks were produced in each direction per candle. It gives a basic indication of volatility, some might find it useful.
Happy trading
Hancock
Hancock - RenkoThis is the first release of Renko indicator.
Renko is plotted over candles and best calculates the number of Renko bricks printed up or down per candle which can be viewed from the data window. It plots the high and low of a the bricks, if numerous bricks are printed on a candle, as well as the open and close of a Renko brick. 
This will be actively developed and improved over the next few months and i will be basing other indicators from this Renko.
Happy trading
Hancock
cATRpillerThis indicator is used to identify range breakouts using an ATR multiplier. My first script,  Im sure there are indies out there like this, but this my favorite way to identify breakouts and trends.
ATR Timeframe RangeThis indicator shows the ATR range on the daily or any other timeframe on your current chart. All settings are fully customize-able.
Linear Regression ++Due to public demand
 Linear Regression Formula 
 Scraped Calculation With Alerts 
Here is the Linear Regression Script For traders Who love rich features
Features
++ Multi time frame -> Source Regression from a different Chart
++ Customized Colors -> This includes the pine lines
++ Smoothing -> Allow Filtered Regression; Note: Using 1 Defaults to the original line. The default is 1
++ Alerts On Channel/Range Crossing
Usage
++ Use this for BreakOuts and Reversals
++ This Script is not to be used Independently
Risks
Please note, this script is the likes of Bollinger bands and poses a risk of falling in a trend range. 
Signals may Keep running on the same direction while the market is reversing.
Requests
If you have any feature requests, comment below or dm me. I will answer when i can. 
Feel free to utilize this on your chart and share your ideas
For developers who want to use this on their chart, Please use  this script 
The original formula for calculation is posted there
❤❤❤ I hope you love this. From my heart! ❤❤❤
$0 Monthly Weekly & Daily OHLC Viewer
Visualizer of current or previous month(s), week(s) & days ranges
Purpose: View last Monthly, Weekly, Daily, and/or a custom time interval OHLC, i.e. previously closed/confirmed or the ongoing higher time interval ranges
Main configurations available:
- 2 main reporting modes: View the current/ongoing M/W/D candles' OHLC (live, repaints) or report OHLC of last closed ones, i.e. previous Montly, Weekly and/or Daily
- View only latest Monthly, Weekly and/or Daily OHLC (lines) or all past ones (~channel)
- Set your own time interval for its price range(s) to be reported, e.g. last quarter '3M', 12H '720', or hide it
- View one specific day of the week OHLC reported all over the week
Graphic/visual configuration: 
- Show the High & Low levels or not
- Show the Open & close levels or not
- Display a background color between top & down or lines only
- Change the background color depending if is/was rising or falling price
- Highlight the top & down breaches of higher timeframe resolution candles: Daily breaching last Weekly range, and/or the Weekly the Monthly one
- Colors & styling can be edited from the indicator's styling configuration panel
Depending on its expected usage, those configurations enable to:
- Consider previously closed candles OLHC as reference top & down ranges (support & resistance, breaches)
- Review chart's current candles evolution within their higher time interval / candle (M/W/D)
- Consider specific week days' range as a reference for the week trend
- Have a general overview of the market evolution trends
Default config is to view current candles evolving within their higher time interval / candle, while reporting last previously closed M+W is a preferred usage. Play with the config settings to find your setup.
View ongoing M+W+D OHLC with dynamic background color:
  
View previously closed M+W+D OHLC:
  
View closed H&L for M+W+D, latest only:
  
View Mondays' OHLC:
  
Feedback & support welcome.
Normailzed CandleThis indicator normalizes Day's candle with Open. Idea is to see the daily movement in the context of the Open of the Day.
Larry Williams talks about Open being the most important price of the day. Hence, this indicator.
The Green line is average Open-to-High for occurrences of Red days. The Red line is average Open-to-Low for occurrences of Green days.
Average are not perfect calculations since occurrences(of Red or Green) will vary within the time-span used for averages.
These can used to gauge likelihood of the intra-day price reversal. If the price exceeds green/red line, there is higher likelihood of the price closing above/below open.
The blue lines are average Open-to-close for Green and Red occurrences.
Be careful on days where consecutive 3rd Highest High or Lowest Low day is made and also on the next day after such day. Prices may turn direction at least for a short while. 
The precursor to this script of the Candle Infopanel script. That script was just numbers in  panel and this is a graphical representation. I
Some of the calculations from original script are commented here because it would make visuals clutters (and probably the left-out calculation are not critical to making trade decisions!)
Developing Range v1.0Developing Range v1.0 
---------------------------- 
Azimuth Dynamics 
Scalping tool for help finding potentially high probability reactive levels. I suggest using on a 5min chart. 
GRAY BAND: yesterday's High-Low range 
BLUE BAND: today's Developing Range. Mean of today's High-Low range so far and yesterday's High-Low range, this is calculated for each of today's bars
THIN BLUE LINE: the mean of today's range median and yesterday's range median.
Note: we do not use the DAILY bar via 'security()' to obtain today's high and low. This would essentially be forward looking, instead we use iteration to check from the current bar back to midnight, bar by bar. This then allows a developing range to be established as the day prints new highs and lows.
Inspired by volatility trading textbook. 
5 Sessions RangeThis script averages the range of the previous 5 sessions and displays it on the chart
The sessions are adjustable
MG - Range trader - 1.0This one is a bit of an experiment..
The theory is, if you have an asset that you firmly believe will rise in the future for fundamental reasons and are happy to hold until that happens i.e. a be a position trader, you can take advantage of market volatility at the same time in a relatively safe way, so theoretically, you  profit when the price goes up or down 
E.g. You have $1000, an asset in which you want to become a position trader and you are happy to either make more money or more of the asset as you believe that will make you more money in the future, you could wait until a decent retracement, maybe around a good support level, then buy $500 of the asset and simply sell if it goes up by X, buy if it goes down by X. If you keep doing this, you will end up with either with more of the asset or more money. You have a sure gain either way (if you are happy to have either money or asset)
There are some considerations:
The higher the trade size, the faster profit compounds and the faster you  exhaust your available buys and sells
- E.g. If asset is $100, you have $500 and you plan to buy / sell every $10 change, if the asset drops straight to $40, your last buy will be at $50, at which point, the asset is still dropping. But it you only plan to buy / sell $5 every $10 price, you will be able to buy right down to 0.
In times of strong trend, it may be better to avoid this approach altogether as there may not be so much oscillation or at least to use a small if not minimum order size.
Application:
The buy and sell triggers can be connected using autoview to convert this indicator into a range trading bot
True Rolling Pivot Range IndicatorHere is the actual 3 day rolling pivot range indicator as detailed in Mark Fisher's book The Logical Trader. 
Renko Price Bars Overlay// Shows the price renko bars (or range bars) instead of the PERIOD renko
// bars that are integrated into Trading View. The normal renko bars that
// Trading View offers only consider the drawing of a new brick when the
// price closes above or below the required brick size. This can produce
// misleading charts since depending on the time interval of a chart, new
// bricks may or may not be drawn. True price renko bars will draw a new 
// brick immediately upon the price exceeding the next target brick size.
// When running this script in "Traditional" mode, the painting of the 
// brick overlay band is INDEPENDENT of the chart interval. If price
// exceeds the required target price for the next brick, the band is
// updated immediately, instead of waiting for the price bar on the chart
// interval to close first. The brick starting anchor point will attempt
// to be a "nice number" at a round interval for the chart ticker. For
// example, if viewing EURUSD with the box size equal to 50 ticks/pips,
// the open and close prices will take the form of 1.2100, 1.2150, 1.2200,
// 1.2250, and so on. This is the same behavior as the normal traditional
// Renko bars in Trading View and other major trading platforms such as 
// Meta Trader.
// Use the tick size in traditional mode to specify the block size, in 
// ticks. This may give interesting results in FOREX pairs... as the tick
// size in Trading View may be 0.00001 instead of the normal pip size of
// 0.0001, so a 10 pip block size may be '100', and not the expected '10'.
// FOREX futures should work in the manner expected, a 10 pip block size
// will indeed equal 0.0010.
// The "ATR" mode functions differently than the Trading View built in 
// version. The block size is updated each time the range is exceeded.
// In Trading View, when using the ATR mode, the ATR is the last ATR 
// value calculated on the ENTIRE data interval, and is applied to all 
// past data. You can see this when you press the '+' sign of the ticker 
// in the top left of the chart window and you will see the brick size 
// as a constant, the brick size is not a function of the ever changing 
// ATR value of the price action. The block size of this script is not
// updated for each price candle (i.e. each 1HR on a 1HR chart), instead
// it is updated only when the price thresholds are exceeded requiring a
// the band to be updated. At that point the current ATR is considered
// and the brick size is updated.
// Options exist to show the current high and low of the brick, and to
// show the required levels that the price must exceed to draw a new 
// brick and update the band.
Please leave comments if you notice any bugs or would like any new features added. I don't find much use for plotting the H/L of the current renko candle, but I have seen some request it in the past.
Cheers.
Market Meanness Index-Price ChangesThis is the Market Mean index. It is used to identify if the market is really trending or if it is range bound(random). In theory, a random sample will be mean reverting 75% of the time. This indicator checks to see what how much the market is mean reverting and converts it to a percentage. If the index is around 75 or higher than the price curve of the market is range bound and there is no trend from a statistical standpoint. If the index is below 75 this means the price curve of the market is in fact trending in a direction as the market is not reverting as much as it should if it were truly following a random/range bound price curve.
2% candlePart of my strategy involves entering a trade based on a candle on a 5-min chart being < 2% (ignoring major volatility). 
I got tired of calculating the range of a single candle either in my head or on a calculator, so I wrote this up. Feel free to share it. 
Shows the %move of any single candle, default horizontal lines are 1% & 2%, can be changed by clicking the gear icon next to the indicator after you have added the indicator to your chart. Works on any timeframe, 5m, 1h, 1d, etc , obviously 
the higher the timeframe, the larger the move.
















