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 |

Sparklines Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
0002ct
Posted : Thursday, March 29, 2018 12:53:52 PM
Registered User
Joined: 11/19/2015
Posts: 459

Hello. I'm going to use small charts like sparklines for a couple of indictators.

1. I use the following to tell me the difference between the current bar's "percent above/below 8EMA" and the prior bar's:
(100 * (C / XAVGC8 - 1)) - (100 * (C1 / XAVGC8.1- 1))

Is this accurate?
 

2. How do I return a count of the bars ago that 8EMA was crossed?

Thank you very much.

Bruce_L
Posted : Thursday, March 29, 2018 2:39:17 PM


Worden Trainer

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

Yes it is accurate, although it can be shorted somewhat.

100 * (C / XAVGC8 - C1 / XAVGC8.1)

There is a SinceTrue() function which can be used to check how many bars ago something happened. If you are looking when price crossed up in the most recent 50 bars.

SinceTrue(XUP(C, XAVGC8), 50)

If you are looking for crossdowns in the most recent 60 bars.

SinceTrue(XDOWN(C, XAVGC8), 60)

If you don't care about the direction of the cross in the most recent 40 bars.

SinceTrue(SGN(C - XAVGC8) <> SGN(C1 - XAVGC8.1), 40)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
0002ct
Posted : Thursday, March 29, 2018 3:14:24 PM
Registered User
Joined: 11/19/2015
Posts: 459

Thank you very much, Bruce. These are perfect.

Bruce_L
Posted : Thursday, March 29, 2018 3:20:41 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.