I have tested the code to do place buy orders and backtested the code. It works on entering new buy positions. However, when I try to use liquidate these buy positions, it does not work on backtest. Is it not possible to backtest closing positions? Do I use liquidate or do I use sell orders to close these positions?
1
1