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

Re: [amibroker] Re: ApplyStop values.



PureBytes Links

Trading Reference Links

Thanks Graham

Rick
--- Graham <kavemanperth@xxxxxxxxx> wrote:

> equity(1,0);
>
plot(valuewhen(Cover==4,CoverPrice),"CoverPrice",colorblue);
>
plot(valuewhen(Sell==4,SellPrice),"SellPrice",colorblue);
> 
> if you have a delay on the exit, then you need to
> allow for this in
> the valuewhen, here is the exit prices if the exit
> is 1 bar after the
> applystop signal
> equity(1,0);
>
plot(valuewhen(ref(Cover==4,-1),CoverPrice),"CoverPrice",colorblue);
>
plot(valuewhen(ref(Sell==4,-1),SellPrice),"SellPrice",colorblue);
> 
> -- 
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://www.aflwriting.com
> 
> 
> On 19/06/07, Rick Osborn <ricko@xxxxxxxxxx> wrote:
> > Yes - I have Equity(1) included
> >
> > What I want to plot is the "actual price" that the
> > system got stopped out at using...
> >
> > for( i = 0; i < BarCount; i++ )
> > {
> > if(Cover[i] ==4)PlotText( "Short\nStop " +
> > CoverPrice[i], i, L[ i ]-dist[i]*2, colorYellow
> > ,colorBlueGrey);
> > if( Sell[i]==4 ) PlotText( "Long\nStop ", i, H[ i
> > ]+dist[i]*2, colorRed, colorYellow );
> > }
> >
> > ... except SCoverPrice[i] does not generate the
> same
> > number that the backtester generates.
> >
> >
> > --- gp_sydney <gp.investment@xxxxxxxxx> wrote:
> >
> > > Rick,
> > >
> > > Don't you need a call to Equity(1) in there
> > > somewhere to update the
> > > cover array with the stop information?
> > >
> > > For #2, what "this" are you plotting - the ATR
> > > function or TrailStop?
> > > TrailStop is delayed by a bar because of the
> Ref(
> > > ,-1).
> > >
> > > GP
> > >
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, Rick Osborn
> > > <ricko@xxx> wrote:
> > > >
> > > > Anybody....
> > > >
> > > >
> > > > --- ricko8294_98 <ricko@xxx> wrote:
> > > >
> > > > > I am using the following Applystop code
> > > > >
> > > > > ATRSet = Optimize("ATRset",40,10,70,5);
> > > > > ATRMult = Optimize("AtrMult",4,2,8,1);
> > > > > TrailStop = Ref(ATR(ATRSet ) * ATRMult ,-1);
> > > > > ApplyStop(stopTypeTrailing, stopModePoint,
> > > > > TrailStop, True, True);
> > > > >
> > > > > and want to print out on my chart when the
> stop
> > > > > kicked in and what
> > > > > the stopped out price was using the If(cover
> > > ==4)...
> > > > > construct.
> > > > >
> > > > > 1.- Can anyone tell me what the stop value
> is
> > > > > called? CoverPrice does
> > > > > not give the same answer that the Backtester
> > > gives.
> > > > >
> > > > > 2.- Also, plotting this on the chart shows
> up
> > > one
> > > > > day before the date
> > > > > shown in the backtester too.  Why is that?
> > > > >
> > > > > Thanks to anyone for some clarification
> > > > >
> > > > > Rick
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > Rick Osborn
> > > >
> > >
> > >
> > >
> >
> >
> > Rick Osborn
> >
> >
> >
> > Please note that this group is for discussion
> between users only.
> >
> > To get support from AmiBroker please send an
> e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For NEW RELEASE ANNOUNCEMENTS and other news
> always check DEVLOG:
> > http://www.amibroker.com/devlog/
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> 


Rick Osborn 



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/