Options Hacker Net Debit Sort Column?


Category:
0
0

Id like to add a column or study filter to sort options by Net Debit for a covered call. I know you can obtain the underlying stock price with getunderlyingSymbol() but I cant find a way to get the option price for the net debit calculation. There is a “Mark % of underlying” column available in ToS but I cant find a command to obtain that input either.

Thanks

Marked as spam
Posted by (Questions: 3, Answers: 1)
Asked on March 19, 2020 10:09 pm
133 views
0
Private answer

I updated your question title because you are asking for the ability to sort a list of options and a Study Filter is only a true/false condition that returns a list of stocks. So this would have to be done as a custom column.

I'm still struggling to understand what you are requesting here. "Net Debit" for covered call. Are you trying to subtract the price of the option from the cost of the stock? This can be accomplished but it requires that you have a list of OPRA codes as ticker symbols and not the underlying stock ticker symbols.

So long as you have that, the code to compute this value would be:

def priceC = close;
def stockPrice = close(GetUnderlyingSymbol());
plot data = stockPrice - priceC;

Keep in mind the vast majority of options contracts will not have sufficient trade volume to make this viable. So I would advise not spending any time at all trying to get this to work.

If you are trying to run a covered call trading strategy I suggest you build a scan for stocks that trade weekly options and within yous scan include filters for a range of implied volatility and other metrics that suites your needs.

Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on March 20, 2020 7:38 am