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

RE: intraday- looking only at today's bars



PureBytes Links

Trading Reference Links

Bill,

Here is what you do:

var: barNoTod(0); barNoTod = iff(CurrentBar=1 or D>D[1], 1,
barNoTod+1);
if barNoTod>=6 and High>Highest(High,5)[1] then Buy;

Or for future use, make it a function (series function
better so that he initialization would not be skipped -- see
Mark Jurik's article in OR Magzine Fall 99).

Alan
-----Original Message-----
Subject:
         intraday- looking only at today's bars
    Date:
         Thu, 4 Nov 1999 16:15:25 -0500
   From:
         "Bill Keyer" <bjkeyer@xxxxxxxxxxxxxx>
      To:
         <omega-list@xxxxxxxxxx>



I need some coding help on something that seems to be pretty
simple.
I'm stumped on how to write code to only consider bars that
have formed
today.
Example: Using intraday data,  I want to buy at the
highest(high,5) but I do
not want the code to consider any of yesterday's bars. (So
the first bar
that I could execute a buy would be the 6th bar of today's
session.)
Any help would be greatly appreciated.

Thanks