Forex
Google
New signals service!

Go Back   Forex Trading > Announcements > Analytics


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack (1) Thread Tools Display Modes
  #11 (permalink)  
Old 12-09-2007, 11:09 PM
MrM MrM is offline
Member
 
Join Date: Jul 2007
Posts: 66
MrM is on a distinguished road
Simba,

I'm 100% on board.

just a note - let's not confuse Autocorrelation and Hurst exponent: autocorrelation measure k-th order dependence in timeseries and was originally constructed for measuring dependence in error-terms/residuals of regression analysis (see heteroskedacity/homoskedacity), while Hurst exponent is a way more complex tool: Hurst exponent is estimated, not calculated: there are several ways to do it: Rescaled range analysis, Power-spectral analysis, Roughness length, Variogram and Wavelet transform.

I think step 1 is autocorrelation: I've done it in Matlab: autocorr command but there doesn't seem to be a custom indicator that measures it, altough it doesn't seem to hard to do.

Benoit – Fractal Analysis Software is software for estimating Hurst exponent,
Interaction between MetaTrader 4 and Matlab via CSV Files - MQL4 Articles is the description for linking Matlab & MetaTrader.

But if you get me the template (hopefully different from the mq4 file on TASC 03/07 Fractal Dimension Index) then I'll see what I can do: I'm committed to this.

cheers.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 12-10-2007, 05:14 AM
SIMBA's Avatar
Senior Member
 
Join Date: May 2006
Posts: 978
SIMBA is on a distinguished road
Quote:
Originally Posted by MrM View Post
Simba,

I'm 100% on board.

just a note - let's not confuse Autocorrelation and Hurst exponent: autocorrelation measure k-th order dependence in timeseries and was originally constructed for measuring dependence in error-terms/residuals of regression analysis (see heteroskedacity/homoskedacity), while Hurst exponent is a way more complex tool: Hurst exponent is estimated, not calculated: there are several ways to do it: Rescaled range analysis, Power-spectral analysis, Roughness length, Variogram and Wavelet transform.

I think step 1 is autocorrelation: I've done it in Matlab: autocorr command but there doesn't seem to be a custom indicator that measures it, altough it doesn't seem to hard to do.

Benoit – Fractal Analysis Software is software for estimating Hurst exponent,
Interaction between MetaTrader 4 and Matlab via CSV Files - MQL4 Articles is the description for linking Matlab & MetaTrader.

But if you get me the template (hopefully different from the mq4 file on TASC 03/07 Fractal Dimension Index) then I'll see what I can do: I'm committed to this.

cheers.
MrM,

Thanks for the explanation.
Unfortunately that was the file I was mentioning,the fractal dimension index.
I will post in a few hours a file from WEALTHLAB that I believe does a good estimation of H,see if you can somehow translate the concept into mql4....and,I will check the links you provided

Regards
Simba
__________________
Somos mortales hasta el primer beso..y la segunda copa de vino
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 12-10-2007, 02:00 PM
MrM MrM is offline
Member
 
Join Date: Jul 2007
Posts: 66
MrM is on a distinguished road
Smile

ok, great.

The more I read about autocorrelation (parametric/nonparametric) the more I'm starting to think that it is really usefull, but what we need is maybe a little less complex: the ideal timeseries for trading would have very clear trends; and what is a trend? higher highs and higher lows or lower highs and lower lows, so based on closing prices we could just calculate a sort of "trend score" of a rolling window (the length of the window is hard to define) where every close of a bar "in the same direction" gets a +1 score, and where a close in a different direction gets a -1 score and you start at zero at the beginning of the window. I know this sounds a lot like other trend-indicators but it's really raw, so easier to manipulate.

I'm reading more on nonparametric (no assumptions about probability distributions etc.) autocorrelation tests and I'll get back to you soon.
Looking forward to that Wealthlab code though
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 12-10-2007, 03:58 PM
SIMBA's Avatar
Senior Member
 
Join Date: May 2006
Posts: 978
SIMBA is on a distinguished road
Quote:
Originally Posted by MrM View Post
ok, great.

The more I read about autocorrelation (parametric/nonparametric) the more I'm starting to think that it is really usefull, but what we need is maybe a little less complex: the ideal timeseries for trading would have very clear trends; and what is a trend? higher highs and higher lows or lower highs and lower lows, so based on closing prices we could just calculate a sort of "trend score" of a rolling window (the length of the window is hard to define) where every close of a bar "in the same direction" gets a +1 score, and where a close in a different direction gets a -1 score and you start at zero at the beginning of the window. I know this sounds a lot like other trend-indicators but it's really raw, so easier to manipulate.

I'm reading more on nonparametric (no assumptions about probability distributions etc.) autocorrelation tests and I'll get back to you soon.
Looking forward to that Wealthlab code though

Hi,

Here it is..and check this link too Traders Tips - May 2003

{ Declare Variables }
var E, Hurst, Bar, Period, SumDiff, FDIPane, EPane: integer;
var R, S, H: float;
Period := 200;
{ Create Custom Indicator Series }
Hurst := CreateSeries;
E := CreateSeries;
{ Our "E" Series is P/P[-1] }
for Bar := 1 to BarCount - 1 do
@E[Bar] := PriceClose( Bar ) / PriceClose( Bar - 1 );
{ Calculate the sum of deviations over the period }
SumDiff := SumSeries( SubtractSeries( E, SMASeries( E, Period ) ), Period );
{ Plot deviation range }
EPane := CreatePane( 50, true, true );
HidePaneLines;
PlotSeries( HighestSeries( SumDiff, Period ), EPane, 474, #Thick );
PlotSeries( LowestSeries( SumDiff, Period ), EPane, 744, #Thick );
PlotSeries( SumDiff, EPane, #Silver, #Thick );
DrawLabel( 'Cumulative Deviation, and Range', EPane );
{ Calculate R/S and the Hurst Exponent }
for Bar := Period * 2 to BarCount - 1 do
begin
R := Highest( Bar, SumDiff, Period ) - Lowest( Bar, SumDiff, Period );
S := StdDev( Bar, E, Period );
@Hurst[Bar] := LN( R / S ) / LN( Period );
end;
{ Plot Hurst Exponent }
FDIPane := CreatePane( 100, true, true );
PlotSeries( Hurst, FDIPane, #Navy, #Thick );
H := @Hurst[BarCount - 1];
DrawLabel( 'Hurst Exponent = ' + FormatFloat( '#0.000', H ), FDIPane );
DrawLabel( 'Random Walk = 0.500', FDIPane );
AddScanColumnStr( 'Hurst', FormatFloat( '#0.0000', @Hurst[BarCount - 1] ) );

Regards
Simba
__________________
Somos mortales hasta el primer beso..y la segunda copa de vino
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 12-11-2007, 12:35 PM
MrM MrM is offline
Member
 
Join Date: Jul 2007
Posts: 66
MrM is on a distinguished road
another Fractal Dimension definition

This is one of the ways (Waveforms) of calculating Fractal Dimension in Matlab: it's the code of an M file. Remember: H = 2 - D


{_FractalDim
Calculate the approximate Fractal Dimension of a waveform
Copyright (c) 2003 by Alex Matulich, Unicorn Research Corporation
January 2006: changed to calculate on n intervals rather than n-1.

Note: the Hurst exponent H = 2 - D, where D is the fractal dimension.

See the following article (particularly equation 6):
A procedure to Estimate the Fractal Dimension of Waveforms
Cevcik, Carlos, "A procedure to Estimate the Fractal Dimension of
Waveforms," International Complexity, Vol 5, 1998.

Because the lookback length n goes from 0 to n, we also have n
intervals, and not n-1 intervals as described in the paper.
}

Inputs:
y(NumericSeries), {price data, e.g. Close of data1}
n(NumericSimple); {lookback length}

Vars: j(0), lngth(0), ymax(0), ymin(0), yscl(0), dx2(0), dy(0);

ymin = Lowest(y, n); ymax = Highest(y, n); yscl = ymax - ymin;
if n < 2 Or ymax = ymin then
lngth = 1
else begin
{ calculate length of curve }
lngth = 0;
dx2 = Square(1/n);
for j = 1 To n begin
dy = (y[j] - y[j-1]) / yscl;
lngth = lngth + SquareRoot(dx2 + dy*dy);
end;
end;
_FractalDim = 1 + (Log(lngth) + Log(2)) / Log(2*n);

{Note: for large n, the result above converges to:
_FractalDim = 1 + Log(lngth) / Log(2*n);
However, because we typically using small values of n (like n<50)
for market analysis, we use the result with the Log(2) term in it.
See the technical article referenced in the opening comments.}

More can be found on Matlab's file exchange: The MathWorks - MATLAB Central - File Exchange
Another potentially usefull link is 2 archives in C where H is calculated in 2 different ways: the popular R/S & also the wavelet transform:
Estimating the Hurst Exponent

So would anyone be interested in taking a look at those two C archives and creating a custom indicator for Hurst exponent in those 2 ways?
I'm afraid I'm not a programmer..

Last edited by MrM; 12-11-2007 at 12:44 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 12-13-2007, 03:20 PM
MrM MrM is offline
Member
 
Join Date: Jul 2007
Posts: 66
MrM is on a distinguished road
No takers?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 12-13-2007, 03:48 PM
zupcon's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Malta
Posts: 201
zupcon is on a distinguished road
Quote:
Originally Posted by MrM View Post
No takers?
Ive been having a play with C and VB versions based on some of the papers you suggested. Have you got any test data sets that you've verified with Mathlab ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 12-14-2007, 02:14 PM
MrM MrM is offline
Member
 
Join Date: Jul 2007
Posts: 66
MrM is on a distinguished road
Well no, because the theory around Hurst exponents is still developping, most papers speak of an estimation of H, and not a calculation: comparison between different calculation methods doesn't seem correct, but comparisons of Hurst exponents of different timeseries which were calculated with the same method seem to be a very valid tool.

Would you care to share your results?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 12-21-2007, 05:55 AM
FX_Capitalist's Avatar
Junior Member
 
Join Date: Dec 2007
Posts: 3
FX_Capitalist is on a distinguished road
Just a question

Has anyone range traded for months at a time? If so would it be logical to have alot of capital @ hand due to the possible long ranges of movement in the market? For example the trend for august is down would you lets say have S/L's, trailing stops and T/P's @ increments of a 100+pips at a time?
__________________
MONEY = MOMENTARILY OWNED NEVER ETERNALLY YOURS


-=[FXC]=-
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 12-21-2007, 07:17 AM
Senior Member
 
Join Date: Oct 2007
Posts: 190
mikkom is on a distinguished road
Quote:
Originally Posted by Pip Trip View Post
Hey - you're thinking way too much now. Currency trading is far too simple than this. People don't become casualties in this biz b/c they don't and/or can't get the entries/indicators/trends/etc. right.

It's ALL discipline. (Oh, how many threads are on this subject in any given forum? Next to none!)

[..snip..]

My piece of advice to you would be to throw a MACD and perhaps 2 MA's onto a chart, be disciplined, use stop losses that have a purpose, use take profit areas that have a purpose, and do the same thing every single time you place a trade.
I have heard this comment millions of times but in my oppinion it's exactly the human factor that gives you edge against those "very disciplined" traders.

Why do I think this? It's against all the books and everything!

It's quite simple actually. If discipline and few indicators would be enough, there would be millions of EAs that would provide constant profits (well all of them probably!). EAs don't have problem with discipline, they are most disciplined than you can ever be. Therefore problem with discipline is removed from the problem when you have EA's.

And still nobody makes money with EA that only has couple of MA's and MACD.

Edit: uh and sorry for making out of topic replies.. I'll try a little bit on the subject too (a bit only) :-)

Stephen Wolfram has written a book "new kind of sciece" where he goes through his ideas on how to predict chaos or generate very complex structures that cannot be predicted by normal means easily (like liquid movements etc) with cellular automata, ie. small programs that act with each other. I haven't read the book very thoughly (it has been on my bookself for couple of years and it's THICK!) but I think there might be a point in his comments that you can emulate or predict some models with many small simple programs that communicate together.

Stephen Wolfram: A New Kind of Science

Forex would be a very good target for this kind of experiment because there are so many actors that it's probably impossible to find a common indicator for all the different scenarios, every scenario is a complex mixture of different aspects and outside influences.

What I'm talking is a bit like neural network without the normal neuron connection, more like a neural network where each node is a specialized unit.

And yes, I know wolframs theories are quite contoversial but there is some good points behind them too.

Last edited by mikkom; 12-21-2007 at 07:29 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/analytics/11151-ideal-timeseries-trade.html
Posted By For Type Date
analytics/: Blogs, Photos, Videos and more on Technorati This thread Refback 12-08-2007 09:59 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
ideal stop loss & take profit on each trade kevmcfoster General Discussion 6 10-15-2007 12:25 PM
MW Headway - my ideal broker BUT... fenix Metatrader brokers 0 05-30-2007 12:46 PM
To trade or not to trade Indicators? yaniv_av Indicators - Metatrader 4 1 03-27-2007 01:01 PM


All times are GMT. The time now is 06:26 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.