PureBytes Links
Trading Reference Links
|
Cliff,
Due to the way back tester works it is not currently possible.
The reason is that formula is first evaluated and
then backtester interprets the result.
Backtester run time variables are not accessible at
formula evaluation stage.
It will be however possible in the future after implementing
callbacks that will allow to intercept the operation of backtester.
Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com
----- Original Message -----
From: <cliffelion@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, October 25, 2001 7:04 PM
Subject: [amibroker] Re: ApplyStop accepts new values in 3.78
> Tomasz,
>
> Can you make the buy price that is used by ApplyStop() available to
> the user?
>
> Cliff Elion
>
> --- In amibroker@xxxx, "Tomasz Janeczko" <amibroker@xxxx> wrote:
> > Hello,
> >
> > I don't know what is your entry ( buy ) formula,
> > but if there are multiple buy signals ValueWhen() will
> > return the last one so your stops are moving.
> >
> > Using ApplyStop() you always setup the stop levels
> > at the first signal that really opens the trade.
> >
> > Therefore ApplyStop() is more reliable.
> >
> > Best regards,
> > Tomasz Janeczko
> > ===============
> > AmiBroker - the comprehensive share manager.
> > http://www.amibroker.com
> >
> >
> > ----- Original Message -----
> > From: <cliffelion@xxxx>
> > To: <amibroker@xxxx>
> > Sent: Thursday, October 25, 2001 4:35 PM
> > Subject: [amibroker] Re: ApplyStop accepts new values in 3.78
> >
> >
> > > Hi Tomasz,
> > >
> > > I am trying new ApplyStop feature, but seems to provide slightly
> > > different results from my previous AFL implementation.
> > >
> > > /**old code to exit trade**/
> > > Lentryprice = ValueWhen ( Buy, BuyPrice );
> > > Lprofitprice = Lentryprice * ( 1+ptarget/100 );
> > > Lstopprice = Lentryprice * ( 1-stopl/100 );
> > >
> > > sell1 = BarsSince ( Buy ) > ldays;
> > > sell2 = High > Lprofitprice;
> > > sell3 = Low < Lstopprice;
> > > Sell = sell1 or sell2 or sell3;
> > >
> > > SellPrice = IIf ( sell2, Max ( Open, Lprofitprice ), IIf (
> sell3,
> > > Min ( Open, Lstopprice ), Close ) );
> > >
> > > /**NEW code to exit trade**/
> > > ApplyStop ( 1, 1, ptarget, 1 );
> > > ApplyStop ( 0, 1, stopl, 1 );
> > >
> > > sell = BarsSince ( Buy ) > ldays;
> > > sellprice = close;
> > >
> > > ?????
> > > As far as I can tell, the target stop behaves the same, but the
> > > stoploss seems to be different, can you provide some insight???
> > >
> > > Thanks,
> > >
> > > Cliff Elion
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
|