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

Creating a Condition for a Condition Column Check Mark Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Al_Gorithm
Posted : Monday, May 21, 2018 3:03:15 PM

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

Hey Bruce, having a senior moment ...

The screen grab below is from a workspace from the "Elder-disk" I bought once upon a time. I wanted to take the three Impulse colors and, in addition to the row of dots plotted on the chart. add three condition columns to a watchlist when each of the red, green, and blue conditios are true.

In the dialog below, is False = 0? True = 1? (Or some other value?)

So, when I want to display a check in my watchlist when the condition is True, can I accept the default choice below? (ie, Greater than 0.00).

Bruce_L
Posted : Monday, May 21, 2018 3:06:02 PM


Worden Trainer

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

My guess would be Greater Than 0.00, but I don't actually have access to the Elder-Disk to know for sure what formulas are being used for the dots on the chart (to know what is returned when true versus what is returned when false).

I use the following for red.

C < XAVGC13.1 AND 119 * C + 765 * XAVGC12.1 < 65 * XAVGC26.1 + 819 * XAVGC9.1

The following for green.

C > XAVGC13.1 AND 119 * C + 765 * XAVGC12.1 > 65 * XAVGC26.1 + 819 * XAVGC9.1

And the following for blue.

SGN(C - XAVGC13.1) <> SGN(119 * C + 765 * XAVGC12.1 - 65 * XAVGC26.1 - 819 * XAVGC9.1)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Al_Gorithm
Posted : Monday, May 21, 2018 3:18:07 PM

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

Thanks, Bruce. I'm such a putz. I just went ahead and tried it - I really can't break anything.
<slaps forehead>

Being a programmer, I assumed 0 would be False. Honestly didn't even look at the PCFs.

It seems to be working. The one or two that didn't I'm assuming is because the market is open and price just caused a color change between the time the watchlist columns rendered and the time I looked at that particular chart.

Which brings up another question, but that's for another day.

Thanks!

Al_Gorithm
Posted : Monday, May 21, 2018 3:22:10 PM

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

... and here are the 3 PCFs. Haven't compared them to yours. When you have a minute let me know what you think. Yours look shorter, maybe because this Elder-disk was developed around the time v12 was the latest and greatest ...

Red
 
(XAVGC13 < XAVGC13.1) AND ((XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) < (XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)))
 
Green
 
(XAVGC13 > XAVGC13.1) AND ((XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) > (XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)))
 
Blue 
 
((XAVGC13 <= XAVGC13.1) AND ((XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) >= (XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)))) OR ((XAVGC13 >= XAVGC13.1) AND ((XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) <= (XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9))))     
 
Thanks!
 
Bruce_L
Posted : Monday, May 21, 2018 3:36:50 PM


Worden Trainer

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

Mine really are just designed to be shorter versions of those formulas.

I take advantage of the fact that an exponential moving average always moves in the direction of what is being averaged. So:

XAVGC13 < XAVGC13.1 can be shortened to C < XAVGC13.1

Also uncascaded the exponential moving averages and used the difference equation for exponential moving averages to shorten:

((XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) < (XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)))

Into:

119 * C + 765 * XAVGC12.1 < 65 * XAVGC26.1 + 819 * XAVGC9.1

It even ends up being a bit shorter than the modern syntax (and can calculate with less data).

MACD12.26 - XAVG(MACD12.26, 9) < MACD12.26.1 - XAVG(MACD12.26.1, 9)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Al_Gorithm
Posted : Monday, May 21, 2018 4:54:11 PM

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

Thanks, Bruce!

As always, you go above and beyond!!

Bruce_L
Posted : Monday, May 21, 2018 4:58:21 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.