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 |

Thrust Formula Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
herbicat
Posted : Tuesday, January 31, 2012 7:59:33 PM
Registered User
Joined: 6/26/2010
Posts: 3

I would like to write a formula to calculate thrust in a scan. I would like it to look for a number of periods in price advance say percentage increase of each move. How is that done? is there a guide for template formulas that I can look at?

Bruce_L
Posted : Wednesday, February 1, 2012 9:17:17 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I do not understand the formula you are attempting to create. If you could clarify your intent with additional details, we may be better able to help.

You could calculate the percentage of the time that Price has had a positive Net Change during the most recent seven bars using the following Indicator Formula:

100 * (ABS(C > C1) - (C1 > C2) - (C2 > C3) - (C3 > C4) - (C4 > C5) - (C5 > C6) - (C6 > C7)) / 7

You could calculate the average percent increase on days with a positive Net Change over the most recent eight bars using the following Indicator Formula:

100 * (C / C1 + C1 / C2 + C2 / C3 + C3 / C4 + C4 / C5 + C5 / C6 + C6 / C7 + C7 / C8) / 8 - 100

But I have no idea if either of these is even close to what you actually want without information from you.

The PCF Formula Descriptions topic has a fairly comprehensive list of the syntax which is valid in the Personal Criteria Formula Language. The Handy PCF example formulas to help you learn the syntax of PCFs! topic has a list of basic example formulas creating using the Personal Criteria Formula Language.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
herbicat
Posted : Thursday, February 9, 2012 12:58:37 PM
Registered User
Joined: 6/26/2010
Posts: 3

It is difficult for me to explain because it is really the visual part of technical analysis, but essentially thrust is a price movement where the last 5-8 bars surge with the candle being >3 times preceding candles. Could quantify >3x last 10 bars with the thrust being  the last 8 bars successively higher with each 8 bars >3x initial 10 bars in the count.

I will look for some good examples and attach charts,

Bruce_L
Posted : Thursday, February 9, 2012 1:12:05 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
So you want to check for all eight of the most recent eight bars to be increasing compared to the previous bar?

C > C1 AND C1 > C2 AND C2 > C3 AND C3 > C4 AND C4 > C5 AND C5 > C6 AND C6 > C7 AND C7 > C8

That we can do. Checking for all eight of the candles to also be at least three times larger than the all ten the ten candles prior to that is a bit more complicated. Testing for the Average to be three times larger is straightforward:

AVGH8 - AVGL8 >= 3 * (AVGH10.8 - AVGL10.8)

But checking actually checking for the smallest of the most recent eight candles to be at least three times the largest of the prior ten candles is quite a bit longer and more complicated:

(H - L + H1 - L1 - ABS(H - L - H1 + L1) + H2 - L2 + H3 - L3 - ABS(H2 - L2 - H3 + L3) - ABS(H - L + H1 - L1 - ABS(H - L - H1 + L1) - H2 + L2 - H3 + L3 + ABS(H2 - L2 - H3 + L3)) + H4 - L4 + H5 - L5 - ABS(H4 - L4 - H5 + L5) + H6 - L6 + H7 - L7 - ABS(H6 - L6 - H7 + L7) - ABS(H4 - L4 + H5 - L5 - ABS(H4 - L4 - H5 + L5) - H6 + L6 - H7 + L7 + ABS(H6 - L6 - H7 + L7)) - ABS(H - L + H1 - L1 - ABS(H - L - H1 + L1) + H2 - L2 + H3 - L3 - ABS(H2 - L2 - H3 + L3) - ABS(H - L + H1 - L1 - ABS(H - L - H1 + L1) - H2 + L2 - H3 + L3 + ABS(H2 - L2 - H3 + L3)) - H4 + L4 - H5 + L5 + ABS(H4 - L4 - H5 + L5) - H6 + L6 - H7 + L7 + ABS(H6 - L6 - H7 + L7) + ABS(H4 - L4 + H5 - L5 - ABS(H4 - L4 - H5 + L5) - H6 + L6 - H7 + L7 + ABS(H6 - L6 - H7 + L7)))) / 8 > 3 * (H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) + 2 * (H10 - L10) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) - 2 * (H10 - L10)) + 2 * (H11 - L11 + H12 - L12 + ABS(H11 - L11 - H12 + L12)) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) + 2 * (H10 - L10) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) - 2 * (H10 - L10)) - 2 * (H11 - L11 + H12 - L12 + ABS(H11 - L11 - H12 + L12))) + H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) + 2 * (H15 - L15) + ABS(H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) - 2 * (H15 - L15)) + 2 * (H16 - L16 + H17 - L17 + ABS(H16 - L16 - H17 + L17)) + ABS(H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) + 2 * (H15 - L15) + ABS(H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) - 2 * (H15 - L15)) - 2 * (H16 - L16 + H17 - L17 + ABS(H16 - L16 - H17 + L17))) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) + 2 * (H10 - L10) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) - 2 * (H10 - L10)) + 2 * (H11 - L11 + H12 - L12 + ABS(H11 - L11 - H12 + L12)) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) + 2 * (H10 - L10) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) - 2 * (H10 - L10)) - 2 * (H11 - L11 + H12 - L12 + ABS(H11 - L11 - H12 + L12))) - H13 + L13 - H14 + L14 - ABS(H13 - L13 - H14 + L14) - 2 * (H15 - L15) - ABS(H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) - 2 * (H15 - L15)) - 2 * (H16 - L16 + H17 - L17 + ABS(H16 - L16 - H17 + L17)) - ABS(H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) + 2 * (H15 - L15) + ABS(H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) - 2 * (H15 - L15)) - 2 * (H16 - L16 + H17 - L17 + ABS(H16 - L16 - H17 + L17))))) / 16

Min Max PCFs

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Putt4Dough
Posted : Thursday, February 9, 2012 2:21:00 PM

Registered User
Joined: 7/30/2007
Posts: 1,072
QUOTE (Bruce_L)
(H - L + H1 - L1 - ABS(H - L - H1 + L1) + H2 - L2 + H3 - L3 - ABS(H2 - L2 - H3 + L3) - ABS(H - L + H1 - L1 - ABS(H - L - H1 + L1) - H2 + L2 - H3 + L3 + ABS(H2 - L2 - H3 + L3)) + H4 - L4 + H5 - L5 - ABS(H4 - L4 - H5 + L5) + H6 - L6 + H7 - L7 - ABS(H6 - L6 - H7 + L7) - ABS(H4 - L4 + H5 - L5 - ABS(H4 - L4 - H5 + L5) - H6 + L6 - H7 + L7 + ABS(H6 - L6 - H7 + L7)) - ABS(H - L + H1 - L1 - ABS(H - L - H1 + L1) + H2 - L2 + H3 - L3 - ABS(H2 - L2 - H3 + L3) - ABS(H - L + H1 - L1 - ABS(H - L - H1 + L1) - H2 + L2 - H3 + L3 + ABS(H2 - L2 - H3 + L3)) - H4 + L4 - H5 + L5 + ABS(H4 - L4 - H5 + L5) - H6 + L6 - H7 + L7 + ABS(H6 - L6 - H7 + L7) + ABS(H4 - L4 + H5 - L5 - ABS(H4 - L4 - H5 + L5) - H6 + L6 - H7 + L7 + ABS(H6 - L6 - H7 + L7)))) / 8 > 3 * (H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) + 2 * (H10 - L10) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) - 2 * (H10 - L10)) + 2 * (H11 - L11 + H12 - L12 + ABS(H11 - L11 - H12 + L12)) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) + 2 * (H10 - L10) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) - 2 * (H10 - L10)) - 2 * (H11 - L11 + H12 - L12 + ABS(H11 - L11 - H12 + L12))) + H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) + 2 * (H15 - L15) + ABS(H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) - 2 * (H15 - L15)) + 2 * (H16 - L16 + H17 - L17 + ABS(H16 - L16 - H17 + L17)) + ABS(H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) + 2 * (H15 - L15) + ABS(H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) - 2 * (H15 - L15)) - 2 * (H16 - L16 + H17 - L17 + ABS(H16 - L16 - H17 + L17))) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) + 2 * (H10 - L10) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) - 2 * (H10 - L10)) + 2 * (H11 - L11 + H12 - L12 + ABS(H11 - L11 - H12 + L12)) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) + 2 * (H10 - L10) + ABS(H8 - L8 + H9 - L9 + ABS(H8 - L8 - H9 + L9) - 2 * (H10 - L10)) - 2 * (H11 - L11 + H12 - L12 + ABS(H11 - L11 - H12 + L12))) - H13 + L13 - H14 + L14 - ABS(H13 - L13 - H14 + L14) - 2 * (H15 - L15) - ABS(H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) - 2 * (H15 - L15)) - 2 * (H16 - L16 + H17 - L17 + ABS(H16 - L16 - H17 + L17)) - ABS(H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) + 2 * (H15 - L15) + ABS(H13 - L13 + H14 - L14 + ABS(H13 - L13 - H14 + L14) - 2 * (H15 - L15)) - 2 * (H16 - L16 + H17 - L17 + ABS(H16 - L16 - H17 + L17))))) / 16
Min Max PCFs

That is the ugliest code I ever saw.



I don't know how you do it Bruce ... maybe you should give a webinar on writing PCFs.
Bruce_L
Posted : Thursday, February 9, 2012 2:23:24 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You can read through the Min Max PCFs topic to see why it is so ugly and how it was done.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
herbicat
Posted : Wednesday, February 15, 2012 12:08:17 PM
Registered User
Joined: 6/26/2010
Posts: 3
Thanks Bruce, that is great. I will start reading your Min Max PCFs and test this formula soon as we get some volume in this market.
aymericgairaud
Posted : Wednesday, February 15, 2012 3:03:38 PM
Registered User
Joined: 1/23/2012
Posts: 6
Hey Putt4Dough,This is unrelated to this post but I could not find a way to direct message you. I saw in another post you use TC2000 for intraday and StockFinder for eod scans. Could you tell me the reason why you don't just use StockFinder for intraday as well? Is it because you find the data slower than TC2000 because of the cloud structure of TC200 vs computer installed StockFinder? Or is it something else? Thank in advance,SoPrimetimeFire
Putt4Dough
Posted : Wednesday, February 15, 2012 4:30:09 PM

Registered User
Joined: 7/30/2007
Posts: 1,072

QUOTE (soprimetimefire)
Hey Putt4Dough,This is unrelated to this post but I could not find a way to direct message you. I saw in another post you use TC2000 for intraday and StockFinder for eod scans. Could you tell me the reason why you don't just use StockFinder for intraday as well? Is it because you find the data slower than TC2000 because of the cloud structure of TC200 vs computer installed StockFinder? Or is it something else? Thank in advance,SoPrimetimeFire

I'm still virtual trading with "play money" so keep that in mind, but it's just personal preference, mostly...

I prefer StockFinder for end-of-day stuff mainly because I'm a computer programmer by day and RealCode lets me code pretty much anything I want. And for eod stuff processing speed isn't as big an issue.

TC2000 seems to be Worden's future direction, however, and I'm trying to implement a mentor's trading plan for intraday trading of the QQQ's. I don't really need RealCode for this, and since I still have a day job, I want to use the new TC2000 Alerts feature to tell me when an opportunity arises with the QQQ's.
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.