//@version=6 indicator("Wheel Companion — Covered Call Path", overlay = true) // User-defined assignment scenario. This script does not read option quotes, // fees, taxes, dividends, or probabilities, and does not place trades. float costBasis = input.float(95.0, "Your share cost basis · per share", minval = 0.01, step = 0.01) float callStrike = input.float(100.0, "Your covered-call strike", minval = 0.01, step = 0.01) float premiumPerShare = input.float(1.25, "Premium received · per share", minval = 0.0, step = 0.01) int contracts = input.int(1, "Covered contracts", minval = 1, maxval = 10000) float coveredShares = contracts * 100.0 float stockChangeAtStrike = (callStrike - costBasis) * coveredShares float premiumCashFlow = premiumPerShare * coveredShares float combinedBeforeCosts = stockChangeAtStrike + premiumCashFlow basisPlot = plot(costBasis, "Your cost basis", color = color.rgb(235, 174, 77), linewidth = 2) strikePlot = plot(callStrike, "Your call strike", color = color.rgb(166, 139, 235), linewidth = 2) fill(basisPlot, strikePlot, color = color.new(callStrike >= costBasis ? color.green : color.red, 90), title = "Basis-to-strike interval") var table summary = table.new(position.top_right, 2, 4, border_width = 1) if barstate.islast table.cell(summary, 0, 0, "CALL PATH", text_color = color.white, bgcolor = color.rgb(25, 45, 34)) table.cell(summary, 1, 0, "USER INPUTS", text_color = color.white, bgcolor = color.rgb(25, 45, 34)) table.cell(summary, 0, 1, "Stock change at strike", text_color = color.white) table.cell(summary, 1, 1, "$" + str.tostring(stockChangeAtStrike, "#.##"), text_color = color.white) table.cell(summary, 0, 2, "Premium cash flow", text_color = color.white) table.cell(summary, 1, 2, "$" + str.tostring(premiumCashFlow, "#.##"), text_color = color.white) table.cell(summary, 0, 3, "Combined · before costs", text_color = color.white) table.cell(summary, 1, 3, "$" + str.tostring(combinedBeforeCosts, "#.##"), text_color = color.white)