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

[EquisMetaStock Group] Re: Chandelier in System Tester



PureBytes Links

Trading Reference Links



Thanks.

--- In equismetastock@xxxxxxxxxxxxxxx, "Jose Silva" 
<josesilva22@xxxx> wrote:
> 
> Becky, for your System Tester you can simply reference the 
trailing 
> stop indicator's in-built crossover signals:
> 
> ---8<-------------------
> 
> x:==FmlVar("Trailing Stop - ATR Chandelier Exit",
> "SIGNALS");
> 
> Long:== x==1;
> Short:== x==-1;
> 
> ---8<-------------------
> 
> 
> And here is an update to the ATR Chandelier trailing stop:
> 
> =====================================================================> Trailing Stop - ATR Chandelier Exit
> =====================================================================> ---8<-------------------------------------
> 
> { 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))
> 
> ---8<-------------------------------------
> 
> 
> jose '-)
> http://www.metastocktools.com
> 
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, becky matsantonis 
<jmatsas@xxxx
> > wrote:
> > 
> > Jose Hi,
> > 
> > After some recent e-mail traffic, I d/l and use your ATR 
Chandelier
> > Exit v2.0 from the Metastocktools site and plot it as an 
indicator.
> > It works great.
> > 
> > Now, if I want to use this concept in the system tester, what 
will
> > be the formula for a Buy order if I want to buy when the current
> > stock price goes above the Chandelier line (long at +1), and sell
> > when it goes below (sell at -1)?
> > 
> > Thanks in advance.








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

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

<*> 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/