Backtest results change when I stop using variables

Forums ProRealTime English forum ProOrder support Backtest results change when I stop using variables

  • This topic has 56 replies, 3 voices, and was last updated 5 years ago by avatarMike.
Viewing 15 posts - 1 through 15 (of 57 total)
  • #108743

    When I back test with 5 variables I get a profit of £130k.  When I change the variables to their optimised absolute values within the code (ready to Automatic Trade) I get £18k.  When I change 1 absolute value back to a variable (which I have left “sitting” in the variable optimisation section) I get £130.

    Can anyone advise me what I might be doing wrong.

    Thanks

    Mike

    #108746

    This is a tick by tick mode “problem”.  Even with variables set to fixed values the tick by tick mode does not activate.

    I thought clicking on each line of the optimisation report was supposed to activate tick by tick mode.  It seems not.  Can anyone advise how to get reliable test results?

    Thanks

    Mike

    #108751

    Have you got tick by tick selected?

    #108752

    Yes.  I realise that Optimisation does not use tick by tick, although I have ticked that option.  I thought that clicking on the apparently optimal set of variables would “drill down” into a tick by tick test.

    #108754

    I thought that clicking on the apparently optimal set of variables would “drill down” into a tick by tick test.

    You are correct.

    I bet you feel like you are going mad / why does stuff like this happen to me?? 🙂  I often think the same when weird stuff happens to me!

    I can’t think of anything else to offer, but I would test your code if you post it on here and then we can see if I get the same result as you?

    I’ll keep thinking also.

     

     

    #108755

    Thanks

    I’ll quadruple check my settings and then assuming I’ve not been a total twat I’ll post the code.  Yes – thought I was losing it 🙂 All problems solved on Saturday and all back today! Great!

    Thanks for taking the time to reply on Sunday.

    Code to follow

    #108756

    Is the 130k read only from the Opti Table and then when you click on that line you get 18K on  the equity curve?

    You also get 18K when you put values in the code and then run the Backtest?

    EDIT /PS

    Just thought of this … Optimisation does not take account of a final Open trade, but running a Backtest and seeing  the equity curve does take account of an Open Trade.

    Unless you are using huge Lot Size I cannot see an Open trade losing 112K??

    #108757

    £130 was top of the opti list.  When I click that line it shows £130 on the Detailed Report and on the Equity Curve.  This is consistent for any line I select.

    When I replace the variables in the code with the absolute values of the optimised test I get 18k.  This is with tick by tick selected.  When I de-select tick by tick witht the absolute values hard coded I get…..yep £130

    This is where I concluded that it was a tick by tick problem…

    Still quadruple checking the setup 🙂

    #108759

    In response to your PS – no, the equity curve looks great as it’s a nice steady uptrend, on the tick by tick and on the £130.  Trade size is £400 – £600.  Just that the tick by tick appears to get stopped out way sooner than the opt result (just based on looking at the first few trades)

     

    #108762

    This is the Hard Coded version with the variables as absolutes. Gets £18k

     

    #108763

    If you export (to an .itf file)  the code with all the Opti values still set up etc and post that then I can import with all yuor settings and I can pop it on my Platform in less than 1 minute and it ensures I get all settings same as you.

     

    #108764

    Here’s the one with the variable

    #108766

    hard coded numbers in this one

    #108768

    Just that the tick by tick appears to get stopped out way sooner than the opt result (just based on looking at the first few trades)

    Above sounds like it is blowing your account??

    I imported your hard coded version and it is doing just that … using all 10k starting capital.

    You have not said what market, timeframe etc?

    Why don’t you try below …

     

     

     

    #108770

    Sorry – I did not make my comment clear. My account (£10k) doesn’t get blow. I just meant that, eg Trade number 2 makes much more on Opt than it does in hard code as the tick by tick takes it out during day 1, whereas on Opti it runs for 3 days for a nice wee profit.

    Dow Jones Industrial on Daily

    I set “True” because I started testing this from 2014 and the DJI was trending up, so adding to my positions produced more profit. I’m now testing in choppy waters so I’ll re-run with False

    Thanks

    False = =£125 and £18 (False makes more sense logically in choppy market and it may be a way to simplify the manual testing that I seem to be destined to do). No pressure but I’m hoping for some magic 🙂

Viewing 15 posts - 1 through 15 (of 57 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login