PureBytes Links
Trading Reference Links
|
Ed,
I'm seeing a problem with the following:
Bullish:= CLOSE-(CLOSE*(OB/100));
Stop:= If(Bullish>=CLOSE,LOW -(Bullish-CLOSE),LOW);
Bearish:= CLOSE-(CLOSE*(OS/100));
Stop:= If(Bearish>=CLOSE,HIGH +(Bearish-CLOSE),HIGH);
Notice that in both instances whether bullish or bearish we have the
close minus the close times the index percentage. Since we know that
Bullish is okay then Bearish should be
Bearish:= CLOSE + (CLOSE*(OS/100));
I am not at my home computer right now so I can't visualize this in
metastock but will as soon as I can.
The stop variable may also need to be changed as well. I just don't
know off the top of my head.
The index indicator is a different approach to the directional
index. Typically we normalize it like a stochastic. In your case it
is indexed like a RSI. I like the idea and certainly think its
useful. Its new and different.
I am sure we will get the problem resolved shortly.
Preston
--- In equismetastock@xxxxxxxxxxxxxxx, "Edmund Woltynski"
<edwol@xxx> wrote:
>
> Preston
>
> The focus is on the structure BearStop, the input from the Stop
expression
> is as expected non-zero. The code to that point is correct. The
structure of
> BearStop is similar to BullStop ? mirror expressions, one works
the other
> does not, and the only difference is that the operators are
reversed. The
> inputs from Stop in both cases are non-zero and should resolve to
either a
> value of the variables "InitStop" or "Stop" (or a variant). This
is not the
> case in BearStop, and it seems to me that there is some issue with
the way
> PREV behaves but I may off the mark here.
>
> Ed
>
> -----Original Message-----
> From: equismetastock@xxxxxxxxxxxxxxx
> [mailto:equismetastock@xxxxxxxxxxxxxxx]On Behalf Of pumrysh
> Sent: Sunday, 21 September 2008 2:47 AM
> To: equismetastock@xxxxxxxxxxxxxxx
> Subject: [EquisMetaStock Group] Re: Short side Trailing Stop
>
> Ed,
>
> Thanks for posting. It works well.
>
> The index is a Directional Movement Index similar to and ADX but
> scaled at the Index variable from 1 to 100. At the OB/OS variable
> you are simply rescaling the index to a different scale. While I
> understand that you are trying to set the OB/OS levels, I think the
> indicator works well just as it is.
>
> I want to keep working with this some more but I am also tight on
> time this weekend.
>
> Preston
>
> --- In equismetastock@xxxxxxxxxxxxxxx
> <mailto:equismetastock%40yahoogroups.com> , "Edmund Woltynski"
> <edwol@> wrote:
> >
> > Preston
> >
> > The negative is taken care of in the Bearish expression - two
> negative is a
> > positive places it above the High.
> >
> > Bull stop indicator is simply the following and ratchets up
> correctly:
> >
> > InitStop:=Input("Initial Stop",0,100000,0.50);
> >
> > Index := 100-(100/(1+( PDI(21)/ MDI(21)+0.0001)));
> > OB:= Index-70;
> >
> > Bullish:= CLOSE-(CLOSE*(OB/100));
> > Stop:= If(Bullish>=CLOSE,LOW -(Bullish-CLOSE),LOW);
> >
> > BullStop :=
> > If(Stop>PREV AND Stop>InitStop,Stop,
> > If(Stop>PREV AND Stop<InitStop,InitStop,
> > If(Stop<=PREV,PREV,Stop*Holdingdays)));
> >
> > BullStop;
> >
> >
> > Ed
> >
> > -----Original Message-----
> > From: equismetastock@xxxxxxxxxxxxxxx
> <mailto:equismetastock%40yahoogroups.com>
> > [mailto: equismetastock@xxxxxxxxxxxxxxx
> <mailto:equismetastock%40yahoogroups.com> ]On Behalf Of pumrysh
> > Sent: Saturday, 20 September 2008 9:37 AM
> > To: equismetastock@xxxxxxxxxxxxxxx
> <mailto:equismetastock%40yahoogroups.com>
> > Subject: [EquisMetaStock Group] Re: Short side Trailing Stop
> >
> > Ed,
> >
> > I actually like your thought process and would love to see the
> > bullish version. It might also help me to see the error.
> >
> > About the OS. If you take a value of 30 and subtract the index
from
> > it you will end up with a number that is less that zero most of
the
> > time. This my be part of the problem.
> >
> > We'll get it figured out.
> >
> > Preston
> >
> > --- In equismetastock@xxxxxxxxxxxxxxx
> <mailto:equismetastock%40yahoogroups.com>
> > <mailto:equismetastock%40yahoogroups.com> , "Edmund Woltynski"
> <edwol@>
> > wrote:
> > >
> > > Preston
> > >
> > > This is just an indicator not a system to be displayed on a
> chart.
> > So
> > > trading rules are a separate issue and relate to how you wish
to
> > use any
> > > trailing stop.
> > > The indicator applied to bar that say at the start of a down
> trend
> > > historically (eg input date) should show get eventually closer
to
> > the top of
> > > the bar depending on the value of the expression above ie stop.
> > >
> > > Everything works correctly except for the BearStop expression.
> For
> > example
> > > Plotting a binary say "Stop<PREV AND Stop< InitStop,Stop" in a
> down
> > trend
> > > always gives a value of zero and yet "Stop" is non-zero and
also
> > > diminishing. For some reason these Boolean expressions seem to
> not
> > evaluate
> > > remaining zero at all times regardless of Stop & InitStop
values.
> > >
> > > The converse indicator i.e. reverse the operators (eg Stop<PREV
> AND
> > Stop<
> > > InitStop,Stop to Stop>PREV AND Stop> InitStop,Stop etc and
> replace
> > HIGH with
> > > LOW throughout the indicator and change OS) works correctly on
> the
> > long
> > > side, the trailing stop moves in steps upwards until it hugs
the
> > LOWs.
> > >
> > > It seems to me that there is something peculiar in the way PREV
> > works.
> > >
> > > Ed
> > >
> > > -----Original Message-----
> > > From: equismetastock@xxxxxxxxxxxxxxx
> <mailto:equismetastock%40yahoogroups.com>
> > <mailto:equismetastock%40yahoogroups.com>
> > > [mailto: equismetastock@xxxxxxxxxxxxxxx
> <mailto:equismetastock%40yahoogroups.com>
> > <mailto:equismetastock%40yahoogroups.com> ]On Behalf Of pumrysh
> > > Sent: Friday, 19 September 2008 4:28 AM
> > > To: equismetastock@xxxxxxxxxxxxxxx
> <mailto:equismetastock%40yahoogroups.com>
> > <mailto:equismetastock%40yahoogroups.com>
> > > Subject: [EquisMetaStock Group] Re: Short side Trailing Stop
> > >
> > > Ed,
> > >
> > > I see several problems. It may take a bit before I can get it
> > > resolved.
> > >
> > > In the meantime can you give me the trading rules you wish to
> > follow?
> > >
> > > Preston
> > >
> > > --- In equismetastock@xxxxxxxxxxxxxxx
> <mailto:equismetastock%40yahoogroups.com>
> > <mailto:equismetastock%40yahoogroups.com>
> > > <mailto:equismetastock%40yahoogroups.com> , "Edmund Woltynski"
> > <edwol@>
> > > wrote:
> > > >
> > > > Hello Preston and other gurus
> > > >
> > > > I am having some issues with the PREV function (I think) in
> > > developing a
> > > > trailing stop ratchet (short side). The "BearStop" function
> gives
> > > me a zero
> > > > for all cases everything else above checkout as I expect it
> to. I
> > > cannot see
> > > > the flaw in my logic. Any help would be appreciated.
> > > >
> > > > Code:
> > > > Day:=Input("Day Entered Trade",1,31,19);
> > > > Mnth:=Input("Month Entered Trade",1,12,4);
> > > > Yr:=Input("Year Entered Trade",1985,2100,2004);
> > > > HoldingDays:=BarsSince(Day=DayOfMonth() AND Mnth=Month() AND
> > Yr=Year
> > > ());
> > > >
> > > > InitStop:=Input("Initial Stop",0,100000,1.52);
> > > >
> > > > Index := 100-(100/(1+( PDI(21)/ MDI(21)+0.0001)));
> > > > OS:=30-Index;
> > > >
> > > > Bearish:= CLOSE-(CLOSE*(OS/100));
> > > > Stop:= If(Bearish>=CLOSE,HIGH +(Bearish-CLOSE),HIGH);
> > > >
> > > > BearStop :=
> > > > If(Stop<PREV AND Stop< InitStop,Stop,
> > > > If(Stop<PREV AND Stop> InitStop, InitStop,
> > > > If(Stop>=PREV,PREV,Stop*Holdingdays)));
> > > >
> > > > {Plot} Bearstop;
> > > >
> > > > Kind Regards,
> > > > Ed
> > > > .
> > > >
> > >
> >
>
------------------------------------
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/
|