Optimization moving average crossing strategy

Forums ProRealTime English forum ProOrder support Optimization moving average crossing strategy

Viewing 15 posts - 151 through 165 (of 186 total)
  • #132260

    I’ve been trying to amalgamate the codes I posted here #130635 as one itf, with cumulateorders =true and without the OTD condition, something like this:

    Results are mixed, mainly because without the OTD (one trade per day) it allows multiple positions to be opened in each time slot. Is there a way to code this so as to have multiple positions, but max one from each time slot?

    1 user thanked author for this post.
    #132273

    Hi, not sure but maybe something like this ?

     

    1 user thanked author for this post.
    #132280

    Hi @Roger, is this what you meant?

    That doesn’t actually help … but probably I’ve made mistakes?

    #132285

    Yes thats it, im going to try to find a solution

    #132304

    Well, I think that the problem is that PRC does not allow to manage each trade independently (partial closure is not allowed)

    1 user thanked author for this post.
    #132307

    Yes, I think you’re right. Even if we could get the opening right, the aggregate of positions would all be subject to the same stop loss, which won’t work.

    Never mind, they work perfectly well separately. Thanks for your help.

    #132393

    This is the 2m version of my ongoing Corona project. Like the 5m it works as one basic strategy divided into 4 separate time slots. All values are identical except for a different pair of crossing averages as thrown up by @jan’s cross-finding engine. There is no other optimisation. The 4 need to be viewed together as 1 strategy; for example the results for (3) look poor but those months are balanced by stronger performance by 1,2 and 4.

    These work with a small SL of just .6% and a healthy risk/reward ratio. Unlike the 5m version, I’ve used @Paul’s ATR trail, but with a conventional break even at .1% This can be switched off, and in some cases that improves profit but with a lower Win%.

    Beware that the back test here is only about 13 months. WF results were very good as you’d expect with no optimisation. There is however the possibility of a sort of reverse curve-fit, ie not that the values are adjusted to fit a particular curve but that the cross-finding engine finds a curve to fit the values you give it. No idea whether that’s better or worse ??? but for my money it seems to be worth a punt. A starting position of €.2pp means a max single loss of around €30

    This can also be used as a template for other instruments, you just have to re-run the cross-finding engine for MAType

     

     

    1 user thanked author for this post.
    #132396

    This is the code I added to @jan’s

     

    3 users thanked author for this post.
    #132405

    Hello,


    @Nonetheless
    , I have been trying to setup your 5m-Corona code on the Wall Street Cash (thanks for sharing!) but for some reasons my Probacktest are giving me no value. I think there might be some reasons to that:

    • Based in Hong Kong so I changed the time for version “a” to: Ctime = time >=213000 and time <230000
    • The minimum order quantity I can set is 0.5, so I changed: ONCE startpositionsize = 0.5, ONCE minpositionsize = 0.5
    • I don’t have access to Wall Street Cash €1 but I have either Wall Street Cash £1 or Wall Street Cash $10. Not sure if you have anything in your code that specifies this market.

    So I don’t see where the problem might be coming from, and I wouldn’t mind some help 🙂

    Thanks

    #132410

    The instrument (Wall St Cash £1 or $10) is not determined in the code, it will run on any chart you launch it from. For me it runs fine with your other settings so not sure where the problem is ???

    #132413

    minimum order quantity I can set is 0.5

    Are you sure this is the min position? If I run mine with position size €.1 then I get the same result as you (my minimum is €.2)

    Try it with startpositionsize = 1

    #132416

    The instrument (Wall St Cash £1 or $10) is not determined in the code, it will run on any chart you launch it from. For me it runs fine with your other settings so not sure where the problem is ???

    Yes that’s what I thought so all good.

    minimum order quantity I can set is 0.5

    Are you sure this is the min position? If I run mine with position size €.1 then I get the same result as you (my minimum is €.2)

    Try it with startpositionsize = 1

    Yes, I am sure about the minimum position, I have attached a screenshot for the sake of being 100% sure.

    I did some further test and weirdly if I change the time constraint and replace the “AND” by “OR”, I have a result.

    Ctime = time >=213000 OR time <230000

    But I am concerned that it may affect the results…

     

    #132422

    I am sure about the minimum position

    your screenshot is the PRT chart, but the minimum position will be set by your broker. If you’re with IG, you have to go to their web platform and click on the info button, see attached image.

    My first thought about the time was to change AND to OR, but that wouldn’t be right as you’re still in the same day. OR would only be used if it were

    Ctime = time >=213000 OR time <010000

    ie the second time is less than the first.

    #132424

    Yes, I understand and I assumed the OR would not be the solution.

    I am with IG and the minimum position is 0.25 but it does not work with the “OR” if I use anything less than 0.5

    May I attach the code “A” in here, maybe I am missing something…thanks for the help here!

     

    #132433

    I have tested the exact same in M15 and I get results for A and D, but nothing for B and C. If that ever helps.

Viewing 15 posts - 151 through 165 (of 186 total)

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