ui: Format min order qty/notional cols with sec ticks
This commit is contained in:
1 parent
bb64760c62
commit
cc55fe1acf
3 files changed
+59
-2
No files matched your search
@@ -83,6 +83,11 @@ namespace mbts.spark {
|
||||
public static string format(this ContractSpecificationImmutable spec, double price, double display_multiplier, bool show_commas, string nan_text) =>
|
||||
_get(spec).format(price, display_multiplier, show_commas, nan_text);
|
||||
|
||||
public static string format_quantity(this ContractSpecificationImmutable spec, double quantity) =>
|
||||
spec.QuantityInfos.TryGetFirst(out var qi)
|
||||
? new TickFactors(qi.TickBase, qi.TickUnit).format(quantity)
|
||||
: quantity.ToString();
|
||||
|
||||
public static double parse(this ContractSpecificationImmutable spec, string text, double display_multiplier, string nan_text) =>
|
||||
_get(spec).parse(text, display_multiplier, nan_text);
|
||||
|
||||
|
||||
Reference in new issue
Block a user