Test input conditions in the optimizer

Forums ProRealTime English forum ProOrder support Test input conditions in the optimizer

Viewing 6 posts - 16 through 21 (of 21 total)
  • #176195

    Ok, I’ll give it a try this way. Thanks. Does the wave diver still work? I haven’t tried it in a while.

    #176197

    Do as shown in my pic.

    But optimizing conditions doesn’t make sense, as they are logical (boolean) values returned when conditions are met or not met, you can’t change the returned value for:

    this way (setting start=0, end=1 and step 1), it simply can’t work as the optimizer tells you (which one is the best, 0 or 1?):

    rather, you can optimize 20 (the number pf periods) and 0 (the type of MA) because they are values of your choice that you want to optimize to make crossovers being tested differently each time, but when a crossover occurs…. it simply occurs even if the optimizer tells you that it would be better not to!

    As to the above example, simply run the optimizer 3 times, commenting out two of the three lines at at a time to see what results any one of those conditions yields.

    #176496

    Hello,

    To illustrate my previous messages with concrete example, here is a strategy that was recently published, with different conditions.

    https://www.prorealcode.com/prorealtime-trading-strategies/3-lines-break-reversal-strategy-on-trending-stocks/

    The variable strategy is fixed to 2 in the code, but you can delete it and transform it into an optimization variable to make it vary and test several conditions in the same system.


    @nonetheless
    don’t be freaked out, this is my very first code published, lol!

    #176504

    this is my very first code published

    I’m sure it’s wonderful, but what instrument do you run it on – equities?

    #176510

    yes, equities on a daily timeframe

    1 user thanked author for this post.
    #192419

    how can I code that so that it can be used in the optimiser?

    Currently the way i do that is select two variables for each condition in the optimiser, one would turn-it on, and another one that is just so extreme that it would actually never trigger that indicator or that makes it always true – so its like the way to enter / omit each different condition or indicator from your strategy in a back test to optimise what ones (or combination of indicators) works best,

    for example:

    Another thing i’ve tried to do is to do loops like below, which seems to work with certain conditions BUT i think i’m still getting errors with some conditions. For conditions ive coded myself it works wonderfully, same results as if i inout or delete that conditions from my BUY conditions myself one by one.  But it appears the in-built indicators within PRT is where the errors occur. Probably due to the type of variable’s or something in the blackbox algorithms  ? So would like to figure out how to improve this approach to optimisation:

    and leave it to run overnight.

    By the way Ive tried it before but the PRT program has always closed down before i wake up and lost all the information too. It is as if it has a kill switch at like 5am every day or something?. Any suggestions how to force it to stay open overnight whilst i sleep?

    1 user thanked author for this post.
Viewing 6 posts - 16 through 21 (of 21 total)

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