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

RE: [amibroker] Re: Elder's SafeZone Stop



PureBytes Links

Trading Reference Links




Have 
you visited the library section of the web site?? There is lots of useful code 
there....
 
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: Toonse 
[mailto:toonse@xxxxxxxxx]Sent: Monday, October 20, 2003 7:43 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
Re: Elder's SafeZone StopGreat to see useful AFL 
postings!  Would be nice to see some more trading systems 
posted.indiana0352 wrote:> I have my own AFL of Safezone 
stop which I did last month that I'm> happy to share.  It's a little 
less complex than the other posted> version but it works fine for 
me!  It's the exact formula from> Elder's book, Come Into My Trading 
Room.>> *******************> /*SafeZone Stop*/> /*by 
Christopher Winn*/> /*September 1st, 2003*/>> /*Programmed 
based on information presented in Dr. Alexander Elder's> book "Come Into 
My Trading Room*/>> /*This formula has been programmed with 
Parameter functionality. > Both the Lookback period and the multiplier of 
the Average Downside> Penetration can be modified as well as the colour 
of the Safezone> Stop Line*/>> GraphXSpace = 
3;>> /* OHLC chart */>> Col = IIf ( Close > Ref 
(Close, -1), colorBrightGreen, colorRed);>> Plot(Close,"", Col, 
styleBar + styleThick);>>> /*Moving 
average*/>> EMAShort = Param ("EMA Short", 13, 1, 30, 
1);>> EMA1 = EMA (Close, EMAShort);>> Plot (EMA1, 
"", colorYellow, styleLine);>>> /* Safezone 
Stop*/>> DayLow = Low;>> YesterdayLow = Ref (Low, 
-1);>> DownsidePen = IIf ( (DayLow < YesterdayLow), 
(YesterdayLow -> DayLow), 0);>> Lookback = Param ("Lookback 
Period", 20, 2, 50, 1);>> SumOfDownPen = Sum (DownSidePen, 
Lookback);>> PenYorN = IIf ( (DayLow < YesterDayLow), 1, 
0);>> NumofDownPen = Sum (PenYorN, Lookback);>> 
AvgDownPen = (SumofDownPen / NumofDownPen);>> SafezoneCoeff = 
Param("Safezone Coefficient", 3, 1, 5, 0.1);>> TodayStop = 
(YesterdayLow - (SafezoneCoeff * (Ref (AvgDownPen, -> 
1))));>> Max1 = Max (TodayStop, Ref(TodayStop, 
-1));>> Max2 = Max (Max1, Ref(TodayStop, -2));>> 
ProtectedStop = Max (Max1, Max2);>> Plot (ProtectedStop, "", 
ParamColor("Safe Zone Color", colorBlue),> styleLine);>> 
Daychange = 100*((Close / Ref (Close, -1))-1);>> Title = Name() + 
" " + Date() + "   Reg Stop:  $" + WriteVal> (TodayStop, 
1.2) + ",   Protect Stop:  $" + WriteVal (ProtectedStop,> 
1.2)+ "   Open  $" + WriteVal (Open, 1.2) + ",  High  
$" + WriteVal> (High, 1.2) + ",  Low  $" + WriteVal (Low, 1.2) 
+ ",  Close  $" +> WriteVal (Graph0, 1.2) + ",  
Daychng  ($" + WriteVal ( (Close - Ref> (Close, -1)), 2.2 ) + " , " 
+ WriteVal (Daychange, 6.2) + "%)"> + "\n" + "Safe Zone 
Stop";>> *********************>> TTYL,> 
Chris>>>> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz 
Janeczko" <amibroker@xxxx>> wrote:> > Hello,> 
>> > You have copied from HTML source where < is replaced by 
&lt;.> >> > Don't copy and paste, instead please use 
"Download formula file"> link from:> > <A 
href="">http://www.amibroker.com/library/detail.php?id=303> 
>> >> > Best regards,> > Tomasz 
Janeczko> > amibroker.com> > ----- Original Message 
-----> > From: "gonniejohnson" <gonniej@xxxx>> > To: 
<amibroker@xxxxxxxxxxxxxxx>> > Sent: Monday, October 20, 2003 
9:47 PM> > Subject: [amibroker] Elder's SafeZone Stop> 
>> >> > > I just downloaded Elder's SafeZone 
Stop   by sloughbridge, added> > > 2003-10-16 00:12:05 
from the Ambroker On-Line_Library. i> received> > > the 
following error message:> > > "Line 38, Column 13:> > 
> Pd= Param("Period",9,2,50,1);  /*Lookback for DPs.  Elder: 
Do> not go> > > back past "the last important turning 
point."*/> > > DP= IIf(L&lt;> > > 
------------^> > > Error 23.> > > Syntax 
error"> > >  (Quotes mine)> > >> > > 
Can anyone help me to correct the error?  Thank You> > > 
gonniej@xxxx> > >> > >> > >> > 
> Send BUG REPORTS to bugs@xxxx> > > Send SUGGESTIONS to 
suggest@xxxx> > > -----------------------------------------> 
> > Post AmiQuote-related messages ONLY to: 
amiquote@xxxxxxxxxxxxxxx> > > (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/) 
> <<A 
href="">http://groups.yahoo.com/group/amiquote/messages/%29>> 
> > --------------------------------------------> > > Check 
group FAQ at:> <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html> 
> >> > > Your use of Yahoo! Groups is subject to> <A 
href="">http://docs.yahoo.com/info/terms/> 
> >> > >> > >>>> *Yahoo! 
Groups Sponsor*> <<A 
href="">http://rd.yahoo.com/M=259395.3614674.4902533.1261774/D=egroupweb/S=1705632198:HM/A=1524963/R=0/SIG=12o885gmo/*http://hits.411web.com/cgi-bin/autoredir?camp=556&lineid=3614674&prop=egroupweb&pos=HM> 
>>>> Send BUG REPORTS to bugs@xxxxxxxxxxxxx> 
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx> 
-----------------------------------------> Post AmiQuote-related messages 
ONLY to: amiquote@xxxxxxxxxxxxxxx> (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/) 
> <<A 
href="">http://groups.yahoo.com/group/amiquote/messages/%29>> 
--------------------------------------------> Check group FAQ at: 
> <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html>> 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service > 
<<A 
href="">http://docs.yahoo.com/info/terms/>.Send 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT 









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.