hi all,
Seems the datetime in OrderData is of float type. Just want to know how to change float type to regular datetime type, Thanks~
hi all,
Seems the datetime in OrderData is of float type. Just want to know how to change float type to regular datetime type, Thanks~
Hi all, I face a problem on simultaneously execution of multi assets. My strategy needs the backtest engine to execute assets simultaneously ( 4 assets, 2 buy orders and 2 sell orders) in next bar( 5 mins bar or 10 mins bar). So I want to know can I see the volume of next bar in next() function, if I can see the volume of next bar, then I can send no order if there is a leg with 0 volume. Or is there any other solution to this problem. Thanks all.
@backtrader I think it's more convenient for me to put the lines into data, because what I am testing is option. I have several option hot contracts of current month and next month with different strikes from 2015-2019 in 1 minute freq. It's time consuming to compute greeks and iv every minute when testing, especially when I need to test different strategy parameters. And there are other statistics like strike price and put/call type. So I first compute all the statistics. Anyway, Can I directly put the statistics already computed into indicators. If not , how could I resample these statistic, just keep the last one . the followings are my lines, thanks
@backtrader Because I have computed many statistics, I thought it cannot be uploaded to indicators; BTW can I just upload the statistic already calculated to indicators?
@backtrader I fo the update func in_Bar class and I'm planing to rewrite the update func. But how can I get all lines of a GenericCSVData object, thanks!!!
@backtrader is there any to do with it, e.g to keep the last value of the timeframe?
@alicc BTW, what I need is just keep the last value of my own lines, Thanks
Hi all,
I met some problem when resampling my own datafeeds. Besides the default lines OHLC , vol and oi, I added some other lines into data such as PE and Volatility. when I resample it, it's ok for the OHLC, vol,and oi, but my own lines are all nan value. Is there any other params I need to set in the cerebro.resampledata(data, kwargs**)?
@ab_trader Thank u. Actually printing is just a test, what I need is that if I can trade the first data before 2017-12-18. For the reason I may test strategies with thousands of instruments with different date range ,and the strategy requires to do some trade earlier when some of data haven't begun, is there any solution to it?
Hi all,
I tested a strategy feeding two data into cerebro . The first data is from 2017-12-01 to 2017-12-31; the second is from 2017-12-18 to 2017-12-31. Both is daily freq. When I printed both of them day by day, the first data before 2017-12-18 was not printed out. What is the problem?