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
Equity should be adjusted on the last tick to the close price of the final bar if a position is open.
Actual Behavior
Equity does not update on the last tick, the last two values in the equity array are the same, but only if trade_on_close=True
Steps to Reproduce
trade_on_close set to True
strategy results in open position at the very end
strategy I used: simple SMA crossover with n1 = 10; n2 = 30. Historical data was the last 5 years in daily bars of MSFT
Additional info
Noticed the discrepancy when comparing to my own little program. https://i.gyazo.com/a794c733395d9de06440b94bf6f7a700.png
The above array is from my code. I double checked and I believe that my code does it correctly and the fact that the last value repeats is suspicious.
Backtesting version: 0.?.?
The text was updated successfully, but these errors were encountered:
Expected Behavior
Equity should be adjusted on the last tick to the close price of the final bar if a position is open.
Actual Behavior
Equity does not update on the last tick, the last two values in the equity array are the same, but only if trade_on_close=True
Steps to Reproduce
Additional info
Noticed the discrepancy when comparing to my own little program.
https://i.gyazo.com/a794c733395d9de06440b94bf6f7a700.png
The above array is from my code. I double checked and I believe that my code does it correctly and the fact that the last value repeats is suspicious.
The text was updated successfully, but these errors were encountered: