dwxconnect icon indicating copy to clipboard operation
dwxconnect copied to clipboard

trouble with get_historic_data

Open bojnordsky opened this issue 2 years ago • 6 comments

Hi there How can I access historical data after I call that function? It just tells us how many bars are there. I tried to read the historic_data_file in the DWX folder but it doesn't;t update when I change the currency. Also, sometimes It doesn't make any file in that directory.

bojnordsky avatar May 11 '22 13:05 bojnordsky

Hi, If you call the get_historic_data function, the respond should trigger the on_historic_data(self, symbol, time_frame, data) function of the tick_processor class as in the example script.

Per default it just prints the length of the data, but you can also print the whole thing, or do any calculations with it.

elvinex avatar May 25 '22 11:05 elvinex

Many thanks. Another question: Is there any way to get some indicator data? for instance, can I access the RSI of MACD, etc.? I already know we can recode those indicators but this would be easier :)

bojnordsky avatar May 26 '22 07:05 bojnordsky

And also, can I access multiple currencies' historical data at once?

bojnordsky avatar May 26 '22 07:05 bojnordsky

Many thanks. Another question: Is there any way to get some indicator data? for instance, can I access the RSI of MACD, etc.? I already know we can recode those indicators but this would be easier :)

Hi @bojnordsky . One option you could employ is the pandas-ta library module, which offers some common indicators. If not, I think another alternative would be to include the functions for your indicator into the EA and make calls to it..

teddywaweru avatar May 26 '22 10:05 teddywaweru

Many thanks. Another question: Is there any way to get some indicator data? for instance, can I access the RSI of MACD, etc.? I already know we can recode those indicators but this would be easier :)

Hi @bojnordsky . One option you could employ is the pandas-ta library module, which offers some common indicators. If not, I think another alternative would be to include the functions for your indicator into the EA and make calls to it..

Many thanks. And what about the other question?

bojnordsky avatar May 26 '22 10:05 bojnordsky

You can subscribe to bar data for multiple symbols, but only request historic data for single symbols.

However, you can just send get_historic_data in a loop for multiple symbols. The response to all these requests will be stored in a dictionary self.dwx.historic_data, which you could use.

elvinex avatar May 26 '22 13:05 elvinex