IHopeToLearn
New member
Is there any way to NOT have the Percentage Label truncate?
ex: 0.01% looks alot like 0.1% and in a scalping rush I have at times got out of a trade thinking 0.01% is not big deal but it was more than I thought. *Not sure if this is where I am supposed to post this.
Here is the current code:
# Profit or Loss Current Candle
#Base Code provided by Pensar
#Modified by Therival and DoubleJinx
#THIS CODE FOUND HERE:
plot entryPrice;
input showDetails = yes;
# Entry Price
entryPrice = GetAveragePrice();
#entryPrice.AssignValueColor(if close < entryPrice then Color.DOWNTICK else Color.UPTICK);
#entryPrice.SetLineWeight(2);
#entryPrice.SetStyle(Curve.SHORT_DASH);
#END OF CODE
# Start of PENSAR Code
# defs
def PL = GetOpenPL();
def Entry = if IsNaN(GetAveragePrice()) then Entry[1] else GetAveragePrice();
def LastEntryBar = if Entry != Entry[1] then BarNumber() else LastEntryBar[1];
def PercentChg = if Entry then (close - Entry) / Entry else 0;
def qty = GetQuantity();
# label
AddLabel(showDetails, qty + "@" + AsDollars(entryPrice),
if PL == 0 then Color.WHITE
else if PL > 0.01 then Color.GREEN
else Color.DARK_ORANGE);
AddLabel(1, "" + AsDollars(PL) +
" | " + AsPercent(PercentChg) ,
if PL == 0 then Color.WHITE
else if PL > 0.01 then Color.GREEN
else Color.DARK_ORANGE);
ex: 0.01% looks alot like 0.1% and in a scalping rush I have at times got out of a trade thinking 0.01% is not big deal but it was more than I thought. *Not sure if this is where I am supposed to post this.
Here is the current code:
# Profit or Loss Current Candle
#Base Code provided by Pensar
#Modified by Therival and DoubleJinx
#THIS CODE FOUND HERE:
input showDetails = yes;
# Entry Price
entryPrice = GetAveragePrice();
#entryPrice.AssignValueColor(if close < entryPrice then Color.DOWNTICK else Color.UPTICK);
#entryPrice.SetLineWeight(2);
#entryPrice.SetStyle(Curve.SHORT_DASH);
#END OF CODE
# Start of PENSAR Code
# defs
def PL = GetOpenPL();
def Entry = if IsNaN(GetAveragePrice()) then Entry[1] else GetAveragePrice();
def LastEntryBar = if Entry != Entry[1] then BarNumber() else LastEntryBar[1];
def PercentChg = if Entry then (close - Entry) / Entry else 0;
def qty = GetQuantity();
# label
AddLabel(showDetails, qty + "@" + AsDollars(entryPrice),
if PL == 0 then Color.WHITE
else if PL > 0.01 then Color.GREEN
else Color.DARK_ORANGE);
AddLabel(1, "" + AsDollars(PL) +
" | " + AsPercent(PercentChg) ,
if PL == 0 then Color.WHITE
else if PL > 0.01 then Color.GREEN
else Color.DARK_ORANGE);
Last edited by a moderator: