Code: Select all
if currentcontracts <> currentcontracts then begin;
centerpoint = centerpoint * (1-lambda) + lambda * close;
This doesn't seem to be doing anything in the backtest. It's just operating as if the lambda doesn't exist.
Further, rather than the close price in the above centerpoint formula, more accurately, I want to use the last price I traded at. Is there a keyword that will always generate the very last price that I traded at.