ChrisBaker97

Earnings-Free Equities - thinkScript Scan Study

Oct 23rd, 2013
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # EARNINGS-FREE EQUITIES - Shows only equities that DO NOT have earnings in the next 45 days
  2. #
  3. # Scan tab study that selects only equities without earnings coming up in
  4. # the next 45 days. To find stocks *with* earnings, see my other thinkScript:
  5. # Today's Potential Earnings Plays: http://pastebin.com/gC1GJMfB
  6. #
  7. # By Chris Baker <ChrisBaker97@gmail.com> @ChrisBaker97
  8. # Latest version maintained at: http://pastebin.com/wZbyXgEZ
  9. # More thinkScripts at: http://pastebin.com/u/ChrisBaker97
  10. #
  11. # This thinkScript is designed for use in the Scan tab. Detailed
  12. # instructions may be found here: http://pastebin.com/wGi1Mvuh
  13. #
  14. # Future enhancement:
  15. # • Incorporate extensive code from my optimal expiration cycle selection
  16. # thinkScript (http://pastebin.com/SR7NDzLB) to dynamically adjust the
  17. # horizon based on the actual expiration date of the option series closest
  18. # to a user-defined optimal days to expiration.
  19. #
  20. # This work is licensed under the Creative Commons Attribution-ShareAlike
  21. # 3.0 Unported License. To view a copy of this license, visit:
  22. # http://creativecommons.org/licenses/by-sa/3.0/deed.en_US
  23. #
  24. # I created this because the default TOS Earnings filter only allows you
  25. # to find stocks *with* earnings, but there's no way to reverse it to
  26. # eliminate stocks *without* earnings, which is often desirable.
  27. #
  28. # If you want to tweak the time period, you may adjust the days input.
  29. # For example, when set to 60, this will find all stocks without earnings
  30. # announcements through the market open 60 days from now.
  31.  
  32. input days = 45;
  33.  
  34. declare once_per_bar;
  35.  
  36. plot scan = sum(HasEarnings(EarningTime.AFTER_MARKET),days)[1-days] +
  37. sum(HasEarnings(EarningTime.BEFORE_MARKET),days)[0-days] < 1;
Add Comment
Please, Sign In to add comment