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


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

PCF for OPEN Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
gabe.aboitiz
Posted : Tuesday, February 23, 2016 12:26:19 PM
Registered User
Joined: 11/19/2015
Posts: 7

Hi Bruce,

I was wonderinf how to combine two if then statements? I wanted to create a PCF where todays open must be between yesterdays open and close regardless if yesterday was green or red. I broke these up into two if then statements where

IF (C.1>O.1) THEN (O<C.1) AND (O>O.1)

and

IF (C.1<O.1) THEN (O>C.1) AND (O<O.1)

How would i be able to combine the two?

StockGuy
Posted : Tuesday, February 23, 2016 12:35:02 PM

Administration

Joined: 9/30/2004
Posts: 9,187

Try this: (O < C1 and O > O1) OR (O > C1 and O < O1)

This formula will return True when today's Open falls between the previous day's Open and Close.  It checks for both "up" and "down" days.

gabe.aboitiz
Posted : Tuesday, February 23, 2016 2:08:34 PM
Registered User
Joined: 11/19/2015
Posts: 7

Hi Bruce, 

thanks so much. i just ended up using

ABS(C.1-O.1) >= ABS(C.1-O) AND
ABS(C.1-O.1) >= ABS (O.1-O)

I was wondering how one would code in consistently lower swing point highs and conversely consistently higher swing point lows?

 

StockGuy
Posted : Tuesday, February 23, 2016 2:39:07 PM

Administration

Joined: 9/30/2004
Posts: 9,187

You might find some of this material useful Plotting Swing Highs and Lows with Dots.

There are a few more links within that topic as well.

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.