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
>