plot entryPrice; input showDetails = yes; input showBasis = yes; input showProfitLoss = yes; input showFills = no; input netProfitLossPastTrades = 0.00; # Entry Price entryPrice = GetAveragePrice(); entryPrice.AssignValueColor(if close < entryPrice then Color.DOWNTICK else Color.UPTICK); entryPrice.SetLineWeight(2); entryPrice.SetStyle(Curve.SHORT_DASH); # Basis Calculation def qty = GetQuantity(); def openCost = qty * GetAveragePrice(); def basis = (qty * entryPrice); #Labels AddLabel(showDetails, qty + "@" + AsDollars(entryPrice), Color.GRAY); AddLabel(showBasis and netProfitLossPastTrades == 0.0, "Basis: " + AsDollars(basis), if basis > (qty * close) then Color.DOWNTICK else Color.UPTICK); AddLabel(showBasis and netProfitLossPastTrades != 0.0, "Basis (adj): " + AsDollars(basis), if basis > (qty * close) then Color.DOWNTICK else Color.UPTICK); def pl = (close - entryPrice) * qty; AddLabel(showProfitLoss, "P/L: " + AsDollars(pl), if pl > 0 then Color.UPTICK else if pl == 0 then Color.WHITE else Color.DOWNTICK); AddLabel(showProfitLoss, "P/L/Share: " + AsDollars(close - entryPrice), if (close - entryPrice) > 0 then Color.UPTICK else if (close - entryPrice) == 0 then Color.WHITE else Color.DOWNTICK);