PureBytes Links
Trading Reference Links
|
Jack
I think I see what the problem might be, and it's probably a basic flaw in
my design. Alternating up and down price movements can repeatedly cross the
same percentage boundary, thus giving more signals. Now that I think about
it I'm guessing that you only want one signal per 1% increase in price. In
other words, a signal when the price crosses above a 1% boundary but no
signal it the price moves down then moves up through the same boundary
again. Am I on the right track now or was I right to start with, or still
completely wrong?
Roy
----- Original Message -----
From: "superfragalist" <j3ttt@xxxxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Thursday, July 24, 2003 1:52 PM
Subject: [EquisMetaStock Group] Roy--Code for %price increments
> Thanks for the code, Roy. For some reason it puts dots more often
> than every 1% rise in price. It sort of groups them together. To make
> sure it wasn't a problem with my expert, I tried it on a couple of
> other experts with the same results. MS expert is a little quirky.
> Other programs and indicator will sometime interfer with an expert
> even though they are not visible within the expert. I have seen a few
> cases of strange behavior--sometimes it's caused by the SmCharts.
> Those are very unruly in my experience.
>
> Would you please try it within one of your experts and let me know if
> it works. If it does, then there's something wrong somewhere within
> my MS. I'm running 8.01. Thanks (If there is something wrong in my
> MS, it should be fun trying to fix it.)
>
> Jack
>
>
>
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx>
> wrote:
> > Jack
> >
> > What I was thinking of was something like this.
> >
> > {Trade 1% Move}
> > N:= Fml("PS Fractal Entry");{your entry signal/price}
> > X:= Fml("PS Fractal Exit"); {your independent exit signal}
> > I:=Cum(N+X>-1)=1; {}
> > Tr:=If(PREV<=0,N>0,If(X>0 {OR entry dependent exits},
> > {end of trade} -1,{continue trade} 1));
> > Xb:=Tr<0; {trade exit bar}
> > Tr:=Abs(Tr)*ValueWhen(1,I OR (Alert(Tr=0,2) AND Tr),N);
> > {trade entry price}
> > Pc:=Int(100*(C/If(Tr>0,Tr,C)));
> > {Tr;} {plot trade and entry price}
> > {Xb;} {plot exit bar}
> > {plot +1 for 1% increase, -1 for 1% decrease}
> > If(Tr>0,If(Pc>Ref(PC,-1),1,If(Pc<Ref(PC,-1),-1,0)),0);
> >
> > This is constructed for long side only and gives a +1 spike 1%
> positive move
> > and a -1 spike for a negative move. The code could be adapted to
> work with
> > both long and short side but how you achieve that could depend very
> much on
> > your system. Another approach would be to duplicate the code for
> use on the
> > short side. The only changes if you did that would be in the 'Pc'
> > calculation I think. Of course the output line would need to be
> amended for
> > both long and short so that only favourable moves were signalled.
> >
> > Roy
> >
> > ----- Original Message -----
> > From: "Roy Larsen" <rlarsen@xxxx>
> > To: <equismetastock@xxxxxxxxxxxxxxx>
> > Sent: Thursday, July 24, 2003 7:34 AM
> > Subject: Re: [EquisMetaStock Group] Re: Tim--Code for %price
> increments
> >
> >
> > > Jack
> > >
> > > It sounds to me as though you need a PREV latch to lock in the
> trade entry
> > > price, followed by a mechanism that gives a signal every time the
> integer
> > of
> > > % change is different from the previous bar.
> > >
> > > Roy
> > >
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "superfragalist" <j3ttt@xxxx>
> > > To: <equismetastock@xxxxxxxxxxxxxxx>
> > > Sent: Thursday, July 24, 2003 7:11 AM
> > > Subject: [EquisMetaStock Group] Re: Tim--Code for %price
> increments
> > >
> > >
> > > > Thanks Tim,
> > > >
> > > > The code you posted is one way of tracking the rise and fall of
> > > > prices by percent. What I'm trying to do is to write a
> statement for
> > > > my expert that will put a dot on my chart each time there's
> been a
> > > > cumulative price increase of 1% on the long side or a 1%
> decrease on
> > > > the short side.
> > > >
> > > > I wrote a zig zag formula that would plot it in an indicator
> window
> > > > but I haven't been able to get it in to an expert version that
> will
> > > > put the dots on the chart. I'm close but not quit there.
> > > >
> > > > If you have any ideas let me know.
> > > >
> > > > Thanks
> > > > Jack
> > > >
> > > >
> > > >
> > > >
> > > > --- In equismetastock@xxxxxxxxxxxxxxx, "timinwaedi"
> <timinwaedi@xxxx>
> > > > wrote:
> > > > > --- In equismetastock@xxxxxxxxxxxxxxx, "superfragalist"
> > > > <j3ttt@xxxx>
> > > > > wrote:
> > > > > > Has anyone seen any code for creating an expert or
> indicator that
> > > > > > will identify when a price moves up x% from the entry price
> and
> > > > > then
> > > > > > moves up x% again from the previous x% increase.
> > > > > >
> > > > > > Jack
> > > > >
> > > > > Hi Jack,
> > > > >
> > > > > Try this indicator:
> > > > > --------------------------------------------------------------
> ---
> > > > > {Percentage Crossover w/Input}
> > > > > Percentage:=Input("Enter the percentage
> threshhold;",0.1,20,3.0);
> > > > > base:=(100-Percentage)/100;
> > > > > top:=(100+Percentage)/100;
> > > > > If((C*base)>PREV,C*base,If((C*top)<PREV,C*top,PREV))
> > > > >
> > > > > --------------------------------------------------------------
> ---
> > > > >
> > > > > Regards,
> > > > >
> > > > > Tim
> > > >
> > > >
> > > >
> > > > 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/
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > 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/
> > >
> > >
> > >
> > >
>
>
>
> 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/
>
>
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy No Snore & Get a Good Night's Sleep. Natural Oral Spray -- $24.95
(1 bottle, 1 month supply, with sweet almond oil, eucalyptus oil & more).
http://www.challengerone.com/t/l.asp?cid=2881&lp=h515.html
http://us.click.yahoo.com/2oMABA/nuYGAA/ySSFAA/BefplB/TM
---------------------------------------------------------------------~->
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/
|