facioquo/stock-charts

add sample signals to the chart

Closed this issue · 4 comments

Hi Dave,

Thanks a lot for your project! it is so easy for me to backtest my strategy! I can test any condition I want through your library. I did several backtest successfully yesterday night.

And I want to show my backtest result on the candle chart (add the buy or sell signal on the chart). And I also want to add indicators (like MACD, and so on.) below the candle chart or on the candle chart. You can tell me how to do it and I think I can complete it.

Thanks

If you’re okay with the architectural model of this demo site, there’s a few broad steps to consider:

  1. Update the API to have an endpoint that returns your backtest results.
  2. Add the backend Metadata information that tells the UI how to display the data. You could specify it as “oscillator” chart type if you want it commingled with all the other smaller charts, or create your own type if you want more control over how it looks.

The candlestick patterns, like Doji, can be an example of how to show signal arrows.

Regarding showing other indicators, that’s already there just use the pencil icon to add them.

I’m converting this issue to an enhancement. I’ll try to add an example or two of adding signals in the demo chart. Some thoughts:

  • select strategy with parameters
  • generate included indicators and signals from unique API endpoint
  • show + / - labels on unique chart

On reflection, I don’t think I’ll ever prioritize these strategy signal enhancements over more basic needs and within the narrow scope of this demo site. It’d be fun, but it will never get acted on in any foreseeable future.