Hurst Exponent

Questions about MultiCharts and user contributed studies.
LTG
Posts: 30
Joined: 08 Sep 2009

Hurst Exponent

Postby LTG » 13 Jan 2010

Does anyone have this indicator to share? I'm currently using w/ MT and find it quite useful.

Thx

PioTrek
Posts: 11
Joined: 01 Dec 2009
Has thanked: 1 time

Postby PioTrek » 13 Jan 2010

Have this in my library...
Hurst Coefficient

Code: Select all

Inputs: Len(Numeric);
Vars: Mean(0), j(0), k(1.253314), SumSqr(0), Scale(0), MaxY(0),
MinY(0), Rng(0);
Arrays: X[100](0), Y[100](0);
Mean = Average(C, Len);
SumSqr = 0;
for j = 0 to Len - 1 begin
X[j] = C[j] - Mean;
SumSqr = SumSqr + X[j] * X[j];
end;
Scale = SquareRoot(SumSqr / Len);
Y[0] = X[0];
MaxY = X[0];
MinY = X[0];
for j = 1 to Len - 1 begin
Y[j] = Y[j - 1] + X[j];
if Y[j] > MaxY then MaxY = Y[j];
if Y[j] < MinY then MinY = Y[j];
end;
Rng = MaxY - MinY;
Hurst = Log(Rng/(k * Scale)) / Log(Len);
Last edited by PioTrek on 13 Jan 2010, edited 1 time in total.

PioTrek
Posts: 11
Joined: 01 Dec 2009
Has thanked: 1 time

Postby PioTrek » 13 Jan 2010

Attached a Hurst Channel indicator as well. Not sure if either are what you are in search of. Good luck.
Attachments
Hurst Channel - Clyde Lee.txt
(3.35 KiB) Downloaded 526 times

LTG
Posts: 30
Joined: 08 Sep 2009

Postby LTG » 13 Jan 2010

Piotrek - thanks. I was able to find the same code but no luck in getting it to compile. Hopefully someone has a compiled version or can help with the code.

When trying to compile, the follow errors appear:

Commentary end is expected before end of file
errLine 29, errColumn 33, errLineEnd 29, errColumnEnd 33
causal study: (Function)

User avatar
TJ
Posts: 6551
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1892 times

Postby TJ » 13 Jan 2010

Piotrek - thanks. I was able to find the same code but no luck in getting it to compile. Hopefully someone has a compiled version or can help with the code.

When trying to compile, the follow errors appear:

Commentary end is expected before end of file
errLine 29, errColumn 33, errLineEnd 29, errColumnEnd 33
causal study: (Function)



the first code is a function, not an indicator.

you have to compile it as a function, using "hurst" as the function name.


for further explanation of Functions,
please see the 1st post in this thread:
http://forum.tssupport.com/viewtopic.php?t=6929

LTG
Posts: 30
Joined: 08 Sep 2009

Postby LTG » 13 Jan 2010

TJ - thanks, got the function to load. What am I missing for the indicator?

User avatar
TJ
Posts: 6551
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1892 times

Postby TJ » 13 Jan 2010

TJ - thanks, got the function to load. What am I missing for the indicator?


I am not sure what you mean.

The Hurst indicator (2nd code posted by PioTrek) compiles and works ok.

p.s. the 1st function code is not needed for the 2nd indicator code.



Image
Attachments
Hurst.gif
Hurst Channel
Hurst.gif (20.74 KiB) Viewed 1044 times

LTG
Posts: 30
Joined: 08 Sep 2009

Postby LTG » 13 Jan 2010

Never mind - got it. Thanks all.

PioTrek
Posts: 11
Joined: 01 Dec 2009
Has thanked: 1 time

Postby PioTrek » 14 Jan 2010

The 2nd Hurst code I posted is work from Clyde Lee. He is considered by many an expert in this particular space. Recommend you examine his work. Another would be Brian Millard and his channel analysis techniques.

Best of luck.

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 15 Jan 2010

The 2nd Hurst code I posted is work from Clyde Lee. He is considered by many an expert in this particular space. Recommend you examine his work. Another would be Brian Millard and his channel analysis techniques.

Best of luck.


I haev done a search on Hurst. There is a web here http://www.theswingmachine.com/index2.htm

The Hurst Band or the "Edge Band Trading Opportunities" looks interesting.

Is there any manual to use the indicators or reference that we can look at apart from the book mentioned in the front part of the indicator?

Sa

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 09 Mar 2010

TJ,

Why the second indicator doesn't update in a realtime chart (MC6.0 beta2)? Your chart seems updating in a realtime chart.

Did I do anything wrong?

Sa

User avatar
TJ
Posts: 6551
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1892 times

Postby TJ » 09 Mar 2010

TJ,

Why the second indicator doesn't update in a realtime chart (MC6.0 beta2)? Your chart seems updating in a realtime chart.

Did I do anything wrong?

Sa



I think it updates at the end of bar.

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 09 Mar 2010

Mine doesn't update in a realtime chart on HSIH10 now...

Why is that?
Attachments
HSIH10.png
HSIH10.png (71.22 KiB) Viewed 880 times

User avatar
TJ
Posts: 6551
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1892 times

Postby TJ » 09 Mar 2010

Mine doesn't update in a realtime chart on HSIH10 now...

Why is that?


I have just tested it on HSIH10,
it is updating ok.

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 10 Mar 2010

Mine doesn't update in a realtime chart on HSIH10 now...

Why is that?


I have just tested it on HSIH10,
it is updating ok.


TJ,

Strange, mine doesn't update. I have checked that the Format Study \ Properties in which "Update on every tick is checked.

Did you make any change on the Inputs? What version of MC are you using?

Sa

User avatar
TJ
Posts: 6551
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1892 times

Postby TJ » 10 Mar 2010

I am using MC v6 b2.

I am using the code straight from the post.

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 10 Mar 2010

I am using MC v6 b2.

I am using the code straight from the post.


Same as what I am using.... strange!!

Do you know what could cause this happening to me?

User avatar
TJ
Posts: 6551
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1892 times

Postby TJ » 10 Mar 2010

how many data series do you have on the chart?

what are the resolutions?

do you have other indicators? are they updating?

User avatar
TJ
Posts: 6551
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1892 times

Postby TJ » 10 Mar 2010

oops... mine is not updating either.
let me take a look at it tomorrow.

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 11 Mar 2010

TJ,

Do you have time to have a look at this?

User avatar
TJ
Posts: 6551
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1892 times

Postby TJ » 11 Mar 2010

sorry, no time to study it yet.

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 27 Mar 2010

Anyone whocan help resolving why the indicator doesn't update in realtime chart?

Sa

FHTrader
Posts: 38
Joined: 24 Feb 2010

Re: Hurst Exponent

Postby FHTrader » 12 Aug 2010

Hi TJ or anyone,

So would someone please post the complete code for this indicator?

Thanks!

sptrader
Posts: 630
Joined: 09 Apr 2010
Location: Colorado
Has thanked: 394 times
Been thanked: 234 times
Contact:

Re:

Postby sptrader » 12 Aug 2010

PioTrek wrote:The 2nd Hurst code I posted is work from Clyde Lee. He is considered by many an expert in this particular space. Recommend you examine his work. Another would be Brian Millard and his channel analysis techniques.

Best of luck.


**Yes, Clyde was an expert in cycle analysis, unfortunately, Clyde passed away a few months ago, Clyde and his research, will be greatly missed by traders around the World.


Return to “MultiCharts”