SamAccountX

Sessions with High/Low Diff

The main purpose of this indicator is to facilitate backtesting, but it may also be useful for traders to easily identify the current
active/open trading sessions on lower-timeframe charts.

This indicator also tracks the session high/low difference and plots it as a label on the last candle of the session once the last
bar of that session has finished printing and a new candle opened. The position and direction of the label is based on the
session open and close - if the session open is greater than the session close (which would equate to the equivalent of a red candle),
the label will be printed UNDER the last candle, and vice versa if the session close is above the session open.

The number printed inside the label is the difference between the session high and the session low, scaled to the minimum tick value of the chart.

Note #1: There is a Pinescript maximum of 500 labels allowed on any chart. While I could have gotten fancy and done some wizardry with label arrays,
I didn't really see a point to it. If labels are enabled for all 4 sessions at the same time, that would still have them available for the past 125
sessions, which would be about 6 months (approx 252 trading days per year, and this would cover 125 of them). If you limit to 2 sessions, you double
your potential look-back to almost a year (250 days out of the 252 average trading days each year), and for a single session, you double it yet again
to just under 2 years.

Note #2: As this indicator tracks open, high, low, and close for each session, it can potentially be enhanced (or forked) to construct "session candles".
I'm not sure what use this would be to anyone, but the pieces are there should someone find a use for it.

While it would be easy to add alerts on sessions opening/closing, I didn't see a purpose or value in that as it would be little more than a
glorified alarm clock. If I get enough demand to add them, I will gladly consider it.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?