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 |

Is there a way to get a negative FX10, FX20...etc.? Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jmlee88888
Posted : Wednesday, May 24, 2006 6:27:52 AM
Gold Customer Gold Customer

Joined: 12/30/2004
Posts: 16
I use the FX10, FX20...etc in my watch list as a 'hurdle' for stocks. I was wondering if there is a way to get a negative FX10, FX20...etc. for comparison with poorly performing stocks? I tried a PCF by putting a negative sign in front of the FX10 but that didn't work. Thanks for your help.
Craig_S
Posted : Wednesday, May 24, 2006 6:39:21 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Are you comparing using the Relative Strength indicator or by the comparison symbol?

- Craig
Here to Help!
jmlee88888
Posted : Wednesday, May 24, 2006 11:55:48 AM
Gold Customer Gold Customer

Joined: 12/30/2004
Posts: 16
I'm just including the FX20 in my watch list. I then calculate a RS (updated daily) vs. the SP-500. When I sort by the RS column heading, I'd like to see the stocks higher in the list box, above both SP-500 and FX20.

What I'd like to do is have an easier way of looking at those that are below Negative FX20 and the SP-500. I don't seem to be able to do this. This will be for my short positions.

Thanks.
Craig_S
Posted : Wednesday, May 24, 2006 12:27:34 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
I see.

There would be no way to "create" a symbol that you could include in your sorts for a negative FX.

- Craig
Here to Help!
Bruce_L
Posted : Wednesday, May 24, 2006 12:46:40 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
jmlee88888,
Even though the calculations and values are different, the actual order of a Relative Strength and a Price Percent Change over the same timeframe should be the same. One possibility would be to write a Personal Criteria Formula (I think the following PCF would only return True for symbols that dropped more than a theoretical -FX20 symbol):

C / C250 < .8

You may wish to review the following:

How to create a Personal Criteria Forumula (PCF)
Handy PCF example formulas to help you learn the syntax of PCFs!
Using EasyScan to find stocks that meet your own criteria

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Craig_S
Posted : Wednesday, May 24, 2006 12:50:52 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Very nice, Bruce. Had not thought of that.

- Craig
Here to Help!
bustermu
Posted : Wednesday, May 24, 2006 6:01:28 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
Please notice that -FX20 is not what one is interested in, it is FX(-20).

Thanks,
Jim Murphy
Bruce_L
Posted : Wednesday, May 24, 2006 6:22:27 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
bustermu,
I'd thought about writing it first as FX-20 and then FX(-20) before deciding to use -FX20 instead to be consistent with the phrasing used in the original post in this topic in an effort to avoid confusion (jmlee88888 meaning seemed fairly clear and any differentiation between the various representations seemed fairly arbitrary considering it isn't an equation and is just an artificial symbol that isn't even currently used in TeleChart).

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jmlee88888
Posted : Thursday, June 22, 2006 11:57:41 AM
Gold Customer Gold Customer

Joined: 12/30/2004
Posts: 16
Thanks for the help. I see that C/C250 < .8 would give me a true/false answer, but my problem is this:

I'm using a relative strength moving average of the FX20 against my stocks, when it crosses to the upside, I buy. when it crosses to the downside, I get out. In effect, I only want to own things that are beating the FX20 on a relative strength basis (smoothed out via a moving average).

However, I can't do this with stocks that I'm short. What I would like to have is a way to duplicate what I do on the long side. Basically to have a relative strength moving average of a FX(-20) so that when the stock crosses to the downside, I'd short it. When it comes back over, I'd cover it.

I can't do so with the formula above.

Is it possible to put a series of negative FX symbols in the Telechart system itself? If so, would you forward this on to the development team please.

Thanks again for a great product and a great support environment.
Craig_S
Posted : Thursday, June 22, 2006 12:03:03 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
When you say "crossing" do you mean when the price crosses the comparison symbol?

- Craig
Here to Help!
jmlee88888
Posted : Thursday, June 22, 2006 2:54:15 PM
Gold Customer Gold Customer

Joined: 12/30/2004
Posts: 16
In my middle pane of the chart, I usually right click on the following:

RS:FX20:MovAvg 45

Then I click Sort By to get a Sort Value for the watchlist. I then look to the Sort Value and look for values that are just a tad above 0. I'm looking for those whose RSFX20 have just crossed UP over the 45DMA of the RSFX20. Those I want to buy.

I'm just hoping there is a way to do this for my short positions. In effect, I'm looking for 'losers' that have just began to outperform (on the downside) FX(-20).

I can see the validity in having the FX10, FX20...etc. as most investors go long. But I think a set of FX-10, FX-20 would be useful to those who like to go short. I'm just thinking maybe this isn't so difficult to program, but I don't know...?

Thanks for the quick response.
Bruce_L
Posted : Thursday, June 22, 2006 4:03:47 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
jmlee88888,
The first of the following formulas should identify when Relative Strength: FX(-20) crosses its own 45-Period Simple Moving Average and identify the direction of the cross. Without an FX(-20) symbol, there isn't a way for me to visually verify that it works, but it is based on the same logic as the second formula. The second formula is designed to identify when Relative Strength: FX20 crosses its own 45-Period Simple Moving Average (and was provided primarily for testing purposes):

RS FX(-20) crossing 45-Period Simple Moving Average of RS FX(-20):

SGN(C - (C + C1 / ((5 / 4) ^ (1 / 250)) + C2 / ((5 / 4) ^ (2 / 250)) + C3 / ((5 / 4) ^ (3 / 250)) + C4 / ((5 / 4) ^ (4 / 250)) + C5 / ((5 / 4) ^ (5 / 250)) + C6 / ((5 / 4) ^ (6 / 250)) + C7 / ((5 / 4) ^ (7 / 250)) + C8 / ((5 / 4) ^ (8 / 250)) + C9 / ((5 / 4) ^ (9 / 250)) + C10 / ((5 / 4) ^ (10 / 250)) + C11 / ((5 / 4) ^ (11 / 250)) + C12 / ((5 / 4) ^ (12 / 250)) + C13 / ((5 / 4) ^ (13 / 250)) + C14 / ((5 / 4) ^ (14 / 250)) + C15 / ((5 / 4) ^ (15 / 250)) + C16 / ((5 / 4) ^ (16 / 250)) + C17 / ((5 / 4) ^ (17 / 250)) + C18 / ((5 / 4) ^ (18 / 250)) + C19 / ((5 / 4) ^ (19 / 250)) + C20 / ((5 / 4) ^ (20 / 250)) + C21 / ((5 / 4) ^ (21 / 250)) + C22 / ((5 / 4) ^ (22 / 250)) + C23 / ((5 / 4) ^ (23 / 250)) + C24 / ((5 / 4) ^ (24 / 250)) + C25 / ((5 / 4) ^ (25 / 250)) + C26 / ((5 / 4) ^ (26 / 250)) + C27 / ((5 / 4) ^ (27 / 250)) + C28 / ((5 / 4) ^ (28 / 250)) + C29 / ((5 / 4) ^ (29 / 250)) + C30 / ((5 / 4) ^ (30 / 250)) + C31 / ((5 / 4) ^ (31 / 250)) + C32 / ((5 / 4) ^ (32 / 250)) + C33 / ((5 / 4) ^ (33 / 250)) + C34 / ((5 / 4) ^ (34 / 250)) + C35 / ((5 / 4) ^ (35 / 250)) + C36 / ((5 / 4) ^ (36 / 250)) + C37 / ((5 / 4) ^ (37 / 250)) + C38 / ((5 / 4) ^ (38 / 250)) + C39 / ((5 / 4) ^ (39 / 250)) + C40 / ((5 / 4) ^ (40 / 250)) + C41 / ((5 / 4) ^ (41 / 250)) + C42 / ((5 / 4) ^ (42 / 250)) + C43 / ((5 / 4) ^ (43 / 250)) + C44 / ((5 / 4) ^ (44 / 250))) / 45) - SGN(C1 - (C1 + C2 / ((5 / 4) ^ (1 / 250)) + C3 / ((5 / 4) ^ (2 / 250)) + C4 / ((5 / 4) ^ (3 / 250)) + C5 / ((5 / 4) ^ (4 / 250)) + C6 / ((5 / 4) ^ (5 / 250)) + C7 / ((5 / 4) ^ (6 / 250)) + C8 / ((5 / 4) ^ (7 / 250)) + C9 / ((5 / 4) ^ (8 / 250)) + C10 / ((5 / 4) ^ (9 / 250)) + C11 / ((5 / 4) ^ (10 / 250)) + C12 / ((5 / 4) ^ (11 / 250)) + C13 / ((5 / 4) ^ (12 / 250)) + C14 / ((5 / 4) ^ (13 / 250)) + C15 / ((5 / 4) ^ (14 / 250)) + C16 / ((5 / 4) ^ (15 / 250)) + C17 / ((5 / 4) ^ (16 / 250)) + C18 / ((5 / 4) ^ (17 / 250)) + C19 / ((5 / 4) ^ (18 / 250)) + C20 / ((5 / 4) ^ (19 / 250)) + C21 / ((5 / 4) ^ (20 / 250)) + C22 / ((5 / 4) ^ (21 / 250)) + C23 / ((5 / 4) ^ (22 / 250)) + C24 / ((5 / 4) ^ (23 / 250)) + C25 / ((5 / 4) ^ (24 / 250)) + C26 / ((5 / 4) ^ (25 / 250)) + C27 / ((5 / 4) ^ (26 / 250)) + C28 / ((5 / 4) ^ (27 / 250)) + C29 / ((5 / 4) ^ (28 / 250)) + C30 / ((5 / 4) ^ (29 / 250)) + C31 / ((5 / 4) ^ (30 / 250)) + C32 / ((5 / 4) ^ (31 / 250)) + C33 / ((5 / 4) ^ (32 / 250)) + C34 / ((5 / 4) ^ (33 / 250)) + C35 / ((5 / 4) ^ (34 / 250)) + C36 / ((5 / 4) ^ (35 / 250)) + C37 / ((5 / 4) ^ (36 / 250)) + C38 / ((5 / 4) ^ (37 / 250)) + C39 / ((5 / 4) ^ (38 / 250)) + C40 / ((5 / 4) ^ (39 / 250)) + C41 / ((5 / 4) ^ (40 / 250)) + C42 / ((5 / 4) ^ (41 / 250)) + C43 / ((5 / 4) ^ (42 / 250)) + C44 / ((5 / 4) ^ (43 / 250)) + C45 / ((5 / 4) ^ (44 / 250))) / 45)

RS FX20 crossing 45-Period Simple Moving Average of RS FX20:

SGN(C - (C + C1 / ((5 / 6) ^ (1 / 250)) + C2 / ((5 / 6) ^ (2 / 250)) + C3 / ((5 / 6) ^ (3 / 250)) + C4 / ((5 / 6) ^ (4 / 250)) + C5 / ((5 / 6) ^ (5 / 250)) + C6 / ((5 / 6) ^ (6 / 250)) + C7 / ((5 / 6) ^ (7 / 250)) + C8 / ((5 / 6) ^ (8 / 250)) + C9 / ((5 / 6) ^ (9 / 250)) + C10 / ((5 / 6) ^ (10 / 250)) + C11 / ((5 / 6) ^ (11 / 250)) + C12 / ((5 / 6) ^ (12 / 250)) + C13 / ((5 / 6) ^ (13 / 250)) + C14 / ((5 / 6) ^ (14 / 250)) + C15 / ((5 / 6) ^ (15 / 250)) + C16 / ((5 / 6) ^ (16 / 250)) + C17 / ((5 / 6) ^ (17 / 250)) + C18 / ((5 / 6) ^ (18 / 250)) + C19 / ((5 / 6) ^ (19 / 250)) + C20 / ((5 / 6) ^ (20 / 250)) + C21 / ((5 / 6) ^ (21 / 250)) + C22 / ((5 / 6) ^ (22 / 250)) + C23 / ((5 / 6) ^ (23 / 250)) + C24 / ((5 / 6) ^ (24 / 250)) + C25 / ((5 / 6) ^ (25 / 250)) + C26 / ((5 / 6) ^ (26 / 250)) + C27 / ((5 / 6) ^ (27 / 250)) + C28 / ((5 / 6) ^ (28 / 250)) + C29 / ((5 / 6) ^ (29 / 250)) + C30 / ((5 / 6) ^ (30 / 250)) + C31 / ((5 / 6) ^ (31 / 250)) + C32 / ((5 / 6) ^ (32 / 250)) + C33 / ((5 / 6) ^ (33 / 250)) + C34 / ((5 / 6) ^ (34 / 250)) + C35 / ((5 / 6) ^ (35 / 250)) + C36 / ((5 / 6) ^ (36 / 250)) + C37 / ((5 / 6) ^ (37 / 250)) + C38 / ((5 / 6) ^ (38 / 250)) + C39 / ((5 / 6) ^ (39 / 250)) + C40 / ((5 / 6) ^ (40 / 250)) + C41 / ((5 / 6) ^ (41 / 250)) + C42 / ((5 / 6) ^ (42 / 250)) + C43 / ((5 / 6) ^ (43 / 250)) + C44 / ((5 / 6) ^ (44 / 250))) / 45) - SGN(C1 - (C1 + C2 / ((5 / 6) ^ (1 / 250)) + C3 / ((5 / 6) ^ (2 / 250)) + C4 / ((5 / 6) ^ (3 / 250)) + C5 / ((5 / 6) ^ (4 / 250)) + C6 / ((5 / 6) ^ (5 / 250)) + C7 / ((5 / 6) ^ (6 / 250)) + C8 / ((5 / 6) ^ (7 / 250)) + C9 / ((5 / 6) ^ (8 / 250)) + C10 / ((5 / 6) ^ (9 / 250)) + C11 / ((5 / 6) ^ (10 / 250)) + C12 / ((5 / 6) ^ (11 / 250)) + C13 / ((5 / 6) ^ (12 / 250)) + C14 / ((5 / 6) ^ (13 / 250)) + C15 / ((5 / 6) ^ (14 / 250)) + C16 / ((5 / 6) ^ (15 / 250)) + C17 / ((5 / 6) ^ (16 / 250)) + C18 / ((5 / 6) ^ (17 / 250)) + C19 / ((5 / 6) ^ (18 / 250)) + C20 / ((5 / 6) ^ (19 / 250)) + C21 / ((5 / 6) ^ (20 / 250)) + C22 / ((5 / 6) ^ (21 / 250)) + C23 / ((5 / 6) ^ (22 / 250)) + C24 / ((5 / 6) ^ (23 / 250)) + C25 / ((5 / 6) ^ (24 / 250)) + C26 / ((5 / 6) ^ (25 / 250)) + C27 / ((5 / 6) ^ (26 / 250)) + C28 / ((5 / 6) ^ (27 / 250)) + C29 / ((5 / 6) ^ (28 / 250)) + C30 / ((5 / 6) ^ (29 / 250)) + C31 / ((5 / 6) ^ (30 / 250)) + C32 / ((5 / 6) ^ (31 / 250)) + C33 / ((5 / 6) ^ (32 / 250)) + C34 / ((5 / 6) ^ (33 / 250)) + C35 / ((5 / 6) ^ (34 / 250)) + C36 / ((5 / 6) ^ (35 / 250)) + C37 / ((5 / 6) ^ (36 / 250)) + C38 / ((5 / 6) ^ (37 / 250)) + C39 / ((5 / 6) ^ (38 / 250)) + C40 / ((5 / 6) ^ (39 / 250)) + C41 / ((5 / 6) ^ (40 / 250)) + C42 / ((5 / 6) ^ (41 / 250)) + C43 / ((5 / 6) ^ (42 / 250)) + C44 / ((5 / 6) ^ (43 / 250)) + C45 / ((5 / 6) ^ (44 / 250))) / 45)

Both formulas can return the following values:

-2: RS down through MA
-1: RS down through MA (but matched or matches exactly)
0: Not crossing.
+1: RS up through MA (but matched or matches exactly)
+2: RS up through MA

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jmlee88888
Posted : Friday, June 23, 2006 3:00:02 AM
Gold Customer Gold Customer

Joined: 12/30/2004
Posts: 16
Thanks Bruce. I really appreciate this. I'm also shocked as to how quickly TC2005 can calculate these numbers for all stocks given the calculations that it has to perform.

I've verified the sorts and they do work, and I don't want to seem like an ingrate, but would you mind explaining the background for the formula? I can see that the difference between the two formulas lie in your choosing 5/4 for the -FX20 and 5/6 for the FX20...why? And do the ^ imply 'to the power of'?

Thanks again and I really appreciate your persistence in pursuing this issue.
Bruce_L
Posted : Friday, June 23, 2006 8:07:44 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The formula starts with the newest value of the Moving Average and goes back to the oldest value and is written using a fairly literal interpretation of how Relative Strength is calculated (Price of symbol / Price of RS Symbol). Because of this, I used the inverse (by switching the numerator and denominator) of one plus the desired annual return (the formula could have been written without this switch):

4 / 5 = .8 = FX(-20)

6 / 5 = 1.2 = FX20

You are correct that x ^ y raises x to the power of y. Assuming a 250 trading day year, the value for an FX symbol should be (the previous day's value * ((one plus the desired annual return) ^ (1 / 250))).

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jmlee88888
Posted : Friday, June 23, 2006 9:22:49 AM
Gold Customer Gold Customer

Joined: 12/30/2004
Posts: 16
Ah...I understand now. Thank you so much. Now I'll be able to construct variants FX(-10), FX(-25)...etc. Thanks again Bruce!
bustermu
Posted : Friday, June 23, 2006 11:07:05 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
If one observes a discrepancy between Bruce's PCF and the plotted curves, it is likely due to the fact that the FX curves use 253 days per year and Bruce used 250 days per year.

Thanks,
Jim Murphy
Bruce_L
Posted : Friday, June 23, 2006 11:15:24 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
bustermu,
Thank you for the observation. Here are versions based on a 253 trading day year in case anybody wishes to try them instead:

RS FX(-20) crossing 45-Period Simple Moving Average of RS FX(-20):

SGN(C - (C + C1 / ((5 / 4) ^ (1 / 253)) + C2 / ((5 / 4) ^ (2 / 253)) + C3 / ((5 / 4) ^ (3 / 253)) + C4 / ((5 / 4) ^ (4 / 253)) + C5 / ((5 / 4) ^ (5 / 253)) + C6 / ((5 / 4) ^ (6 / 253)) + C7 / ((5 / 4) ^ (7 / 253)) + C8 / ((5 / 4) ^ (8 / 253)) + C9 / ((5 / 4) ^ (9 / 253)) + C10 / ((5 / 4) ^ (10 / 253)) + C11 / ((5 / 4) ^ (11 / 253)) + C12 / ((5 / 4) ^ (12 / 253)) + C13 / ((5 / 4) ^ (13 / 253)) + C14 / ((5 / 4) ^ (14 / 253)) + C15 / ((5 / 4) ^ (15 / 253)) + C16 / ((5 / 4) ^ (16 / 253)) + C17 / ((5 / 4) ^ (17 / 253)) + C18 / ((5 / 4) ^ (18 / 253)) + C19 / ((5 / 4) ^ (19 / 253)) + C20 / ((5 / 4) ^ (20 / 253)) + C21 / ((5 / 4) ^ (21 / 253)) + C22 / ((5 / 4) ^ (22 / 253)) + C23 / ((5 / 4) ^ (23 / 253)) + C24 / ((5 / 4) ^ (24 / 253)) + C25 / ((5 / 4) ^ (25 / 253)) + C26 / ((5 / 4) ^ (26 / 253)) + C27 / ((5 / 4) ^ (27 / 253)) + C28 / ((5 / 4) ^ (28 / 253)) + C29 / ((5 / 4) ^ (29 / 253)) + C30 / ((5 / 4) ^ (30 / 253)) + C31 / ((5 / 4) ^ (31 / 253)) + C32 / ((5 / 4) ^ (32 / 253)) + C33 / ((5 / 4) ^ (33 / 253)) + C34 / ((5 / 4) ^ (34 / 253)) + C35 / ((5 / 4) ^ (35 / 253)) + C36 / ((5 / 4) ^ (36 / 253)) + C37 / ((5 / 4) ^ (37 / 253)) + C38 / ((5 / 4) ^ (38 / 253)) + C39 / ((5 / 4) ^ (39 / 253)) + C40 / ((5 / 4) ^ (40 / 253)) + C41 / ((5 / 4) ^ (41 / 253)) + C42 / ((5 / 4) ^ (42 / 253)) + C43 / ((5 / 4) ^ (43 / 253)) + C44 / ((5 / 4) ^ (44 / 253))) / 45) - SGN(C1 - (C1 + C2 / ((5 / 4) ^ (1 / 253)) + C3 / ((5 / 4) ^ (2 / 253)) + C4 / ((5 / 4) ^ (3 / 253)) + C5 / ((5 / 4) ^ (4 / 253)) + C6 / ((5 / 4) ^ (5 / 253)) + C7 / ((5 / 4) ^ (6 / 253)) + C8 / ((5 / 4) ^ (7 / 253)) + C9 / ((5 / 4) ^ (8 / 253)) + C10 / ((5 / 4) ^ (9 / 253)) + C11 / ((5 / 4) ^ (10 / 253)) + C12 / ((5 / 4) ^ (11 / 253)) + C13 / ((5 / 4) ^ (12 / 253)) + C14 / ((5 / 4) ^ (13 / 253)) + C15 / ((5 / 4) ^ (14 / 253)) + C16 / ((5 / 4) ^ (15 / 253)) + C17 / ((5 / 4) ^ (16 / 253)) + C18 / ((5 / 4) ^ (17 / 253)) + C19 / ((5 / 4) ^ (18 / 253)) + C20 / ((5 / 4) ^ (19 / 253)) + C21 / ((5 / 4) ^ (20 / 253)) + C22 / ((5 / 4) ^ (21 / 253)) + C23 / ((5 / 4) ^ (22 / 253)) + C24 / ((5 / 4) ^ (23 / 253)) + C25 / ((5 / 4) ^ (24 / 253)) + C26 / ((5 / 4) ^ (25 / 253)) + C27 / ((5 / 4) ^ (26 / 253)) + C28 / ((5 / 4) ^ (27 / 253)) + C29 / ((5 / 4) ^ (28 / 253)) + C30 / ((5 / 4) ^ (29 / 253)) + C31 / ((5 / 4) ^ (30 / 253)) + C32 / ((5 / 4) ^ (31 / 253)) + C33 / ((5 / 4) ^ (32 / 253)) + C34 / ((5 / 4) ^ (33 / 253)) + C35 / ((5 / 4) ^ (34 / 253)) + C36 / ((5 / 4) ^ (35 / 253)) + C37 / ((5 / 4) ^ (36 / 253)) + C38 / ((5 / 4) ^ (37 / 253)) + C39 / ((5 / 4) ^ (38 / 253)) + C40 / ((5 / 4) ^ (39 / 253)) + C41 / ((5 / 4) ^ (40 / 253)) + C42 / ((5 / 4) ^ (41 / 253)) + C43 / ((5 / 4) ^ (42 / 253)) + C44 / ((5 / 4) ^ (43 / 253)) + C45 / ((5 / 4) ^ (44 / 253))) / 45)

RS FX20 crossing 45-Period Simple Moving Average of RS FX20:

SGN(C - (C + C1 / ((5 / 6) ^ (1 / 253)) + C2 / ((5 / 6) ^ (2 / 253)) + C3 / ((5 / 6) ^ (3 / 253)) + C4 / ((5 / 6) ^ (4 / 253)) + C5 / ((5 / 6) ^ (5 / 253)) + C6 / ((5 / 6) ^ (6 / 253)) + C7 / ((5 / 6) ^ (7 / 253)) + C8 / ((5 / 6) ^ (8 / 253)) + C9 / ((5 / 6) ^ (9 / 253)) + C10 / ((5 / 6) ^ (10 / 253)) + C11 / ((5 / 6) ^ (11 / 253)) + C12 / ((5 / 6) ^ (12 / 253)) + C13 / ((5 / 6) ^ (13 / 253)) + C14 / ((5 / 6) ^ (14 / 253)) + C15 / ((5 / 6) ^ (15 / 253)) + C16 / ((5 / 6) ^ (16 / 253)) + C17 / ((5 / 6) ^ (17 / 253)) + C18 / ((5 / 6) ^ (18 / 253)) + C19 / ((5 / 6) ^ (19 / 253)) + C20 / ((5 / 6) ^ (20 / 253)) + C21 / ((5 / 6) ^ (21 / 253)) + C22 / ((5 / 6) ^ (22 / 253)) + C23 / ((5 / 6) ^ (23 / 253)) + C24 / ((5 / 6) ^ (24 / 253)) + C25 / ((5 / 6) ^ (25 / 253)) + C26 / ((5 / 6) ^ (26 / 253)) + C27 / ((5 / 6) ^ (27 / 253)) + C28 / ((5 / 6) ^ (28 / 253)) + C29 / ((5 / 6) ^ (29 / 253)) + C30 / ((5 / 6) ^ (30 / 253)) + C31 / ((5 / 6) ^ (31 / 253)) + C32 / ((5 / 6) ^ (32 / 253)) + C33 / ((5 / 6) ^ (33 / 253)) + C34 / ((5 / 6) ^ (34 / 253)) + C35 / ((5 / 6) ^ (35 / 253)) + C36 / ((5 / 6) ^ (36 / 253)) + C37 / ((5 / 6) ^ (37 / 253)) + C38 / ((5 / 6) ^ (38 / 253)) + C39 / ((5 / 6) ^ (39 / 253)) + C40 / ((5 / 6) ^ (40 / 253)) + C41 / ((5 / 6) ^ (41 / 253)) + C42 / ((5 / 6) ^ (42 / 253)) + C43 / ((5 / 6) ^ (43 / 253)) + C44 / ((5 / 6) ^ (44 / 253))) / 45) - SGN(C1 - (C1 + C2 / ((5 / 6) ^ (1 / 253)) + C3 / ((5 / 6) ^ (2 / 253)) + C4 / ((5 / 6) ^ (3 / 253)) + C5 / ((5 / 6) ^ (4 / 253)) + C6 / ((5 / 6) ^ (5 / 253)) + C7 / ((5 / 6) ^ (6 / 253)) + C8 / ((5 / 6) ^ (7 / 253)) + C9 / ((5 / 6) ^ (8 / 253)) + C10 / ((5 / 6) ^ (9 / 253)) + C11 / ((5 / 6) ^ (10 / 253)) + C12 / ((5 / 6) ^ (11 / 253)) + C13 / ((5 / 6) ^ (12 / 253)) + C14 / ((5 / 6) ^ (13 / 253)) + C15 / ((5 / 6) ^ (14 / 253)) + C16 / ((5 / 6) ^ (15 / 253)) + C17 / ((5 / 6) ^ (16 / 253)) + C18 / ((5 / 6) ^ (17 / 253)) + C19 / ((5 / 6) ^ (18 / 253)) + C20 / ((5 / 6) ^ (19 / 253)) + C21 / ((5 / 6) ^ (20 / 253)) + C22 / ((5 / 6) ^ (21 / 253)) + C23 / ((5 / 6) ^ (22 / 253)) + C24 / ((5 / 6) ^ (23 / 253)) + C25 / ((5 / 6) ^ (24 / 253)) + C26 / ((5 / 6) ^ (25 / 253)) + C27 / ((5 / 6) ^ (26 / 253)) + C28 / ((5 / 6) ^ (27 / 253)) + C29 / ((5 / 6) ^ (28 / 253)) + C30 / ((5 / 6) ^ (29 / 253)) + C31 / ((5 / 6) ^ (30 / 253)) + C32 / ((5 / 6) ^ (31 / 253)) + C33 / ((5 / 6) ^ (32 / 253)) + C34 / ((5 / 6) ^ (33 / 253)) + C35 / ((5 / 6) ^ (34 / 253)) + C36 / ((5 / 6) ^ (35 / 253)) + C37 / ((5 / 6) ^ (36 / 253)) + C38 / ((5 / 6) ^ (37 / 253)) + C39 / ((5 / 6) ^ (38 / 253)) + C40 / ((5 / 6) ^ (39 / 253)) + C41 / ((5 / 6) ^ (40 / 253)) + C42 / ((5 / 6) ^ (41 / 253)) + C43 / ((5 / 6) ^ (42 / 253)) + C44 / ((5 / 6) ^ (43 / 253)) + C45 / ((5 / 6) ^ (44 / 253))) / 45)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Bruce_L
Posted : Thursday, May 10, 2007 12:58:41 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
It is possible to create a negative FX line in Personal Chartist for Blocks Player. Please start by creating the following Custom Code Block as Line and Single to Line. If you have not done so already, you may wish to review the following before attempting to create your own Code Blocks:

Hello World! Writing Code Blocks for SnapSheets in Visual Basic.NET
Creating a True Range Block

FX:

Delete everything in the Code Block Editor and replace it with the following (please keep in mind I am not a programmer):

<WBIGuid("8c4b0640-032f-4159-ae7f-2a7282ab6495"),FriendlyName("FX")> _
Public Class FX
Inherits BaseTemplateDLSAndSingleToDLS
Public Overrides Sub calculate()
If ParameterValue > -100
Dim span As System.TimeSpan
Dim year As System.TimeSpan = System.TimeSpan.FromDays(365.2425)
Dim ratio As Double
Dim interest As Single = 100 / (100 + ParameterValue)
Dim value As Double
For bar As Integer = 0 To InputCount - 2
span = InputDate(InputCount - 1) - InputDate(bar)
ratio = span.Ticks / year.Ticks
value = InputValue(InputCount - 1) * (interest ^ ratio)
AddToOutput(InputDate(bar),value)
Next
AddToOutput(InputDate(InputCount - 1),InputValue(InputCount - 1))
End If
End Sub
End Class

Then save the attached .bWorks file to the following folder:

\My Documents\Blocks Files\Workspaces

You can then open the Workspace via your FILE menu (Open Workspace then My Computer).

It's a basic Workspace based on Personal Chartist with an FX Line that can be adjusted using QuickEdit. You may wish to review the following:

Customizing with Properties
Your First 3 Block Diagrams

Attachments:
jmlee88888-13102.bWorks - 51 KB, downloaded 749 time(s).



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