PureBytes Links
Trading Reference Links
|
It does take a bit to understand, but I think you ahve the general idea
take a case of Buyprice.
If you do a scan or cahrt of Valuewhen(buy,Buyprice) it gives the
value of buyprice on the day of the signal, without any trade delays.
backtester automatically adjusts your trade information for the trade
delays.
I have learnt that for anything except for backtest to use the delays.
To make life easier I use these to define the lookback values
Budl = Status("buydelay");
Sedl = Status("selldelay");
Shdl = Status("shortdelay");
Codl = Status("coverdelay");
then for the chart or exploration the valuewhen becomes
EntryPrice = Valuewhen(ref(buy,-budl),Buyprice)
It is also important to remember thsi if you are writing the trade
definitions into loops when you define an exit price based on the
entry price
--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm
On 2/6/06, balin8425 <balin8425@xxxxxxxxx> wrote:
> on page 366 of the Amibroker manual, under AmiBroker Formula
> Language.
>
> Equity(1), Comments:
> by Tomasz
>
> "When your formula uses Equity (1) you should avoid using built-in
> delays...
>
> "Here is a story why:
>
> "Only BACKTESTER implements delays while EXPLORATION and other modes
> do NOT...
>
> "Built in delays are designed to be used in BACKTESTER ONLY. The
> intention (?) is as follows: set non zero delays int he settings now
> SINGLE formula can be used to BACKTEST and to get TODAY SIGNALS for
> trading for tomorrow (in SCAN) mode.
>
> "Solution 1:
> Embed delays in the AFL code itself:
> Buy=Ref(Buy,-1);
> Sell=Ref(Sell,-1);
>
>
> (I think this is saying that when using Equity(1) don't set non-
> Delays in the settings and don't set non-zero delays using
> SetTradeDelays. Instead always use the Buy=Ref(Buy,-1) for buying
> today when the initial signal to buy was yesterday.
>
> Is this correct?
>
> (I am assuming built-in delays (see line 1 of quote above) are both
> the delays set in the settings and the delays set by SetTradeDelays.)
>
>
>
> I want to use Equity(1) on all my backtested formula because
> 1) it removes the excess buy-sell signals instead of ExRem.
> 2) Compounded equity curves
>
> But always having to buy today referring to yesterday's signal
> instead of setting a trade delay is a convoluted way to do a simple
> process.
>
> Have I misunderstood?
>
> Thank-you Balin Butler
>
>
>
>
>
>
>
>
>
> 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 other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
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 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/
<*> 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/
|