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

Re: [amibroker] Re: Apply Plot



PureBytes Links

Trading Reference Links

Stephane,

It is possible to retrieve any variable from the level of
plugin DLL (GetVariable() function from SiteInterface),
so you don't need to pass buy/sell, short/cover variables
as arguments. 

On the other hand you can pass them as arguments as
you suggested - it is a matter of your choice.

But... as I mentioned there is a caveat here:
you have to write BetterApplyStop as the last one in your formula
to make sure buy/sell/short/cover arrays are in their final shape,
and you can not use resulting line to reevaluate your buy/sell points
otherwise your function output will not be consistent with backtesting results

Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com


----- Original Message ----- 
From: "Stephane Carrasset" <nenapacwanfr@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, November 28, 2001 3:53 PM
Subject: [amibroker] Re: Apply Plot


> 
> OK,
> 
> so If i want Built a plugin dll for a BetterApplyStop, I must have 
> two arrays and the stop,
> BetterApplyStop ( array buy, array sell, stop)
> 
> stephane
> 
> 
> > 
> > I think I already mentioned the reasons.
> > 
> > ApplyStop does not generate any "magic" level line at the 
> > time of formula execution.
> > 
> > All it does - is just setting internal back-tester variables
> > that are used during back-testing.
> > 
> > This is so because back-testing is iterative process that
> > is executed bar by bar oposite to the normal AFL formula
> > statements that are executed on whole arrays at once.
> > 
> > Let's suppose that we have "BetterApplyStop" function
> > that returns the stop level line.
> > Let's say you write the following formula:
> > 
> > buy = ...something...
> > 
> > stoplevel = BetterApplyStop( 2,2,2*ATR(10),1 );
> > 
> > sell = ... some calculation using stop level ....
> > 
> > Because AFL operates on whole arrays and the lines of
> > code are evaluated only once
> > the BetterApplyStop would not know about your sell formula and 
> would generate
> > wrong stoplevel line since it would assume that there is no sell 
> formula.
> > 
> > This will lead to the non consistent results between backtesting
> > and the value returned by BetterApplyStop.
> > 
> > This is the reason why ApplyStop does not return the stop level 
> line.
> > 
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > 
> > 
> > ----- Original Message ----- 
> > From: "CARRASSET Stephane" <nenapacwanfr@xxxx>
> > To: "'amibroker'" <amibroker@xxxx>
> > Sent: Wednesday, November 28, 2001 2:52 PM
> > Subject: [amibroker] Apply Plot
> > 
> > 
> > > Tomacz,
> > > 
> > > Applystop is certainly a powerfull tool, but why you don't allow 
> us to
> > > visualize the level of an applystop on a chart
> > > 
> > > stephane
> > > 
> > > 
> > > Buy= Cross(C,MA(C,20));
> > > Sell= Cross(MA(C,20),C);
> > > ApplyStop(2,2,2*ATR(10),1);
> > > 
> > > 
> > > Graph0=C;
> > > Graph0Color=1;
> > > Graph0Style=64;
> > > Graph1= ApplyStop(2,2,2*ATR(10),1);
> > > Graph1Color=6;
> > > Graph1Style=1;
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 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/ 
> 
> 
>