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

[EquisMetaStock Group] Re: Generic formula with variables.



PureBytes Links

Trading Reference Links

Greg,

First, a suggestion, NEVER NAME A CUSTOM INDICATOR THE SAME AS A 
PACKAGED INDICATOR. It will save you from countless headaches later 
on. Change the name to TRIXX. That way it will be easy to identify 
the custom versus the packaged indicator.

Second, you have not mentioned which version of Metastock you have. 
In version 8 and 7.2 the call for Trix includes the data array...TRIX
(Data Array, Periods). In earlier versions the call is TRIX(Periods). 
The default data array is the close. 

Finally, in the exploration you will need to decide whether you want 
to use the packaged indicator or the custom indicator which you have 
written. In the indicator which you have written the default value is 
13, thus this would be used when the formula is called in an 
exploration or system test.

The smartest way that I know of to keep up with different lookback 
periods is to identify the periods used in the title. Use TRIXX13 for 
a custom written formula with a 13 period lookback. Use TRIXX20 for a 
custom formula with 20 periods. Like this:

TRIXX13:
d:=13;
MA:= Mov(C,d,E);
MA1:= Mov(MA,d,E);
MA2:= Mov(MA1,d,E);
ROC(MA2,1,%)

TRIXX20:
d:=20;
MA:= Mov(C,d,E);
MA1:= Mov(MA,d,E);
MA2:= Mov(MA1,d,E);
ROC(MA2,1,%)


Hope this helps!

Preston



--- In equismetastock@xxxxxxxxxxxxxxx, "Greg" <tardy.g@xxxx> wrote:
> Hi everyone,
> 
> I am using the TRIX indicator from S&C of a few month ago.
> 
> TRIX:
> 
> d:= Input("Number of Periods",5,100,13);
> MA:= Mov(C,d,E);
> MA1:= Mov(MA,d,E);
> MA2:= Mov(MA1,d,E);
> ROC(MA2,1,%)
> 
> I named the indicator TRIX.
> 
> If I plot it on a chart, I get the choice of the period in the 
dialog box
> appearing when I drag an drop.
> 
> If I use it in the explorer I get the default period, 13, 
automatically.
> 
> Is there a way to run an exploration for a 20 day period using the 
existing
> indicator ? I tried TRIX(20) without success.
> The idea is to define a basic formula with variables that can be 
used as
> parameters (properties) both in the exploration and in other 
indicators. For
> example, I could be interestd in plotting a 9 day EMA of a TRIX
(35). This
> would be Mov(TRIX(35),9,E) without having to create a TRIX(35) 
indicator.
> 
> To conclude, using Mov(9)TRIX(20) or Mov(14)TRIX(21) with two 
generic
> formula Mov() and TRIX() would be great.
> 
> An thoughts ? Solutions ?
> 
> Thanks,
> 
> Greg.


To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/