Thanks.
Right now I can very easy to get such line with:
[dt.fromordinal(int(v)) for v in ind.data.datetime.array]
Thanks.
Right now I can very easy to get such line with:
[dt.fromordinal(int(v)) for v in ind.data.datetime.array]
As we can see in the cerebro plot sample below, there should be a 'cross' mark moving with mouse pointer,
However, in my work with PyCharm IDE, I can get the figure as below but no such 'cross' mark pointer, why? This issue bother me a long time. Any comment is very appreciated.
Thanks.
Right now I can very easy to get such line with:
[dt.fromordinal(int(v)) for v in ind.data.datetime.array]
Reason to get such line is to export all data lines of an indicator to a DataFrame for checking data correctness, described as here
Thanks in advance.
Thanks. I can get the name list and then using _getline('name') to fetch the line object.
By the way, I find it's not easy to get the datetime series from the indicator instance, how can I do?
All lines in the indicator are for computing the signals, I need to dump them out for checking if there is any computing error. My idea is to dump them to a DataFrame with date as index and each line as column.
Say that an indicator sample as below:
class MyIndicator(bt.indicator):
lines = ('mva1', 'mva2')
def __init__(self):
self.l.mav1 = ....
self.l.mav2 = ....
My question here is how to get the names, 'mva1' 'mva2', from the existed MyIndicator? I would like to iterate myindicator.lines to get the names but it seems no such attribute, any idea?