thanks! it worked
Best posts made by Gleetche
-
RE: Fractional Sizes not working from sample code
Ah i just need to remove
if args.fractional:
cerebro.broker.addcommissioninfo(CommInfoFractional())
Latest posts made by Gleetche
-
RE: "Remove argument"
@run-out oh sorry,
class DonchianChannels(bt.Indicator): alias = ('DCH', 'DonchianChannel',) lines = ('dcm', 'dch', 'dcl',) # dc middle, dc high, dc low params = dict( period=20, lookback=-1, # (-1) = doesnt current bar ) plotinfo = dict(subplot=False) # plot along with data plotlines = dict( dch=dict(color="black"), # use same color as prev line (dcm) # dcl=dict(_samecolor=False), # use same color as prev line (dch) ) def __init__(self): hi, lo = self.data.high, self.data.low if self.p.lookback: # move backwards as needed hi, lo = hi(self.p.lookback), lo(self.p.lookback) self.l.dch = bt.ind.Highest(hi, period=self.p.period) self.l.dch2 = bt.ind.Highest(hi, period=self.p.period+30) # self.l.dcl = bt.ind.Lowest(lo, period=5)
-
"Remove argument"
Hey there,
I am trying this donchian channel from:
https://www.backtrader.com/recipes/indicators/donchian/donchian/and my ide suggests me to remove ",period=self.p.period" from
self.l.dch = bt.ind.Highest(hi, period=self.period)
"
Can anyone explain why?
-
RE: Fractional Sizes not working from sample code
Ah i just need to remove
if args.fractional:
cerebro.broker.addcommissioninfo(CommInfoFractional()) -
Fractional Sizes not working from sample code
hi,
I copy-pasted the sample code from:
https://www.backtrader.com/blog/posts/2019-08-29-fractional-sizes/fractional-sizes/#trading-cryptocurrencies-fractionsFrom the blog itself, the log should be :
But mine is:
As you can see, the sample log's size is -16.4574...
mine does not have any decimals.Am I doing anything wrong or am I missing something?
-
RE: How do I install the sample data from backtrader library?
Because I have
- Downloaded the files
- Tried pasting it into several folders of my project files, expecting it would "fit".
and still:
- Downloaded the files
-
RE: How do I install the sample data from backtrader library?
"So the good way to play with the Backtrader's samples is to actually clone the Backtrader repository and work directly with it."
and how do I do this? How do I clone the backtrader repository into my directory? or how do I place the specific data into the place where I needed to place? Where do i place it?
I have downloaded the file. I just don't know what do with it.
-
RE: How do I install the sample data from backtrader library?
@vladisld
My question is how do I install it? I apologize if my question is not clear. -
RE: How do I install the sample data from backtrader library?
@vladisld it would be helpful if you elaborate more. I have pasted the directory to my project directory and the problem persists. Which source code are you talking about?
-
How do I install the sample data from backtrader library?
Hi there,
I am trying to run the sample code from:
https://www.backtrader.com/blog/posts/2019-08-29-fractional-sizes/fractional-sizes/
,and it uses the sample data from backtrader library. Since I copy pasted the code and ran it, it says there is no such data, so I will assume I have to download it manually. And I guess this is where to get the data from:
https://github.com/mementum/backtraderBut how do I install it? the installation note :
Which I already did when I first installed backtrader.