What do you think will happen when you switch AND and OR?
I think you don't understand my request. I exactly know what logical operator do ...
I want that my tester change automatically my input with all combination with "and and "or" (above is a simple example)
Exactly the same way as the tester can test all combinations for input betwwen 1 and 10 for example.
Hello everyone,
I want to backtest my code with the strategy tester but i want an external input that say sometimes it's "&&" sometimes it's "||", is it possible ?
Example :
External_Input_1 between 1 and 10 (in the strategy tester)
External_Input_2 between 1 and 10 (in the strategy tester)
External_Input_3 between 1 and 10 (in the strategy tester)
I want to test all combination of external input BUT i also want all combinaision with || instead of && :
Thank you in advance !
Just use a bool input to switch between two different functions for 'and' 'or'
Imagine there is 1000 possible combinations... i will not switch manually to test everything.. that's my point i want to use the strategy tester for that.
With just this tiny example i have 4 combinations :
if (MyVar_1==External_Input_1 && MyVar_2==External_Input_2 && MyVar_3==External_Input_3)
if (MyVar_1==External_Input_1 || MyVar_2==External_Input_2 || MyVar_3==External_Input_3)
if (MyVar_1==External_Input_1 && MyVar_2==External_Input_2 || MyVar_3==External_Input_3)
if (MyVar_1==External_Input_1 || MyVar_2==External_Input_2 && MyVar_3==External_Input_3)
In my Code is many more than 4...
Thank you
I think that you should rethink and refactor your "logic" for the your code. Break it down and simplify it in logical repeatable terms. Then using arrays of the data (instead of individual variables), you can iterate over it (using loops), to get a final result of the calculations.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone,
I want to backtest my code with the strategy tester but i want an external input that say sometimes it's "&&" sometimes it's "||", is it possible ?
Example :
External_Input_1 between 1 and 10 (in the strategy tester)
External_Input_2 between 1 and 10 (in the strategy tester)
External_Input_3 between 1 and 10 (in the strategy tester)
I want to test all combination of external input BUT i also want all combinaision with || instead of && :
Thank you in advance !