OPEN-SOURCE SCRIPT

Market Pivot Levels [Past & Live]

Market Levels provide a robust view of daily pivot points of markets such as high/low/close with both past and live values shown at the same time using the recently updated system of polylines of pinescript.

The main need for this script arose from not being able to use plots for daily points because plots are inherently once drawn can't be erased and because we can't plot stuff for previous bars after values are determined we can't use them reliably. And while we can use traditional lines, because we would have extremely high amount of lines and we would have to keep removing the previous ones it wouldn't be that effective way for us. So we try to do it with the new method of polylines.

Features of this script:
- Daily High/Low Points
- Yesterday High/Low/Close Points
- Pre-Market High-Low points.

Now let's preview some of the important points of code and see how we achieve this:

With the code below we make sure no matter which chart we are using we are getting the extended hours version of sessions so our calculations are made safely for viewing pre-market conditions.


Coding our own function to calculate high's and low's because inbuilt pinescript function cannot take series and we send this function to retrieve our high's and lows.


With doing calculations at the bars of day ending points we can retrieve the correct points and values and push them for our polylines array so it can be used in best way possible.


The rest of the code is annotated and commented. You can let me know in comments if you have any questions. Happy trading.
Daily ChartsFractalhighlowHistorical VolatilitylevelsmarketsmarketstructurepivotPivot points and levelspivotpointshighlowpremarketyesterday

开源脚本

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

想在图表上使用此脚本?


One does not simply win every trade.
更多:

免责声明