Firetron’s FormatRoundedPercent

1 1151 Views No Comments 4 years ago
  • Formats a number to be rounded and have the percent symbol.

    Custom Command Dependencies:

    Test 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(' ')
      local formatted = CC_FormatRoundedPercent(change)
      Log('Formatted Default:')
      Log(' ')
      local formatted2 = CC_FormatRoundedPercent(change, 4, ' @')
      Log('Formatted Another Way:')
      Log(' ')
      Save('done', true)
    HaasScript Code
    Sign in or Register to download for free
  • Phemex x HaasOnline Promotion Type: contest Expires: May 31, 2024 Exclusive
    Receive up to 1,200 USDT! The more you trade, the more you earn.
Login or Register to Comment

Unlock your crypto trading potential

Create a free account and enjoy everything we have to offer.

Join for Free