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 |

HMA 5 on BOP Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
donv98
Posted : Friday, October 7, 2016 4:54:02 PM
Registered User
Joined: 7/29/2010
Posts: 417

I'm trying to plot a 5 period Hull moving average on BOP without success.

(30 * C + 27 * C1 - 7 * C3 - 4 * C4 - C5) / 45

When I switch the data source to BOP is when I have problems.

Does the below plot a 5 sma of the HMA 5?

 

Many thanks for any help.

Bruce_L
Posted : Friday, October 7, 2016 4:56:37 PM


Worden Trainer

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

You aren't going to be able to successfully change the data source of any of the Custom PCF Indicators. These indicators will always use price and volume as the data source.

You could re-write the Indicator Formula to use BOP however.

(30 * BOP + 27 * BOP1.1 - 7 * BOP1.3 - 4 * BOP1.4 - BOP1.5) / 45



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
donv98
Posted : Friday, October 7, 2016 5:05:14 PM
Registered User
Joined: 7/29/2010
Posts: 417

Bruce,

   Many thanks.

Have a nice weekend.

Don

Chagall
Posted : Monday, March 6, 2017 11:11:00 AM
Registered User
Joined: 9/11/2012
Posts: 92

I tried to change the datasource for the formula

(c>avgc2 and c1<avgc2) *c

to a stochastic 12/3, with no values coming in. Is there any workaround for this?

I actual try to get  dots for "is true", if and when that crossing up happens to the DSS Bressert, that means to an underlying identical stochastic being the data source for the second stochastic . Therefore implementing the stoc formula into the condition part can&acute;t help, I think.

 

thank you,

Franz J.

Bruce_L
Posted : Monday, March 6, 2017 11:39:07 AM


Worden Trainer

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

You can't change the data source of Custom PCF Indicators and there really isn't a workaround for this other than to re-write the formula (if possible).

We can write a formula for Bressert DSS in TC2000 v17 (but not in earlier versions of TC2000). This assumes it is in fact an exponentilal stochastic of an exponential stochastic.

So something like the following for the Bressert DSS 10, 10:

100 * XAVG((XAVG(STOC10, 10) - MIN(XAVG(STOC10, 10), 10)) / (MAX(XAVG(STOC10, 10), 10) - MIN(XAVG(STOC10, 10), 10)), 10)

And the following for crossing up its own 2 period simple moving average.

XUP(XAVG((XAVG(STOC10, 10) - MIN(XAVG(STOC10, 10), 10)) / (MAX(XAVG(STOC10, 10), 10) - MIN(XAVG(STOC10, 10), 10)), 10), AVG(XAVG((XAVG(STOC10, 10) - MIN(XAVG(STOC10, 10), 10)) / (MAX(XAVG(STOC10, 10), 10) - MIN(XAVG(STOC10, 10), 10)), 10) ,2))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Chagall
Posted : Tuesday, March 7, 2017 3:48:56 PM
Registered User
Joined: 9/11/2012
Posts: 92

Great to have this option in V 17, read the new version hints but didn&acute;t realize this. Thank you very much,

 

Franz J.

Chagall
Posted : Thursday, March 9, 2017 10:49:12 AM
Registered User
Joined: 9/11/2012
Posts: 92

Now, in order to get a dot within the DSS curve indicating the DSS turning up, I would have to set the DSS formula as multiplier.  For the formula being calculated "very slow", is there a way to reference the already calculated DSS? Remembering my Metastock times I would have defined A= (DSS formula) and the multiplier would be simply A. Maybe V 17 has an approach to this too.

For now I have the multiplier set to (-1) and get the dot at 100 %. I would like to hide the corresponding dots ("not true") which appear at 0, but I miss the idea for this. The Dots print in the same window with the DSS. Can you help again?

thank you,
Franz 

Bruce_L
Posted : Thursday, March 9, 2017 10:59:11 AM


Worden Trainer

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

There is no way to assign a variable or reference a previously calculated value.

If you use division instead of multiplication, you can generate a division by zero error when the Condition Formula portion is not true and make it so the dots don't plot.

100 * XAVG((XAVG(STOC10, 10) - MIN(XAVG(STOC10, 10), 10)) / (MAX(XAVG(STOC10, 10), 10) - MIN(XAVG(STOC10, 10), 10)), 10) / ABS(XUP(XAVG((XAVG(STOC10, 10) - MIN(XAVG(STOC10, 10), 10)) / (MAX(XAVG(STOC10, 10), 10) - MIN(XAVG(STOC10, 10), 10)), 10), AVG(XAVG((XAVG(STOC10, 10) - MIN(XAVG(STOC10, 10), 10)) / (MAX(XAVG(STOC10, 10), 10) - MIN(XAVG(STOC10, 10), 10)), 10) ,2)))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Chagall
Posted : Friday, March 10, 2017 11:46:23 AM
Registered User
Joined: 9/11/2012
Posts: 92

Bruce,

that&acute;s exactly what I was looking for. Not only the false dots are hidden, but the dots plot within the DSS line. Great, and thank you very much!

Franz J.

PS: Maybe I will find out by myself how to alter the formula to get the "DSS turning down" dots plotted. But I am a graphic mind, no mathematic one. Can you please giv a hint ;) ?

Bruce_L
Posted : Friday, March 10, 2017 11:54:44 AM


Worden Trainer

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

There is a XUP about a third of the way through the formula which needs to be changed to XDOWN instead.

100 * XAVG((XAVG(STOC10, 10) - MIN(XAVG(STOC10, 10), 10)) / (MAX(XAVG(STOC10, 10), 10) - MIN(XAVG(STOC10, 10), 10)), 10) / ABS(XDOWN(XAVG((XAVG(STOC10, 10) - MIN(XAVG(STOC10, 10), 10)) / (MAX(XAVG(STOC10, 10), 10) - MIN(XAVG(STOC10, 10), 10)), 10), AVG(XAVG((XAVG(STOC10, 10) - MIN(XAVG(STOC10, 10), 10)) / (MAX(XAVG(STOC10, 10), 10) - MIN(XAVG(STOC10, 10), 10)), 10) ,2)))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Chagall
Posted : Sunday, March 12, 2017 9:19:14 AM
Registered User
Joined: 9/11/2012
Posts: 92

I see. Thank you very much again!

 

Franz J.

Chagall
Posted : Monday, March 27, 2017 3:52:34 PM
Registered User
Joined: 9/11/2012
Posts: 92

QUOTE (Bruce_L)

There is no way to assign a variable or reference a previously calculated value.

If you use division instead of multiplication, you can generate a division by zero error when the Condition Formula portion is not true and make it so the dots don't plot.

100 * XAVG((XAVG(STOC10, 10) - MIN(XAVG(STOC10, 10), 10)) / (MAX(XAVG(STOC10, 10), 10) - MIN(XAVG(STOC10, 10), 10)), 10) / ABS(XUP(XAVG((XAVG(STOC10, 10) - MIN(XAVG(STOC10, 10), 10)) / (MAX(XAVG(STOC10, 10), 10) - MIN(XAVG(STOC10, 10), 10)), 10), AVG(XAVG((XAVG(STOC10, 10) - MIN(XAVG(STOC10, 10), 10)) / (MAX(XAVG(STOC10, 10), 10) - MIN(XAVG(STOC10, 10), 10)), 10) ,2)))



Bruce ,

now I want this frormula to be true yesterday. I tend to write STOC10, 10.1 every time STOC10, 10 occurs. For I need it for a PCF containing an OR, I cannot use the features that are available in a scan. 

Do you think my idea to be correct?

 

Thank you, FRanz J.

Bruce_L
Posted : Monday, March 27, 2017 4:04:54 PM


Worden Trainer

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

If I am understanding correctly, you need to replace each instance of STOC10 with STOC10.1.1 instead of just using STOC10.1 (because the second parameter is a simple %K).

100 * XAVG((XAVG(STOC10.1.1, 10) - MIN(XAVG(STOC10.1.1, 10), 10)) / (MAX(XAVG(STOC10.1.1, 10), 10) - MIN(XAVG(STOC10.1.1, 10), 10)), 10) / ABS(XUP(XAVG((XAVG(STOC10.1.1, 10) - MIN(XAVG(STOC10.1.1, 10), 10)) / (MAX(XAVG(STOC10.1.1, 10), 10) - MIN(XAVG(STOC10.1.1, 10), 10)), 10), AVG(XAVG((XAVG(STOC10.1.1, 10) - MIN(XAVG(STOC10.1.1, 10), 10)) / (MAX(XAVG(STOC10.1.1, 10), 10) - MIN(XAVG(STOC10.1.1, 10), 10)), 10) ,2)))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Chagall
Posted : Friday, April 7, 2017 1:53:42 PM
Registered User
Joined: 9/11/2012
Posts: 92

Bruce,

you did understand correctly, but my mistake, I actually tried to write a condition formula. 

With DSS Bressert 21,3 = D1, and DSS Bressert 42,3 = D2, the condition should be:


(
(D1 and D2 turning up)
OR
(D1 turning up and D2 turned up yesterday)
OR
(D2 turning up and D1 turned up yesterday)
)

I am  able to write the pcf this way:

(
((D1 > D1 yest. and D1 yest.<D1 before yest.) and (D2 > D2 yest. and D2 yest.<D2 before yest.))
OR
and so on

, but I would assume there is an easier way to write the formula. Can you help again?

Thank you!

Bruce_L
Posted : Friday, April 7, 2017 3:09:01 PM


Worden Trainer

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

I don't think there really is a good way to write what I suspect you actually want. The quick and dirty way will also return true if D1 and D2 turned up yesterday (and requires both stochastic to still be going up).

(XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2), 2) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2), 2))

What you actually requested is quite a bit longer (and it is possible for one of the stochastics to have started going back down).

(XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))

I suspect the combination you really want is as follows and I'm not sure there is a really good way to write it.

D1 and D2 moving up today.

D1 moving down yesterday and/or D2 moving down yesterday.

If both D1 and D2 were moving down yesterday ignore two days ago.

If D1 was moving up yesterday and D2 was moving down yesterday then D1 must have been moving down two days ago.

If D1 was moving down yesterday and D2 was moving up yesterday, then D2 must have been moving down two two days ago.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Chagall
Posted : Saturday, April 8, 2017 3:26:26 PM
Registered User
Joined: 9/11/2012
Posts: 92

Bruce,

Indeed the latter of your 2 pcfs is exactly what I was looking for.  Your "dirty" pcf is great too even with its specialties and would be sufficient for me, but it didn&acute;t detect 2 (D1+D2 turning up) cases on Friday in my symbol universe (PM and INCY).

Thank you very much for your great help,

 Franz J.

Chagall
Posted : Wednesday, April 12, 2017 5:45:59 PM
Registered User
Joined: 9/11/2012
Posts: 92

QUOTE (Bruce_L)

I don't think there really is a good way to write what I suspect you actually want. The quick and dirty way will also return true if D1 and D2 turned up yesterday (and requires both stochastic to still be going up).

(XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2), 2) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2), 2))

What you actually requested is quite a bit longer (and it is possible for one of the stochastics to have started going back down).

(XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))

I suspect the combination you really want is as follows and I'm not sure there is a really good way to write it.

D1 and D2 moving up today.

D1 moving down yesterday and/or D2 moving down yesterday.

If both D1 and D2 were moving down yesterday ignore two days ago.

If D1 was moving up yesterday and D2 was moving down yesterday then D1 must have been moving down two days ago.

If D1 was moving down yesterday and D2 was moving up yesterday, then D2 must have been moving down two two days ago.

 

Bruce,

now I tried to add the condition(s) to your latter formula, that either D1 or D2 has to be < 18. But obviously there is something I am doing wrong, for the scan results contain many values > 18.

The pcf  applied is:

(
(XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))
)
 
AND
 
(
100 * XAVG((XAVG(STOC21,3) - MIN(XAVG(STOC21,3), 21)) / (MAX(XAVG(STOC21,3), 21) - MIN(XAVG(STOC21,3), 21)), 3)
 
OR
 
100 * XAVG((XAVG(STOC42,3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42,3), 42) - MIN(XAVG(STOC42,3), 42)), 3)
 
< 18

Can you please help to find my mistake?
 
thanks,
Franz J.
Chagall
Posted : Thursday, April 20, 2017 10:55:03 AM
Registered User
Joined: 9/11/2012
Posts: 92

Bruce,

I would assume there is a precedence issue only, but I don&acute;t see it. Can you please take a look? (previous post)

 

thanks

 

Franz J.

Bruce_L
Posted : Thursday, April 20, 2017 11:00:59 AM


Worden Trainer

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

You need to compare each formula to 18, not OR the formulas and compare the result to 18.

((XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))) AND (100 * XAVG((XAVG(STOC21,3) - MIN(XAVG(STOC21,3), 21)) / (MAX(XAVG(STOC21,3), 21) - MIN(XAVG(STOC21,3), 21)), 3) < 18 OR 100 * XAVG((XAVG(STOC42,3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42,3), 42) - MIN(XAVG(STOC42,3), 42)), 3) < 18)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Chagall
Posted : Friday, April 21, 2017 2:11:18 PM
Registered User
Joined: 9/11/2012
Posts: 92

Creating a new scan and inserting that formula I get an error (please insert formula"). Maybe I&acute;ll find out at the weekend, but may b e you can take a look before?

Bruce_L
Posted : Friday, April 21, 2017 2:18:12 PM


Worden Trainer

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

It was pretty much just a copy and paste of your formula with < 18 made to each of the two 100 * formulas at the end instead of just having one < 18 at the end.

That said, I don't get an error message when I use the formula. My first thought was that it could be using . as a decimal marker vs using , as a decimal marker, but I don't think there are actually any decimal markers in the formula.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Chagall
Posted : Friday, April 28, 2017 5:54:11 PM
Registered User
Joined: 9/11/2012
Posts: 92

Bruce,

your pcf is working perfectly, don&acute;t know what first had happened there.

thank you,

Franz J.

Chagall
Posted : Thursday, June 29, 2017 12:45:49 PM
Registered User
Joined: 9/11/2012
Posts: 92

QUOTE (Bruce_L)

You need to compare each formula to 18, not OR the formulas and compare the result to 18.

((XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))) AND (100 * XAVG((XAVG(STOC21,3) - MIN(XAVG(STOC21,3), 21)) / (MAX(XAVG(STOC21,3), 21) - MIN(XAVG(STOC21,3), 21)), 3) < 18 OR 100 * XAVG((XAVG(STOC42,3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42,3), 42) - MIN(XAVG(STOC42,3), 42)), 3) < 18)

 

Bruce,

can you help again and invert this formula from up to down? That means, the Bresserts turning down instead of up and the values being > 82 instead of <18.

Would be very appreciated.

 

thank you,

 

FRanz Josef

Bruce_L
Posted : Thursday, June 29, 2017 12:58:55 PM


Worden Trainer

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

Please try the following Condition Formula.

((XDOWN(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XDOWN(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XDOWN(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))) AND (100 * XAVG((XAVG(STOC21,3) - MIN(XAVG(STOC21,3), 21)) / (MAX(XAVG(STOC21,3), 21) - MIN(XAVG(STOC21,3), 21)), 3) > 82 OR 100 * XAVG((XAVG(STOC42,3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42,3), 42) - MIN(XAVG(STOC42,3), 42)), 3) > 82)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Chagall
Posted : Sunday, April 8, 2018 5:28:31 PM
Registered User
Joined: 9/11/2012
Posts: 92

QUOTE (Bruce_L)

Please try the following Condition Formula.

((XDOWN(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XDOWN(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XDOWN(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))) AND (100 * XAVG((XAVG(STOC21,3) - MIN(XAVG(STOC21,3), 21)) / (MAX(XAVG(STOC21,3), 21) - MIN(XAVG(STOC21,3), 21)), 3) > 82 OR 100 * XAVG((XAVG(STOC42,3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42,3), 42) - MIN(XAVG(STOC42,3), 42)), 3) > 82)

 

Bruce,

with your formula working fine, I tried to have a "condition true" dot displayed above the candles (resp. below them for the XUP case). But I couldn&acute;t find out where to place my multipliers *H*1,0002 resp. *L*0,9998.

Please how to implement that parts?

Thank you,

Franz J.

Bruce_L
Posted : Monday, April 9, 2018 2:31:34 PM


Worden Trainer

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

Maybe the following for the XDOWN case?

H * 1,0002 * ABS(((XDOWN(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XDOWN(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XDOWN(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))) AND (100 * XAVG((XAVG(STOC21,3) - MIN(XAVG(STOC21,3), 21)) / (MAX(XAVG(STOC21,3), 21) - MIN(XAVG(STOC21,3), 21)), 3) > 82 OR 100 * XAVG((XAVG(STOC42,3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42,3), 42) - MIN(XAVG(STOC42,3), 42)), 3) > 82))

And the following for the XUP case?

L * 0,9998 * ABS(((XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))) AND (100 * XAVG((XAVG(STOC21,3) - MIN(XAVG(STOC21,3), 21)) / (MAX(XAVG(STOC21,3), 21) - MIN(XAVG(STOC21,3), 21)), 3) < 18 OR 100 * XAVG((XAVG(STOC42,3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42,3), 42) - MIN(XAVG(STOC42,3), 42)), 3) < 18))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Chagall
Posted : Tuesday, April 10, 2018 10:25:10 AM
Registered User
Joined: 9/11/2012
Posts: 92

QUOTE (Bruce_L)

Maybe the following for the XDOWN case?

H * 1,0002 * ABS(((XDOWN(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XDOWN(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XDOWN(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))) AND (100 * XAVG((XAVG(STOC21,3) - MIN(XAVG(STOC21,3), 21)) / (MAX(XAVG(STOC21,3), 21) - MIN(XAVG(STOC21,3), 21)), 3) > 82 OR 100 * XAVG((XAVG(STOC42,3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42,3), 42) - MIN(XAVG(STOC42,3), 42)), 3) > 82))

And the following for the XUP case?

L * 0,9998 * ABS(((XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))) AND (100 * XAVG((XAVG(STOC21,3) - MIN(XAVG(STOC21,3), 21)) / (MAX(XAVG(STOC21,3), 21) - MIN(XAVG(STOC21,3), 21)), 3) < 18 OR 100 * XAVG((XAVG(STOC42,3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42,3), 42) - MIN(XAVG(STOC42,3), 42)), 3) < 18))

 

Bruce,

yes the positions of the true points seems correct, but they appear outside of the chart (if not displayed as a histogram). It seems the formulas result in values 10000x the stock price. But simple dividing the formula(s) by that number didn&acute;t help. (I had to replace the comma in 1,0002 resp. 0,0098 by a dot).

 

Thanks,

 

Franz J.

Bruce_L
Posted : Tuesday, April 10, 2018 11:02:49 AM


Worden Trainer

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

You could replace the 1,0002 with 10002 / 10000 and the 0,9998 with 9998 / 1000 instead and it should work everywhere. That said, I am a bit surprised it would be necessary as the charts normally use the local decimal marker settings. Using the . as the decimal marker is usually only an issue with stuff processed on your servers like the WatchList Columns.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Chagall
Posted : Tuesday, April 10, 2018 11:03:05 AM
Registered User
Joined: 9/11/2012
Posts: 92

QUOTE (Chagall)

QUOTE (Bruce_L)

Maybe the following for the XDOWN case?

H * 1,0002 * ABS(((XDOWN(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XDOWN(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XDOWN(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XDOWN(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))) AND (100 * XAVG((XAVG(STOC21,3) - MIN(XAVG(STOC21,3), 21)) / (MAX(XAVG(STOC21,3), 21) - MIN(XAVG(STOC21,3), 21)), 3) > 82 OR 100 * XAVG((XAVG(STOC42,3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42,3), 42) - MIN(XAVG(STOC42,3), 42)), 3) > 82))

And the following for the XUP case?

L * 0,9998 * ABS(((XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21, 3) - MIN(XAVG(STOC21, 3), 21)) / (MAX(XAVG(STOC21, 3), 21) - MIN(XAVG(STOC21, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42.1.1, 3) - MIN(XAVG(STOC42.1.1, 3), 42)) / (MAX(XAVG(STOC42.1.1, 3), 42) - MIN(XAVG(STOC42.1.1, 3), 42)), 3), 2))) OR (XUP(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), AVG(100 * XAVG((XAVG(STOC21.1.1, 3) - MIN(XAVG(STOC21.1.1, 3), 21)) / (MAX(XAVG(STOC21.1.1, 3), 21) - MIN(XAVG(STOC21.1.1, 3), 21)), 3), 2)) AND XUP(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), AVG(100 * XAVG((XAVG(STOC42, 3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42, 3), 42) - MIN(XAVG(STOC42, 3), 42)), 3), 2)))) AND (100 * XAVG((XAVG(STOC21,3) - MIN(XAVG(STOC21,3), 21)) / (MAX(XAVG(STOC21,3), 21) - MIN(XAVG(STOC21,3), 21)), 3) < 18 OR 100 * XAVG((XAVG(STOC42,3) - MIN(XAVG(STOC42, 3), 42)) / (MAX(XAVG(STOC42,3), 42) - MIN(XAVG(STOC42,3), 42)), 3) < 18))

 

Bruce,

yes the positions of the true points seems correct, but they appear outside of the chart (if not displayed as a histogram). It seems the formulas result in values 10000x the stock price. But simple dividing the formula(s) by that number didn&acute;t help. (I had to replace the comma in 1,0002 resp. 0,0098 by a dot).

 

Thanks,

 

Franz J.

Bruce,

taking away my multiplier the dots match exactly with the H. Is there still a way to have the dots slightly above the H without a syntax error?

 

Bruce_L
Posted : Tuesday, April 10, 2018 11:19:08 AM


Worden Trainer

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

Well 0.02% above and below the high and low isn't very much. You could use larger values. The following would be 1% (which might be too big), but you can adjust the values as desired.

H * 101 / 100 * ABS

And:

L * 99 / 100 * ABS

An alternative would be to use a percentage of the range over a period instead of a percentage of the values.

(H + (MAXH100 - MINL100) / 1000) * ABS

And:

(L - (MAXH100 - MINL100) / 1000) * ABS

Again, you could change the 1000 in the formula to adjust how much above and below the highs and lows to plot the dots.



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