• Get $30 off VIP with code SUMMER30. Ends July 27. Happy trading!

Run In To Earnings Data


New member
Hi all-
I have an earnings data setup that I have found on this website that plots some very useful data. However, I'd like to add a few things to it. I'd like to add a vertical line 7, 14, and 21 days prior to earnings, as well as 7 days after earnings. I think I have that figured out by using the following:

AddVerticalLine(HasEarnings()[-21], "", Color.GREEN);
AddVerticalLine(HasEarnings()[-14], "", Color.GREEN);
AddVerticalLine(HasEarnings()[-7], "", Color.GREEN);
AddVerticalLine(HasEarnings()[7], "", Color.RED);

I'd also like to add historical data from the past two years of the average % move from 21 days prior to earnings, 14 days prior to earnings, and 7 days prior to earnings, as well as 7 days after earnings and put this into a label at the top of the chart similar to the below image:


Also, is there a way to add a cloud between each vertical line (either red, yellow, or green) depending on the % move? For example over 5% is a green cloud, between 0-4.9% is a yellow cloud, and any negative % is a red cloud? Similar to the image below.


I know this may be complex, but any help would be greatly appreciated.

Thanks in advance for any help!


New member
Morning @bp805 Can you please post the full code of your study?
Hi @_Merch_Man_ , if you're referring to the whole earnings indicator suite that I use, the whole suite of studies came from this thread:


The first post contains the code to everything that I have on my charts. I mainly use the "earnings reaction", "data labels", and "earnings statistic" codes on my charts. There is a TOS link at the end of the first post that contains all of the studies.

My first post here starting this thread is looking to add an additional couple study sets to it to achieve what I'm looking for in my first post in this thread. Hope that clarifies....thanks!

Similar threads