Back test with old formula

I have written a formula and done the back test of this. Again i have modified the formula and again done the backtest. But the result of latest back test is same as that of previous back test. But the formulas are entirely different.
for example,
i have written formula1 and result is backtest1.
Again, i have written formula2 and the backtest result should be different as per my formula, but the same previous back test result is coming as per formula1.
Is there any setting, so that the backtest result should come as per the formula.

1 Like

Which "formula" do you have in the Analysis Window before running the backtest?

(Image source: Using New Analysis Window)

You need to send a formula from AFL Editor to the Analysis Window - steps given in the above image source link. Or "Pick a formula".


As per my code, there will be buy signal when the 20D EMA crosses 50D EMA from below, but the backtest show the buy signals when 5D EMA crosses the 22D EMA from below.

As per my formula (when 20D EMA crosses 50D ema from below), the last buy signal should be 9.29 on 7th June 2019. But as per the back test the last buy signal is 20.29 7th June, 2019 (which is, when 5D EMA crosses 22D ema from below). For proof i have attached 3 screen shots.

  1. Parameters of EMA (20D crossing 50D) along with timing of buy.
  2. Backtest result of buy timings.
  3. Parameters of EMA (5D crossing 22D) along with timeing of buy.

Please guide me, how to resolve the issue. error1

1 Like


1 Like


1 Like

In case you haven't figured it out yet - like you can play with parameters on Charts, you can also play parameters from Analysis Window.


1 Like