Support Board
Date/Time: Sun, 22 Dec 2024 10:13:45 +0000
Post From: Crossover strategy
[2015-02-14 22:28:40] |
Sawtooth - Posts: 4141 |
You can use the same logic concept in post #3 to 'latch' the crossover TRUE to wait for the offset to be reached: O3: =IF(CROSSFROMBELOW(C3:C4,D3:D4),TRUE,IF(CROSSFROMABOVE(C3:C4,D3:D4),FALSE,O4)) P3: =IF(CROSSFROMABOVE(C3:C4,D3:D4),TRUE,IF(CROSSFROMBELOW(C3:C4,D3:D4),FALSE,P4)) Then latch the offset TRUE until the opposite crossover so that you don't get multiple entries: Q3: =IF(AND(C4-D4<=0.2,C3-D3>0.2),TRUE,IF(CROSSFROMABOVE(C3:C4,D3:D4),FALSE,Q4)) R3: =IF(AND(D4-C4<=0.2,D3-C3>0.2),TRUE,IF(CROSSFROMBELOW(C3:C4,D3:D4),FALSE,R4)) (I modified the offset formulas) Then find the first time they both are TRUE: K3: =AND(O3,Q3,Q4=FALSE) M3: =AND(P3,R3,R4=FALSE) You may need to release the double IF latch with another condition to get the exact entries you want. A variation of this concept can be used in a variety of situations. Date Time Of Last Edit: 2015-02-15 04:55:50
|