Registered User Joined: 10/28/2012 Posts: 9

Hello Bruce returning customer . i use to have this formula working great in the past but now saying i have an error in the formula.
(AVGH14  AVGL14) / 2 + (ABS(H  C1) + ABS(C1  L) + ABS(H1  C2) + ABS(C2  L1) + ABS(H2  C3) + ABS(C3  L2) + ABS(H3  C4) + ABS(C4  L3) + ABS(H4  C5) + ABS(C5  L4) + ABS(H5  C6) + ABS(C6  L5) + ABS(H6  C7) + ABS(C7  L6) + ABS(H7  C8) + ABS(C8  L7) + ABS(H8  C9) + ABS(C9  L8) + ABS(H9  C10) + ABS(C10  L9) + ABS(H10  C11) + ABS(C11  L10) + ABS(H11  C12) + ABS(C12  L11) + ABS(H12  C13) + ABS(C13  L12) + ABS(H13  C14) + ABS(C14  L13)) / 28 / C *100 > 1.75
it says unable to parse number 1.75 at position 480

Worden Trainer
Joined: 10/7/2004 Posts: 65,008

Did you possibly switch to a computer using the , as the decimal marker instead of using the . as the decimal marker as is more common in the United States?
Please try the following instead (it is shorter because there have been improvements to the PCF Language since your formula was written).
100 * ATR14 / C > 175 / 100
Bruce Personal Criteria Formulas TC2000 Support Articles

Registered User Joined: 10/28/2012 Posts: 9

thanks Bruce much appreciated

Registered User Joined: 9/17/2010 Posts: 478

Bruce, out of idle curiosity, why not
100 * ATR14 / C > 1.75

Worden Trainer
Joined: 10/7/2004 Posts: 65,008

Not all places use a . as the decimal marker. Some places use the , as the decimal marker instead for example. TC2000 does not handle this well.
If the software is run locally on a computer where the decimal marker is set to use the , instead of the . then everything done on the computer itself will want the , as the decimal marker. This includes custom indicators plotted on the chart and the testing of formulas.
But lots of calculations happen on our servers even if the software is running locally (as opposed to using TC2000 Anywhere). All of the calculations are running on a computer where the . is set as the decimal marker. Such calculations include things like WatchList columns, scans, and alerts.
This means the best solution for situations where the comma (,) is set as the decimal marker instead of the period (.) being set as the decimal marker as is more common in the United States is to try to not use decimal markers in the formula at all. This is why instead of writing:
1.75
Which does include a decimal marker, we would write:
175 / 100
Which does not include a decimal marker in such situations.
Since there weren't any actual syntax errors in the original formula and since the customer was not located in the United States, the most likely fix was to eliminate decimal markers from the formula (and I might as will simplify it with new syntax while I was at it).
Bruce Personal Criteria Formulas TC2000 Support Articles

Registered User Joined: 9/17/2010 Posts: 478

Thanks. Rats, I knew that, just didn't make the connection.Sorry

Worden Trainer
Joined: 10/7/2004 Posts: 65,008

You're welcome. Even if you knew it, having it explicitly written out again in the forums is a good idea as other people might find it easier to find the answer and reason on their own if it happens to them.
Bruce Personal Criteria Formulas TC2000 Support Articles
