[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] Interpretation of Formula



PureBytes Links

Trading Reference Links

Hi Michael


While I'm sure that someone could do what you require, there's an important issue that you seem not to be aware of. Trough() and TroughBars() are ZigZag based. What this means in terms of your formula is that only the real signals will show up in back testing. In real trading you would get 10-40% more (false) signals that will never show up in back testing (except perhaps for the last 2 or 3 bars).

Most plots based on ZZ are dynamic and change as new data is added. The System Tester allows ZZ to look at future data, by which I mean real data that is dated later than the bar being tested. What the test results will show is just the signals that stood the test of time, not the ones that disappeared after 2 or 3 more bars of data were added.


Regards

Roy
www.metastocktips.co.nz

 
----- Original Message ----- 
From: Michael 
To: equismetastock@xxxxxxxxxxxxxxx 
Sent: Friday, December 01, 2006 7:36 AM
Subject: [EquisMetaStock Group] Interpretation of Formula


I was wondering if anyone can help me decipher the following formula 
for a system backtest. The formula is:

target:=1.0;
pt:=Trough(1,Security("SPY",c),target);
time:=TroughBars(1,Security("SPY",c),target);
signal:=Cross(((Security("SPY",c)-pt)/pt)*100,target);
signal AND (Ref(BarsSince(signal),-1)>=time)

The concept is that the above formula will purchase a selected 
security at such time as the SPY increases at least 1% above its 
most recent trough. 

The sell side of the formula is:

target:=1.0;
pt:=Peak(1,Security("SPY",c),target);
time:=PeakBars(1,Security("SPY",c),target);
signal:=Cross(Neg(target),((Security("SPY",c)-pt)/pt)*100);
signal AND (Ref(BarsSince(signal),-1)>=time)

In the above formula, the sell signal is suppose to occur when the 
SPY closes 1% below its most recent peak.

For the most part, it appears that the signals are correct but when 
I run this in Metastock Pro 8.0, I am not catching all the signals. 
Perhaps I am missing something or have too much in the formula.

Can anyone with some programming assistance let me know if this is 
programmed properly?

Thank you.

Mike



 

[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/