STEPN CONVERSION OPTIMIZERThis is a very simple indicator that anyone can use but it is especially geared towards STEPN users who often have to switch between different tokens (GST, GMT, SOL, BNB).
The idea of the indicator is that at a glance you can know if it is a good time or not to make a conversion. What the indicator does is divide the value of the token that we have by the one that we want to change in each bar and with this data a graph is created with which you know how much you are going to receive for each token and how much you would have received at any other time.
It is completely configurable for any conversion between STEPN tokens, you can also include two dotted lines that indicate when the maximum and minimum conversion rate has been reached, which makes it very easy to know where you are.
The data collection is independent of the graph on screen so it's great to have it on screen waiting for the ideal moment for the change while you do other things.
The timeframe is also configurable in case you are not very interested in precision, by default the data is taken from the 5-minute chart.
I created this indicator for myself but seeing how useful it is to me and that not only am I not losing money like before but I am even earning money with conversions, I have decided to share it.
Feedback would be appreciated and if you like it and find it as useful as it does for me, show some love.
GMT
GMT Offset, without using security fn - showcaseThis script is a demo of how one can avoid the use of the request.security function and get values for a number of previous day's open/high/low/close
where the user can define a custom "start of the day" using the GMT input. This allows the user to be independent of the exchange timezone
that the security function uses internally.
Implications of this include:
Suppose you want to treat the start of your day as the NZX market open which is at 2000 UTC+0 and base you indicator calculations
on the NZK market midnight as opposed to the chart exchange timezone.
The indicator purpose is to showcase how that can be achieved in code.
If security function in the future is modified to accept a timezone parameter - obviously this code will no longer be needed as such.
We do two things here:
We plot the values for open high low close using the calc_ohlc_daysback as circles
Then we use the f_security function to get the same values but using security and plot them using solid lines
We do this both on the daily and weekly values.
What we expect to see is the lines matching thus proving that the calc_ohlc_daysback works correctly as compared to security function.
Note - the chart gmt default value is set to 0 which means the comparison will work correctly out of the box on exchanges that have weekend data.
The script is designed to work on intraday timeframes highest being 4 hour and lowest being 3 min
(programmatically the script is no bounded as sich to the intraday timeframe however if not enough data is present at a particular timeframe
values needed to display the lines will be null and hence the lines will not print.)
You can get the same results on other exchanges but might need to change the value of chart gmt
Script does not work on exchanges that have gaps on the weekend at this time
Now all of this can obviously be done with the security function - why go through the trouble? Well with security function you are bound to
the timezone of the exchange you are on. Doing it this way you are no longer bound by the exchange timezone and you can effectively change
the time at which the day starts independent of any exchange. Go ahead - change the GMT offset in settings
Future enhancements:
a) Deal with exchanges where "bar merge" is required - if possible (detect that an exchange does not have weekend data basically)
b) Deal with lower timeframes if possible (on the minute timeframe there is usually not enough data in the series to calc values several weeks back)
c) Make a library for this functionality - this will be optimal so one does not need to copy paste code.
d) Expand library to add GMT auto adjust (specifically around DST in different countries). Today this is a challenge as no relizble way exists to
extract the UTC offset from an syminfo.timezone given that syminfo.timezone returns text such as "America/New York"
For example - one might have 3 session thst they want to work with. Tokio, London and New York. Tokio does not follow DST so the market session starts at the same time all year round. London observes DST but at a different time from New York. So in order to have all this in the same chart and have it auto adjust is a bit of a challenge. With the DST offset functions - this is possible to do. (
Well, that is unless the awesome TV devs push out v6 where that is build in the security function (for it to accept a timezone offset other) in which case the code here will become useless.
Foot notes:
This script is inspired by Traders Reality indicator by @infernixx (developed by @plasmapug with additional modifications by @infernixx and @Peshocore)
Special thanks to @JayRogers for INSECURITY() which inspired the development of calc_ohlc_daysback
Traders Reality Psy Levels/Daily Open GMT AwareTraders 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)
How To Calculate Symbol's UTC NumberVarious methods to calculate a symbol's timezone offset as a numerical value in hours and decimal minutes. This value may be useful to script authors in certain situations where timezone information needs to be available in a numerical format while using intraday charts. Special thanks to @LucF and TradingView Support for their efficiency advisements!
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!
{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)
ICT - Time Theory (Kill Zones & Midnight NY & GMT)This script helps you to mark the following automatically instead of doing it every day:
Midnight GMT;
Midnight NY;
Asia Session;
London Open Kill Zone;
New York Open Kill Zone;
London Close Kill Zone;
This helps if you trade intra-day with this ICT concepts.
It draws a horizontal lines instead of painting the background. (There is a limitation of around 50 vertical lines per script)
ICT - Midnight (NY & GMT)This script helps you to mark midnight GMT & NY time automatically instead of doing it every day.
This helps if you trade intra-day using ICT concepts that refer to this times.
It draws a vertical line instead of painting the background. (There is a limitation of around 50 vertical lines per script)