Does anyone have this indicator to share? I'm currently using w/ MT and find it quite useful.
Thx
Hurst Exponent
Have this in my library...
Hurst Coefficient
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.
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 1346 times
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)
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)
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
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
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
I am not sure what you mean.TJ - thanks, got the function to load. What am I missing for the indicator?
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.
- Attachments
-
- Hurst.gif
- Hurst Channel
- (20.74 KiB) Downloaded 2932 times
I haev done a search on Hurst. There is a web here http://www.theswingmachine.com/index2.htmThe 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.
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
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
TJ,I have just tested it on HSIH10,Mine doesn't update in a realtime chart on HSIH10 now...
Why is that?
it is updating ok.
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
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Hurst Exponent
Hi TJ or anyone,
So would someone please post the complete code for this indicator?
Thanks!
So would someone please post the complete code for this indicator?
Thanks!
-
- Posts: 742
- Joined: 09 Apr 2010
- Location: Texas
- Has thanked: 483 times
- Been thanked: 274 times
- Contact:
Re:
**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.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.