Subscription & data-feed pricing Class schedule

Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.

 Right conditions but bad results Rate this Topic:
 Previous Topic · Next Topic Watch this topic · Print this topic ·
VikinGo75
 Posted : Thursday, February 28, 2019 4:38:54 PM
Registered User
Joined: 12/27/2011
Posts: 39

Gm, i've written this condition formula:

- Stocks between 40 - 100 with daily range > 4%

- Stocks between 100 - 200 with daily range > 3%

- Stocks over 200 with daily range > 2%

(((((H-L)/L)*100) > 4) AND (40<C<100)) OR (((((H-L)/L)*100) > 3) AND (100<C<200)) OR (((((H-L)/L)*100) > 2) AND (C>200))

but in the results i find also stocks between 40 and 100 with a daily range between 3 and 4 (it should be at least 4).

Why? I don't understand.

Thank You

V.

Bruce_L
 Posted : Thursday, February 28, 2019 4:49:00 PM

Worden Trainer

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

For starters, you can't just write 40<C<100, you need to write this as 40 < C AND C < 100 instead. In any case, please try the following.

`(40 <= C AND C < 100 AND 100 * H > 104 * L) OR (100 <= C AND C < 200 AND 100 * H > 103 * L) OR (200 <= C AND 100 * H > 102 * L)`

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
VikinGo75
 Posted : Thursday, February 28, 2019 4:53:26 PM
Registered User
Joined: 12/27/2011
Posts: 39

QUOTE (Bruce_L)

For starters, you can't just write 40<C<100, you need to write this as 40 < C AND C < 100 instead. In any case, please try the following.

`(40 <= C AND C < 100 AND 100 * H > 104 * L) OR (100 <= C AND C < 200 AND 100 * H > 103 * L) OR (200 <= C AND 100 * H > 102 * L)`

It works! n&deg; 1 Bruce.

Thank You very much.

VikinGo75
 Posted : Thursday, February 28, 2019 6:05:06 PM
Registered User
Joined: 12/27/2011
Posts: 39

Bruce, same problem:

- Stocks with fibonacci daily between 100 and 61,80 (at bottom) AND Close < Open

- Stocks with fibonacci daily between 38,20 and 0 (at top) AND Close > Open

((C-H)/(H-L)*100> -100 AND ((C-H)/(H-L)*100) < -61 AND C<O) OR ((C-H)/(H-L)*100> -39 AND C>0)

What's wrong?

Thank You.

V.

Bruce_L
 Posted : Friday, March 1, 2019 9:58:33 AM

Worden Trainer

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

You didn't provide specific examples of bad results, but the formulas can be shortened.

`(STOC1 <= 38.2 AND C < O) OR (STOC1 >= 61.8 AND C > O)`

I did eliminate the requirement that the close be above the low from your formula in the first section since it wasn't part of your English language description or have a similar section in the second part of your formula that the close be below the low.

I also refined the results to 61.8 and 38.2 instead of 39 and 61 as that is what was in the English language description.

The last letter `O` in your formula actually seemed to be the number `0` (zero). This would have meant the close just needed to be positive (which is it for all stocks) instead of having to be above the open.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
VikinGo75
 Posted : Friday, March 1, 2019 11:12:33 AM
Registered User
Joined: 12/27/2011
Posts: 39

No words, big thank you Bruce.

raider45
 Posted : Saturday, March 2, 2019 11:09:26 AM
Registered User
Joined: 9/30/2011
Posts: 788
I have tested the following formula, I would like to explain the mechanism of the functioning of the quotation in relation to Fibonacci.

(STOC1 <= 38.2 AND C <O) OR (STOC1> = 61.8 AND C> O)

Thank you and goodbye.
Raider45
raider45
 Posted : Monday, March 4, 2019 10:13:09 AM
Registered User
Joined: 9/30/2011
Posts: 788

I would like to have a PCF Formula with the signal on the retracement = <100 of Fibonacci.

I thank and greet Raider45

Bruce_L
 Posted : Monday, March 4, 2019 1:06:00 PM

Worden Trainer

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

I didn't really develop the formula VikinGo75 provided. I only tried to streamline it. That means I cannot really explain the original intent.

That said, the open always comes before the close. The high and low could be the open or close, but are generally between the open and close in that they cannot happen prior to the open or after the close. We cannot tell if the high or low happened first using just daily data.

So let's take a look at the first part.

`10 * STOC1 <= 382 AND C < O`

It checks for the close to be in the bottom 38.2% of the candle with the close between the open and low (albeit possibly at the low).

The second part checks for the reverse.

`10 * STOC1 >= 618 AND C > O`

This checks for the close to be in the top 38.2% of the candle with the close between the open and high (albeit possibly at the high).

Is it necessarily a fib retracement? No. But it does use fib percentages as to where the closing price is relative to the entire range of the day.

With this in mind, the value cannot be greater than 100% or less than 0%. So if you were to take this to its logical conclusion where you were looking only at extreme cases, the formulas would be:

`(L = C AND C < O) OR (O < C AND C = H)`

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
raider45
 Posted : Monday, March 4, 2019 1:14:10 PM
Registered User
Joined: 9/30/2011
Posts: 788

Congratulations, thank you! Sincerely !
Bruce_L
 Posted : Monday, March 4, 2019 1:17:02 PM

Worden Trainer

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

You're welcome.

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

 Forum Jump Customer Training & Support - Ask a Trainer - TC2000 version 12/18 - Ask a Trainer - TC2000 version 7 - Ask a Trainer - StockFinder 5.0 - PCFs, EasyScan and Custom Indicators General Discussions - Stock and Market Talk - TC2000 version 12 or 18 - TC2000 version 7 - StockFinder 5.0 - RealCode for StockFinder 5.0 Tutorial Videos - TC2000 version 12 tutorial videos - TC2000 version 7 tutorial videos 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.