Also I think max should be 'Max'. I don't think it should make a difference but the documentation prefers this method

Latest posts made by Ola D
-
RE: Find the intraday "high" and "low" in 1min bar?
-
RE: Find the intraday "high" and "low" in 1min bar?
@Anthony-Chow said in Find the intraday "high" and "low" in 1min bar?:
ize=0,ago=??) to find the high at beginning ?
Dayhigh = max(self.datahigh.get(size=len(self),ago=0))
I think this will work. Size is the number of candles you want to account for while ago is how many candles ago you want the iteration to end
-
Live Feed vs Backtesting
Hi, I'm just learning about backtrader and I have some questions regarding how the program processes backtesting as opposed to live trading (in my case, Interactive Brokers).
First off, I'm not sure if backtrader's buy and sell orders sell at the candle's close or not. For example: if a candle has an OHLC of (30,31,28,29) will the code automatically sell at 29 when it's done processing?
In addition to this, while in live trading, will the program wait till the candle is fully formed before making orders or as the live data feed is coming in for that same candle, the 'next' function keeps getting iterated. If the latter is the case, then how does that work? Sorry if this seems a bit confusing. If it is, please let me know so I can clarify any way I can. Thanks