logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
wdgigi  
#1 Posted : Wednesday, April 30, 2008 5:37:02 AM(UTC)
wdgigi

Rank: Member

Groups: Registered, Registered Users
Joined: 3/6/2008(UTC)
Posts: 16

Goodmorning,

i would write an explorer code that says to me how many days are departed from the last peak low of Dop() indicator. So i can see the stocks that are in buy zone of hurst's cycle.

I know what in manual is written about reference in explorer, but have you some idea to resolve the problem?

Thanks.

gigi

wabbit  
#2 Posted : Wednesday, April 30, 2008 8:49:50 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Hi gigi,

I assume for dop, you are actually referring to the Detrended Price Oscillator (DPO() function)?

The first thing you have to do is define the "last peak low". You could do something like:

Code:

ind := dpo(25);
level := -0.3;
lastPeakLow:=ind < level;


or maybe:
Code:

ind := dpo(25);
lastPeakLow:= ind > ref(ind,-1) and ref(ind,-1) < ref(ind,-2);


and then use the BarsSince() function to find the time periods (in bars) elapsed since the condition was true. How you define it is up to you.


Hope this helps.

wabbit [:D]

P.S. Another way might be to use the Trough() function and/or TroughBars() function, but you must be accutely aware of how these functions work before attempting to use it in trading system; if you do not know how these functions work, do not use them.

wdgigi  
#3 Posted : Thursday, May 1, 2008 6:32:20 AM(UTC)
wdgigi

Rank: Member

Groups: Registered, Registered Users
Joined: 3/6/2008(UTC)
Posts: 16

I've put the code that you have written in idicator builder and then i've used the BarsSince() function in Explorer but there was not selected any stock.

Where have i was wrong?

thx.

gigi

wabbit  
#4 Posted : Thursday, May 1, 2008 6:40:32 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Please post all of the code for the exploration.

Please indicate which code is in which column, if you have used multiple columns.


wabbit [:D]

wdgigi  
#5 Posted : Thursday, May 1, 2008 7:05:59 AM(UTC)
wdgigi

Rank: Member

Groups: Registered, Registered Users
Joined: 3/6/2008(UTC)
Posts: 16

In Explorer:

Col A: BarsSince( FmlVar("Hurst Indicator","LASTPEAKLOW") )

result: N/A

In Indicator Builder:

ind := DPO(42);
level := -0.3;
lastPeakLow:=ind < level;

thanks.

gigi

wabbit  
#6 Posted : Thursday, May 1, 2008 9:35:35 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
In the explorer options, uncheck the "load minimum records" and load about 200 bars of data.


wabbit [:D]

P.S. You know that dpo() uses and left shifted moving average, so at the right hand edge of the chart there are N/A bars, don't you?
wdgigi  
#7 Posted : Friday, May 2, 2008 1:02:12 AM(UTC)
wdgigi

Rank: Member

Groups: Registered, Registered Users
Joined: 3/6/2008(UTC)
Posts: 16

Right now!

You have turned the light! In colB i've written: (i use the 42 span and 22 half span)

Ref(BarsSince( FmlVar("Hurst Indicator","LASTPEAKLOW") ),-22)+22 ;

so i have the days from today and last peak low.

Now i modify the DPO() with this:

SPAN:=Input("SPAN",1,70,42);

CLOSE-Ref( Mov(CLOSE, SPAN, SIMPLE),(SPAN/2+1));

and then i must transform this code in percet from point so i can explorer evey stock.

THIS IS THE CODE:

SPAN:=Input("SPAN",1,70,42);

(CLOSE-Ref( Mov(CLOSE, SPAN, SIMPLE),(SPAN/2+1)))*100/CLOSE

THX

gigi

wdgigi  
#8 Posted : Wednesday, May 7, 2008 12:22:40 PM(UTC)
wdgigi

Rank: Member

Groups: Registered, Registered Users
Joined: 3/6/2008(UTC)
Posts: 16

The first footstep is made. Now the part most difficult.
It would need to find the distance between the last low and the low precedent and to use this distance as value for the dpo.
Better between the last low and the precedent. From this to that preceding anchor, to make an average to use as value for the dpo.
Then in explorer making the scan of the stocks that are distant (in days) from the value dpo.
In this way we should find the stocks that are near to cyclical low.

Some ideas?

gigi

wdgigi  
#9 Posted : Friday, May 30, 2008 11:50:24 AM(UTC)
wdgigi

Rank: Member

Groups: Registered, Registered Users
Joined: 3/6/2008(UTC)
Posts: 16

Hi wabbit,

i've made a trading system with the channel from "Moving Average - Centered v4.0 by Jose Silva" and the results are too good to be true. Infact, the indicator plot on future the line and so the signal is not correct. But it would be fantastic.

The code of system:

buy order: Ref(LOW,-1) < Ref((FmlVar("Moving Average - Centered v4.0 by Jose Silva","CMA")*(1-(opt1/100))),-1) AND CLOSE > (FmlVar("Moving Average - Centered v4.0 by Jose Silva","CMA")*(1-(opt1/100)))

sell order: Ref(HIGH,-1) > Ref((FmlVar("Moving Average - Centered v4.0 by Jose Silva","CMA")*(1+(opt1/100))),-1) AND CLOSE < ((FmlVar("Moving Average - Centered v4.0 by Jose Silva","CMA")*(1+(opt1/100))))

opt1:= 3-7-1;

I could insert an image of this system but i don't know how must i do it.

Then i have an excel file where i've build the Hurst Cycles with some mathematic operation. I wuold insert this formula in metastock but i've no idea how make it. This would be very interesting for a trader who want to study in equis forum the market cycles.

The excel file can i send you with skype if you want.

thanks.

gigi

wabbit  
#10 Posted : Friday, May 30, 2008 9:02:19 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
wdgigi wrote:
... the results are too good to be true.

Whenever it seems too good to be true, it usually is. You cannot use the centered moving average as a basis for trading becuase it uses hindsight. If you read in the info at the top of the file, it even mentions this, "{ Uses forward-referencing to center Mov Avg and project future direction.}{ Uses hindsight - do not trade! }"


Before using any code, you MUST be fully aware of how the function works. Sometimes, authors will point out potential pitfalls for you, warnings you are wll advised to heed; but even if there are warnings, you should still fully evaluate how each function works to understand when it will give accurate results (if ever) and when it will give erroneous or misleading results.


wabbit [:D]

wdgigi  
#11 Posted : Saturday, May 31, 2008 3:14:20 AM(UTC)
wdgigi

Rank: Member

Groups: Registered, Registered Users
Joined: 3/6/2008(UTC)
Posts: 16

Thanks wabbit, but i am on market form almost 20 years..and i know what it means to see a fantastic equity line and then to discorver that it's impossible

But the hurst cycles are an important help for trader who like to use forecast methods and to scann the stocks with the indicator by joe silva is very intersting.

If you use 3 channels of the 3 cycles 60-30-15 togheter and the low price touch these channels i have good probability that the stock is near a cycle bottom. If you have a forecast of 3 cycles in the same direction and to the same price-zone it is statistically probable that you are near a reversal pattern.

The Dpo is used to set the probable correct duration of cycles and its peaks in percent are used to set the probable correct percentage of the envelope channel. These are the pricipal rules.

Now we have the 2 indicators: DPO and channel by joe silva. It would need to succeed in uniting them. To calculate the middle distance from the last 3 or 4 or 5 peaks of dpo and use this distance as parameter of the centered moving average with which to calulate the channel indicator by joe silva.Then calculate the middle ampleness percentage of DPO to set the percentage of channel by joe silva.

Than to coplete the work is necessary to draw on the chart the cycles build with the formula that i 've written on an excel file but that i don't know write in metastock.

I repeat, this would be a work that we can make togheter for the community in equis forum.

bye wabbit and thank you for the help.

gigi

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.