TradingView
DayTradingOil
17 Ara 2020 12:21

User-Inputed Time Range & Fibs 

E-mini S&P 500 FuturesCME

Açıklama

Greetings 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: tradingview.com/u/DayTradingOil/).
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/atas-possibilities/indicators/initial-balance-indicator-how-to-use-initial-balance/).

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(mypivots.com/dictionary/definition/96/initial-balance-ib).

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--> (tradingview.com/script/dYqL95JB-Backtesting-Trading-Engine-PineCoders/), Pinecoders.com for help with Tracking the Highs/Lows--> (pinecoders.com/faq_and_code/ and @TradeChartist for allowing me to use some of the code for the Fibonacci Extensions from his script here--> (tradingview.com/script/mWmIRNVF-Simple-Fibonacci-Retracement/).

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.

Sürüm Notları

Update Details:
Removed Fibonacci Extensions. Code is cleaner with just pre-set Target Extensions.
Also added an array to track past Range Distances to calculate an average.
*Lookback period of Range Distance Averages can be changed in the settings.

Sürüm Notları

Added Alerts when Close Crosses Above/Below Range.
Yorumlar
overninethousand
I've been profitable with this indicator. I want to thank you, I wish I could donate more, one day I will. This is simply a token of gratitude.
DayTradingOil
@overninethousand, Thank you very much! I use this as my main criteria for entering the market intraday and have been profitable with it for some time now. Thank you again for the donation, always appreciated.
-DayTradingOil
edgeCT
Again :) really appreciated thanks, Man

if possible please add multiple session range like Asian, London, and New York Session range Also is there any way we can limit the number of days putting these levels on the chart
DayTradingOil
Hi @edgeGT, Thanks for the donation! What you are asking for would change the script entirely, and can be quite awkward to display the information you requested properly. Therefore I made a private publication that you and others can access from the link on the bottom.

Some things are different from this version of the script. From your comment it seems like you want to display the entirety of each session(NY, London, Tokyo). My script works by measuring a small window of time(Such as Initial Balance from 9:30am-10:30am EST) and extending the Range of that time window forward. Since you rather see the entirety of each session, I've instead opted to highlight the user-defined range, with an option in the menu to extend the Range Highs/Lows if required. I've also added an Input in which you can choose the number of bars back to stop plotting.

Picture Example:


Script:
tradingview.com/script/gy59Edb6-Custom-User-Inputed-Timed-Range/

Kind Regards
-DayTradingOil
edgeCT
@DayTradingOil, Super Cool thanks man
mickey1984
@DayTradingOil, this is amazing how do i change the daily opening price to start at midnight nyc est
ronniebrasco33907
How can I donate to you directly?
psagar1111
@DayTradingOil,

Thanks for sharing such great script.
I need to modify this script to plot ranges for entire week, say from Monday to Monday. Time period for me is 0915:1015
Can you help me to figure out changes, so i can have daily/weekly/monthly session option instead of default daily session.
overninethousand
Awesome work man! I was wondering what's the possibility of adding alerts for every time it crosses above or below?
DayTradingOil
Hi @alberttiago, I just added in two AlertConditions for when Close Crosses Above and Close Crosses Below the Range. To set them up, right click the indicator on the chart workspace, click "Add Alert on TRF", and create two new Alerts with the Condition "Close Crossed Above IB Range!" and "Close Crossed Below IB range!" Thanks for the suggestion!
Daha Fazla