Dr Alexander Elder Safe Zone

This is a discussion on Dr Alexander Elder Safe Zone within the Trading Software forums, part of the Commercial category; I find Dr Alexander Elder SafeZone indicator very useful in trading with Metastock charting. I also trade with charts using ...

Reply
 
LinkBack Thread Tools Search this Thread
Old Jul 30, 2008, 12:53pm   #1
 
3 Posts
Joined Jul 2008
Dr Alexander Elder Safe Zone

I find Dr Alexander Elder SafeZone indicator very useful in trading with Metastock charting.
I also trade with charts using Easy language and C#, have not been successful in translating Safezone to this other charting.
Can anyone help?
Trade-it is offline   Reply With Quote
Old Jul 30, 2008, 1:21pm   #2
 
ronblack's Avatar
Joined Oct 2006
Contact the author, maybe he has a plug-in

Ron
ronblack is offline   Reply With Quote
Old Jul 30, 2008, 2:23pm   #3
 
Crap Buddist's Avatar
Joined Jan 2007
This any good ?

This is an adaptation of Dr. Elder's stop based on the following points
that he emphasizes in his book:
(1) you may use the slope of a 22 day EMA to define the trend
(2) SafeZone is not a mechanical gadget to replace independent thought.
(3) Calculate the stops separately for uptrends and downtrends.
(4) The lookback period should not go back beyond the last important
turning point. If the market has
reversed from down to up two weeks ago, then the SafeZone for the
current long trades should not
look back more than 10 trading days.
(5) An important decision is choosing the coefficient for the SafeZone
stop. He says a coefficient
between 2 and 3 provides a margin of safety, but you must research it
on your own market data.
(6) You can add it to almost any trading system, including Triple Screen.
(7) The excel code that Dr. Elder used in his book kept the stop from
declining for 3 days, by which
time either the uptrend resumes or the stop is hit. This code uses a
period of 5. }


INPUTS:
Price((H+L)/2), MALength(22), Lookback(15), Trend(3), AutoLBck(True),
MultLong(2), MulShort(2);

VARIABLES:
MA(0), Ldiff(0), Lday(0), Sdiff(0), Sday(0), Longsum(0), Shortsum(0) ,
Countlng(0), Countshr(0), Avglow(0),
Avghigh(0), Longstop(0), Shortstp(0), Lstop(0), Sstop(0), ii(0),
LBackTmp(0);

{Determine trend by slope of EMA}
MA = xaverage( Price, MALength );
Condition1 = MA > MA[Trend];
Condition2 = MA < MA[Trend];

{Determine Lookback Period (to prior swing extreme)}
IF LBackTmp<LookBack THEN LBackTmp=LBackTmp+1;
IF Condition1<>Condition1[1] THEN BEGIN
LBackTmp=LookBack;
Value1=MinList(MALength*0.66,LookBack);
IF Condition1 and AutoLBck THEN IF LowestBar(L,Value1)<LookBack THEN
LBackTmp=LowestBar(L,Value1);
IF Condition2 and AutoLBck THEN IF HighestBar(H,Value1)<LookBack THEN
LBackTmp=HighestBar(H,Value1);
END;

{determine and count number of days with:
for longs - lows being lower than prior lows
for shorts - highs being higher than prior highs}

Ldiff = IFF(L[1] > L, L[1] - L, 0); { Difference of lows }
Lday = IFF(L[1] > L, 1, 0); { 1 if this is a "low's" day }
Sdiff = IFF(H[1] < H, H - H[1], 0); { Difference of highs }
Sday = IFF(H[1] < H, 1, 0); { 1 if this is a "high's" day }

{SAFEZONE FOR LONGS}
{Get average of lows lower than prior low}
Longsum = summation(Ldiff, LBackTmp);
Countlng = summation(Lday, LBackTmp);
IF Countlng <> 0 THEN Avglow = Longsum / Countlng;

{Calculate stop at "X" times avglow}
Lstop = LOW - (MultLong * Avglow);

{Prevent stop from being lowered}
Longstop = MAXLIST(Lstop, Lstop[1], Lstop[2], Lstop[3], Lstop[4], Lstop[5]);

{Set Plot}
IF Condition1 THEN BEGIN
PLOT1(Longstop[1], "LSTOP");
IF lastbaronchart THEN BEGIN
Plot1[-1](Longstop, "LSTOP"); {Shows tomorrows stop
on lastbar+1}
Plot3(Longstop, "StopNext"); {Indicates tomorrows
stop: set indicator to point/black}
END;
END;

{SAFEZONE FOR SHORTS}
{Get average of highs higher than prior high}
Shortsum = summation(Sdiff, LBackTmp);
Countshr = summation(Sday, LBackTmp);
IF Countshr <> 0 THEN Avghigh = Shortsum / Countshr;

{Calculate stop at "X" times avghigh}
Sstop = HIGH + (MulShort * Avghigh);

{Prevent stop from rising}
Shortstp = MINLIST(Sstop, Sstop[1], Sstop[2], Sstop[3], Sstop[4], Sstop[5]);

{Set Plot}
IF Condition2 THEN BEGIN
PLOT2(Shortstp[1], "SSTOP");
IF lastbaronchart THEN BEGIN
Plot2[-1](Shortstp, "SSTOP"); {Shows tomorrows stop on lastbar+1}
Plot3(Shortstp, "StopNext"); {Indicates tomorrows stop: set
indicator to point/black}
END;
END;



"Final" Alexander Elder's "SafeZone Stop" for Tradestation 4
__________________


"You smell that? Do you smell that? Coin, son. Nothing else in the world smells like that. I love the smell of Coin in the morning."~ Colonel Coin
Crap Buddist is offline   Reply With Quote
Old Jul 30, 2008, 5:16pm   #4
 
3 Posts
Joined Jul 2008
Trade-it started this thread Thanks, will give this a try
Trade-it is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tom Alexander As A Trading Mentor? learningMPtrader Educational Resources 4 Dec 14, 2013 6:21pm
Alexander Elder - Triple Screen Trading System kr2009 Technical Analysis 1 Oct 2, 2007 8:37pm
Alexander Elder SBM First Steps 15 May 24, 2004 7:24pm
Dr Alexander Elder Safri Laross Educational Resources 4 Aug 28, 2003 2:36pm

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)