Created
November 21, 2019 18:50
-
-
Save dimfeld/c0c9d6c067a73ff4c14c29f17d125e3b to your computer and use it in GitHub Desktop.
Thinkscript for Days until Earnings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input length = 60; | |
def xx = -GetEventOffset(Events.EARNINGS); | |
def yy = Sum(HasEarnings(type = EarningTime.AFTER_MARKET), length)[-length + 1] > 0; | |
plot x = xx + yy * .5; | |
x.AssignValueColor( if x <= 1 then Color.LIGHT_RED else Color.DARK_GRAY); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment