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

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



PureBytes Links

Trading Reference Links

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
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@xxxxxxxxxps.com, "professor77747" <professor@x..>
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




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

__,_._,___