+1 888 340 6572
MultiCharts Project Management
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
feature_request_small.png
Open Feature request MC-1842

System.Double is not the recommended C# type for monetary calculations

action_vote_minus_faded.png
4
Votes
action_vote_plus_faded.png
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
Description

In MultiCharts.NET currently System.Double is used throughout the API as the default price type. However, System.Double is prone to rounding errors, even though there are functions like PublicFunctions.DoubleEquals() to work around this problem, use of them leads to less than optimal code in terms of precision, readability, and maintainability. The recommended data type in C# is System.Decimal and there are also some robust implementations of Money type that use System.Decimal as their underlying type which can be used instead. For example https://www.nuget.org/packages/Money/ The Money type should implicitly cast to and from System.Decimal. Also see this related StackOverflow post: http://stackoverflow.com/q/693372/450913
I believe, in MultiCharts.NET everywhere in the API that there is ISeries is has to be replaced with ISeries or ISeries

Steps to reproduce this issue

N/A

Comments (0)
History
Issue basics
  • Type of issue
    Feature request
  • Category
    Stability
  • Targeted for
    Not determined
  • Status
    Under Review
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (2)
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
  • Resolution
    Not determined
  • Severity
    Critical
Attachments (0)
There is nothing attached to this issue
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates