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

Re: Can MS do loops?



PureBytes Links

Trading Reference Links

C<prev won't do it. use the ref

C<ref(c,-1) and ref(c,-1)<ref(c,-2)

Now remember you could get messed  up in this market during those 3 days.
have a % or point stop too.

it seems you want The Detrended Price Oscillator (DPO) is an indicator that
attempts to eliminate the trend in prices.  Detrended prices allow you to
more easily identify cycles and overbought/oversold levels.
The calculation is quite simple; you simply center an x-period moving
average by shifting it back x/2 + 1 periods.  This centered moving average
is then subtracted from the close.  The result is an oscillator that crosses
above and below zero.
Since the DPO is shifted back "x/2 + 1" periods, the last "x/2 + 1" periods
will have no values.

MetaStock prompts you to enter the number of periods.  The value entered
should be the approximate length of the cycle you wish to identify.  Cycles
longer than the number of periods you enter will not be shown.  The default
value is 20.





Richard Estes


-----Original Message-----
From: Mullin285@xxxxxxx <Mullin285@xxxxxxx>
To: metastock@xxxxxxxxxxxxx <metastock@xxxxxxxxxxxxx>
Date: Monday, September 14, 1998 12:12 AM
Subject: Re: Can MS do loops?


>Richard
>Thanks for popping in. Basically I am trying to learn how to use MS but the
>thing that triggered this particular question was ... I wanted to close my
>long trades if there were 3 consecutive down days. I tried :
>C<prev and C<prev-1 and C<prev-2 but that didn't work out right Seemed to
be
>acting more like I said or instead of and.
>I also want to build an indicator that will horizontal shift my plots by an
>input value. Much like the built in mov which allows shifting but 'called'
mov
>doesn't. Basically I hope to center the SMA [ex. 40 bar SMA shifted 20
bars].
>If I could do that then I want to subtract the SMA from the previous SMA
and
>plot the results.
>I don't know if these things have any real value. I'm just trying to follow
>some ideas from Murphy's TA book and at the same time learn about building
>these things.
>I never even thought to go to the MS website. Do they have some good
goodies
>there?
>I have not been able to get writeval or writeif to do anything but squack
>whenever I've tried to use them. I get an error msg saying not a valid
>function. OK I better stop here, probably already have worn out my
>invitation<g>
>Any help is appreciated
>
>Thanks
>Chris
>
>In a message dated 9/14/98 12:28:11 AM Eastern Daylight Time,
>rtestes@xxxxxxxxxxxxxx writes:
>
>> my answer is no, but you can work around that with nested if/and
statements.
>>  what are you trying to do?
>>
>>  Between reviewing the formulas at the Equis.com site and the manual, you
>>  should get a good view of the programming capability.
>>
>>  Richard Estes