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

Re: [EquisMetaStock Group] Roy--Code for %price increments



PureBytes Links

Trading Reference Links

Jack

I built my code as an indicator and I only tested it superficially with that
tool. Most of my charts (EOD) have moves greater than 1% with every bar so
simulating what you are doing is a little bit hit and miss.

>From my understanding of what you require I built the indicator to
(hopefully) give a signal (+ or - one) when the percentage change from the
entry price crossed each 1% boundary. For example if the entry price was
$100.00 (100%) then a price move from $100.99 to $101.00 should give a
signal  but a move from $101.00 to $101.99 would (should) not. It's quite
possible that the MS single digit precision could throw a spanner in the
works although the Int() isn't usually a problem is this regard.

Can you try the code as an indicator as well just to see how it compares to
the expert. I would expect the same results from both, and if they are the
same then it certainly suggests that my code is not working as intended for
you.

I'll take a look anyway. I assume your using it with intraday charts? What
timeframe? Issue?

Roy


> 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 Ink Cartridges & Refill Kits for Your Epson at Myinks.com
Free shipping on orders $50 or more to the US and Canada.
http://www.c1tracking.com/l.asp?cid=5705&lp=home/epson.asp
http://us.click.yahoo.com/brYXfA/_xWGAA/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/