My code was working fine in the earlier version of amibroker. Just upgraded to latest amibroker and for the openlongpositions it shows “invaliddatetime”
backtest works fine otherwise, the only thing it messes is CAR (compounded annual return). When i change the timeframe to ‘daily’ the error goes away. but as soon as i put weekly, invaliddatetime shows up against openlongpositions.