how to calculate level in option chain


New member
Hi all, I am trying to calculate level of trike price in option chain
ex: on the Call i try to find what is a strike price down 7 lines from the strike price ATM
or the Put what is the strike price goes back 7 lines from the strike price ATM

it looks like when you set top loss by select level instead % or +/-

what is a code to calculate a level in option chain?
this is a draft that I came up with

input level = 7 and -7;
input DTE = (default 14, 20, 30); #number of day of period

def Symbol = underfying;
def Strike = getstrike();

plot output = if (isput level = -7) and (level = 7) and (DTE = 14) then 1 else 0;

assignBackgroundColor(if ouput == 1 then color.GREEN else color.CURRENT);

Any advice and suggestions would be greatly appreciated.



New member
Thanks, I did RTD in excel, it worked well. But now I try to use directly on TOS instead export or RTD on excel
this project that I build a custom column in option chain it show output whereas Delta = .20 - 25 and strike around 7 level down from strike ATM for Call and Put opposite Delta = -.20 - -.25 and strike around -7 level up from strike ATM

Similar threads