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

RE: Specified Dates For Strategy Please Help



PureBytes Links

Trading Reference Links

please - just don't package this up as a canned system, and sell it on the
Internet. Just kidding, but someone did that a few years back. The results
were spectacular. <g>

> Please help with the following
>
> I am trying to build and back test a strategy that will only
> run between a specified time and on specified days of each month.
>

As an aside, the logic will be easier to understand and change if you encode
your begin/end dates in an array (or two), and then your logic looks
something like:


for j = 1 to n_dates begin
  if (current_date >= start_date(j)
      and (current_date <= end_date(j)) then begin
    {...}
  end;
end;

where n_dates is a variable giving the number of start/end date pairs.