PureBytes Links
Trading Reference Links
|
Greetings all,
A 'little bird' suggested that I should post my querry here and
hopefully someone might offer some advice.
O.k. here goes;
The following indicators are based on the Dynamic Breakout system
(DBS) as found in Thomas Stridsman's book "Trading systems that work"
It's simply a variation on the Turtle channel breakout method where
you buy a breakout above the highest high of `x' number of days ago.
(i.e. a HHV channel)
This DBS system varies the channel width dynamically according to
price volatility (as measured by standard deviation)
The following indicator finds the VALUE of the varying channel width
(in this case the HHV channel will vary between 20 and 100 bars ago)
and is then referenced into the second indicator
******************************
{DBS-Lookback}
{-----User Inputs-----}
VolPer:=Input("Enter StdDev periods",1,100,30);
LBmin:=Input("Enter Min. lookback periods for entry",5,100,20);
LBmax:=Input("Enter Max. lookback periods for entry",20,200,100);
HV:= Stdev(C, VolPer);
YestHV := Ref(HV, -1);
DeltaHV := 1+((HV-YestHV)/HV);
If(Cum(1)=1,LBmin,Min(Max(PREV*DeltaHV,LBmin),LBmax));
********************************
This following second indicator then references the above first
indicator to plot entry and exit signals
(i.e. not `clean' signals but ALL valid signals where they occur)
********************************
{DBS-Lsigs}
{Dynamic Breakout system - Long signals}
{ User inputs }
Mess1:=Input("Change defaults in DBS-Lookback Indicator",0,0,0);
{Long entry & Long exit Channel}
Lnc:=Ref(HHV(H,LastValue(Fml("DBS-LookBack")+PREV-PREV)),-1);
Lxc:=Ref(LLV(L,LastValue(Fml("DBS-LookBack")+PREV-PREV)),-1);
{ Entry/Exit Long breakouts }
entry:=H>Lnc;
exit:= L<Lxc;
entry;
-exit
*******************************
o.k., now for the question;
You will note from the above, the use of one(1) PREV command in the
first indicator and four(4) PREV commands in the second indicator (as
well as the PREV command associated with the referenced formula
within this indicator)
Although the indicators work fine and dandy, they take a long, Long,
L?--O--?N?--G time to plot on screen. Obviously due to the large
amount of computer resource demanded by the PREV command.
If I attempt to run an exploration on numerous stocks/futures using
these indicators, I generally have to do it at night just before bed.
The results are available for me in the morning. (lucky I sleep for
8+ hours)
Is there anything I can do to the indicator code to speed up the
execution?
Or is this simply a Metastock limitation that I will have to live
with?
In short how can i replace the PREV commands?
Any tips would be much appreciated.
Thanks kindly,
Paul
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/
|