FPL ();
Description
Returns floating Profit/Loss value based on strategy signals. For each bar, this value is equal to the possible Profit/Loss if the position were exited at the Close price.
Example
declare lower;
plot FPL = FPL();
plot ZeroLine = 0;
FPL.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
FPL.DefineColor("Positive", Color.UPTICK);
FPL.DefineColor("Negative", Color.DOWNTICK);
FPL.AssignValueColor(if FPL >= 0 then FPL.Color("Positive") else FPL.Color("Negative"));
ZeroLine.SetDefaultColor(Color.GRAY);
This script plots the floating Profit/Loss and colors the plot based on whether the hypothetical exit would result in profit or loss.