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

Re: [EquisMetaStock Group] becky formula



PureBytes Links

Trading Reference Links

Dr. Torque,
 
It's NOT my formula. It's Jose's formula as you can see. I could not even use it correctly as you witnessed in the email traffic, much less come up with it. Anyway:
 
You can find it in: www.metastocktools.com Then Under
Free MetaStock section - System/signal Indicators
2nd row below this title is:
ATR trailing stop
 
There are a lot more goodies there.
 
I am also attaching it for your convenience.
 
 
{ Trailing Stop - ATR Chandelier Exit v3.0 }
{ Long (+1) & Short (-1) trigger signals at
Close crossover of user-defined trailing stops}
{ ©Copyright 2003~2005 Jose Silva
  The grant of this license is for personal use
  only - no resale or repackaging allowed.
  All code remains the property of Jose Silva.
  http://www.metastocktools.com }
{ User Inputs }
multi:=Input("ATR multiplier",0,10,2.5);
pds:=Input("ATR periods",1,252,10);
pds1:=Input("ATR lookback periods",1,252,21);
plot:=Input("[1]Trailing Stop,  [2]Long+Short,  [3]Signals",1,3,1);
adv:=Input("plot:  today's trailing stop=0,  tomorrow's stop=1",0,1,0
);
delay:=Input("Entry and Exit signal delay",
0,5,0);
{ Trailing Stops }
StLong:=HHV(C-multi*Mov(ATR(1),pds,E),pds1);
StShort:=LLV(C+multi*Mov(ATR(1),pds,E),pds1);
stopLong:=If(C<PREV,StLong,Max(StLong,PREV));
stopShort:=If(C>PREV,StShort,Min(StShort,PREV));
{ Trade flags/signals }
In:=Cross(C,Ref(stopShort,-1));
Out:=Cross(Ref(stopLong,-1),C);
Init:=Cum(IsDefined(In+Out))=1;
x:=ValueWhen(1,In-Out<>0 OR Init,In-Out);
long:=x=1 AND (Alert(x<>1,2) OR Init);
short:=x=-1 AND (Alert(x<>-1,2) OR Init);
signals:=long-short;
flag:=ValueWhen(1,signals<>0 OR Init,signals);
{ Switch between Long/Short stops }
stop:=Ref(If(flag=1,stopLong,stopShort),-1+adv);
{ Plot in price chart }
If(plot=1,stop,
If(plot=2,Ref(stopLong,-1+adv),0));
If(plot=1,stop,
If(plot=2,Ref(stopShort,-1+adv),signals))

"dr.torque" <drtorque@xxxxxxxxx> wrote:
dear becky,
would you please copy-paste the code of this v3 chande exit to me?
 
thanks
 
-----Original Message-----
From: equismetastock@xxxxxxxxxxxxxxx [mailto:equismetastock@xxxxxxxxxxxxxxx] On Behalf Of becky matsantonis
Sent: Wednesday, April 27, 2005 9:21 AM
To: equismetastock@xxxxxxxxxxxxxxx
Subject: Re: [EquisMetaStock Group] Re: Chandelier Exit v3

Jose,
 
Works like a champ now. U R the best.
 
Thanks Again

Jose Silva <josesilva22@xxxxxxxxx> wrote:

Becky, I can't see your charts, but v3 of the "Trailing Stop - ATR
Chandelier Exit" is the one I would use.


> I do reference the Chandelier function per you advice but
> then I get a buy & sell execution every single day.

BUY Order:
x:=FmlVar("Trailing Stop - ATR Chandelier Exit", "SIGNALS");
x=1

SELL Order:
x:=FmlVar("Trailing Stop - ATR Chandelier Exit", "SIGNALS");
x=-1


jose '-)
http://www.metastocktools.com



--- In equismetastock@xxxxxxxxxxxxxxx, becky matsantonis <jmatsas@xxxx
> wrote:
>
> Jose Hi,
>
> I will bother you one more time because I have two issues in
reference to Chandelier Exit v3.
>
> As you can see from my attached graph, although most of the time the
two lines of Chandelier Exit v2 and v3 are the same, there is an
occasional difference between them (especially at the end of the data
~35 ticks). I did use the exact same parameters when I run the two
versions (ATR periods, lookback, multiplier, etc). Shall I assume that
version 3 being the latest is 'more' correct than version 2?
>
> Also I still can't get the Chandelier Exit to work as a Buy/Sell
System (buy when the current stock price goes above the Chandelier
line, sell when goes below). I do reference the Chandelier function
per you advice but then I get a buy & sell execution every single day.
Right now I use without success:
>
> BUY Order:
>
> x:=FmlVar("Trailing Stop - ATR Chandelier Exit", "SIGNALS");
> Long:= x=1;
>
> SELL Order:
>
> x:=FmlVar("Trailing Stop - ATR Chandelier Exit", "SIGNALS");
> Short:= x=-1;
>
> Are these above formulas correct or maybe I need to use the "actual
value" of the Chandelier Exit function instead of the "x" value. If
so, which is that value?
>

>
> Thanks again for all your help.




__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Yahoo! Groups Links