PureBytes Links
Trading Reference Links
|
I guess I miss stated what I was hoping to do. I'm using 2000i and want to
plot a linear line based upon the open of the open of the first bar of a
day. I can do it based on the open of the day before, or the day before
that, just not on the day that is trading.
Any ideas appreciated...
----- Original Message -----
From: "Alex Matulich" <alex@xxxxxxxxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Friday, December 12, 2003 4:54 PM
Subject: Re: How to calculate from 1st bar of the day?
Joe,
> What I want it to do is plot from that point forward, but for only that
>day. Then reset from the opening of the next day. A day to day function,
>reset each day from the open.
So you want a function to return a constant value throughout an
intraday chart, changing only at the open of each day. It's not
trivial.
{Function: myfunction}
Inputs: price(NumericSeries), b(NumericSimple);
Vars: x(0), y(0), result(0);
if time = FirstBarStartTime then begin
{calculate your function based on the open}
{make sure you do it so that your variables change ONLY within
this section. Do not call any other series function, only simple
functions. If you use canned functions like RSI or CCI or
XAverage, then you must replicate that code here, and save your
own values of previous prices for use next time this part of
the code is executed}
result = {whatever}
end;
myfunction = result;
|