You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if we say are defining the next in the strategy class like buy and sell actions how can we track this in the _trade_data object so we can track easily when the order was placed and when the broker executed the buy sell and hold to present in the plots ?
Backtesting version: 0.1.2
The text was updated successfully, but these errors were encountered:
results._trade_data, as mentioned in #4, is only available after the simulation run. For the time being, if you need to query state during the simulation, you should look into the properties of Position (Strategy.position) and track state changes manually yourself.
trades = _trade_data
final = pd.DataFrame()
final = final.append(trades[trades[["Entry Price"]].notnull().all(1)])
final = final.append(trades[trades[["Exit Price"]].notnull().all(1)])
final = final.sort_index()
It looks like this just shows the buy/close position dates.
if we say are defining the next in the strategy class like buy and sell actions how can we track this in the _trade_data object so we can track easily when the order was placed and when the broker executed the buy sell and hold to present in the plots ?
The text was updated successfully, but these errors were encountered: