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

Re: Code help with beginning of day strategy


  • To: rghstocks@xxxxxxx
  • Subject: Re: Code help with beginning of day strategy
  • From: Mike Gossland <mga@xxxxxxxx>
  • Date: Sat, 25 Jan 2003 14:22:15 -0800

PureBytes Links

Trading Reference Links

>Randy wrote:
>
>>I'm trying to do in simple terms is to start the strategy at the
>>beginning of each day. Example:  On a 5 minute chart, buy at the
>>close of the 15th bar from the opening of the day.
>
>How about:
>
>If Time[15] = 0930 then buy;
>
>(assuming 0930 is the opening time in your time zone and market).

This is a very neat approach.

Just one little correction - bar times are end times, so you'd need to use

if Time[15] = 935 then buy;

Or more generally:

if Time[15] = MinutesToTime(TimeToMinutes(Sess1StartTime) + BarInterval) then buy;

Mike Gossland

___________________________

Mike Gossland
info@xxxxxxxxxxxx
www.gossland.com
Tel: (250) 756-3970
Fax: (250) 756-3978