How do I nest conditions in the IF section
7 replies
Dave_C
11 years ago #110820
How do I nest conditions in the IF section
That is –
If A is True and ((B and C are true) or (D and E are true))
I cannot find an area where the brackets () can be added.
Mark Fric
11 years ago #120702
Hello,
there is a possibility to specify and/or conditions and to select brackets in every trading rules line, see attached image.
The condition in the second screenshot corresponds to your example, the ‘Market Condition is Flat’ is only an example.
Mark
StrategyQuant architect
machairu
11 years ago #120706
The nesting condition is not so easy for newbie like me but it is much interest. Kindly,give an example of how to use brackets in conjuction with the AND/OR connectors.For instance if( A or B or C and D,E) then……..How/where do you place the brackets.Kindly attach an image.
Machairu
Dave_C
11 years ago #120710
I can see what you are saying but this is very obtuse.
How do I close the brackets in correct sequence?
machairu
11 years ago #120712
Hey Dave,
I meant something like this: Is there the correct way to place the brackets.
Case 1 (A or B or C and D or E)
Case 2 ((A or B or C) and (D or E))
Case 3 (((((A ) or (B ) or (C ) and ((D) or (E)))))
Sorry for being obtuse.
Machairu
Dave_C
11 years ago #120713
Hi Machairu
I think you misinterpreted my request. I was not directed at you. We have a common request.
This was directed at SQ support.
Regards
David
Mark Fric
11 years ago #120719
Hey Dave,
I meant something like this: Is there the correct way to place the brackets.
Case 1 (A or B or C and D or E)
Case 2 ((A or B or C) and (D or E))
Case 3 (((((A ) or (B ) or (C ) and ((D) or (E)))))
I understand it could be little bit complicated at first, but after you’ll understand it it is actually very simple.
The only difference between how you wrote it and EA Wizard is that in EA Wizard each condition A, B, C, D, E is in its own line.
But you’ll use the same brackets.
For example Case 2 : ((A or B or C) and (D or E))
can be made in EA Wizard like:
(( A
or B
or C )
and
(D
or E))
Mark
StrategyQuant architect
Dave_C
11 years ago #120725
Thanks for your reply Mark.
Only now have I woken up to the fact that when adding conditions, the second and last columns contain the dropdowns for the brackets.
Your support is really appreciated.
Viewing 7 replies - 1 through 7 (of 7 total)