Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help wanted: maintain chart demo site #212

Open
DaveSkender opened this issue Mar 27, 2022 · 1 comment
Open

help wanted: maintain chart demo site #212

DaveSkender opened this issue Mar 27, 2022 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@DaveSkender
Copy link
Member

DaveSkender commented Mar 27, 2022

I'm looking for help with some light work to maintain the demo site. It's an Angular frontend with a .NET Web API backend. Mostly just copying code and modifying it to add any indicators that are available in the indicator library but not yet available in the demo chart + keeping up with new or modified ones.

No time pressure on this one, but some level of commitment is appreciated. Let me know if you're interested. This is relatively easy stuff, so newbies are welcome here; I'll still be involved, be available for pair programming, and help with code reviews + will be looking at new features over time. Ideas are also welcome.

How to add indicators (example):

  1. add Controller for API, such as:

    [HttpGet("EMA")]
    public IActionResult GetEma(
        int lookbackPeriods)
    {
        try
        {
            IEnumerable<Quote> quotes = FetchQuotes.Get();
    
            IEnumerable<EmaResult> results =
                quotes.GetEma(lookbackPeriods)
                      .TakeLast(limitLast);
    
            return Ok(results);
        }
        catch (ArgumentOutOfRangeException rex)
        {
            return BadRequest(rex.Message);
        }
    }
  2. Add indicator metadata that is used by the chart user interface:

    // Exponential Moving Average
    new IndicatorList
    {
        Name = "Exponential Moving Average (EMA)",
        Uiid = "EMA",
        LegendTemplate = "EMA([P1])",
        Endpoint = $"{baseUrl}/EMA/",
        Category = "moving-average",
        ChartType = "overlay",
        Parameters = new List<IndicatorParamConfig>
        {
            new IndicatorParamConfig {
                DisplayName = "Lookback Periods",
                ParamName = "lookbackPeriods",
                DataType = "int",
                DefaultValue = 20,
                Minimum = 1,
                Maximum = 250
            }
        },
        Results = new List<IndicatorResultConfig>{
            new IndicatorResultConfig {
                DisplayName = "EMA",
                TooltipTemplate = "EMA([P1])",
                DataName = "ema",
                DataType = "number",
                LineType = "solid",
                DefaultColor = standardBlue
            }
        }
    }
  3. Make sure it works correctly:

    image

@DaveSkender DaveSkender added help wanted Extra attention is needed good first issue Good for newcomers labels Mar 27, 2022
@DaveSkender DaveSkender moved this from Maybe to In Progress in Stock Indicators for .NET Mar 27, 2022
@DaveSkender DaveSkender moved this from In Progress to Do Next in Stock Indicators for .NET Mar 27, 2022
@DaveSkender DaveSkender moved this from Do Next to Icebox in Stock Indicators for .NET Apr 17, 2022
@sshquack
Copy link

Hi @DaveSkender I can try to add the following the three indicators to the charts and see how it looks:

@DaveSkender DaveSkender moved this from Icebox to Do Next in Stock Indicators for .NET Dec 25, 2022
@github-project-automation github-project-automation bot moved this to 💡 Triage in Stock Charts Apr 19, 2024
@DaveSkender DaveSkender moved this from 💡 Triage to 🔖 Do next in Stock Charts Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: 🔖 Do next
Development

No branches or pull requests

2 participants