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

Identifying a new high Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
NattowGate
Posted : Monday, January 29, 2018 9:00:02 AM
Gold Customer Gold Customer

Joined: 12/16/2013
Posts: 7

I'm wondering if there is a more elegant solution than what I've written below.  Essentially, what I'm attempting to code is a True or False condition for turning points.

I'm defining the turning point as a candle where today's close is greater than yesterday's high (C > H1) and the candle prior to that the Close was below the prior Low (C1 < L2).   

(C > H1 AND C1 < L2) OR

(C > H1 AND (C1 > L2 AND C1 < H2) AND C2 < L3) OR

(C > H1 AND (C1 > L2 AND C1 < H2) AND (C2 > L3 AND C2 < H3) AND C3 < L4) OR

(C > H1 AND (C1 > L2 AND C1 < H2) AND (C2 > L3 AND C2 < H3) AND (C3 > L4 AND C3 < H4) AND C4 < L5)

Here is a link of what I am attempting to accheive using ADBE as an example, the red arrows are the turning points.

The above coding does the job, but was just curious if there was a simpler, more elegant way to code it.

 

Thanks

https://www.screencast.com/t/YKbbx4zTl

Bruce_L
Posted : Monday, January 29, 2018 11:46:36 AM


Worden Trainer

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

Maybe the following?

C > H1 AND TrueInRow(C1 > L2 AND C1 < H2, 4) = SinceTrue(C1 < L2, 4)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
NattowGate
Posted : Wednesday, May 23, 2018 11:43:31 PM
Gold Customer Gold Customer

Joined: 12/16/2013
Posts: 7

Thanks again, Bruce, the above formula works great.  Is there a way to convert it for use in Heikin Ashi?  I tried converting it using the standard defintion of Heikin ashi without much success...

 

(O + H + L +C)/4 > MAX(H1, O1,C1) AND TrueInRow((O1 + H1 + L1 +C1)/4 > MIN(L2,O2,C2) AND (O1 + H1 + L1 +C1)/4 < MAX(H1,O1,C1), 4) = SinceTrue((O1 + H1 + L1 +C1)/4 < MIN(L2,O2,C2), 4)

 

Any insight is appreciated.

 

Thanks

 

 

Wesley

 

Bruce_L
Posted : Thursday, May 24, 2018 9:51:12 AM


Worden Trainer

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

Please try the following condition formula instead.

O + H + L + C > GREATEST(4 * H1, XAVG(O2 + H2 + L2 + C2, 3)) AND TrueInRow(O1 + H1 + L1 + C1 > LEAST(4 * L2, XAVG(O3 + H3 + L3 + C4, 3)) AND O1 + H1 + L1 + C1 < GREATEST(4 * H2, XAVG(O3 + H3 + L3 + C3, 3)), 4) = SinceTrue(O1 + H1 + L1 + C1 < LEAST(4 * L2, XAVG(O3 + H3 + L3 + C3, 3)), 4)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
NattowGate
Posted : Thursday, May 24, 2018 11:31:49 PM
Gold Customer Gold Customer

Joined: 12/16/2013
Posts: 7

Hi Bruce,

 

Thank you so much, would it be possilbe to trouble you for a bit more assistance, please.  Could we also convert the following sell signal to Heikin-Ashi as well?

C < L1 AND TrueInRow(C1 > L2 AND C1 < H2, 35) = SinceTrue(C1 > H2, 35)

Bruce_L
Posted : Friday, May 25, 2018 7:56:36 AM


Worden Trainer

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

Please try the following condition formula.

O + H + L + C < LEAST(4 * L1, XAVG(O2 + H2 + L2 + C2, 3)) AND TrueInRow(O1 + H1 + L1 + C1 > LEAST(4 * L2, XAVG(O3 + H3 + L3 + C3, 3)) AND O1 + H1 + L1 + C1 < GREATEST(4 * H2, XAVG(O3 + H3 + L3 + C3, 3)), 35) = SinceTrue(O1 + H1 + L1 + C1 > GREATEST(4 * H2, XAVG(O2 + H3 + L3 + C3, 3)), 35)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
NattowGate
Posted : Friday, May 25, 2018 8:43:36 AM
Gold Customer Gold Customer

Joined: 12/16/2013
Posts: 7

Thanks so much, Bruce!

Bruce_L
Posted : Tuesday, May 29, 2018 10:21:47 AM


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.