-
Formats a number to be rounded and have the percent symbol.
Custom Command Dependencies:
NoneTest code:
if not Load('done', false) then local closes = ClosePrices() local close1 = ArrayGet(closes, 1) local close2 = ArrayGet(closes, 2) local change = PercentageChange(close1, close2) Log(' ') Log(change) Log('Chnage:') Log(' ') local formatted = CC_FormatRoundedPercent(change) Log(formatted) Log('Formatted Default:') Log(' ') local formatted2 = CC_FormatRoundedPercent(change, 4, ' @') Log(formatted2) Log('Formatted Another Way:') Log(' ') Save('done', true) end