LinePlotterIndicator is not a real indicator but a wrapper to show lines on the chart, hence the name.
If you want the output, you should wrap the operations you want considered in indicator classes.
and indicators to a csv but the format is not very friendly to importing using pd.read_csv
It was not meant to be pure csv output.
Is there a way to custom format the output of the csv from bt.Writer?
Writer and customizing the output.
These are limitations from
matplotlib. The shortcuts may be found in the
self.data_length = [len(data) for data in self.datas]
Don't you think that you should be initializing that to
0? It's simply a matter of good style and the data feeds may have initialized themselves in the background and be growing in length.
the datas with idx 1, 2, 3, 4, 6, 7, 8, 9 are from replaydata, the ones with idx 0, 5 are data feeds from IB. Why do the data lengths of replaydata decrease time to time?
Unless you show us the code, how can we tell what you are doing?
1.I am using bracket order example code, bracket order, but when I change the stop and profit limits(p2 and p3) such as they are out of range , for example p2=800, It does orders without issuing any error??!!!
p2=800 out of range? What is the range? Which error are you expecting?
2.when does the self.position condition get True(being in the market)? I checked this several times, but it doesn't get True at all.
self.position references a position open for
self.datas, which is the first data feed introduced in the system). If it isn't
True, you haven't opened a position.
- .I am using data having 200 length. When It ends and plots, some trades are not shown as colored(green and red triangles) triangles
Unless you give as a chart and the operations log, not much can be said.
- is there any method to apply trailing stop in bracket orders?
That you use a
Data feeds get the length incremented when new data has arrived. As such
list) a data structure with as many
0as data feeds you add to the system
self.datasand the previous data structure and check the
lenof each. If it has increased, new data is there.
You may want to let us know (in code terms) what you have done and what your expectations are. Your message isn't clear at all.
In any case one can tray to read between the lines that your problems may have to do with intraday data and
pyfolio expects daily returns (at least with the versions that worked, because the API kept changing and there could of course have been an update)