kviateq

Kviateq - Session Pivots

First of all, I must say that this script wouldn't be possible without the help of one of the best script developers on TradingView - @ahancock (thanks a bunch for your help)

This script draws opening ranges for each of the sessions - Tokyo, London and New York and plots session high, low and pivot range of the previous session.
So if you trade London session - you would only take longs if we're above the Tokyo pivot range and vice versa for shorts.
Often times previous session's highs act as resistance and lows act as support, so careful trading around those levels.

It is obviously meant for lower timeframes, since each of the sessions only lasts a few hours.
Default settings are set to the exchange that I use and my timezone ( GMT +7), so you might need to adjust the settings accordingly.

Tokyo - 12am GMT
London - 7am GMT
New York - 12pm GMT
Release Notes: There was a bit of a confusion about the script and also I made a mistake but naming the pivots wrong.
This update should solve this.

Basically now when it says "London Pivot" - it's a pivot that appears during the London session, however it's drawn using values of the previous (Tokyo) session. Similarly - the New York pivot range displays during New York session, however it uses London's High, Low and Close to determine the range.

I hope this update solves the confusion that might have been caused by me not triple checking the code before publishing it.
Release Notes: New version of the script!

Upon reviewing the script I noticed how the pivot ranges were calculated using the time right before the opening of the new session, rather than previous session's time. It wasn't an issue if the current session began right when the previous session ended, however if there was a gap - it resulted in inaccurate pivot ranges.
That's already fixed.

I also color coded previous session's highest highs and lows and extended them using dotted lines.

I changed the opening range to one hour. For some reason the results are also better if you add 1 minute to session times (1601 instead of 1600).

Enjoy
Release Notes: Disregard adding one minute to the session times. The script does it now automatically
Release Notes: Fixed the session times. They're now set to GMT
Release Notes: Added a few new functions and clean up some things
Skript med en öppen källkod

I sann TradingView-anda har författaren till detta skript publicerat det som öppen källkod, så att handlare kan förstå och verifiera det. Skål för författaren! Du kan använda den gratis men återanvändning av den här koden i en publikation regleras av våra Ordningsregler. Du kan göra den till favorit för att använda den i ett diagram.

Vill du använda det här skriptet i ett diagram?

Kommentarer

Thank you, it's been very helpful! :)
200 coins
Svara
rPud rPud
Hello, I've had some great success with this indicator but have recently noticed that some of the session high/low data is off. Sometimes only by 4 pips or so, other times a lot more. This leads to an incorrect pivot point. With this in mind, may I ask please where it's grabbing it's pricing from? Perhaps it's as simple as that. I use FXCM and/or Oanda and neither match up. There appears to be no pattern as to the errors.

I'd be more than happy to help in anyway ref bug testing if you'd like to look into this. As it's a great indicator to have. Many thanks in advance.
Svara
@rPud, hey, sorry for the late reply, I've honestly just noticed this. I've checked both FXCM and Oanda and they match up perfectly for me. Are you still experiencing the issues?
Have you tried changing the session times in settings? The default ones are set for my specific time zone (GMT +7). Let me know and I'll try to help.
Happy you're finding it useful
Svara
@rPud, Hey I just checked the code again and realized that you were right - the script was using highest and lowest values not from the previous session, but rather from the time before the new session started (if that makes any sense). I just re-wrote the big part of that script and believe it to be accurate now.
Svara
rPud kviateq
@kviateq, Thanks so much for the re-write, thats great! :) Since I left the message above I'd figured out roughly the same and was planning to drop you a line.

There is something else though please, that remains an issue within the new script. I’ll try my best to explain.

For example: I have my NYC session defined as 13:00 to the close of the 19:45 candle (GMT). This leaves a small gap between 20:00 and 22:00 - when the tradingview session ends. This isn’t a problem and the pivot calculation is correct, as long as price doesn’t break the high or low created between 13:00 and 19:45 - during this gap time between 20:00 and 22:00. If it ventures out of my range during this time, the pivot calculation is incorrect. Presumably it uses the new high or low created instead.

Does that make sense? If this doesn’t or you’d like examples and further info, please do PM me. I’m very happy to help.
Svara
rPud rPud
EDIT.
If you take a peek at the below image you'll see an example of what I mean. The grey coloured range on the left shows my NYC session. 13:00 - 19:45 BST (Not GMT sorry). The right hand range is the one from the indicator. Same exact timings. But as price has broken the range in the gap time, the indicator has used the new low instead. You see the "low line: is lower. NB. There is another example on the right, same screenshot. With the tiny spike up in the gap time.

Svara
@rPud, thanks for your input. I changed the timezones to GMT times. I'm not 100% sure if that's what was causing the wrong calculations, but I just checked on my chart and it looks good to me.
Svara
rPud kviateq
@kviateq, Hi there. Thanks for the fix, I'm pleased it was such a simple one! All works good for me too. Thanks again, much appreciated. :)
+1 Svara
rPud rPud
@kviateq, Sorry, although it seemed like an instant fix, I'm still experiencing some oddities. Hmmm. Let me try and figure it out. I'll report back if I have any luck. Thanks again.
+1 Svara
@rPud, what issues are you still experiencing?
Svara