jayy

VWAP forex Yesterday Hi/Low update fix

This script is an updte fix of an earlier script that stopped functioning when TradingView updated Pine script. This script plots Forex (24 hour session) VWAP, yesterday's high, low, open and close (HLOC),
the day before's HLOC -
Also plots higher timeframe 20 emas
1 minute 5, 15, 60 period 20 ema
5 minute 15, 60 period 20 ema
15 minute 60, 120 , 240 period 20 ema
60 minute 120, 240 period 20 ema
120 minute 240, D period 20 ema
240 minute D period 20 ema
Also signals inside bars (high is less than or equal to the previous bar's high and the low is greater than or equal to the previous low) the : true inside bars have a maroon triangle below the bar as well as a ">" above the bar.
If subsequest bars are inside the last bar before the last true inside bar they also are marked with an ">"
This is probably a slight variation from the way Leaf_West plots the inside bars.
It appears that he marks all bars that are inside the original bar until one a bar has a high or low
outside the original bar. But I would need to see an example on his charts.
The Time Session Glitch and the Fix FX_IDC, COINBASE and BITSTAMP:
The script will correctly default to 1700 hrs to 1700hrs EDT/EST session for FXCM.
Strangely some securities appear to erroneously start their session at 1200 hrs ie. My guess is that they are somehow tied to GMT+0 instead of New York time (GMT+5). See this for yourself by selecting EURUSD using the FXCM exchange (FX:EURUSD) and then EURUSD from the IDC exchange (FX_IDC:EURUSD). The FX-IDC session opening range starts 5 hours before it actually should at 1700 hrs EDT/EST. To correct for this I have implemented an automatic fix (default) and a user selected "5 hour time shift adjust. ment needed on some securities".
There is also a 4 hour time shift button which might be necessary when New York reverts from Eastern Standard Time to Eastern Daylight Time (1 hour difference) in March (and then back again in November). In the default auto adjust mode you will need to select the 1 hour time shift. That is if this glitch still exists at that time.
I have looked at other scripts, other than my own and where the script is available, that need to use information about the opening bar and all have the same time shift issue
COINBASE and BITSTAMP open at 0000 hours GMT. Since I use lines instead of circles or crosses I had to make a small adjustment to plot the lines correctly.
If it needs work let me know.
Jayy

Jayy
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?