- ago
Hi, is there any way to use the Building Blocks so that I can link multiple condition blocks with or?

Example:



In C# coding, it is represented this way with multiple AND links.



Basically I would have already an idea in C# how I can use conditions so that these are possible with an OR.

But I would like to know if this is also possible with the building blocks in the design surface.

Regards Christian
11
1,227
Solved
12 Replies

Reply

Bookmark

Sort
- ago
#1
Hi Christian,
It's a FAQ: "I'm building a strategy from Blocks and missing OR Divider"
0
- ago
#2
Yes I found it but these are not the correct solution...

It's not gone, just different. Option 1: Drop another Entry/Exit block with another condition to be OR'd. Option 2: Use a Multi-Condition Group and set At least N Condition(s) True to '1'. For more info, see Building Blocks > Building Block Rules in the Help Guide.

OPTION 2 is not possible when you have 2 necessary conditions as true in every block.
OPTION 1 opens two orders when the both conditions in another Entry/Exit block is also true.

So for my understand, the only possibility is the C# coding which is fine for me and the easiest way also.

Regards Christian
0
Best Answer
Cone8
 ( 4.98% )
- ago
#3
Yes, you're right. I'm not sure if it's possible, but this case is a good argument to bring back the OR Divider... or maybe even an elegant new ConditionBuildingBlock AND/OR property that could just be checked to make it an OR.
3
- ago
#4
Is "Or" an option in building blocks? For example, Is it possible to code a strategy that enters when the Close is above the 50 day SMA "Or" the 200 day SMA?
0
Glitch8
 ( 10.62% )
- ago
#5
You can use a Multi-Condition Group and say 1 of 2 Conditions are true.
0
Cone8
 ( 4.98% )
- ago
#6
Multi-Condition takes care of most "OR" applications, but not the one in Post #1.

We'd need a M-C of an M-C, which probably won't happen.
0
Glitch8
 ( 10.62% )
- ago
#7
I was addressing Moptop specifically. Originally, he had posted this in a standalone thread, but Eugene combined them, somewhat confusing the conversation.
0
- ago
#8
Is the condition therefore achievable?
I created an example branch that could be achieved with the "or" conditions.
And why not also add “flex”, I’ll leave you with this article to understand how it works.
https://help.tc2000.com/m/69401/l/1200586-how-to-use-flex-scan-conditions

0
Glitch8
 ( 10.62% )
- ago
#9
The flex here looks like it is similar to our Qualifier concept, and we have a Qualifier that is "for N Consecutive Bars" that looks like it would match this one.

But no, a Block Strategy like this isn't achievable in WL8 until we implement this #FeatureRequest.
0
- ago
#10
Yes, we can find an alternative with multi-condition group.
However here I checked "muss pass in order" which means that it will respect the order of the conditions. While multi-conditions do not respect the order.
In a way, “flex” would simply be the integration of respect for order.

In my example, I make my stochastic take the form of a pullback + breakout of the neutrality zone.
0
Glitch8
 ( 10.62% )
- ago
#11
Looks like Build 62 is turning into a "non-trivial" update. We just activated this for development. On top of that, you'll be able to nest Multi-Conditions Groups. So, the Building Block designer is getting a level up in flexibility.
3
Glitch8
 ( 10.62% )
- ago
#12
Here's how you'll implement the original strategy once Build 62 is released.

3

Reply

Bookmark

Sort