ThinkOrSwim, IBKR, and others reports the implied-volatility (IV) for a given expiration. If I know the current underlying price and IV for that expiration, can I compute a rough estimate of the call or put premium at a given OTM strike (say 0.15 to 0.4 delta) options? I think the black-scholes formula will give me that, but does anyone know of a Java library or script for computing it?
I'm not sure why you would want to do such a calculation because if the option trades, the premium is available from the market. Be that as it may, yes, you can use Black Scholes to generate a rough theoretical estimate of of any option's premium if you know the IV for that expiration. However it will be rough because it won't account for variations like wide B/A spreads or volatility smile/smirk, etc.
I use IBKR's delta and IV numbers and at times, they are not that reliable, particularly for options expiring in a day or two. I don't need precision but sometimes their numbers are just whacked out or not updating in a timely fashion.
Sorry, can't help you with a Java script.