Sessions Full Markets [TradingFinder] Forex Stocks Index 7 Time🔵 Introduction
In global financial markets, particularly in FOREX and stocks, precise timing of trading sessions plays a crucial role in the success of traders. Each trading session—Asian, European, and American—has its own unique characteristics in terms of volatility and trading volume.
The Asian session (Tokyo), Sydney session, Shanghai session, European session (London and Frankfurt), and American session (New York AM and New York PM) are examples of these trading sessions, each of which opens and closes at specific times.
This session indicator also includes a Time Convertor, enabling users to view FOREX market hours based on GMT, UTC, EST, and local time. Another valuable feature of this indicator is the automatic detection of Daylight Saving Time (DST), which automatically applies time changes for the New York, London, and Sydney sessions.
🔵 How to Use
The indicator also displays session times based on the exact opening and closing times for each geographic region. Users can utilize this indicator to view trading hours either locally or in UTC time, and if needed, set their own custom trading times.
Additionally, the session information table includes the start and end times of each session and whether they are open or closed. This functionality helps traders make better trading decisions by using accurate and precise time data.
Key Features of the Session Indicator
The session indicator is a versatile and advanced tool that provides several unique features for traders.
Some of these features are :
• Automatic Daylight Saving Time (DST) Detection : This indicator dynamically detects Daylight Saving Time (DST) changes for various trading sessions, including New York, London, and Sydney, without requiring manual adjustments. This feature allows traders to manage their trades without worrying about time changes.
Below are the start and end dates for DST in the New York, London, and Sydney trading sessions :
1. New York :
Start of DST: Second Sunday of March, at 2:00 AM.
End of DST: First Sunday of November, at 2:00 AM
2. London :
Start of DST: Last Sunday of March, at 1:00 AM.
End of DST: Last Sunday of October, at 2:00 AM.
3. Sydney :
Start of DST: First Sunday of October, at 2:00 AM.
End of DST: First Sunday of April, at 3:00 AM.
• Session Display Based on Different Time Zones : The session indicator allows users to view trading times based on different time zones, such as UTC, the local time of each market, or the user’s local time. This feature is especially useful for traders operating in diverse geographic regions.
• Custom Trading Time Setup : Another notable feature of this indicator is the ability to set custom trading times. Traders can adjust their own trading times according to their personal strategies and benefit from this flexibility.
• Session Information Table : The session indicator provides a complete information table that includes the exact start and end times of each trading session and whether they are open or closed. This table helps users simultaneously and accurately monitor the status of all trading sessions and make better trading decisions.
🟣 Session Trading Hours Based on Market Mode and Time Zones
The session indicator provides precise information on the start and end times of trading sessions.
These times are adjusted based on different market modes (FOREX, stocks, and TFlab suggestions) and time zones (UTC and local time) :
🟣 (FOREX Session Time) Forex Market Mode
• Sessions in UTC (DST inactive) :
Sydney: 22:00 - 06:00
Tokyo: 23:00 - 07:00
Shanghai: 01:00 - 09:00
Asia: 22:00 - 07:00
Europe: 07:00 - 16:00
London: 08:00 - 16:00
New York: 13:00 - 21:00
• Sessions in UTC (DST active) :
Sydney: 21:00 - 05:00
Tokyo: 23:00 - 07:00
Shanghai: 01:00 - 09:00
Asia: 21:00 - 07:00
Europe: 06:00 - 15:00
London: 07:00 - 15:00
New York: 12:00 - 20:00
• Sessions in Local Time :
Sydney: 08:00 - 16:00
Tokyo: 08:00 - 16:00
Shanghai: 09:00 - 17:00
Asia: 22:00 - 07:00
Europe: 07:00 - 16:00
London: 08:00 - 16:00
New York: 08:00 - 16:00
🟣 Stock Market Trading Hours (Stock Market Mode)
• Sessions in UTC (DST inactive) :
Sydney: 00:00 - 06:00
Asia: 00:00 - 06:00
Europe: 07:00 - 16:30
London: 08:00 - 16:30
New York: 14:30 - 21:00
Tokyo: 00:00 - 06:00
Shanghai: 01:30 - 07:00
• Sessions in UTC (DST active) :
Sydney: 23:00 - 05:00
Asia: 23:00 - 06:00
Europe: 06:00 - 15:30
London: 07:00 - 15:30
New York: 13:30 - 20:00
Tokyo: 00:00 - 06:00
Shanghai: 01:30 - 07:00
• Sessions in Local Time:
Sydney: 10:00 - 16:00
Tokyo: 09:00 - 15:00
Shanghai: 09:30 - 15:00
Asia: 00:00 - 06:00
Europe: 07:00 - 16:30
London: 08:00 - 16:30
New York: 09:30 - 16:00
🟣 TFlab Suggestion Mode
• Sessions in UTC (DST inactive) :
Sydney: 23:00 - 05:00
Tokyo: 00:00 - 06:00
Shanghai: 01:00 - 09:00
Asia: 23:00 - 06:00
Europe: 07:00 - 16:00
London: 08:00 - 16:00
New York: 13:00 - 21:00
• Sessions in UTC (DST active) :
Sydney: 22:00 - 04:00
Tokyo: 00:00 - 06:00
Shanghai: 01:00 - 09:00
Asia: 22:00 - 06:00
Europe: 06:00 - 15:00
London: 07:00 - 15:00
New York: 12:00 - 20:00
• Sessions in Local Time :
Sydney: 09:00 - 16:00
Tokyo: 09:00 - 15:00
Shanghai: 09:00 - 17:00
Asia: 23:00 - 06:00
Europe: 07:00 - 16:00
London: 08:00 - 16:00
New York: 08:00 - 16:00
🔵 Setting
Using the session indicator is straightforward and practical. Users can add this indicator to their trading chart and take advantage of its features.
The usage steps are as follows :
Selecting Market Mode : The user can choose one of the three main modes.
Forex Market Mode: Displays the forex market trading hours.
oStock Market Mode: Displays the trading hours of stock exchanges.
Custom Mode: Allows the user to set trading hours based on their needs.
TFlab Suggestion Mode: Displays the higher volume hours of the forex market in Asia.
Setting the Time Zone : The indicator allows displaying sessions based on various time zones. The user can select one of the following options:
UTC (Coordinated Universal Time)
Local Time of the Session
User’s Local Time
Displaying Comprehensive Session Information : The session information table includes the opening and closing times of each session and whether they are open or closed. This table helps users monitor all sessions at a glance and precisely set the best time for entering and exiting trades.
🔵Conclusion
The session indicator is a highly efficient and essential tool for active traders in the FOREX and stock markets. With its unique features, such as automatic DST detection and the ability to display sessions based on different time zones, the session indicator helps traders to precisely and efficiently adjust their trading activities.
This indicator not only shows users the exact opening and closing times of sessions, but by providing a session status table, it helps traders identify the best times to enter and exit trades. Moreover, the ability to set custom trading times allows traders to easily personalize their trading schedules according to their strategies.
In conclusion, using the session indicator ensures that traders are continuously and accurately informed of time changes and the opening and closing hours of markets, eliminating the need for manual updates to align with DST changes. These features enable traders to optimize their trading strategies with greater confidence and up-to-date information, allowing them to capitalize on opportunities in the market.
Marketsessions
10x Bull Vs. Bear VP Intraday Sessions [Kioseff Trading]Hello!
This script "10x Bull Vs. Bear VP Intraday Sessions" lets the user configure up to 10 session ranges for Bull Vs. Bear volume profiles!
Features
Up To 10 Fixed Ranges!
Volume Profile Anchored to Fixed Range
Delta Ladder Anchored to Range
Bull vs Bear Profiles!
Standard Poc and Value Area Lines, in Addition to Separated POCs and Value Area Lines for Bull Profiles and Bear Profiles
Configurable Value Area Target
Up to 2000 Profile Rows per Visible Range
Stylistic Options for Profiles
This script generates Bull vs. Bear volume profiles for up to 10 fixed ranges!
Up to 2000 volume profile levels (price levels) Can be calculated for each profile, thanks to the new polyline feature, allowing for less aggregation / more precision of volume at price and volume delta.
Bull vs Bear Profiles
The image above shows primary functionality!
Green profiles = buying volume
Red profiles = selling volume
All colors are configurable.
Bullish & bearish POC + value areas for each fixed range are displayable!
That’s about it :D
This indicator is part of a series titled “Bull vs. Bear”.
If you have any suggestions please feel free to share!
Market Sessions and TPO (+Forecast)This indicator "Market Sessions and TPO (+Forecast)" shows various market sessions alongside a TPO profile (presented as the traditional lettering system or as bars) and price forecast for the duration of the session.
Additionally, numerous statistics for the session are shown.
Features
Session open and close times presented in boxes
Session pre market and post market shown
TPO profile generated for each session (normal market hours only)
A forecast for the remained of the session is projected forward
Forecast can be augmented by ATR
Naked POCs remain on the chart until violated
Volume delta for the session shown
OI Change for the session shown (Binance sourced)
Total volume for the session shown
Price range for the session shown
The image above shows processes of the indicator.
Volume delta, OI change, total volume and session range are calculated and presented for each session.
Additionally, a TPO profile for the most recent session is shown, and a forecast for the remainder of the active session is shown.
The image above shows an alternative display method for the session forecast and TPO profile!
Additionally, the pre-market and post-market times are denoted by dashed boxes.
The image above exemplifies additional capabilities.
That's all for now; further updates to come and thank you for checking this out!
And a special thank you to @TradingView of course, for making all of this possible!
market sessions by sellstreetIndicator of trading sessions:
Indicator created to track the opening of trading sessions:
Asia, Frankfurt, London, New York.
Tracking the opening of these key levels
- Day Opening (DO), Week Opening (WO), Month Opening (MO).
- New York (NYM) openings display.
- Highs and lows of the previous day (PDH/PDL).
- Day of the week display.
- Formation of the Сentral Bank Dealers Range (CBDR).
Indicator settings.
The open source code will help traders to understand the technical part of the script.
Flexible visual and technical setup of the indicator:
- Ability to enable/disable the display of trading sessions on the history.
- Enabling/disabling the display of the key opening levels on the chart history for a convenient backtest.
- Automatically switch to summer/winter time.
To use this indicator, add it to your favorites after the chart
TradingView must be overloaded to work correctly.
FVG Sessions [LuxAlgo]The FVG Sessions indicator highlights the first fair value gap of the trading session as well as the session range. Detected fair value gaps extend to the end of the trading session.
Alerts are included on the formation of a session fair value gap, price being within a session fair value gap, mitigations, and price crossing session fair value gaps average.
🔶 USAGE
Trader ICT states that the first fair value gap of the trading session can attract the most significant reaction. Having only one FVG per session allows users to further focus on that precise imbalance as well as external elements.
The mitigation of a fair value gap is clearly indicated on the chart with a more transparent color allowing users to see inverse FVGs.
Extending the fair value gaps allows the imbalance area to provide potential support and resistance.
Do note that this script should be used on intraday charts.
🔶 ALERTS
The script includes the following alerts:
🔹 Bullish/Bearish FVG
Alerts on the formation of the first bullish or bearish FVG of the session.
🔹 Bullish/Bearish FVG Mitigation
Alerts when the first bullish or bearish FVG of the session is mitigated.
🔹 Price Within FVG
Alerts when price is within the first bullish or bearish FVG area of the session.
🔹 Price Cross FVG Average
Alerts when price cross the average level of the first bullish or bearish FVG of the session.
Market Sessions - By LeviathanA simple indicator to help you keep track of 4 market sessions (default: Tokyo, London, New York, Sydney) in 4 different visual forms (boxes, timeline, zones, colored candles) with many other useful tools.
You can choose between 4 different market sessions. The default ones are Tokyo, London, New York and Sydney but you can easily customize the times, names and colors to make the script plot any session you need. Sessions can be viewed in 4 different ways: boxes, zones, timelines, or just colored candles, all with customizable appearances. You can make your chart cleaner by merging sessions overlaps, choosing a custom lookback period and also picking between various additional settings such as viewing session High/Low or Open/Close change in % or pips, hiding weekends, viewing the Open/Close Line to identify session’s direction and 0.5 level to see session’s “Equilibrium” and much more. More updates with interesting tools will be added in the future.
Note: The script will plot the correct default Tokyo, London, New York and Sydney sessions automatically, your chart/Tradingview app timezone does not matter! If you wish to tweak the open/close times of sessions, just make sure you input them in UTC (but even this can be changed later in the settings)
Settings Overview
SESSIONS
- You can show/hide Tokyo Session, rename it, change the color and set up start/end time.
- You can show/hide London Session, rename it, change the color and set up start/end time.
- You can show/hide New York Session, rename it, change the color and set up start/end time.
- You can show/hide Sydney Session, rename it, change the color and set up start/end time.
* Keep in mind that you can fully change and customize these sessions and therefore create any other sessions or a zone you wish to display.
ADDITIONAL TOOLS AND SETTINGS
1. “Change (Pips)” - this will add the pip distance between Session High and Session Low or the pip distance between Session Open and Session Close to the session label.
2. “Change (%)” - this will add the percentage distance between Session High and Session Low or the percentage distance between Session Open and Session Close to the session label.
3. “Merge Overlaps” - this will merge the overlapping sessions and show only one at a time (end of Tokyo is moved to start of London, the end of London is moved to the start of New York, end of New York is moved to start of Sydney and end of Sydney is moved to start of Tokyo).
4. “Hide Weekends” - this will prevent the script from plotting sessions over the weekend when the markets are closed.
5. “Open/Close Line” - this will draw a line from the session open to the session close (or current price, if session is ongoing).
6. “Session 0.5 Level” - this will draw a horizontal line halfway between the session’s high and the session’s low.
7. “Color Candles” - this will color the bars/candlesticks with the color of the session in which they occurred.
8. Display Type” - Choose between three different ways of session visualization (Boxes, Zones and Candles).
9. “Lookback (Days)” - this input tells the script to only draw sessions for X days back (1 = one day).
10. “Change (%/Pips) Source) - this is where you choose the source of “Change (Pips)” and ”Change (%) ” labels. Picking “Session High/Low” will show you the change between Session High and Session Low and picking “Session Open/Close” will show you the change between Session Open and Session Close.
11. “Input Timezone” - this defines the timezone of the session start/end inputs (you don’t have to change this unless you know what you’re doing)
Make sure to read future update logs to keep track of the most recent additions and settings of this script.
Box generation code inspired by Jos(TradingCode), session box visuals inspired by @boitoki's FX Market Sessions
DR/IDR Candles [LuxAlgo]This indicator displays defining ranges (DR) and implied defining ranges (IDR) constructed from two user set sessions (RDR/ODR) as graphical candles on the chart. The script introduces additional graphical elements to the original DR/IDR concept and as such can be thought as a graphical method in addition to a technical indicator.
Additionally, this script can display various Fibonacci retracements from the constructed DR/IDR if enabled within the settings.
Settings
Regular Session: Enable/disable regular session's DR/IDR alongside setting the session time. By default, 09:30 - 10:30 am.
Overnight Session: Enable/disable overnight session's DR/IDR alongside setting the session time. By default, 03:00 - 04:00 am.
UTC Offset: UTC offset for the time zone, by default -5 (EST)
Retracements
Reverse: Inverts source range upper/lower value for constructing the retracements.
From: Source range used to construct the retracements, by default DR is used.
By default, the 0.5 retracement (average line) is displayed.
Usage
The used sessions are highlighted by a gray background. DRs are highlighted by dashed lines while IDRs are highlighted by solid ones. The maximum/minimum price between each user set session is highlighted by solid wicks.
The color of the DRs/IDRs/wicks are determined by the price position relative to the DR; if price is above the DR maximum, then a blue color is used. If price is below, then an orange color is used, and if price is within the DR range, then a gray color is used.
Additionally, the area of the DR range is used to highlight the number of time price is located within the DR, with a longer background highlighting a higher number of occurrences. This can help highlight if the DR levels were potentially useful as support/resistance.
When price is outside the IDR range, the area between the price and IDR is highlighted, in blue if price is above the IDR, and orange if it is under.
The original author of the DR/IDR concept describes 3 rules using the price position relative to the DR/IDR levels:
1.) If price on the 5-minute timeframe closes above the DR high after 10:30 AM or 04:00 AM then the DR low will likely be the low of the trading session.
2.) If price on the 5-minute timeframe closes below the DR low after 10:30 AM or 04:00 AM then the DR high will likely be the high of the trading session.
3.) If price closes above the IDR high after 10:30 AM or 04:00 AM it is an early indication that the low of the DR will be the low of the day and vice versa.
We can see that the above rules are cases of conditional probabilities.
There is no significant data supporting or regarding any statistical probability of the above rules to be true, which are more than uncertain given the stochastic nature of prices. The lack of precision of these rules is also a concern (time zone dependance, applicable markets, etc...).
Credits
Credits to trader TheMas7er who originally created the DR/IDR concept in November of 2022. This script was derived from his proposed session times & rules for trading.
Market Trading Sessions (TG Fork)Visualize trading sessions opening hours of several international exchanges on a grid. Contrary to other indicators, this one automatically aligns the session with the current chart's timezone.
This is helpful for bar replay or manual backtesting, to spot patterns of correlations (this can also be used in conjunction with correlation indicators, see my other indicators).
Original indicator by Gunzo, if you like this indicator, please show the original author some love:
This indicator is also inspired by the following indicators:
ZenAndTheArtOfTrading with
UnknownUnicorn468659 with
This fork implements the following features:
Converted to PineScript v5.
Adapted default color palette to dark mode, as is the default in TradingView now.
Fix drawing issues, now the design shows as it was originally meant to be.
Fixed mistiming issue that made some sessions display with a delay compared to the real session, especially the first session was bar at the start of the session was not displayed.
Inputted the accurate timings for each session, instead of the default 0800-1600 in the original indicator.
Essentially, you can just add this indicator and it should work out of the box. If not, please let me know, and I'll try to fix it!
Traders_Reality_LibLibrary "Traders_Reality_Lib"
This library contains common elements used in Traders Reality scripts
calcPvsra(pvsraVolume, pvsraHigh, pvsraLow, pvsraClose, pvsraOpen, redVectorColor, greenVectorColor, violetVectorColor, blueVectorColor, darkGreyCandleColor, lightGrayCandleColor)
calculate the pvsra candle color and return the color as well as an alert if a vector candle has apperared.
Situation "Climax"
Bars with volume >= 200% of the average volume of the 10 previous chart TFs, or bars
where the product of candle spread x candle volume is >= the highest for the 10 previous
chart time TFs.
Default Colors: Bull bars are green and bear bars are red.
Situation "Volume Rising Above Average"
Bars with volume >= 150% of the average volume of the 10 previous chart TFs.
Default Colors: Bull bars are blue and bear are violet.
Parameters:
pvsraVolume : the instrument volume series (obtained from request.sequrity)
pvsraHigh : the instrument high series (obtained from request.sequrity)
pvsraLow : the instrument low series (obtained from request.sequrity)
pvsraClose : the instrument close series (obtained from request.sequrity)
pvsraOpen : the instrument open series (obtained from request.sequrity)
redVectorColor : red vector candle color
greenVectorColor : green vector candle color
violetVectorColor : violet/pink vector candle color
blueVectorColor : blue vector candle color
darkGreyCandleColor : regular volume candle down candle color - not a vector
lightGrayCandleColor : regular volume candle up candle color - not a vector
@return
adr(length, barsBack)
Parameters:
length : how many elements of the series to calculate on
barsBack : starting possition for the length calculation - current bar or some other value eg last bar
@return adr the adr for the specified lenght
adrHigh(adr, fromDo)
Calculate the ADR high given an ADR
Parameters:
adr : the adr
fromDo : boolean flag, if false calculate traditional adr from high low of today, if true calcualte from exchange midnight
@return adrHigh the position of the adr high in price
adrLow(adr, fromDo)
Parameters:
adr : the adr
fromDo : boolean flag, if false calculate traditional adr from high low of today, if true calcualte from exchange midnight
@return adrLow the position of the adr low in price
splitSessionString(sessXTime)
given a session in the format 0000-0100:23456 split out the hours and minutes
Parameters:
sessXTime : the session time string usually in the format 0000-0100:23456
@return
calcSessionStartEnd(sessXTime, gmt)
calculate the start and end timestamps of the session
Parameters:
sessXTime : the session time string usually in the format 0000-0100:23456
gmt : the gmt offset string usually in the format GMT+1 or GMT+2 etc
@return
drawOpenRange(sessXTime, sessXcol, showOrX, gmt)
draw open range for a session
Parameters:
sessXTime : session string in the format 0000-0100:23456
sessXcol : the color to be used for the opening range box shading
showOrX : boolean flag to toggle displaying the opening range
gmt : the gmt offset string usually in the format GMT+1 or GMT+2 etc
@return void
drawSessionHiLo(sessXTime, show_rectangleX, show_labelX, sessXcolLabel, sessXLabel, gmt, sessionLineStyle)
Parameters:
sessXTime : session string in the format 0000-0100:23456
show_rectangleX : show the session high and low lines
show_labelX : show the session label
sessXcolLabel : the color to be used for the hi/low lines and label
sessXLabel : the session label text
gmt : the gmt offset string usually in the format GMT+1 or GMT+2 etc
sessionLineStyle : the line stile for the session high low lines
@return void
calcDst()
calculate market session dst on/off flags
@return indicating if DST is on or off for a particular region
timestampPreviousDayOfWeek(previousDayOfWeek, hourOfDay, gmtOffset, oneWeekMillis)
Timestamp any of the 6 previous days in the week (such as last Wednesday at 21 hours GMT)
Parameters:
previousDayOfWeek : Monday or Satruday
hourOfDay : the hour of the day when psy calc is to start
gmtOffset : the gmt offset string usually in the format GMT+1 or GMT+2 etc
oneWeekMillis : the amount if time for a week in milliseconds
@return the timestamp of the psy level calculation start time
getdayOpen()
get the daily open - basically exchange midnight
@return the daily open value which is float price
newBar(res)
new_bar: check if we're on a new bar within the session in a given resolution
Parameters:
res : the desired resolution
@return true/false is a new bar for the session has started
toPips(val)
to_pips Convert value to pips
Parameters:
val : the value to convert to pips
@return the value in pips
rLabel(ry, rtext, rstyle, rcolor, valid, labelXOffset)
a function that draws a right aligned lable for a series during the current bar
Parameters:
ry : series float the y coordinate of the lable
rtext : the text of the label
rstyle : the style for the lable
rcolor : the color for the label
valid : a boolean flag that allows for turning on or off a lable
labelXOffset : how much to offset the label from the current position
rLabelOffset(ry, rtext, rstyle, rcolor, valid, labelXOffset)
a function that draws a right aligned lable for a series during the current bar
Parameters:
ry : series float the y coordinate of the lable
rtext : the text of the label
rstyle : the style for the lable
rcolor : the color for the label
valid : a boolean flag that allows for turning on or off a lable
labelXOffset : how much to offset the label from the current position
rLabelLastBar(ry, rtext, rstyle, rcolor, valid, labelXOffset)
a function that draws a right aligned lable for a series only on the last bar
Parameters:
ry : series float the y coordinate of the lable
rtext : the text of the label
rstyle : the style for the lable
rcolor : the color for the label
valid : a boolean flag that allows for turning on or off a lable
labelXOffset : how much to offset the label from the current position
drawLine(xSeries, res, tag, xColor, xStyle, xWidth, xExtend, isLabelValid, labelXOffset, validTimeFrame)
a function that draws a line and a label for a series
Parameters:
xSeries : series float the y coordinate of the line/label
res : the desired resolution controlling when a new line will start
tag : the text for the lable
xColor : the color for the label
xStyle : the style for the line
xWidth : the width of the line
xExtend : extend the line
isLabelValid : a boolean flag that allows for turning on or off a label
labelXOffset : how much to offset the label from the current position
validTimeFrame : a boolean flag that allows for turning on or off a line drawn
drawLineDO(xSeries, res, tag, xColor, xStyle, xWidth, xExtend, isLabelValid, labelXOffset, validTimeFrame)
a function that draws a line and a label for the daily open series
Parameters:
xSeries : series float the y coordinate of the line/label
res : the desired resolution controlling when a new line will start
tag : the text for the lable
xColor : the color for the label
xStyle : the style for the line
xWidth : the width of the line
xExtend : extend the line
isLabelValid : a boolean flag that allows for turning on or off a label
labelXOffset : how much to offset the label from the current position
validTimeFrame : a boolean flag that allows for turning on or off a line drawn
drawPivot(pivotLevel, res, tag, pivotColor, pivotLabelColor, pivotStyle, pivotWidth, pivotExtend, isLabelValid, validTimeFrame, levelStart, pivotLabelXOffset)
draw a pivot line - the line starts one day into the past
Parameters:
pivotLevel : series of the pivot point
res : the desired resolution
tag : the text to appear
pivotColor : the color of the line
pivotLabelColor : the color of the label
pivotStyle : the line style
pivotWidth : the line width
pivotExtend : extend the line
isLabelValid : boolean param allows to turn label on and off
validTimeFrame : only draw the line and label at a valid timeframe
levelStart : basically when to start drawing the levels
pivotLabelXOffset : how much to offset the label from its current postion
@return the pivot line series
getPvsraFlagByColor(pvsraColor, redVectorColor, greenVectorColor, violetVectorColor, blueVectorColor, lightGrayCandleColor)
convert the pvsra color to an internal code
Parameters:
pvsraColor : the calculated pvsra color
redVectorColor : the user defined red vector color
greenVectorColor : the user defined green vector color
violetVectorColor : the user defined violet vector color
blueVectorColor : the user defined blue vector color
lightGrayCandleColor : the user defined regular up candle color
@return pvsra internal code
updateZones(pvsra, direction, boxArr, maxlevels, pvsraHigh, pvsraLow, pvsraOpen, pvsraClose, transperancy, zoneupdatetype, zonecolor, zonetype, borderwidth, coloroverride, redVectorColor, greenVectorColor, violetVectorColor, blueVectorColor, lightGrayCandleColor)
a function that draws the unrecovered vector candle zones
Parameters:
pvsra : internal code
direction : above or below the current pa
boxArr : the array containing the boxes that need to be updated
maxlevels : the maximum number of boxes to draw
pvsraHigh : the pvsra high value series
pvsraLow : the pvsra low value series
pvsraOpen : the pvsra open value series
pvsraClose : the pvsra close value series
transperancy : the transparencfy of the vecor candle zones
zoneupdatetype : the zone update type
zonecolor : the zone color if overriden
zonetype : the zone type
borderwidth : the width of the border
coloroverride : if the color overriden
redVectorColor : the user defined red vector color
greenVectorColor : the user defined green vector color
violetVectorColor : the user defined violet vector color
blueVectorColor : the user defined blue vector color
lightGrayCandleColor : the user defined regular up candle color
cleanarr(arr)
clean an array from na values
Parameters:
arr : the array to clean
@return if the array was cleaned
calcPsyLevels(oneWeekMillis, showPsylevels, psyType, sydDST)
calculate the psy levels
4 hour res based on how mt4 does it
mt4 code
int Li_4 = iBarShift(NULL, PERIOD_H4, iTime(NULL, PERIOD_W1, Li_0)) - 2 - Offset;
ObjectCreate("PsychHi", OBJ_TREND, 0, Time , iHigh(NULL, PERIOD_H4, iHighest(NULL, PERIOD_H4, MODE_HIGH, 2, Li_4)), iTime(NULL, PERIOD_W1, 0), iHigh(NULL, PERIOD_H4,
iHighest(NULL, PERIOD_H4, MODE_HIGH, 2, Li_4)));
so basically because the session is 8 hours and we are looking at a 4 hour resolution we only need to take the highest high an lowest low of 2 bars
we use the gmt offset to adjust the 0000-0800 session to Sydney open which is at 2100 during dst and at 2200 otherwize. (dst - spring foward, fall back)
keep in mind sydney is in the souther hemisphere so dst is oposite of when london and new york go into dst
Parameters:
oneWeekMillis : a constant value
showPsylevels : should psy levels be calculated
psyType : the type of Psylevels - crypto or forex
sydDST : is Sydney in DST
@return
Simple FX Market Hours█ OVERVIEW
A simple market session indicator that show you what market is in session according to the timezone you configured. It will draw a table with 4 cells matching 4 market Sydney, Tokyo, London and New York. Whenever market is in session the matching text will change colour.
█ WHAT MAKE THIS DIFFERENT
All other indicator on the market are either bar colouring, background colouring, or some sort of box drawing on the chart which is very messy and cluttered your chart. This indicator is as simple as it gets. The label are positions by default at the top right corner (you can change this in the config). It doesn’t draw anything on your chart so you can get right into your price action without anything blocking you.
Also, these type of indicator on the market are not auto converting the market session time to your your configured timezone, you will have to manually entered in the market session hours in your local time. This indicator does! Or perhaps I didn’t look hard enough. Either way I think there aren’t any indicator that are this simple.
█ HOW IT WORKS
I’m using table function (available to pinescript version 4 and above) to position the market labels and change colour of them according to if the market is in session or not.
For timezone, I have predefined all the market hours in all of the timezone from GMT-12 to GMT+12. When you select your timezone it will convert it to the symbol’s exchange timezone. Feel free to update the timezone if I had it incorrectly.
This script doesn’t take into account the DST because DST doesn’t starts or ends on a fixed date.
I also put in a check for symbol type using: syminfo.type == "forex”. So that it will only display if you are on forex pairs. You don’t need to hide it while you are looking at crypto or other assets. For convenience purposes.
█ NOTES
If you like the script be sure to press the like button it will help shows other people that this is useful. Thank you very much!
{Gunzo} Market Trading Sessions (Tokyo, London, New York)Market Trading Sessions is a tool designed to help traders to find the best times of the day for price action trading. It displays non-overlapping visuals for the major trading sessions : Oceania, Asia, Europe, and USA.
OVERVIEW :
This tool has been designed to match all the following requirements that I needed for optimal usage :
Display opening and closing of main markets
See clearly market sessions (non-overlapping colors)
Display Sydney session if wanted
Display GMT hours and days
Visually pleasing design and colors
Highly configurable
As I had trouble finding a script matching all these criteria, I created this tool and I'm sharing it with the TradingView community, hoping you will find it useful too.
SETTINGS :
Display market sessions on weekends : Display theoretical market sessions times on the weekend which can be useful for non forex markets.
Display session for Oceania\Sydney : Display "Oceania\Sydney" trading session
Display session for Asia\Tokyo : Display "Asia\Tokyo" trading session
Display session for Europe\London : Display "Europe\London" trading session
Display session for USA\New York : Display "USA\New York" trading session
Display session names : Display names of the session on the visual
Oceania color : Configurable color for the "Oceania\Sydney" sessions
Asia color : Configurable color for the "Asia\Tokyo" sessions
Europe color : Configurable color for the "Europe\London" sessions
USA color : Configurable color for the "USA\New York" sessions
Background color : Configurable color for the table background
Border color : Configurable color for the table borders
Text color : Configurable color for the table text
Header color : Configurable color for the table header (even days)
Header color (alternate) : Configurable color for the table header (odd days)
Simple Market Session by GavThis is a simple script to highlight market sessions.
It highlights Sydney, Tokyo, London, and New York sessions with transparent background colors.
You are able to change session times, color, and transparency.
SessionsBackground colors that show open-close of the major market sessions (London, New York, Sydney, Tokyo).
Written for (UTC-4).