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

Re: [amibroker] Re: Exit on EOD Close (Intraday data)



PureBytes Links

Trading Reference Links



Mike,

Thanks.  Problem with using DateNum is that the system is running on intra-day data and on holidays, the currency market will close at noon and then reopen at 1600 the same day for the start of the next day's session.

Nick

On Jul 15, 2009, at 12:55 PM, Mike wrote:



I don't know the reason for your results. But, you might try simplifying by just checking if the bars have the same DateNum, Day, DayOfWeek, DayOfYear or DaysSince1900.

One thing to verify before going ahead is whether or not your backtest would work using today as your last in range date. Will it still work when there is no tomorrow's bar to check against?

Mike

--- In amibroker@xxxxxxxxxps.com, Nick Willemse <nick.willemse@...> wrote:
>
> Ok, I'll post some progress i've made:
> 
> I decided to look ahead at the time of the next bar, take the 
> difference, and if it's not equal to my timeframe (which is 5 min 
> bars) then we must be at the last bar of the session so i set sell to 
> 1. Here's the statement:
> 
> Cover = (Ref(TimeNum(),1) - Ref(TimeNum(),0)) > 40000 ;
> 
> But I get strange results on every 55 minutes. The difference is 500 
> until 8:55 or 9:55 or 10:55, then the difference jumps to 4500. Why 
> could this be?
> 
> Remember this is backtest only, hence forward looking.
> 
> Nick
> 
> On Jul 13, 2009, at 11:47 AM, Nick Willemse wrote:
> 
> > Hi Everyone,
> >
> > I'm trying to backtest a strategy and have 5 min data. Some days 
> > are holidays and the closing time for the day is different on 
> > holidays. How can I exit the trade if i am in one on the last bar 
> > of the trade ? TradeStation you just add SetExitOnClose. ANything 
> > similar in AB?
> >
> > Thanks in advance
> > Nick
>




__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___