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

PCF from SC Article Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Gary3302
Posted : Friday, March 22, 2019 9:52:40 PM
Registered User
Joined: 1/5/2008
Posts: 117

The below PCF's appear in an article by Christian Pratsch in the April Edition of S & C.  When I try to use the formulas I keep getting an error message "Unmatched Parentheses."  Thanks in advance for the help.

 

Long: (STOC12,1 > 78) OR ((STOC12,1 < 78) AND (STOC12,1 > AVG(STOC12,1,3)))

 

Short: (STOC12,1 < 78) OR ((STOC12,1 > 78) AND (STOC 12,1 < AVG(STOC12,1,3)))  

Al_Gorithm
Posted : Saturday, March 23, 2019 7:25:30 AM

Registered User
Joined: 6/30/2017
Posts: 1,227

I don't use Stochastic PCFs, but you should be able to figure it out here: http://forums.worden.com/default.aspx?g=posts&t=66571.

I'd taka a crack at it, but I'm going out on a coffee & donut run. :)

Al_Gorithm
Posted : Saturday, March 23, 2019 8:14:18 AM

Registered User
Joined: 6/30/2017
Posts: 1,227

Haven't finished my coffee yet, but this syntax returns no error messages. Whether it does what the author intended is a question for someone else. :) ...

STOC12.1 > 78 OR STOC12.1 < 78 AND STOC12.1 > AVG(STOC12.1,3)

I prefer the dots to the commas (in this case) which allowed me to ditch a bunch of the parenthesis.
 
Good luck!
Gary3302
Posted : Saturday, March 23, 2019 9:03:29 AM
Registered User
Joined: 1/5/2008
Posts: 117

Thanks, really appreciate you taking the time to do that.  Seems to be working fine.

Al_Gorithm
Posted : Saturday, March 23, 2019 11:08:48 AM

Registered User
Joined: 6/30/2017
Posts: 1,227

Happy to help!

I'm lazy, so whenever I need a PCF I ask Bruce (he spoils me) but in this case a quick look at the documentation shows the correct syntax. I'm still not sure what the difference is between an indicator version and a function version, but maybe Bruce can explain the significance (if any) Monday.

Also, it's a shame the PCF in the S&C Mag returns an error. It's not the first time I've encountered errors in the code in that magazine. I know publishing ain't easy, but c'mon ... a little proofreading would be awesome.

Bruce_L
Posted : Monday, March 25, 2019 10:34:31 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I wish there were a difference between the indicator and function versions. I really do.

It would be very nice if the function version took another indicator formula as one of its arguments and could be used kind of like how Data Source works on plotted indicators but with other formulas as arguments instead of a plotted indicator.

Unfortunately there pretty much isn't a difference and it doesn't work that way (except when it does for example with moving averages, minimum, maximum, greatest, least, sum, and all of the math functions).

The only time it seems to make any difference when both versios of the syntax exist as far as I can tell is averages, minimimum, maximum, and one indicator. That indicator is Bollinger Bands. The function version allows you to specify a fractional width setting while the indicator version does not (because the period gets interpreted as indicating the next parameter instead of as a decimal marker in the indicator version).



-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.