TC2000.com• Download software • Tutorial videos • Subscription & data-feed pricing • Class schedule

TC2000Brokerage.com• New account application • Trading resources • Margin rates • Stock & option commissions

Worden Discussion Forum » Customer Training & Support » PCFs, EasyScan and Custom Indicators » Tilson T3 Moving Average

-(f ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGCx, x), x), x), x), x) + 3 * ((f ^ 2) + (f ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGCx, x), x), x), x) - (6 * (f ^ 2) + 3 * (f + (f ^ 3))) * XAVG(XAVG(XAVG(XAVGCx, x), x), x) + (1 + 3 * f + (f ^ 3) + 3 * (f ^ 2)) * XAVG(XAVG(XAVGCx, x), x)

A T3-6-1.272 can be written as follows.

-(1.272 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6), 6) + 3 * ((1.272 ^ 2) + (1.272 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6) - (6 * (1.272 ^ 2) + 3 * (1.272 + (1.272 ^ 3))) * XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6) + (1 + 3 * 1.272 + (1.272 ^ 3) + 3 * (1.272 ^ 2)) * XAVG(XAVG(XAVGC6, 6), 6)

Examples

Bruce

I changed parameters to .86 and 12 (just to see a different plot)

with a word processor program using find/replace.

I assume that is in an acceptable range?

The new PCF gives heavy negative values way below price.

Is something else wrong?

-(.86 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC12, 12), 12), 12), 12), 12) + 3 * ((.86 ^ 2) + (.86 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC12, 12), 12), 12), 12) - (12 * (.86 ^ 2) + 3 * (.86 + (.86 ^ 3))) * XAVG(XAVG(XAVG(XAVGC12, 12), 12), 12) + (1 + 3 * .86 + (.86 ^ 3) + 3 * (.86 ^ 2)) * XAVG(XAVG(XAVGC12, 12), 12)

Thanks

Not quite sure what the difference is, but yeah, there is something wrong with your version. It should be the following.

-(.86 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC12, 12), 12), 12), 12), 12) + 3 * ((.86 ^ 2) + (.86 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC12, 12), 12), 12), 12) - (6 * (.86 ^ 2) + 3 * (.86 + (.86 ^ 3))) * XAVG(XAVG(XAVG(XAVGC12, 12), 12), 12) + (1 + 3 * .86 + (.86 ^ 3) + 3 * (.86 ^ 2)) * XAVG(XAVG(XAVGC12, 12), 12)

There does seem to be a -12 in your formula that is a -6 in mine, so that might be the entire difference (or maybe not).

Yes, I see it now.

Your template has a six that isnt a period value.

It was changed along with the other sixes.

Hi Bruce,

I'm trying to create two Condition PCFs pertaining to the slope of the T3=5=1.618:

1) for a 10-bar negative slope: 6 * (FAVG((-4.235801 * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5), 5) + 20.561175096* XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5) - 33.268947 * XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5) + 7.943573032* XAVG(XAVG(XAVGC5, 5), 5)), 10) - (-4.235801 * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5), 5) + 20.561175096* XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5) - 33.268947 * XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5) + 7.943573032* XAVG(XAVG(XAVGC5, 5), 5))) / 9 < 0

2) for a 3-bar positive slope: 6 * (FAVG((-4.235801 * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5), 5) + 20.561175096* XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5) - 33.268947 * XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5) + 7.943573032* XAVG(XAVG(XAVGC5, 5), 5)), 3) - (-4.235801 * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5), 5) + 20.561175096* XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5) - 33.268947 * XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5) + 7.943573032* XAVG(XAVG(XAVGC5, 5), 5))) / 2 > 0

I'm not sure which slope formula to use with the T3:

This one, as an example with MS:

6 * (MS, 10) - MS10) / 9 < 0

Or this one:

6 * (FAVG(XAVG(T3-5-1.62), 10) - AVG(XAVG(T3-5-162), 10)) / 9 < 0

I suspect the second one is correct, but am not sure if using AVG(XAVG ....) on a T3 will work? Thanks a lot for your help with this.

Oh, by the way. I would like to put in an indicator request for future TC2000 versions. Namely, Linear Regression Channels which move with the price and include top, middle and bottom channel lines with selectable parameters for length of bars and StDev of the channel. I've used these for many years now (with NinjaTrader) with default values of 55 bars and 3.5 SD which work very well for viaualizin extended moves..

Thanks and kind regards,

Chris

Regarding the LinReg Channels above, I meant linear regression line channels, not envelopes. A nice addition would also be to color the LR Channels in two different colors depending on the slope of the channels.

The XAVG() in the second formula is almost certainly the result of the formula being for something like an exponential TSV or an exponential MS as opposed to be part of the linear regression slope formula itself.

Taking a look at the actual template for the linear regression slope instead of trying to convert an example would be your best bet.

Linear Regression and Linear Regression Slope

For example, it may not be obvious that the first example with MS is actually the same as the following.

6 * (FAVG(MS, 10) - AVG(MS, 10)) / 9 < 0

Or that this can actually be simplified down to the following (although that is more an understanding math thing than a looking at the template thing).

FAVG(MS, 10) < AVG(MS, 10)

So the 10 period linear regression slope can be written as follows.

6 * (FAVG(-4.235801 * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5), 5) + 20.561175096* XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5) - 33.268947 * XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5) + 7.943573032* XAVG(XAVG(XAVGC5, 5), 5), 10) - AVG(-4.235801 * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5), 5) + 20.561175096* XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5) - 33.268947 * XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5) + 7.943573032* XAVG(XAVG(XAVGC5, 5), 5), 10)) / 9

And checking for this being less than 0 can be written as follows.

FAVG(-4.235801 * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5), 5) + 20.561175096* XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5) - 33.268947 * XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5) + 7.943573032* XAVG(XAVG(XAVGC5, 5), 5), 10) < AVG(-4.235801 * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5), 5) + 20.561175096* XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5) - 33.268947 * XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5) + 7.943573032* XAVG(XAVG(XAVGC5, 5), 5), 10)

And a 3 period linear regression slope can be written as follows.

6 * (FAVG(-4.235801 * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5), 5) + 20.561175096* XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5) - 33.268947 * XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5) + 7.943573032* XAVG(XAVG(XAVGC5, 5), 5), 3) - AVG(-4.235801 * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5), 5) + 20.561175096* XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5) - 33.268947 * XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5) + 7.943573032* XAVG(XAVG(XAVGC5, 5), 5))) / 2

And checking for this being greater than 0 can be written as follows.

FAVG(-4.235801 * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5), 5) + 20.561175096* XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5) - 33.268947 * XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5) + 7.943573032* XAVG(XAVG(XAVGC5, 5), 5), 3) > AVG(-4.235801 * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5), 5) + 20.561175096* XAVG(XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5), 5) - 33.268947 * XAVG(XAVG(XAVG(XAVGC5, 5), 5), 5) + 7.943573032* XAVG(XAVG(XAVGC5, 5), 5), 3)

Thanks very much for your help and info, Bruce - just what I needed, very interesting.

I'm also trying to create an indicator which signals a spike or numerical 1 when the bar closes above the Top Channel of a Bollinger Band with a period of 20 and an SD of (only) 0.25.

I could easily create a scan condition for this but can't figure out how to make an indicator which is flat (or 0), except when the close crosses up the BB-0.25 Channel Top.

Many thanks,

If you already know how to create the Condition Formula, you should be able to use it as the Boolean Formula in a Custom PCF % True Indicator to get spikes to 100 when it is true and a value of 0 when it is false.

I don't have the formula itself unfortunately. I just auto-created the Scan Condition from the indicator (BB-0.25).

Please try the following Condition Formula.

C > BBTOP(0.25, 20)

Bollinger Bands (BB)

There are templates made for a lot of different indicators.

Indicator Formula Templates

Thanks very much, Bruce. That's a really good resource link too.

I'm usng some hybrid indicators based on TSV ad Moneystream which I have created by using the "Create Scan Condition" method. Basically I have (at least) four such scan conditions, but do not want to include all 4 in an Easyscan, as they would then use an "AND" logic. I need to use an "OR" logic, so that the Easyscan would find results if only one (or more than one) condition would be fulfilled.

Is there a way of doing this wthout having to write an extensive Conditon PCF?

By the way, do you think it would be likely that future TC2000 versions might include a LinReg Channel indicator wit two outer, parallel lines deterined by the LR-Ch period and StDev parameters?

Thanks,

If you want to OR, you are going to need to use a PCF. There isn't any other way to OR in an EasyScan.

I do not know if linear regression channel indicator will ever be added to TC2000 v17. It is currently only available as a drawing tool.

Thanks Bruce. Can I call Worden to get a paid technical consulting service by the hour in order for someone to code my hybrid volume indicators into a PCF, with/without OR functions?

Kind regads,

Yes, the cost is $95 / hour in full hour increments. That said, it may or may not be possible to implement your indicators entirely in the PCF Language so OR can be used.

Hello Bruce,

I wanted to ask your help again with a condition PCF for the following condition:

The T3-8-1.618 has crossed down the Hull MA of the Price High within the last 3 bars.

If T3 and Hull and Price are all scaled together on a chart, the T3 does not cross the rpice down, It only does so if it is scaled by itself and the Price and Hull Avg are scaled together. That is why I cannot create a scan condition on the chart without the formulas.

When scaled by itself the T3 has some interesting crosses though. Thanks very much for writing the code for me.

Kind regards - Chris

The formula I just created for the T3-8-1.618 can definitely cross down through price.

-(1.618 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8), 8), 8) + 3 * ((1.618 ^ 2) + (1.618 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8), 8) - (6 * (1.618 ^ 2) + 3 * (1.618 + (1.618 ^ 3))) * XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8) + (1 + 3 * 1.618 + (1.618 ^ 3) + 3 * (1.618 ^ 2)) * XAVG(XAVG(XAVGC8, 8), 8)

On another note, you did not specify the period of the Hull moving average of the Price High.

You shouldn't make a condition for T3 crossing through price when it is scaled by itself because the crossover points are meaningless and will change with zoom and scroll.

Oh, sorry about the Hull MA -

I wanted to use the 1-period Hull MA of the Price HIGH.

The 1 period hull moving average of the high is just the high. So either:

XDOWN(-(1.618 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8), 8), 8) + 3 * ((1.618 ^ 2) + (1.618 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8), 8) - (6 * (1.618 ^ 2) + 3 * (1.618 + (1.618 ^ 3))) * XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8) + (1 + 3 * 1.618 + (1.618 ^ 3) + 3 * (1.618 ^ 2)) * XAVG(XAVG(XAVGC8, 8), 8), H, 3)

Or:

CountTrue(XDOWN(-(1.618 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8), 8), 8) + 3 * ((1.618 ^ 2) + (1.618 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8), 8) - (6 * (1.618 ^ 2) + 3 * (1.618 + (1.618 ^ 3))) * XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8) + (1 + 3 * 1.618 + (1.618 ^ 3) + 3 * (1.618 ^ 2)) * XAVG(XAVG(XAVGC8, 8), 8), H), 3) > 0

Thanks very much, Bruce - I appreciater your help and constructive info. Chris

I have some further T3 MA related conditions which I would like to ask your help with:

1) The T3-36-1.272 must be ABOVE the T3-6-1.272 AND

The T3-8-1.618 crosses the T3-6-1.272 DOWN within the last 3 bars;

2) The Price High is above the EMA-200 OR the BBTop(20, 0.25) OR the EMA-89 (separate condition, not part of T3 above. If the OR conditions are not supported that's okay, conditions #1 & #3 are more important to me).

---------------------------------------------------------------------------------------------------------

3) The T3-6-1.272 must be ABOVE the T3-36-1.272 AND

The T3-8-1.618 crosses the T3-6-1.272 UP within the last 3 bars;

4) The Price Low is below the EMA-200 OR the BBTop(20, 0.25) OR the EMA-89 (again a separate condition, not part of th T3 condition above).

Thanks very much for your help, Bruce. Incidentally, I've stopped using NinjaTrader and ThinkOrSwim and now exclusively use TC2000.

Kind regards,

-(1.272 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC36, 36), 36), 36), 36), 36) + 3 * ((1.272 ^ 2) + (1.272 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC36, 36), 36), 36), 36) - (6 * (1.272 ^ 2) + 3 * (1.272 + (1.272 ^ 3))) * XAVG(XAVG(XAVG(XAVGC36, 36), 36), 36) + (1 + 3 * 1.272 + (1.272 ^ 3) + 3 * (1.272 ^ 2)) * XAVG(XAVG(XAVGC36, 36), 36) > -(1.272 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6), 6) + 3 * ((1.272 ^ 2) + (1.272 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6) - (6 * (1.272 ^ 2) + 3 * (1.272 + (1.272 ^ 3))) * XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6) + (1 + 3 * 1.272 + (1.272 ^ 3) + 3 * (1.272 ^ 2)) * XAVG(XAVG(XAVGC6, 6), 6) AND XDOWN(-(1.618 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8), 8), 8) + 3 * ((1.618 ^ 2) + (1.618 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8), 8) - (6 * (1.618 ^ 2) + 3 * (1.618 + (1.618 ^ 3))) * XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8) + (1 + 3 * 1.618 + (1.618 ^ 3) + 3 * (1.618 ^ 2)) * XAVG(XAVG(XAVGC8, 8), 8), -(1.272 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6), 6) + 3 * ((1.272 ^ 2) + (1.272 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6) - (6 * (1.272 ^ 2) + 3 * (1.272 + (1.272 ^ 3))) * XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6) + (1 + 3 * 1.272 + (1.272 ^ 3) + 3 * (1.272 ^ 2)) * XAVG(XAVG(XAVGC6, 6), 6), 3)

H > LEAST(BBTOP(.25, 20), XAVGC89, XAVGC200)

-(1.272 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6), 6) + 3 * ((1.272 ^ 2) + (1.272 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6) - (6 * (1.272 ^ 2) + 3 * (1.272 + (1.272 ^ 3))) * XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6) + (1 + 3 * 1.272 + (1.272 ^ 3) + 3 * (1.272 ^ 2)) * XAVG(XAVG(XAVGC6, 6), 6) > -(1.272 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC36, 36), 36), 36), 36), 36) + 3 * ((1.272 ^ 2) + (1.272 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC36, 36), 36), 36), 36) - (6 * (1.272 ^ 2) + 3 * (1.272 + (1.272 ^ 3))) * XAVG(XAVG(XAVG(XAVGC36, 36), 36), 36) + (1 + 3 * 1.272 + (1.272 ^ 3) + 3 * (1.272 ^ 2)) * XAVG(XAVG(XAVGC36, 36), 36) AND XUP(-(1.618 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8), 8), 8) + 3 * ((1.618 ^ 2) + (1.618 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8), 8) - (6 * (1.618 ^ 2) + 3 * (1.618 + (1.618 ^ 3))) * XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8) + (1 + 3 * 1.618 + (1.618 ^ 3) + 3 * (1.618 ^ 2)) * XAVG(XAVG(XAVGC8, 8), 8), -(1.272 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6), 6) + 3 * ((1.272 ^ 2) + (1.272 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6) - (6 * (1.272 ^ 2) + 3 * (1.272 + (1.272 ^ 3))) * XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6) + (1 + 3 * 1.272 + (1.272 ^ 3) + 3 * (1.272 ^ 2)) * XAVG(XAVG(XAVGC6, 6), 6), 3)

L < GREATEST(BBTOP(.25, 20), XAVGC89, XAVGC200)

Hey Bruce, Many thanks for that intensive work. I didn't realize that the OR conditions were this efficient, good to know for the future. Regretably, I think I made an error on condtion #3. I had initially mentioned: 3) The T3-6-1.272 must be ABOVE the T3-36-1.272 AND The T3-8-1.618 crosses the T3-6-1.272 UP within the last 3 bars; What I should have said is: 3-new) The T3-6-1.272 must be ABOVE the T3-36-1.272 AND The T3-8-1.618 crosses the T3-6-1.272 DOWN within the last 3 bars; Condition #4 remains the same. Sorry about that, perhaps you could modify #3? Just to be sure: If I edit the conditions of these filters within a scan, I could set them to work with weekly, daily or intraday charts/scans? I really appreciate your input, will study what you've done here. Kind regards, Chris

Just change the XUP to XDOWN in the formula.

-(1.272 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6), 6) + 3 * ((1.272 ^ 2) + (1.272 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6) - (6 * (1.272 ^ 2) + 3 * (1.272 + (1.272 ^ 3))) * XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6) + (1 + 3 * 1.272 + (1.272 ^ 3) + 3 * (1.272 ^ 2)) * XAVG(XAVG(XAVGC6, 6), 6) > -(1.272 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC36, 36), 36), 36), 36), 36) + 3 * ((1.272 ^ 2) + (1.272 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC36, 36), 36), 36), 36) - (6 * (1.272 ^ 2) + 3 * (1.272 + (1.272 ^ 3))) * XAVG(XAVG(XAVG(XAVGC36, 36), 36), 36) + (1 + 3 * 1.272 + (1.272 ^ 3) + 3 * (1.272 ^ 2)) * XAVG(XAVG(XAVGC36, 36), 36) AND XDOWN(-(1.618 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8), 8), 8) + 3 * ((1.618 ^ 2) + (1.618 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8), 8) - (6 * (1.618 ^ 2) + 3 * (1.618 + (1.618 ^ 3))) * XAVG(XAVG(XAVG(XAVGC8, 8), 8), 8) + (1 + 3 * 1.618 + (1.618 ^ 3) + 3 * (1.618 ^ 2)) * XAVG(XAVG(XAVGC8, 8), 8), -(1.272 ^ 3) * XAVG(XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6), 6) + 3 * ((1.272 ^ 2) + (1.272 ^ 3)) * XAVG(XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6), 6) - (6 * (1.272 ^ 2) + 3 * (1.272 + (1.272 ^ 3))) * XAVG(XAVG(XAVG(XAVGC6, 6), 6), 6) + (1 + 3 * 1.272 + (1.272 ^ 3) + 3 * (1.272 ^ 2)) * XAVG(XAVG(XAVGC6, 6), 6), 3)

Yes, you can write these once and change the time frame in the scan without changing anything in the formulas.

Thanks VERY much - have a great week.

You're welcome.