PureBytes Links
Trading Reference Links
|
Thanks Graham - also had to add line to Buy citeria in
order to prevent Buy on last bar: datenum()==ref(datenum(),1).
Cheers
Dean H.
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> If you are live trading then use now function instead of timenum
> If you are backtesting then it is easy matter to just use
lookforward
> one bar to test if next bar is another day.
> EOD = datenum()<ref(datenum(),1);
>
> --
> 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 3/22/06, troll <deanhodgins@xxx> wrote:
> > I found this code posted a while ago by TJ that works fine
> > for closing trades at end of day as long as Timenum() corresponds
> > to value.
> >
> > TimeNum() == 160000;
> >
> > I've modified to include my own conditions and it still works
fine.
> >
> > Sell = myconditions ;
> > OR TimeNum() == 160000;
> >
> > Problem I have is that final bars are not all identical and
> > some print final intraday bar starting at 151500 while other
tickers
> > print final bar for day at 130000. I could probably modify to
include
> > all permutations but I was wondering if there's a simple way just
to
> > close all positions at start of final bar for the day regardless
of
> > whether final bar printed at 3:15 pm or 1:00 pm or any other final
> > value for the day. (Currently using 15 min bars)
> >
> > Thanks & Regards,
> >
> > Dean H.
> >
> >
> >
> >
> >
> >
> >
> >
> > 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
> >
> >
> >
> >
> >
> >
> >
>
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/
|