HasEarnings ( int type);
true if there are announced earnings, and
false otherwise. Use an EarningTime constant to specify the time of announcement.
|type||EarningTime.ANY||Defines the time of the earnings announcement: after market close, befor market open, or either.|
plot isBefore = HasEarnings(EarningTime.BEFORE_MARKET);
plot isAfter = HasEarnings(EarningTime.AFTER_MARKET);
plot isDuringOrUnspecified = HasEarnings() and !isBefore and !isAfter;
This example script marks announced earnings with an up arrow if they are expected before market open, down arrow if they are expected after market close, and a dot if they are expected during market trading hours or the time is not specified.