feat: candlestick chart support trade indicator
about https://github.com/imaNNeo/fl_chart/issues/1995
I have added a new tradeSignalType property to CandlestickSpot, which includes four types:
buy/sell/trade/none.
When the type is not none, it will display a corresponding trading
signal above the candlestick based on the different types
such as
This approach is not scalable, and it just applies to the signal type. For example, if someone wants to have a similar feature for just indicating important points, we have to develop a new feature. So I would like to suggest implementing it in a generic way, For example, you can define a concept called candleIndicatorPointer, and it is something that we draw on top (or bottom) of the candles (using an enum, for example). Then we can have an abstract painter inside that, and we can define a CandleBalloonPainter (which is what you already want. So it has a text resolver that you can customize the text that it shows, and you can implement your usecase to show buy, sell, ... indicators.
Someone else can use it to show different wordings for a different concept. This way, the balloon painter is reusable for any other use cases. We can also define new painters for different shape of indicators.
I know it makes it more challenging to implement. But I'm sure it aligns with our goal: to be fully customizable. I appreciate your understanding. Thanks!
Hello, I sincerely apologize for the inconvenience. The author account of this PR has been disabled and is no longer available (@artsooter is my old account).
I've submitted a new PR incorporating your feedback. Thank you!
new PR (https://github.com/imaNNeo/fl_chart/pull/2032)