Scan for Days to Expiration


Category:
0
0

Hi Pete, i have this  existing scan that scan stocks that are trending

declare lower;

def conditionOne = Average(close, 20) / Average(close, 200) >= 1.1;

plot x = conditionOne;

but i would like to insert another condition to only show those stocks that have expiration between 8 to 14 days. 

Tried Options Hacker but unable to get the right code. 

Request your assistance please.

Thanks

RESOLVED
Marked as spam
Posted by (Questions: 8, Answers: 15)
Asked on October 27, 2019 9:49 am
118 views
0
Private answer

Stocks do not have a property called "days to expiration". So we cannot use Stock Hacker to get a list of stocks that have options expiring a set number of days in the future. Only options have a property called "days to expiration". So you must use the Option Hacker.

I just built a scan using your code on the Options Hacker screen and it returned 80 results. Screenshot below shows the output and settings for this scan. Be sure to spot check a few of these stocks to make sure they meet your criteria.

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on October 27, 2019 10:15 am
0
Comments and questions are added in the space below the answer or the question. Simply click the link below labeled "Add Comment".
( at October 28, 2019 7:43 am)