LazyBear

Earnings S/R Levels [LazyBear]

These levels are based on price around earnings day. I have implemented support for 2 calculation modes:

Mode 1: Level = (low of 1 day prior to earnings + high of 1 day after earnings) / 2.0
Mode 2: Level = (hl2 of 1 day prior to earnings + hl2 of 1 day after earnings + close from earnings day) / 3.0

Chart above shows "Mode 1". Mode can be changed via options page.

This indicator was requested by user @mika2k1ff. I learnt more about this idea from @DanV and @TimWest (Thanks guys :)). BTW, TimWest has an indicators package, "Key Hidden Levels", that has this and more.

Do let me know how you use this, I am very intrigued by the potential this idea shows. Thanks.

For a complete list of my indicators:
- GDoc: docs.google.com...ByMEvm5MLo/edit?usp=sharin...
- Chart:

List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
오픈 소스 스크립트

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

면책사항

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

차트에 이 스크립트를 사용하시겠습니까?
//
// @author LazyBear 
// List of all my indicators: https://www.tradingview.com/v/4IneGo8h/
//
study("Earnings S/R Levels [LazyBear]", shorttitle="ELVLS_LB", overlay=true)
mode=input(1, "S/R mode", minval=1, maxval=2)
earnings = security("ESD:"+ticker+"_EARNINGS", "D", close, true)
ehl2_mode1=(nz(earnings[1]) ? avg(low[2],high) : nz(ehl2_mode1[1])) // AVG2(low of 1 day pri, high of 1 day after)
ehl2_mode2=(nz(earnings[1]) ? (hl2[2]+hl2+close[1])/3 : nz(ehl2_mode2[1])) // AVG3(HL2 of 1 day pri, HL2 of 1 day after, close of earnings day)
ehl2=mode==1?ehl2_mode1:mode==2?ehl2_mode2:ehl2_mode1 // default: mode1
plot(ehl2, linewidth=2, style=circles)