Template:Fluctuation formatter
{{#switch:{{{type|{{{2|maximize}}}}}}
|maximize = {{#switch:1
|{{#expr: {{formatnum:{{{1}}}|R}} > {{{threshold|0}}}}} = {{Increase}} {{{custom label|+{{#expr:{{formatnum:{{{1}}}|R}}}}}}}
|{{#expr: {{formatnum:{{{1}}}|R}} < -{{{threshold|0}}}}} = {{Decrease}} {{{custom label|−{{#expr:abs{{formatnum:{{{1}}}|R}}}}}}}
|{{#expr: abs{{formatnum:{{{1}}}|R}} <= {{{threshold|0}}}}} = {{Steady}} {{#switch:1
|{{#expr: {{formatnum:{{{1}}}|R}} > 0}} = {{{custom label|+{{#expr:{{formatnum:{{{1}}}|R}}}}}}}
|{{#expr: {{formatnum:{{{1}}}|R}} < 0}} = {{{custom label|−{{#expr:abs{{formatnum:{{{1}}}|R}}}}}}}
|1 = {{{custom label|{{{steady label|no change}}}}}}
}}
|1 =
}}
|minimize = {{#switch:1
|{{#expr: {{formatnum:{{{1}}}|R}} > {{{threshold|0}}}}} = {{IncreaseNegative}} {{{custom label|+{{#expr:{{formatnum:{{{1}}}|R}}}}}}}
|{{#expr: {{formatnum:{{{1}}}|R}} < -{{{threshold|0}}}}} = {{DecreasePositive}} {{{custom label|−{{#expr:abs{{formatnum:{{{1}}}|R}}}}}}}
|{{#expr: abs{{formatnum:{{{1}}}|R}} <= {{{threshold|0}}}}} = {{Steady}} {{#switch:1
|{{#expr: {{formatnum:{{{1}}}|R}} > 0}} = {{{custom label|+{{#expr:{{formatnum:{{{1}}}|R}}}}}}}
|{{#expr: {{formatnum:{{{1}}}|R}} < 0}} = {{{custom label|−{{#expr:abs{{formatnum:{{{1}}}|R}}}}}}}
|1 = {{{custom label|{{{steady label|no change}}}}}}
}}
|1 =
}}
|neutral = {{#switch:1
|{{#expr: {{formatnum:{{{1}}}|R}} > {{{threshold|0}}}}} = {{IncreaseNeutral}} {{{custom label|+{{#expr:{{formatnum:{{{1}}}|R}}}}}}}
|{{#expr: {{formatnum:{{{1}}}|R}} < -{{{threshold|0}}}}} = {{DecreaseNeutral}} {{{custom label|−{{#expr:abs{{formatnum:{{{1}}}|R}}}}}}}
|{{#expr: abs{{formatnum:{{{1}}}|R}} <= {{{threshold|0}}}}} = {{Steady}} {{#switch:1
|{{#expr: {{formatnum:{{{1}}}|R}} > 0}} = {{{custom label|+{{#expr:{{formatnum:{{{1}}}|R}}}}}}}
|{{#expr: {{formatnum:{{{1}}}|R}} < 0}} = {{{custom label|−{{#expr:abs{{formatnum:{{{1}}}|R}}}}}}}
|1 = {{{custom label|{{{steady label|no change}}}}}}
}}
|1 =
}}
|{{{type|{{{2|maximize}}}}}} = {{Error|Error: Unrecognized type. Please use "maximize", "minimize", or "neutral".}}
}}
{{Documentation}}