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 |

TC2007 : IF / ELSE programming? Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
traderlees
Posted : Thursday, May 15, 2008 11:30:47 AM
Registered User
Joined: 1/28/2008
Posts: 7
Support,
    In TC2007 (PCFs), is it possible to program a PCF with some conditional processing like :
IF (condion-A) 
    return 1 
ELSE 
    return 0

      Any insights/workarounds are appreciated.
StockGuy
Posted : Thursday, May 15, 2008 5:26:23 PM

Administration

Joined: 9/30/2004
Posts: 9,187
Might be possible if you provide a specific example of what you're looking for.

ABS(C>C1) + 1, for example, returns a value of 2 when C>C1 is True.
bustermu
Posted : Thursday, May 15, 2008 8:36:31 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
QUOTE (traderlees)
In TC2007 (PCFs), is it possible to program a PCF with some conditional processing like :

IF (condion-A)
return 1
ELSE
return 0


traderlees,

Yes.  A PCF of the form:

ABS( A )

always returns 1 when A returns True and returns 0 when A returns False.

Thanks,
Jim Murphy
diceman
Posted : Thursday, May 15, 2008 9:32:08 PM
Registered User
Joined: 1/28/2005
Posts: 6,049
You may be interested in this:
 
 
 
 
 
Thanks
diceman
 
 
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.