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

Offset into future? - help (more, please)


  • To: "Phil Kobierowski" <omega-list@xxxxxxxxxx>
  • Subject: Offset into future? - help (more, please)
  • From: "Peter Iovanella" <ivo1@xxxxxxxxx>
  • Date: Thu, 23 Apr 1998 05:49:22 -0700

PureBytes Links

Trading Reference Links

Thanks for the response, but I think I need to clarify my request.  I'm
trying to plot the moving average into the future - that is, I want to see
the lines offset out _beyond_ the current price bar.  Like today's bar is
here:

|

and the MA lines project out to, say, here:

------------------ (5 time periods forward)
------------------------ (9 time periods forward)
----------------------------- (15 time periods forward)

I know I can't do a moving average on something that hasn't happened, and
I'm not trying to.  These averages are based on extant data (see the code
below), but are simply _displayed_ out beyond the current data.  That's what
I'm going for, and if anyone knows if it is possible, and how to accomplish
it, please let me know.  See the original message below for my initial
explanation (try not to get confused) and the code I used.  Thanks again!

-----Original Message-----

>> I'm trying to set up a 3-line moving average cross, with each line offset
a
>> different amount into the future.  Here's what I did:
>>
>> Input: Price(close),Length1(21),Length2(15),Length3(9);
>>
>> plot1(Average(Price,Length1)[-15],"Avg1");
>> plot2(Average(Price,Length2)[-9],"Avg2");
>> plot3(Average(Price,Length3)[-5],"Avg3");
>>
>> I used negative values in the offset brackets.  I figured it would look
>> forward instead of backward with the offset set to a negative value,
since
>> it looks backwards when the offset value is positive.  However, I can't
>> figure out if I'm correct in this respect, since TS doesn't seem to allow
me
>> to look forward past the last bar.  How can I get around this?  Is there
any
>> way to offset into the future, or am I limited to the past?  Please help!

>From: Phil Kobierowski <phil@xxxxxxxxxxxxxx>
>To: Peter Iovanella <ivo1@xxxxxxxxx>; omega-list@xxxxxxxxxx
<omega-list@xxxxxxxxxx>
>Date: Wednesday, April 22, 1998 8:55 PM
>Subject: Re: Offset into future? - help
>

>Try:
>
>plot1[5](Average(Price,Length1), "avg1");
>
>Assuming my syntax is correct, this lets you calculate in the present but
>plot on bars in the past.
>
>
>Phil Kobierowski
>phil@xxxxxxxxxxxxxx
>----------