ka66

Mansfield Long-Range Background

ka66 已更新   
Mansfield Long-Range Background. From Stan Weinstein's book.

This plots the high-low range for the last N years, including the current year.

It gives us an idea of any long-term resistance or support in play, which may affect how a trend behaves.

Note that one could just as easily check the yearly chart to get what this is showing, but it's convenient to have a template with all the elements required to emulate a Mansfield chart.
版本注释:
Bug fix: in our main weekly use case, Pine could not determine the no. of historical bars required.

And thus this long-range indicator really is meant for weekly charts effectively, with around 10 years of data.
版本注释:
  • Fix bug where we were missing bars in the weekly, and possibly showing things in reverse!
  • Fix bug where there were fewer years than the lookback period configured, now it's min of lookback and available years.
  • Explicitly error out if the indicator is on any non-weekly and non-yearly charts.
  • Replace year labels with triangle-ups/downs, and a tooltip which shows the year, for visual compactness.
版本注释:
  • Simplify code in parts
  • Better logic for displaying year labels, with adjustable vertical spacing.
  • Arrays only filled up to required lookback period at the most, now.
版本注释:
  • Still some weird bug in yearly display, when it should be one to one with the candles.
  • Remove use of yearly timeframes, simply sticking to the weekly timeframe, the main use case, where it works as expected.
版本注释:
Clarify Lookback Period title text to be more specific. Update chart!
开源脚本

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

免责声明

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

想在图表上使用此脚本?