Skip to content

IQuote not found? #203

Answered by DaveSkender
Jenscaasen asked this question in Q&A
Discussion options

You must be logged in to vote

You cannot modify IQuote directly, rather you'd need to add it to your pre-existing class equivalent of Quote. The code in your app should look something like this:

using Skender.Stock.Indicators;

[..]

public class MyCustomQuote : IQuote
{
    // required base properties
    public DateTime Date { get; set; }
    public decimal Open { get; set; }
    public decimal High { get; set; }
    public decimal Low { get; set; }
    public decimal Close { get; set; }
    public decimal Volume { get; set; }

    // custom properties
    public int MyOtherProperty { get; set; }
}

If you're getting CS2046 'IQuote' could not be found, then I'd check to make sure you've 1) supplied the using statemen…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DaveSkender
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #203 on December 09, 2020 03:51.