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

[amibroker] Re: How can I backtest using specific times.



PureBytes Links

Trading Reference Links

Hi Tom,
I must've misunderstood your question. Sorry to lead you down the 
garden path.
Can you post your code, so I can have a look at it?
Ta,
Ian

--- In amibroker@xxxxxxxxxxxxxxx, <professor@xxx> wrote:
>
> Ian,
> 
> Thanks for your reply, but that didn't work. I still get the same 3 
times in my backtest. They are the times that I have in my database 
settings for the trading hours. I have show 24 hours trading (no 
filtering) checked in the Filtering section.
> 
> I only get 3 times for trades everyday. When the day market opens, 
when the evening market opens, and at the end of the day probably 
midnight. If I change the market times in the database setting the 
trading time change to the new times. It seems that the times in my 
formula do not affect the backtest. My formula will auto trade at the 
times in the formula and not at the times that the backtest trades 
unless I have them the same.  Then the backtest will match my actual 
trading results as close as possible.
> 
> Now, I have a possible 3 trades a day to match my backtesting, but 
I would like to have 4 possible trades a day and 4 trades at the same 
times in my backtesting, so that they will amost match.
> 
> Thanks again,
> Tom
>   ----- Original Message ----- 
>   From: ian_rosbif 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Friday, August 08, 2008 7:59 AM
>   Subject: [amibroker] Re: How can I backtest using specific times.
> 
> 
> 
>   Hi Tom,
> 
>   How about something like:
> 
>   //Trim seconds off the time
> 
>   HHMM = TimeNum/100;
> 
>   // Buy at 14:30, 17:00, 17:30 & 18:00
> 
>   Buy = HHMM == 1430 Or HHMM == 1700 Or HHMM == 1730 Or HHMM == 
1800;
> 
>   Cheers,
> 
>   Ian
> 
>   --- In amibroker@xxxxxxxxxxxxxxx, "professor77747" <professor@>
>   wrote:
>   >
>   > I would like to run a backtest that will buy at 4 specific times
>   during
>   > the day.
>   >
>   > I have a formula that will do that, but when I backtest it will 
only
>   > buy at 3 times which are the times that I have on the database
>   > settings. I don't know how to get the backtest to use the times 
in my
>   > formula.
>   >
>   > I use a day/night chart.
>   >
>   > Basically, I would like to buy at the same times as the times 
on the
>   > backtest so I can compare my actually auto trading with the 
backtest.
>   I
>   > realize that there will be some difference in the results 
because the
>   > trades will be at slightly different times, but it will be close
>   enough
>   > for my purposes.
>   >
>   > I am not a programmer, but I can make simple changes to a 
formula.
>   >
>   > Please advise. Thanks,
>   > Tom
>   >
>



------------------------------------

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/