PureBytes Links
Trading Reference Links
|
Hi Ara,
Thanks for your reply.
Actually I'm not setting this up for backtesting, I'm setting it up for a
scan so I'd like to have the Alert to buy tomorrow. If I use:
Buy = Ref(BuyCondition,-1);
...then this would give me the actual day I buy it. Not an alert to buy
tomorrow.
There dosen't seem to be a problem not getting signals to buy using:
BuyPrice = ref(O,1);
It looks like using this sets the value for the applystops for the open
when I actually buy it rather then the open of the day that the alert was
generated, this is what I was trying to do.
Cheers Glenn
--- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxxx>
wrote:
> Glen,
>
> Your code specifies use tomorrow's price to buy today.
>
> You might be better of using:
>
> BuyPrice = Open;
> Buy = Ref(BuyCondition,-1);
>
> This says use yestersay's price data to buy today at open.
>
> You may not see much difference but you'll have errors in duration of
> holding period and miss out on a trade if there is a signal the last day
or
> have a buy price og 0 (zero) since tomorrow price is not available.
>
>
>
> This way you use yesterday closing price calculation to buy today at
open.
> ----- Original Message -----
> From: "Glenn" <glennokb@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Tuesday, July 22, 2003 11:04 PM
> Subject: [amibroker] Re: Equity(1) help.
>
>
> > OK,
> >
> > It looks like I've solved it!
> >
> > Simply added this to the scan...
> >
> > BuyPrice=ref(O,1);
> >
> > Cheers, Glenn
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Glenn" <glennokb@xxxx>
wrote:
> > > Hi,
> > >
> > > I have read the latest post in the ALF language help
> > > http://www.amibroker.com/guide/afl/afl_view.php?name=EQUITY
> > that
> > > Equity(1) can't be used with SetTradeDelays other then in
backtesting.
> > >
> > > I would like to use Equity(1) in my "Scan" as I use Applystop for a
> > profit
> > > and initial stop therefore I really need to use Equity(1).
> > >
> > > The problem I have is I would like to use the open of the
following day
> > > (the day I actually buy the stock) after the alert to calculate the
> > > applystop exits. ie: not the day that the alert was triggered as
Equity
> > (1)
> > > does.
> > >
> > > In a scan if I use ref(buy,-1) then the exit will be calculated as I
> would
> > > like but the buy is also delayed...no good!
> > >
> > > I have tried a few things in my scan formula but I can't get the buy
> > alert
> > > AND the sell alert correct (using the day after the buy alert for
> > > calculating it) in the Scan results.
> > >
> > > Is there any way to do this? Thanks.
> > >
> > > Cheers, Glenn
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy No Snore & Get a Good Night's Sleep. Natural Oral Spray -- $24.95
(1 bottle, 1 month supply, with sweet almond oil, eucalyptus oil & more).
http://www.challengerone.com/t/l.asp?cid=2881&lp=h515.html
http://us.click.yahoo.com/2oMABA/nuYGAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|