execute next() step for each tick
Hey, everyone. i want to backtest a strategy base in 5min, but i will modify the limit order based on the new tick data coming once i send a limit order. Can i use the data replay function with tick data to achieve this goal? Is it means backtrader will execute the next function for every tick?
replaywill send each tick to
next. That's the point.
Ray-0403 last edited by
Another problem relate to it. Let's say i placed a stoptraillimit order and the order has been executed. (the trailamount is 3 pips), i backtest the strategy tick by tick. Is it means the stop price will be recalculated for every new tick coming rather than recalculated by using the latest 5min bar's close price?
(The Doc says that : the stop price is recalculated by using the latest close price and substracting the trailamount distance)
Each incoming tick happens to be the last available
closeprice for the current bar.
@backtrader so if i want to access the newest tick data i should use datas.close, right? If i want to access the current bar's high and low value and the last closed bar's close price, i use datas.high and datas.low and datas[-1].close? It's confusing. Sorry, i am new to backtrader...