How to get Dataseries from Bars?

Created at 08 Nov 2022, 09:33
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
MA

How to get Dataseries from Bars?
08 Nov 2022, 09:33


I have a situation where I have a list of symbols, and I want to get the RSI of each symbol.

I can get the RSI of one symbol easily, but to get the RSI for other symbols, I need that symbol's Dataseries.

 

I used marketData.getBars(), and I can get bars, and high or low. No problem. But i cannot cast this to Dataseries.

How do I convert result of marketData.getBars() to dataseries, so I can pass into first parameter of RSI.



EDIT:

Found.

getBars().ClosePrices returns a dataseries.


@manoj.clsd.kumar@gmail.com