vicsharp-shibusa / kyna

Open source stock data collection and analysis.
MIT License
2 stars 1 forks source link

Need a way to create chart properties in the configuration JSON. #63

Closed vicsharp-shibusa closed 5 months ago

vicsharp-shibusa commented 5 months ago

In CandlestickSignalRunner:

            var chart = new Chart(item.Code, item.Industry, item.Sector)
                .WithCandles(ohlc)
                .WithTrend(new MovingAverageTrend(new MovingAverageKey(21), ohlc))
                .Build();

It would be better if the trend mechanism was defined in the configuration JSON. We probably need a standard for this - how to define chart construction in a JSON section.

vicsharp-shibusa commented 5 months ago

This is complete. The following example is from a back-testing configuration file.

 "Chart Configuration": {
     "Interval": "Daily",
     "Moving Averages": null,
     "Trend Configuration": [
         {
             "Trend": "S21C",
             "Weight": null
         }
     ]
 }