|
Hi Phill
OK, that's a little clearer. I've assumed, perhaps
wrongly, that you're using MS 8.01 or above. Earlier EOD versions did not have
the Security() function, though it has been in PRO versions since 7 point
something.
If you only require the CLOSE of XAO then it's
probably best to create a variable as below. Change path name to one that is
appropriate for your data.
X:=Security("C:\Equis\Stocks\ASX\Indices\XAO",C);
EntryTrigger := cond1 AND cond2 AND
cond3 AND (X > Mov(X,30,S));
EntryTrigger;
If you have a version of MetaStock that does not
have the security function then you would need to use the "P" variable (also
known as "INDICATOR") to call the CLOSE of XAO in your formula. You would do
this by opening the XAO chart, marking (highlighting or selecting) it and
changing the formula to this.
X:=P;
EntryTrigger := cond1 AND cond2 AND
cond3 AND (X > Mov(X,30,s));
EntryTrigger; or to this
X:=INDICATOR;
EntryTrigger := cond1 AND cond2 AND
cond3 AND (X > Mov(X,30,s));
EntryTrigger;
The P variable only calls the CLOSE from a chart
but you can get around that by creating your own indicator of the prices, moving
averages, or whatever you want, and marking that indicator once dropped onto the
chart. The User Manual describes how to use both the P and Security() function.
I haven't been able to make the P variable work with the Enhanced System Tester,
but it's not necessary as you have the Security function anyway.
Regards
Roy
----- Original Message -----
From: pennellp2000
Sent: Sunday, December 25, 2005 6:33 PM
Subject: [EquisMetaStock Group] Re: Reference to External condition
function Roy I just want to add the condition XAO must be greater than than its own moving average as an entry condition whilst searching through stocks within the XAO. I am trying to ensure that the general market is rising whilst testing for individual stocks within the general market. Perhaps I shouldn't have used the term "externalcond". Thanks Phill > Is there any function or code in Metastock that allows reference to an > external condition. For example > > entry trigger := cond1 > and cond2 > and cond3 > and (XAO > mov(XAO,30,s)); > > > > note XAO = Australian stock Exch All Ordinaries. > > Thanks in advance Phill > YAHOO! GROUPS LINKS
|