Simbasystem-gbpusd - page 71

 
SIMBA:
Hi All,

Does any of you excellent programmers know how to create a.mq4 indicator that calculates the Hurst exponent for a currency pair and tf ?the Hurst exponent measures the degree of randomness/trendiness in a time series..at a set moment of time..so,it can be an exceptional filter to add to our system

Based on the following wealth lab formula that uses 200 "sliding" periods :

FIGURE 5: WEALTH-LAB, HURST EXPONENT. Here are the tabular results for the chart displayed in Figure 4.

{ 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 := 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 := LN( R / S ) / LN( Period );

end;

{ Plot Hurst Exponent }

FDIPane := CreatePane( 100, true, true );

PlotSeries( Hurst, FDIPane, #Navy, #Thick );

H := @Hurst;

DrawLabel( 'Hurst Exponent = ' + FormatFloat( '#0.000', H ), FDIPane );

DrawLabel( 'Random Walk = 0.500', FDIPane );

AddScanColumnStr( 'Hurst', FormatFloat( '#0.0000', @Hurst ) );

--Dion Kurczek, Wealth-Lab, Inc.

www.wealth-lab.com

There is a similar indicator named(Fractal Dimension Index) FDI(basically 2-Hurst ) in this forum,but it doesn`t seem to work as the wealth lab one..which from the visual inspection I did is the one really interesting..

Regards

Simba

Hi Simba,

I don't really have time today because I come late from school so I would appreciate if someone else could do it But if there's nothing tonight when I'm home, I'll attempt. It would help if you could mention what language it is written in so that one can use help to find out what certain commands mean.

 
popok_sakti:
frantacech, Nice article, thank you

Maybe add this pyramiding hedge mode to Ea?

options extern bool Kamikadze = true

or separe ea? its very nice system.

 

Hurst Exponent

Hi All,

Does any of you excellent programmers know how to create a.mq4 indicator that calculates the Hurst exponent for a currency pair and tf ?the Hurst exponent measures the degree of randomness/trendiness in a time series..at a set moment of time..so,it can be an exceptional filter to add to our system

Based on the following wealth lab formula that uses 200 "sliding" periods :

FIGURE 5: WEALTH-LAB, HURST EXPONENT. Here are the tabular results for the chart displayed in Figure 4.

{ 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 := 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 := LN( R / S ) / LN( Period );

end;

{ Plot Hurst Exponent }

FDIPane := CreatePane( 100, true, true );

PlotSeries( Hurst, FDIPane, #Navy, #Thick );

H := @Hurst;

DrawLabel( 'Hurst Exponent = ' + FormatFloat( '#0.000', H ), FDIPane );

DrawLabel( 'Random Walk = 0.500', FDIPane );

AddScanColumnStr( 'Hurst', FormatFloat( '#0.0000', @Hurst ) );

--Dion Kurczek, Wealth-Lab, Inc.

www.wealth-lab.com

There is a similar indicator named(Fractal Dimension Index) FDI(basically 2-Hurst ) in this forum,but it doesn`t seem to work as the wealth lab one..which from the visual inspection I did is the one really interesting..

Regards

Simba

 
SIMBA:
Hi All,

Does any of you excellent programmers know how to create a.mq4 indicator that calculates the Hurst exponent for a currency pair and tf ?the Hurst exponent measures the degree of randomness/trendiness in a time series..at a set moment of time..so,it can be an exceptional filter to add to our system

Based on the following wealth lab formula that uses 200 "sliding" periods :

FIGURE 5: WEALTH-LAB, HURST EXPONENT. Here are the tabular results for the chart displayed in Figure 4.

{ 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 := 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 := LN( R / S ) / LN( Period );

end;

{ Plot Hurst Exponent }

FDIPane := CreatePane( 100, true, true );

PlotSeries( Hurst, FDIPane, #Navy, #Thick );

H := @Hurst;

DrawLabel( 'Hurst Exponent = ' + FormatFloat( '#0.000', H ), FDIPane );

DrawLabel( 'Random Walk = 0.500', FDIPane );

AddScanColumnStr( 'Hurst', FormatFloat( '#0.0000', @Hurst ) );

--Dion Kurczek, Wealth-Lab, Inc.

www.wealth-lab.com

There is a similar indicator named(Fractal Dimension Index) FDI(basically 2-Hurst ) in this forum,but it doesn`t seem to work as the wealth lab one..which from the visual inspection I did is the one really interesting..

Regards

Simba

I'm mostly done with the indicator, I only need to know how to compute standard deviation.

"e" is an array with numbers (it's not prices, it's numbers 0, 1, 2, and 3s). e[0] is the last number, e[max] is the first number. Now how do I compute standard deviation from last N numbers? E.g. when I'm at e, I need StdDev from numbers e through e. I supposed it was this:

s=iStdDevOnArray(e,0,n,0,MODE_SMA,bar);

but it always returns zero.

The sooner you help me, the sooner you will have the indicator Please help or otherwise several hours of my work will be worthless...

 

Ea Tf?

Hi, everyone.

Great work from all of you guys. I'm impressed by reading your comments, especially Simba's and Malcik's on trading philosophy. There are no many threads around like this one. Thanks a lot.

Q: What is recommended TF for v1.3.a while forward testing? M1 or M5?

Regards,

greg:)

 
frantacech:
Online Forward Test SimbaSystemM1v1.3.a - M5

http://www.rubicon.cz/reports/aos/ea5/statement.htm

ea1-4 - gambling with martingale

Thanks Franta, this is going to be useful! Konecne nejaka ceska domena na tomhle foru, muhehe )

 
gregoorry:
Hi, everyone.

Great work from all of you guys. I'm impressed by reading your comments, especially Simba's and Malcik's on trading philosophy. There are no many threads around like this one. Thanks a lot.

Q: What is recommended TF for v1.3.a while forward testing? M1 or M5?

Regards,

greg:)

gregoorry,

Thanks for your nice comments. It can work on both M1 and M5 but we do all our tests on M5. So if you are going to join our team (which would be great), stick with M5 so that we have consistent data to compare.

 

M5

Malcik:
gregoorry, Thanks for your nice comments. It can work on both M1 and M5 but we do all our tests on M5. So if you are going to join our team (which would be great), stick with M5 so that we have consistent data to compare.

Well, M5 then.

Thanks for your prompt reply mate and invitation which makes me rather shy. I'm neither programmer nor coder but being glad to take my humble part in some testing...

 
Malcik:
Thanks Franta, this is going to be useful! Konecne nejaka ceska domena na tomhle foru, muhehe )

Yes, Show must go on!

Hehe, a ten nazev - symbolicky...

 

Hello Simba,

I just finish partial test,

GBPUSD PERIOD 29/NOV/06 TO 01/MARCH/07 - risk 5%

&

GBPJPY FULL2.7 YEARS - risk 10%

I'll post more result as they become available

I'm sorry, it seems the results are not good

Regs,

Popok

SIMBA:
Hi popok

.. deleted ..

GBPUSD PERIOD 29/NOV/06 TO 01/MARCH/07

GBPJPY FULL2.7 YEARS

.. deleted ..

Files:
simba.rar  56 kb
Reason: