% from Hurst envelope

Hi,
I'm trying to do this: "Last Close Is X% From Upper band of Hurst Dominancy Envelope" (also the same for the lower band).
No luck so far. Any help would be appreciated.
Thxs.
Julius

 

Hi Julius,

The next update - due in a couple of weeks - will have a new scripting function called WITHINRANGE() which will make this type of calculation much easier! In the meantime this will calculate when the close is within 2% above/below the upper band of the Hurst Dominancy Envelope (using the default 40 bar/95% settings):

U1 = DOMENV(DEFAULT=UPPERBAND);
CLOSE() > (U1 * 0.98) and
CLOSE() < (U1 * 1.02)

Here’s an example with the above formula used in a Show Bar and Custom Bar Colour scheme:

Capture

To put the values in a watchlist column simply divide the close by the upper band value:

U1 = DOMENV(DEFAULT=UPPERBAND);
CLOSE() / U1

The cells can then then be coloured by right-clicking on the header and selecting Custom Labels. Here the cells are red when more than 2% away from the upper line:

Capture