PureBytes Links
Trading Reference Links
|
Hi Paul:
Just what I needed.
.
Thanks
Lionel
From: equismetastock@xxxxxxxxxxxxxxx [mailto:equismetastock@xxxxxxxxxxxxxxx]
On Behalf Of ppappppapp
Sent: Wednesday, November 07, 2007 10:49 PM
To: equismetastock@xxxxxxxxxxxxxxx
Subject: [SPAM][SPAM]Re: [EquisMetaStock Group] Dynamic Breakout system -
How to speed it up?
Hi Lionel,
Per your request,
The DBS indicators and code are as follows:
Please note that this code utilizes both Roy's & Preston's
suggestions of removing the PREV and substituting the FORUM dll &
hence runs much faster.
(see Roy's & Preston's previous posts for explanation)
Please also note these indicators show ALL signals (which is what I
want), you may want to see only the `clean' signals (i.e. one entry,
followed by one exit then one entry again etc etc)
You will have to modify it for `clean' signals.
#####
P.S. Thanks again to ROY for looking at the first indicator (DBS-
Lookback) & trying to get rid of the PREV in that one. I must admit
even WITH the PREV in the first Indicator it still runs quite fast
for me, so I'm happy. Thanks Roy.
#####
Anyway . . . .
<Indicator No.1 below finds the variable channel width depending on
the volatility and is referenced into indicators 2,3 & 4>
****************************************
{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));
****************************************
<Indicator No.2 below plots ALL long signals using the variable
channel as defined in Indicator 1>
****************************************
{DBS-Lsigs}
{ User inputs }
Mess1:=Input("Change LB and Vol defaults in Indicator 1",0,0,0);
LB:=Fml("DBS-Lookback");
{Long entry & Long exit Channel}
Lnc:=Ref(ExtFml("Forum.HHV",H,LB),-1);
Lxc:=Ref(ExtFml("Forum.LLV",L,LB),-1);
{ Entry/Exit Long breakouts }
entry:=ValueWhen(1,IsDefined(Ref(LB,-1)),H>Lnc);
exit:=ValueWhen(1,IsDefined(Ref(LB,-1)),L<Lxc);
entry;
-exit
****************************************
<Indicator No.3 below plots ALL short signals using the variable
channel as defined in indicator No.1>
****************************************
{DBS-Ssigs}
{ User inputs }
Mess1:=Input("Change LB and Vol defaults in Indicator 1",0,0,0);
LB:=Fml("DBS-Lookback");
{Short entry & Short exit Channel}
Snc:=Ref(ExtFml("Forum.LLV",L,LB),-1);
Sxc:=Ref(ExtFml("Forum.HHV",H,LB),-1);
{ Entry/Exit Short breakouts }
entry:=ValueWhen(1,IsDefined(Ref(LB,-1)),L<Snc);
exit:=ValueWhen(1,IsDefined(Ref(LB,-1)),H>Sxc);
entry;
-exit
****************************************
<Indicator No.4 below plots the channel bands around the price in the
price window. Note that the exit channel is the same size as the
entry channel. The `proper' DBS system uses a half sized exit
channel. i.e. If we enter on a 40 day channel we then exit on a 20
day channel but I like full sized channel for both entry & exit.
See additional code line below for half sized exit channel>
****************************************
{Dynamic Breakout Channel lines for the Long side}
{ User inputs }
pds1:=Input("Change LB and Vol defaults in Indicator 1",0,0,0);
LB:=Fml("DBS-Lookback");
{Long entry & Long exit Channel}
Lnc:=Ref(ExtFml("Forum.HHV",H,LB),-1);
Lxc:=Ref(ExtFml("Forum.LLV",L,LB),-1);
{For half sized exit channel use this logic instead of above}
{Lxc:=Ref(ExtFml("Forum.LLV",L,LB/2),-1);}
{Plot in Price window}
Lnc;
Lxc
****************************************
I'm sure with some thought you could incorporate indicators 2,3,& 4
into one single indicator with Inputs to determine what you want to
plot. That's an exercise for me on the next rainy day . . . luckily
it's Summer here in Melbourne :-D
Hope that helps Lionel,
Best Regards,
Paul
--------------------------------------------------
--- In equismetastock@xxxxxxxxxxxxxxx
<mailto:equismetastock%40yahoogroups.com> , "Lionel Issen" <lissen@xxx>
wrote:
>
> Paul:
>
> Can you post the code for us?
>
>
>
> Lionel
>
[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/
|