Hello everyone,
I already have a script written that appears in my option chain as a percentage. All I want to do is change this to appear in an actual dollar amount, and I don't really know think script. I can't even fumble through it. Everything I have tried is wrong. I have made minor alterations to think script and have cut and paste; however, I've never written a script.
This would be very simple for someone who knew what they were doing, I'm sure, lol. So, obviously, that is not me

.
I would GREATLY appreciate it if someone could alter this.
Thank you in advance for any assistance and guidance.
input maxPctThreshold = 0.5;
def maxShares = 100;
def maxContracts = 1;
def premium = maxContracts * close * 100;
def premiumPct = premium/(MaxShares * close(getUnderlyingSymbol()));
def strikePriceGain = getStrike() - close(getUnderlyingSymbol());
def premiumPlusSharesPct = ((strikePriceGain * maxShares) + premium)/(MaxShares * close(getUnderlyingSymbol()));
AddLabel(yes, AsPercent(premiumPlusSharesPct), if premiumPlusSharesPct >= 0.5 then color.green else color.black);
I already have a script written that appears in my option chain as a percentage. All I want to do is change this to appear in an actual dollar amount, and I don't really know think script. I can't even fumble through it. Everything I have tried is wrong. I have made minor alterations to think script and have cut and paste; however, I've never written a script.
This would be very simple for someone who knew what they were doing, I'm sure, lol. So, obviously, that is not me



I would GREATLY appreciate it if someone could alter this.
Thank you in advance for any assistance and guidance.
input maxPctThreshold = 0.5;
def maxShares = 100;
def maxContracts = 1;
def premium = maxContracts * close * 100;
def premiumPct = premium/(MaxShares * close(getUnderlyingSymbol()));
def strikePriceGain = getStrike() - close(getUnderlyingSymbol());
def premiumPlusSharesPct = ((strikePriceGain * maxShares) + premium)/(MaxShares * close(getUnderlyingSymbol()));
AddLabel(yes, AsPercent(premiumPlusSharesPct), if premiumPlusSharesPct >= 0.5 then color.green else color.black);