TradingView
Peshocore
1 nov. 2021 14:49

Traders Reality Psy Levels/Daily Open GMT Aware 

Bitcoin / TetherUS PERPETUAL CONTRACTBinance

Description

Traders Reality Psy Levels/Daily Open GMT Aware
This indicator serves as the Tradingview equivalent of an MT4 indicator suite (Psy Levels and Daily Open)

Functionality:
In general we define Asia session to start with the Sydney exchange open.
For all intends and purposes for this indicator Asia session is defined as the open of the NZX market and close of the ASX market according to the 24 hour market clock.
The Daily Open is defined as the open of the Asia session.
The Psychological High and Low are defined as the first high and first low the Asian session starting at Saturday night and going into Sunday morning.
These are 2 key confluences that can be used in various strategies. These are in some sense similar to pivot points.

The script is GMT ( UTC ) offset aware meaning you can adjust the start of the day to any point within the allowed GMT offsets (-12 to 14)
For example if your exchange timezone is UTC+0 then the start of the Asia session starts at 2000 (UTC+0) and ends at 0400 (UTC+0) when Sydney if not in DST
You will set the offset to 4. When Sydney is in DST you will set the offset to 3
Naturally since the offset allows the entire range of GMT offsets to be used you do not need to choose the Asia market as the start of the day.
The default setting is set to 4 as of Nov 1st 2021
The GMT offset puts the calculation in the correct place regardless of exchange timezone so you do not need to adjust any settings
when working with exchanges not on UTC+0
Psy levels works only on exchanges that are open on the weekends that provide with 24x7 data.
The GMT offset puts the calculation in the correct place regardless of exchange timezone.

Features:
1) Plot the current Daily Open for timeframes between 4 hour and 1 min.
2) Plot the current weekly Psychological High and Low for timeframes between 4 hour and 1 min.
3) Configurable GMT offset, default set to Sydney open (as defined above)
4) Toggle to show historical Daily Open values (line)
5) Toggle to show historical Psychological High and Low values (line)
6) Turn labels on and off
7) Change line/label colors


Foot notes:
Use at your own risk and your own responsibility. No guarantees are provided and no responsibility is assumed by the developers of this script.
Original @plasmapug, additional edits (with permission) by @infernixx and @Peshocore
INSECURITY() from @JayRogers (enhanced for gmt offset)

Notes de version

Fixed for default Sydney open.
Sydney is in the southern hemisphere and DST kicks in the opposite of when DST kicks in the northern hemisphere.

Notes de version

correcting the showcase

Notes de version

updated Daily open color and changed label so as to distinguish from the other indicator

Notes de version

limited timeframes to 1h/30min/15min/5min/3min/1min. This is because other timeframes the start of the day may fall on times where no candles exist. hence the Psy High/Low can only be displayed on these timeframes 1h/30min/15min/5min/3min/1min

Notes de version

renaming indicator name
Commentaires
HumbletradesFX
Mad Love brother, thanks for the incredible work
Peshocore
mad love to you too brother - thank you so much
Peshocore
General announcement - this indicator will be removed in the near future as the code is no longer maintained here. Thank you for your understanding
Peshocore
Hey guys - given that the features in this indicator are now available in the main traders reality indicator - I am thinking of retiring this script, meaning I will not be making more updates to it. Let me know what you think. Since a lot of people have liked it - i will not necessarily delete it any time soon - just putting it in archive more sort to speak.
CricketBee
IS there a way to edit this (and make a local copy) so that it crates PSY levels for FuTURES (which open on sunday night) or Stocks which open monday morning? THANKS for a great indicator
Peshocore
@CricketBee, yeah feel free to copy the code - its under public license mozilla v2.0 license as stated. with that said - the psy levels cals are based on sydney open on sat night so if you play around with the in_session = time('240', '0000-0800:1', gmtoffsetPsy) where 1 represents Sunday you can shift it around to other days. you dont necessarily need the dlyoffset part as that is specific to traders reality. likely you will want to get rid of the gmt stuff that if you want to work on exchanges that are not 24/7
Peshocore
guys technically you dont need this indicator anymore as the psy hi/low are now included in the latest version of the Traders Reality indicator. Granted in the Traders Reality indicator you dont get the option to do historical values as that indicator is already full to the brim. Either way I will keep this one around just in case someone wants to look at the historical psy hi/low values
DC6-Forever
Yo yo yo, mad love and respect brother for doing this. Peace.
Peshocore
@DC6-Forever, my pleasure brother - mad love
DroWheels_Vic
♥️
Plus