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 4 years ago by avatarMike.
Viewing 15 posts - 16 through 30 (of 57 total)
  • #108772

    Mike – Welcome to the forums.

    Please always use the ‘Insert PRT Code’ button when putting code in your posts as it makes it far easier for others to read and to copy. I have tidied up your post for you 🙂

    Also try to be more careful when posting as I have also had to delete two of your posts that were identical or almost identical to previous posts.

    #108775

    Hi Vonasi

    Thanks for the welcome

    Noted and Thanks re the posts.

    I have made only one post, albeit with responses to GraHal, who has been helping me. I did look for a solution but found none, hence the new post.

    Could you direct me to the other two please?

    Thanks
    Mike

    #108779

    The other two places were double post by you within this thread. You posted the code twice and also your last comment twice. It is as if you submitted them and then added a slight change to them and submitted them again. I have deleted them so they are gone forever into the bottomless internet dustbin and so I cannot now direct you to them. 🙂

    #108780

    Good job I read them first … so it’s okay Mike! 🙂

    #108782

    Yes – I did add to my replies. I saw GraHal had done the same and thought that was how it was done. Clearly not! I’ll review the videos/rules so I do it right. The forums are great so I’ll get it right. There were two slightly different pieces of code – I appreciate that had I used the button all would be well. Cheers

    #108784

    The code looked identical to me so sorry if there was a minute difference that I missed before hitting ‘delete’ and sending it off into the ether.

    You can edit any of your posts within five minutes of submitting them by using the EDIT button but not once that time has expired. Moderators can edit posts at any time for you if requested to do so or if they feel it is necessary.

    #108785

    No worries – it was my error.

    Thanks for the EDIT advice

    #108788

    Well I was getting weird stuff also, which if it was my own code I probably would have kept going trying to find out WHY!?  But I would have got sick to death of myself in the meantime and often think at that point we need somebody to pull us off the job and go for a beer!!! 🙂

    Sooo I decided to comment out your Trailing Stop and use a TP and SL at lines 34 and 35 ans lines 52 and 53 and attached is the result.  Rest of your code I left as is … but I did reduce Lot size.

    Lot size = 1 so as you were using Lot size = 10 in theory – if you had a big enough wallet you could make more with attached than your Trailing Stop / 130K version … but was that real anyway??? 🙂

    A buy and hold since 1 Aug 2010 would have made you slightly more, but at a bigger drawdown.

    PS

    I think the Issue / weirdness we both got was to do with the Trailing Stop. A few on here have said they have ad Issues / Trailing Stops are not working etc.

    #108793

    Thanks GraHal

    You’re a man after my own heart. I’ve already started on the beer 🙂

    I’m not 100% sure what changes you’ve made. Could you attach the code please?

    I know Nicolas has written a trailing stop algorithm. I may try that or just tweak a fixed stop.

    Thanks again for spending so much time on this. I’ll let you know if I can fix it based on the sideways market of the last 21-24 months.

    1 user thanked author for this post.
    #108796

    I’ll let you know if I can fix it based  on the sideways market of the last 21-24 months.

    That version of mine makes over 10K in the past 24 months … so just keep enjoying the beer and making the money! 🙂

    The code is attached to my post as an .itf and to see the differences enter your version and mine on the link below. Takes less than 1 minute (after you have got in a routine), you don’t need to sign up / in and it’s easier than doing a spot the difference check. I uses it often.

    https://www.diffchecker.com/diff

     

    1 user thanked author for this post.
    #108798

    Sorry

    Missed the file link – thought it was the name of the picture files. (Novices – they’re hopeless, you know!) Thanks also for the diff checker. I had a quick run at your code on tick by tick (on True too) and am now very much looking forward to Monday!!

    I think I’ll be able to afford wine too now 🙂

    Plagiarism is a wonderful thing

    Thanks again

    1 user thanked author for this post.
    #108803

    looking forward to Monday!!

    Yeah rather than spend time (wasting our lives! 🙂 ) and frustration trying to analyse / quantify why we get weirdness it’s more efficient to get the System working somehow and spawn another version or get on with the next strategy?

    I wish I followed my own advice as I get a bit obsessed myself (with car problems and DIY also!) 🙂

    I ran the v2 version through Vonasi Robustness Tester and it comes out as a good score (attached)!

    Let’s see what Vonasi has to say about it, he often has a near opposite view on various trading strategy matters which can all be grist to the mill!

    #108808

    Let’s see what Vonasi has to say about it

    I asked Vonasi on the link in case you wonder what I am on about? 🙂

    https://www.prorealcode.com/topic/day-month-year-strategy-robustness-tester/page/5/#post-108805

     

    #108814

    am now very much looking forward to Monday!!

    Don’t set it going Live until we have Demo Forward tested it for a while!!

    I just noticed an error I made because I wasn’t concentrating!!

    The TP and SL on the short side should be as below!

    I am still reworking it  at a 1 hour TF , but make the changes below and see what you get on the 1 day??

    EDIT / PS

    TP = 50
    SL = 50
    are (still) the best settings for 1 Day TF but they do need to be in the code position as above.

     

    #108815

    I had a quick look at it and yes the robustness test results are good. Attached are my 20/5 robustness test results.

    The entry conditions do seem like they have the potential to be curve fitted and analysis of so many variables and combinations of variables to confirm whether they are or are not curve fitted could take an awful long time.

    There is also the concern that during the test period the DJI has basically been a bull market except since the beginning of 2018 where it has been going sideways in a very volatile manner. The majority of robustness tests show the equity curve as being under water for 50% to 75% of the first part of the test period before taking off in a very bullish market and then going sideways again in a very volatile sideways market. This concerns me. Would I want to trade something that goes sideways or is in a small loss for 7 to 8 years of a 9 year test period – probably not.

    At the end of the day we must always compare our equity curve to buy and hold on something like the DJI. We either want to seriously beat it or get very close to it but avoid all the major draw downs on the way or we want a strategy that just consistently and repeatedly makes money and more money than we could get if we invested in something much lower risk than spread betting.

    It can seem sometimes as GraHal says that my views are opposite to what others want to hear about a strategy but it is always a good idea if you are going to risk your own hard earned money on a strategy to take one step back (or three or four preferably!) and try to find as many reasons why you shouldn’t be trading it before counting all the reasons why you should be trading it. Sometimes one big reason can stand out and be a singular reason as to why you should not trade a strategy and sometimes a whole bunch of small reasons can add up to be enough reason not to.

    In the adrenaline rush of the excitement of feeling that you could suddenly be rich if this strategy works out it is sometimes difficult to step back and with a cool head look for reasons why it is actually a rubbish strategy. I have created strategies in the past that have kept me awake at night with excitement but then after two or three days of hard testing I have decided to never ever trade. Don’t be in such a rush to be rich or you could find that you just rushed towards being poor!

    1 user thanked author for this post.
Viewing 15 posts - 16 through 30 (of 57 total)

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