New version 18 available now


Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

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

Hull moving Average Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Neurotic_Raccon
Posted : Monday, May 28, 2018 4:00:30 PM
Registered User
Joined: 5/23/2018
Posts: 2

I am trying to program Hull moving average such that it changes color with a change of direction. Blue while moving up and  Red while moving down. How can someone create a custom indicator?

Bruce_L
Posted : Tuesday, May 29, 2018 11:00:37 AM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442

I would probably leave the moving average on the chart as a line and plot different dots on that line when moving moving up versus moving down. You will need two Custom PCF Indicators overlayed into the same pane and scale as price in order to do this.

The following settings are based on a 50 period Hull moving average. You can change any instances of 50 in the formulas to adjust the settings. For the blue dots:

- Plot Style: Dots
- Plot Color: Blue
- Period: 1
- Average Type: Doesn't matter (because the Period is 1).
- Formula: IIF(HAVGC50 > HAVGC50.1, HAVGC50, 1 / 0)

For the red dots:

- Plot Style: Dots
- Plot Color: Red
- Period: 1
- Average Type: Doesn't matter (because the Period is 1).
- Formula: IIF(HAVGC50 < HAVGC50.1, HAVGC50, 1 / 0)

How to Overlay an Indicator (choose & Scale With)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Al_Gorithm
Posted : Tuesday, May 29, 2018 12:22:32 PM

Gold Customer Gold Customer

Joined: 6/30/2017
Posts: 1,114

Pretty cool. Filing this away for future reference. :)

Neurotic_Raccon
Posted : Friday, June 01, 2018 4:39:36 PM
Registered User
Joined: 5/23/2018
Posts: 2

Thanks so much, it works 

0002ct
Posted : Friday, June 08, 2018 11:19:50 AM
Gold Customer Gold Customer

Joined: 11/19/2015
Posts: 417

Hi, Bruce. When convenient, could I please have the formula for hull50 turning green and vice versa? I hope you're well.

Bruce_L
Posted : Friday, June 08, 2018 11:41:53 AM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442

Hull turning blue.

TrueInRow(HAVGC50 > HAVGC50.1, 2) =1

Or maybe this would be more efficient (it is shorter).

XUP(HAVGC50, HAVGC50.1)

Hull turning red.

TrueInRow(HAVGC50 < HAVGC50.1, 2) = 1

Shorter version being the following.

XDOWN(HAVGC50, HAVGC50.1)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
0002ct
Posted : Friday, June 08, 2018 1:13:50 PM
Gold Customer Gold Customer

Joined: 11/19/2015
Posts: 417

Perfect as always. Thanks, Bruce. Have a nice weekend.

0002ct
Posted : Monday, June 18, 2018 3:43:18 PM
Gold Customer Gold Customer

Joined: 11/19/2015
Posts: 417

Hello.

Bruce, I've confused myself.

1. I've plotted the B-R, R-B Hull8 trend changes as above. They're plotted right on the chart candlesticks. Looks good. This is the "Hull trend".

2. "Next Hull change": I've also plotted the "based on current value, where would Hull8 next change to red or blue" formula you helped me with last week. I use a "last value horizontal" line for:

(51 * C1 + 186 * (C2 + C3) + 78 * C4 + 6 * C5 - 115 * C - 30 * (C6 + C7) - 15 * C8 - 5 * C9) / 312


The "next change" line *appears" to be correct. It's always below a blue dot and above a red dot relative to the last "Hull Trend" value. But if I change the scaling of the Next Hull to "by itself" (rather than the symbol", I get a completely different value. 

Why does changing the scaling produce a different price value?
 

Bruce_L
Posted : Monday, June 18, 2018 4:22:23 PM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442

I do not know why this would happen. The value should not change, only the position of the plot relative to price should change when you plot the Custom PCF Indicator on its own scale.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
0002ct
Posted : Monday, June 18, 2018 4:26:15 PM
Gold Customer Gold Customer

Joined: 11/19/2015
Posts: 417

It's the end of your day, so I'll try following up tomorrow by sending you the layout+chart to TC mail. I'll work on it tonight to see if I clear it up myself. Thanks, Bruce.

0002ct
Posted : Thursday, June 21, 2018 3:56:39 PM
Gold Customer Gold Customer

Joined: 11/19/2015
Posts: 417

Bruce, would you please help me with finding current price's distance away (in percent) from "next hull change" as above in this thread?
 

Bruce_L
Posted : Thursday, June 21, 2018 4:19:55 PM


Worden Trainer

Joined: 10/7/2004
Posts: 63,442

Please try the following.

100 * (312 * C / (51 * C1 + 186 * (C2 + C3) + 78 * C4 + 6 * C5 - 115 * C - 30 * (C6 + C7) - 15 * C8 - 5 * C9) - 1)



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