Test input conditions in the optimizer

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

Viewing 15 posts - 1 through 15 (of 21 total)
  • #176132

    Hello, if I want to check different input conditions with the optimization of other conditions at the same time in the optimizer, how can I do that? Is that possible? I have pre-defined different conditions and am currently always optimizing my strategies with each condition individually. Which of course costs a lot of time. So, as an example, do I want to optimize SL, TP or other conditions at the same time with cond1 or cond2 or cond3 … to find out which cond is currently the best … how can I code that so that it can be used in the optimizer?

    #176134

    You can run any number of variables in the optimizer up to a max number of permutations. You just have to insert a variable in your condition for the value you want to test (eg. the period of a moving average). Then you can run it along with any other variables (stop, target, trail etc) all at once.

    I often set it up with 2-3000 permutations and leave it to run overnight.

    #176135

    Yes … misunderstanding. Explained differently, as an example: cond1 = engulfing, cond2 = lowerhigh and cond3 = Close <EMA200 … how can I automatically compare these with one another in the optimizer and optimize my numerical values? Does that work? The examples are just examples.

    #176138
    #176141

    compare these with one another

    you mean to ascertain which is most effective? you can’t do that in the optimizer, only the operative values.

    to compare them you would have to enter (or omit) them one by one to see which had the best effect.

    #176145

    So the way I’ve been doing it so far. I was hoping there would be an ingenious coding trick for it.

    #176146

    not that I know of!

    #176149

    Hello,

    To compare different conditions in a strategy, I personally use an int optimization variable, like “strategy”, in ProBacktest module.

     

    This can be used in combination of other optimization variables, under the limit of combinations of course
    Is this what you want to implement?
    Fabrice

    1 user thanked author for this post.
    #176160

    And then enter the various strategies as conditions as numbers in the optimizer? So in the way I thought it was possible.

    #176164

    Yes, “strategy” can be a variable that varies between 1 and X with increment of 1, to test different sub-strategies: entries, SL, TP (1 SL distance vs. 1.5 or 2), BE or not. etc…

    And then we use this variable in different locations in the code when needed to make some comparison and test alternative signals.

    Only thing is to note somewhere what are the meaning of the sub-strategies so that we can quickly retrieve which condition is best when the table of results is generated, and it shows that strategy=5 has better gains than strategy=9 for instance.

    #176165

    That’s exactly how it sounds logical. So far I haven’t got it right. Maybe Roberto or Nicolas can help?

    #176166

    What exactly do you want to achieve phoentzs?

     

    #176167

    To compare different conditions in a strategy, I personally use an int optimization variable, like “strategy”

    it’s an interesting way of doing things, but do you find that it actually saves time? the optimizer is still just running them separately, one at a time, as you would do manually. Not so much optimizing as automating part of the test process … but you still have to write all the code and run each one. not sure if it will get you ahead of the game. Perhaps if you add the operative variables as well and ran it overnight – could be worth trying.

    #176178

    @robertogozzi As described above. If I want to compare operational conditions in the optimizer with numerical values ​​such as SL, TP or breakeven at the same time, how can I write the conditions so that they can be processed in the optimizer? As a simple example … we have a breakout strategy and want to compare what works best: cond1 = engulfing, cond2 = higherhigh, cond3 = lowerlow and so on … what works best should be the result.

    #176189

    To compare different conditions in a strategy, I personally use an int optimization variable, like “strategy”

    it’s an interesting way of doing things, but do you find that it actually saves time? the optimizer is still just running them separately, one at a time, as you would do manually. Not so much optimizing as automating part of the test process … but you still have to write all the code and run each one. not sure if it will get you ahead of the game. Perhaps if you add the operative variables as well and ran it overnight – could be worth trying.

    It may not save time for sure. I am not into running backtests overnight yet, so I don’t face such challenges.

    The main idea is to manage several alternative conditions in the same file, instead of creating several trading systems. In the end, you can reuse the conditions as a template to create other trading systems quickly, based on other indicators. It’s more an organization efficiency than pure strategy optimization.

    @phoentzs if we take some examples in your library, it could be something like this.

    https://www.prorealcode.com/prorealtime-trading-strategies/dax-m15-long-wave-diver-with-grid-and-mtf/

    It’s basic IF ELSE statements.

     

     

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

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