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 |

Bull And Bear Balance Indicator Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
topmarx
Posted : Saturday, December 2, 2017 6:19:15 PM
Registered User
Joined: 6/24/2017
Posts: 15

Hello

I would love to recreate the Bull And Bear Balance Indicator for TC2000, I especially want to use it within easyscan, to search for crossovers ?

Has this been done before for TC, as I know many of the traders articles get coded for TC2000?

Thanks M

Bruce_L
Posted : Monday, December 4, 2017 11:47:16 AM


Worden Trainer

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

The base bull formula would seem to be:

IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L))))))

The base bear formula would seem to be:

IIF(C < O, IIF(C1 > O, GREATEST(C1 - O, H - L), H-L), IIF(C > O, IIF(C1 > O, GREATEST(C1 - L, H - C), GREATEST(O - L, H - C)), IIF(H - C > C - L, IIF(C1 > O, GREATEST(C1 - O, H - L), H - L), IIF(H - C < C - L, IIF(C1 > O, GREATEST(C1 - L, H - C), O - L), IIF(C1 > O, GREATEST(C1 - O, H - L), IIF(C1 < O, GREATEST(O - L, H - C), H - L))))))

With the histogram just being the difference between the two.

IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L)))))) - IIF(C < O, IIF(C1 > O, GREATEST(C1 - O, H - L), H-L), IIF(C > O, IIF(C1 > O, GREATEST(C1 - L, H - C), GREATEST(O - L, H - C)), IIF(H - C > C - L, IIF(C1 > O, GREATEST(C1 - O, H - L), H - L), IIF(H - C < C - L, IIF(C1 > O, GREATEST(C1 - L, H - C), O - L), IIF(C1 > O, GREATEST(C1 - O, H - L), IIF(C1 < O, GREATEST(O - L, H - C), H - L))))))

The article recommends smoothing these values with moving averages.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
topmarx
Posted : Wednesday, December 6, 2017 10:46:07 PM
Registered User
Joined: 6/24/2017
Posts: 15

Wow, works like a charm thanks Bruce. I added as an indicator and figured out the smoothing. 

If I now want to create an easyscan, I created the below simple above/below -  but I would like to (1) add smooting, say 5 period to each, and (2) then create a scan for cross-overs, with a large pcf like below I dont know where to add the periods (.1) etc so I can do below say 3 bars ago, above 1 bar ago ?

(IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L))))))) > (IIF(C < O, IIF(C1 > O, GREATEST(C1 - O, H - L), H-L), IIF(C > O, IIF(C1 > O, GREATEST(C1 - L, H - C), GREATEST(O - L, H - C)), IIF(H - C > C - L, IIF(C1 > O, GREATEST(C1 - O, H - L), H - L), IIF(H - C < C - L, IIF(C1 > O, GREATEST(C1 - L, H - C), O - L), IIF(C1 > O, GREATEST(C1 - O, H - L), IIF(C1 < O, GREATEST(O - L, H - C), H - L)))))))

Bruce_L
Posted : Thursday, December 7, 2017 8:47:29 AM


Worden Trainer

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

Every single O, H, L, or C without an offset parameter already would get an offset parameter. So for say 3 bars ago would become O3, H3, L3, and C3. The only thing with an offset parameter already would be C1, so you would add the offset to the existing offset parameter. So for say 3 bars ago would become C4 instead of C1.

All of that said, XUP() and XDOWN() functions were added to the Personal Criteria Formula Language in TC2000 v17 which makes it so you may not need to do offsets.

Let's say you wanted to check for if the 5 period simple moving average of the base bull formula crossed up through its own 2 period simple moving average (so the second line was a 2 period simple moving average of the 5 period simple average of the base bull formula).

XUP(AVG(IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L)))))), 5), AVG(AVG(IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L)))))), 5), 2))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
raider45
Posted : Thursday, December 7, 2017 2:56:52 PM
Registered User
Joined: 9/30/2011
Posts: 788
The following formula generates numbers, I would like the change with signal.
 
IIF (C <O, IIF (C1 <O, GREATEST (H - C1, C - L), GREATEST (H - O, C - L)), IIF (C> O, IIF (C1> O, H - L , GREATEST (O - C1, H - L)), IIF (H - C> C - L, IIF (C1 <O, GREATEST (H - C1, C - L), H - O), IIF (H - C <C - L, IIF (C1> O, H - L, GREATEST (O - C1, H - L)), IIF (C1> O, GREATEST (H - O, C - L), IIF (C1 <O, GREATEST (O - C1, H - L), H - L))))))
 
Thank you and goodbye.
 
Raider45
Bruce_L
Posted : Thursday, December 7, 2017 3:01:19 PM


Worden Trainer

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

And it very well should generate numbers as that is what is described in the S&C article. I cannot write a formula generating a signal without some indication as to what you want the signal to be based on. What needs to happen before the signal returns true?



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
raider45
Posted : Thursday, December 7, 2017 3:11:59 PM
Registered User
Joined: 9/30/2011
Posts: 788

The Crossing Up Value signal on line zero !

Bruce_L
Posted : Thursday, December 7, 2017 3:23:16 PM


Worden Trainer

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

The indicator doesn't even cross through zero (although it can equal zero).

So I guess, above zero:

IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L)))))) > 0

Equals zero:

IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L)))))) = 0

Switching from zero to above zero:

TrueInRow(IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L)))))) > 0, 2) = 1

Switching from above zero to zero:

TrueInRow(IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L)))))) = 0, 2) = 1



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Bruce_L
Posted : Thursday, December 7, 2017 3:27:00 PM


Worden Trainer

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

Maybe you are interested in the Histogram instead? It actually does cross through zero.

Above Zero:

IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L)))))) > IIF(C < O, IIF(C1 > O, GREATEST(C1 - O, H - L), H-L), IIF(C > O, IIF(C1 > O, GREATEST(C1 - L, H - C), GREATEST(O - L, H - C)), IIF(H - C > C - L, IIF(C1 > O, GREATEST(C1 - O, H - L), H - L), IIF(H - C < C - L, IIF(C1 > O, GREATEST(C1 - L, H - C), O - L), IIF(C1 > O, GREATEST(C1 - O, H - L), IIF(C1 < O, GREATEST(O - L, H - C), H - L))))))

Below Zero:

IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L)))))) < IIF(C < O, IIF(C1 > O, GREATEST(C1 - O, H - L), H-L), IIF(C > O, IIF(C1 > O, GREATEST(C1 - L, H - C), GREATEST(O - L, H - C)), IIF(H - C > C - L, IIF(C1 > O, GREATEST(C1 - O, H - L), H - L), IIF(H - C < C - L, IIF(C1 > O, GREATEST(C1 - L, H - C), O - L), IIF(C1 > O, GREATEST(C1 - O, H - L), IIF(C1 < O, GREATEST(O - L, H - C), H - L))))))

Crossing Up Zero:

TrueInRow(IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L)))))) > IIF(C < O, IIF(C1 > O, GREATEST(C1 - O, H - L), H-L), IIF(C > O, IIF(C1 > O, GREATEST(C1 - L, H - C), GREATEST(O - L, H - C)), IIF(H - C > C - L, IIF(C1 > O, GREATEST(C1 - O, H - L), H - L), IIF(H - C < C - L, IIF(C1 > O, GREATEST(C1 - L, H - C), O - L), IIF(C1 > O, GREATEST(C1 - O, H - L), IIF(C1 < O, GREATEST(O - L, H - C), H - L)))))), 2) = 1

Crossing Down Zero:

TrueInRow(IIF(C < O, IIF(C1 < O, GREATEST(H - C1, C - L), GREATEST(H - O, C - L)), IIF(C > O, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(H - C > C - L, IIF(C1 < O, GREATEST(H - C1, C - L), H - O), IIF(H - C < C - L, IIF(C1 > O, H - L, GREATEST(O - C1, H - L)), IIF(C1 > O, GREATEST(H - O, C - L), IIF(C1 < O, GREATEST(O - C1, H - L), H - L)))))) < IIF(C < O, IIF(C1 > O, GREATEST(C1 - O, H - L), H-L), IIF(C > O, IIF(C1 > O, GREATEST(C1 - L, H - C), GREATEST(O - L, H - C)), IIF(H - C > C - L, IIF(C1 > O, GREATEST(C1 - O, H - L), H - L), IIF(H - C < C - L, IIF(C1 > O, GREATEST(C1 - L, H - C), O - L), IIF(C1 > O, GREATEST(C1 - O, H - L), IIF(C1 < O, GREATEST(O - L, H - C), H - L)))))), 2) = 1



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
raider45
Posted : Thursday, December 7, 2017 3:32:54 PM
Registered User
Joined: 9/30/2011
Posts: 788
Congratulations, thank you!
 
Best regards !
Bruce_L
Posted : Thursday, December 7, 2017 4:20:39 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
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.