Wichita falls, tx
Posts: 4 since May 2014
Thanks Given: 1
Thanks Received: 5
|
If you don't want to trade stocks when they get close to their earnings date here is the study for you. Add this study along with your other studies/filters and you can avoid those stocks with upcoming earnings.
Tip
|
#I couldn't get the wizard to function like it does if you select the Corporate earnings study. I left it here for others to play with it.
#Wizard text: Has an earnings announcement
#Wizard input: Choice
#Wizard text: in the next
#Wizard input: length
#Wizard text: bars
#If the Input length is 10 days. Then any stock that has earning in 10 days or less will not appear in your scan. Change the 10 to however many trades you would like to use.
Input length = 10;
input Choice = {default "Any time", "Before the Market", "After the Market"};
def earnings = hasearnings();
plot scan;
switch (Choice){
case "Any time":
scan = (sum(hasearnings(),length)[-length +1] > 0) is false;
case "Before the Market":
scan = (sum(HasEarnings(type = EarningTime.BEFORE_MARKET),length)[-length +1] > 0) is false;
case "After the Market":
scan = (sum(HasEarnings(type = EarningTime.AFTER_MARKET),length)[-length +1] > 0) is false;
}
|
|
|
|