TimeFilterLibrary "TimeFilter"
provides utilities for dates and times
inSession(session, timezone, period)
Parameters:
session (simple string)
timezone (simple string)
period (simple string)
Returns: bool inSession Whether the current time is within the defined time session
inDateRange(startDate, endDate)
Parameters:
startDate (int)
endDate (int)
Returns: bool inRange Whether the current time is within the defined date range
isWeekDay(weekDay, timezone)
Parameters:
weekDay (int)
timezone (simple string)
Returns: bool isWeekDay Whether the provided day is the current day of the week
inWeek(useMon, useTue, useWed, useThu, useFri, useSat, useSun, timezone)
Parameters:
useMon (bool)
useTue (bool)
useWed (bool)
useThu (bool)
useFri (bool)
useSat (bool)
useSun (bool)
timezone (simple string)
Returns: bool inWeek Whether the current time is one of the defined days
filter(useRange, useSession, useWeek, inRange, inSession, inWeek)
Parameters:
useRange (bool)
useSession (bool)
useWeek (bool)
inRange (bool)
inSession (bool)
inWeek (bool)
Returns: bool filter Whether the filter matches or not
Times
Period Value ZonesPeriod Value Zones is designed to help traders understand where current value is being found by splitting the day into 3 key periods based on common reversal times recognized for intraday trading.
By splitting the day into 3 periods, we can more efficiently determine where short-term value lies by using only the data we consider relevant during these periods of time.
> Overview
This indicator is recommended for low timeframe trading during the New York RTH Session.
By only trading within this session, we can ensure that volume and volatility remain fairly consistent.
Within each Period, you will find on the chart:
Value Area Points from Previous period (Value High(VAH)/Value Low(VAL)/Point of Control(POC))
Volume Weighted Average Price (VWAP) Cloud, based on High and Low values during the period.
Value Zone based Potential Reversal Zones.
Additional Displays:
Potential Reversal Detection Signals with Invalidation Levels
Forward Plotted Key Market times.
> Components
• Value Area Points
VAH/VAL/POC are important volume profile points which display where the market has previously held value.
We use these specific levels as support and resistance to confirm direction by monitoring interactions between price and these important levels.
The VAH and VAL lines change colors based on price's interaction with them to confirm whether that level should be regarded as support or resistance.
• VWAP Cloud
VWAP is a common metric used to determine the strength of a trend, and provides a point to look for re-bid & re-offer.
When price breaks out of our Fixed Value zone, VWAP helps us determine further direction.
Also included is VWAP deviation bands, for traders who would prefer to view the standard deviation away from this cloud as well.
• Value Reversal Zones
These Zones are calculated based on extensions of the Period Value Zone.
While in a balanced market, these zones have been shown to provide potential reversal opportunities.
• Potential Reversal Signals
These signals are based on an advanced method for confirming a higher-low or lower-high to reasonably create a signal that is not very laggy but also rooted in sound logic.
While helpful, These are NOT buy or sell signals, and you should always use further analysis to decide the next steps to take.
When a signal appears, an associated invalidation level is also displayed, if this level is crossed the associated signal is no longer considered relevant.
• Key Market Times
These are important times within the day that normally produce volatility caused by daily market catalysts.
Each key time is forward plotted 1 hour before it occurs to provide a clear heads up for potential opportunity.
Opening Fuel: Known for having an increase in Volume after the formation of the 15min Opening Range.
1st Reversal: Common Area for seeing initial large positioning effecting the market, often causing reversals.
Initial Balance Close: End of the first hour, a common positioning tool for futures traders.
2nd Reversal: Positioning is typically reactionary to IB Close, alongside Euro Traders Exiting Positions.
Euro Close: Close of Europe Session, a common positioning tool for futures traders.
Lunch: Usually Low Volume, traders are often out to lunch.
Lunch End: Volume tends to re-enter, as traders come back from lunch.
1st Reversal: New Hour, common area to see large position re-enter the market.
Bonds Close: Bonds markets close, Equities reacting to close of the bond market.
1st MOC: Initial Market on Close orders are places, market reaction is normally expected off of MOC positioning.
MOC Close: As MOC orders are reported, volatility is likely found within the market.
> Methodology
This indicator can be used with the same principles as trading balanced volume profiles.
Rule 1: Unless the price breaks and holds Value High or Value Low, we should expect buyers and sellers to maintain the current balance.
Rule 2: If we break and push away from the Period Value High, we should treat that level as supportive on retest unless we look back below and sellers defend on retest.
Rule 3: If we break and push away from the Period Value Low, we should treat that level as resistance on retest unless we look back above and buyers defend on retest.
Rule 4: If we recover Value Low, and it becomes supportive, we look for our Period POC and Period Value High as our targets above.
Rule 5: If we fail to hold Period Value High, and it becomes resistance, we look for our Period POC and Period Value Low as targets below.
Balance in the context of this indicator is considered as the area between Period Value High and Period Value Low
Acceptance outside of balance in the context of this indicator is considered as Period Value Low or High, becoming supportive or resistance.
> Examples
Theoretical Example:
In the bullish example below, price holds VWAP and makes POC supportive, showing interest from buyers pushing to Value High.
Real-World Example:
Below is an example of the same setup as the theoretical example, taking place on a real futures chart.
By utilizing these rules, we can look for opportunities at these levels and have a plan for how we should be interacting with them.
This will help us determine likely targets and risk-off levels that are based on volume and current "value" from participants.
High/Low Statistics @joshuuuThis indicator has been made to get a statistical edge. It has two different options. Weekly High/Low or Daily High/Low
Weekly High/Low - use this on Daily Chart
This option plots a table, that shows how often the High/Low of the Week has been made on certain Days of the Week. It is possible, to only filter bullish/bearish weeks, to have more precise values.
Daily High/Low - use this on Hourly Chart
This options plots a table, that shows how often High/Low of the Day has been made on certain Hours of the Day. It is possible, to only filter bullish/bearish days, to have more precise values.
How do I use it?
Let's say you have created a daily bias. You are expecting spx500 to have a bullish day. Now you can filter bullish days in your indicator settings and then you get data, on which time of the day you have the highest chance to see the high/low of the day being created, same goes for weekly bias.
Market Session TimesThis indicator is released by the Trade Travel Chill community and uses the Trade by Design Method. It has the following features:
Pre-defined alerts
Moon Cycles
Asian, UK and US Market open times visual indicators
Trading day visual separator
All these features are highly customisable and configurable.
Time of Day and Day of Week Buying and Selling StrategyThis strategy allows you to back test longing or shorting or do nothing during time increments of 30 minutes for various days of the week. For example if you want to see if every Saturday if Bitcoin dropped in value from 1600-7000 UTC, this script will allow you to test that.
Make sure you are in the 30 minute time frame while viewing the performance and trade history.
How To Set Backtest Time Ranges
Example how to set the time range window to be backtested for both entries and exits. Additional examples are also included showing how to set the date range and toggle plot visibility.
By incorporating this code with your own strategy's logic, it will allow you to backtest various time windows.
Much gratitude to @LucF and @a.tesla2018 for help with including ':1234567' for time ranges on weekends. Thank you both!
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!