New version 18 available now


Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Nested IIF and Greatest Functions Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
esc
Posted : Thursday, December 06, 2018 8:18:58 AM
Gold Customer Gold Customer

Joined: 3/11/2013
Posts: 22

I have what I consider to be a complex PCF need.  I think it might be doable using nested IIF and Greatest functions but have not had luck so far.  Here is the logic:

Group A:
A1)  ABS(C2-L1)
A2)  ABS(C2-H1)
A3   H1-L1
 
Group B:
B1)  ABS(C1-L)
B2)  ABS(C1-H)
B3)  H-L
 
Scan1= Largest Group B value is 25% bigger than the largest Group A value 

Scan2= Largest Group B value is 25% smaller than the largest Group A value

 

Can anyone lend a hand?

Bruce_L
Posted : Thursday, December 06, 2018 10:06:36 AM


Worden Trainer

Joined: 10/7/2004
Posts: 64,323

The following formulas are for TC2000 v18.

Scan1:

GREATEST(ABS(C1 - L), ABS(C1 - H), H - L) >= 1.25 * GREATEST(ABS(C2 - L1), ABS(C2 - H1), H1 - L1) AND (H <> L OR H <> C1 OR L <> C1)

Scan2:

GREATEST(ABS(C1 - L), ABS(C1 - H), H - L) <= .75 * GREATEST(ABS(C2 - L1), ABS(C2 - H1), H1 - L1) AND (H1 <> L1 OR H1 <> C2 OR L1 <> C2)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.