Optimization moving average crossing strategy

Forums ProRealTime English forum ProOrder support Optimization moving average crossing strategy

Viewing 15 posts - 16 through 30 (of 186 total)
  • #122782

    To avoid comparing the same MA

    That’s great Jan, should speed things up too, 70 less pairs to check.

    I think that only has to be added to one set of the MAs, no? ie not the MAtypeV2 as well

    I have tried altering the period but so far 15 on both sides seems to give the best result.

    #122783

    Best optimization for 200k:

    ONCE MAType = 3
    ONCE MATypeV2 = 9

    1 user thanked author for this post.
    #122786

    Excellent – thanks Francesco!

    That combination does well enough in the ancient history, but more importantly it’s getting good results this year — 3 and 9 it is.

    #122787

    @Jan — forget my query about the alteration to the code, of course it only has to be added once at the beginning of the list. Brain fog.

    #122790
    Jan

    Hi Nonetheless,  thanks for the reply, not sure what you meant ” @jan — forget my query about the alteration to the code, of course it only has to be added once at the beginning of the list. Brain fog.”

    Have a nice weekend.

     

    To avoid comparing the same MA (assuming the periods remain fixed), which is then meaningless, the very simple code is:

    //Before all average definitions:

    if MAType <> MATypeV2 then

     

    //after all average definitions

    Endif

    You have to do this code AROUND all averages, both MAType and MATypeV2 in my opinion.

    I think that if you code it only around the MAType defined averages, the first set,  the strategy optimizing would give an error because when both (MAType and MATypev2) are the same,  MAType would be excluded and undefined, which results in Nothing (MAType) crossing a average MATypeV2, which should give a error.

    #122794

    not sure what you meant

    Because my first thought was that “if MAType <> MATypeV2 then” had to be added to each MA — ie 140 times, but of course it’s just once at the beginning of the list. That was the foggy brain part. Never mind… have a great weekend!

    #122821

    DAX 1H looks very promising. Thanks

    #122832

    Here’s another way of using this. The attached itf isolates just the ‘search engine’ part so that it can be inserted into any existing strategy. For example, if you had certain indicators and conditions on a daily TF, you could insert this on a 1h TF and it will find a pair of crossing MAs to use as additional entry conditions within the context of your other filters and parameters etc.

    Very effective!

    2 users thanked author for this post.
    #122867

    Hi Jan,

    This one I am trying to activate on the DAX 1 min. It shuts down after a few seconds, minutes or hours (without reason).

    I hope you can find what I’m missing. Alvast bedankt!

     

    #122869

    Has it ever traded … even once?

    What is the Rejection stop message when it shuts down … you can see these in the Orders List, Rejection / Cancelled Tab.

    #122872

    It never traded.. I quits without reason..

    #122873

    Try below … as without the Flatbefore (which you didn’t have) then all times are flat after … if you understand my logic?

     

     

     

    #122876
    Jan

    hi Frenqle,

    hard to test in the weekend.

    What do mean with ” after a few seconds, minutes or hours (without reason).” you tried different timeframes ? If you had used the hourly timeframe, did it then stop immediately ?

    It seems consistent with the base code.

    Did you try to leave the original code and set it fixed to the required 2 averages, does that work ?  (I saw you stripped to code to only the 2 averages you want)

    KR Jan

    #122879

    Would there be possible to make a code that look at a higher TimeFrame pair crossing, and when that happened execute an order on a lower time frame for an optimized crossing for that timeframe? Or would that just result in very few trades? Just been doing ProRealTime for a week so thats out of my competence level =)

    What I want to do is, find a optimal crossing for a long position on lets say the daily or 4H chart, and when that happened, look for a optimized crossing for long position on a much lower timeframe like 15 min, 5 min, etc. So we just take trades in the “right” trend at the moment. And wise versa for the short position. That should improve the winning %?

    Awesome code both Jan and Nonetheless, thank you!

    #122884

    @dnystrom I dont think you would want an actual crossover in both time frames as that would be a fairly rare occurrence and, as you say, result in v few trades. Better would be to use some kind of trend indicator in the daily TF, then insert the part of the code i posted above (MACross finder) in the shorter TF and let it find the best crossover to work in conjunction with your daily filter.

    It’s possible of course to load it in both TFs and optimize them separately, but I wouldn’t expect it to work very well. (or maybe it would – try it and let us know!)

Viewing 15 posts - 16 through 30 (of 186 total)

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