Firetron's FormatRoundedQuoteCurrency
stableDescription
Formats a number to be rounded and have the quote currency symbol.
Custom Command Dependencies:
Firetron’s QuoteDecimals
HaasScript
-- ============================================================================
-- Firetron's FormatRoundedQuoteCurrency
--
-- Formats a number to be rounded and have the quote currency symbol.
--
-- Custom Command Dependencies:
-- Firetron's QuoteDecimals
--
-- Discord: @FiretronP75
-- ============================================================================
-- ========================================================
-- Definition
-- ========================================================
DefineCommand('FormatRoundedQuoteCurrency', 'Formats a number to be rounded and have the quote currency symbol.')
-- ========================================================
-- Parameters
-- ========================================================
local input = DefineParameter(NumberType, 'Input', 'The number to format', true, 0)
local market = DefineParameter(StringType, 'market', 'The currency market', false, PriceMarket(), 'InputAccountMarket, InputMarket, PriceMarket')
local digits = DefineParameter(NumberType, 'Digits', 'The digits to round to', false, CC_QuoteDecimals(market), 'CC_QuoteDecimals')
local symbol = DefineParameter(StringType, 'Symbol', 'The symbol to append', false, ' '..QuoteCurrency(market))
-- ========================================================
-- Output
-- ========================================================
DefineOutput(StringType, Round(input, digits)..symbol, 'Formatted Value')
0 Comments
Sign in to leave a comment.
No comments yet. Be the first!