Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 18:57:20 +0000



Post From: Trying to OR(AND a condition and I think I'm wrong.

[2024-05-20 18:45:14]
ForgivingComputers.com - Posts: 960
As was mentioned by @emmanuel, you are looking for Exclusive OR (XOR: either is true, but not both).

XOR(a,b) = (a && !b) || (!a && b)

1. Divergence detector has an up arrow on the current bar and Heiken-Ashi bar is green

a = AND(ID27.SG4>0,!(ID18.SG4>ID18.SG1))

2. Divergence detector has an up arrow on the current bar and Heiken-Ashi bar is a very skinny doji with just a small amount of body.

Since this cannot be a Green Bar, the Doji is either Open=Close, or Open>Close.

b = AND(!(ID27.SG4>0, ID18.SG4<=ID18.SG1)),(ABS(ID18.SG1 - ID18.SG4 <.50))