Rule for insuring use of latest quarterly data

Does anyone know how I could create a rule that insures I am using the most current quarterly data? For both buying and selling.
I would like to transact AFTER their latest quarterly data has been released for the quarter I am trading in.
For instance, we are just entering a new reporting season right now and I have a model that wants to sell one position. I would like to insure that the stock I am selling has already reported for this quarter and its replacement recommendation has already reported too.

I can do this manually but it would be a real pain and I cannot simulate that.

I have no idea how this will simulate but want to play around with it.
thanks.

Add “CompleteStmt = TRUE” to your buy criteria?

I think this statement is equivalent to:

Preliminary_Statement = False

One field that might be helpful is “WeeksToQ”. I’m recalling cases that it’s not always accurate (it’s timing is sometimes based on estimates of approximate dates of prior filings, and some companies don’t set hard dates for their earnings release), but it might give a pretty good idea if an expected earnings release soon. WeeksToQ=0 would normally mean earnings are due this week.

I’d also think adding “AND StaleStmt = False” also to all your buy and sell rules would prevent action on a position taken during the peroid of time that the data is out but not yet updated in the database.

Not sure how well both of those in combination would work. Others probably have better suggestions, but those are what pop to mind.

Thank you. I will try all of these ideas.