dwxconnect
dwxconnect copied to clipboard
trouble with get_historic_data
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.
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.
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 :)
And also, can I access multiple currencies' historical data at once?
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. 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?
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.