PureBytes Links
Trading Reference Links
|
Hi Ross
The answer to questions 1 and 2 is no. The same restriction as always also applies to exploration columns, though with version 10 you get 12 columns to work with instead of 6. The restricted capacity of all EST formula windows, only 1023 characters if my memory serves me correctly, usually means that space becomes a problem before the 20-variable limit does. Offloading as much code as possible to the Indicator Builder is the most practical solution to the EST space problem. It might also be necessary to offload the optimisation code, if used, but that's a little more messy.
Preston mentioned the reusing (recycling) of indicator names. This tactic is possible because of the purely sequential nature of the MetaStock Formula language. A variable name defined on line 3 and only used on line 10 becomes available for reuse on line 11, and this situation doesn't change regardless of the data being used. Obviously a variable name cannot be used for a different purpose if its existing definition is still required for subsequent code, but it can be legitimate to redefine a name by modifying the original definition (where the original definition is part of the new definition). Once again the purely sequential nature of the MFL is what makes this practice possible.
In practical terms the recycling of variable names might allow up to 30 or so unique definitions. Linking formulas by appropriate use of the GV DLL can extend the number of definitions considerably more, although definitions that are passed from one indicator "module" to another do add some extra overheads. As an example, the Trade Equity GV DE set of indicators (shown towards the rear of the December issue of MSTT) effectively acts as one indicator due to the GV linkage. In all there are 157 distinct variable definitions, and in the three indicator modules these share 18, 20 and 20 variable names.
The advantage of using GV-linked formulas over Fml() and FmlVar() is primarily one of access speed, and this is important when running system tests or explorations and calling several external values. The first of two problems with the GV-linked approach is that loading into the Indicator Builder (of existing formulas particularly) requires that indicators (modules) in the chain be loaded in reverse order to overcome the "formula does not exist" problem that would otherwise be reported. The second potential problem is that linked modules must be refreshed by using an Fml() call as each new security is loaded - GV data arrays do not automatically update on each security. It is for this reason that all TE exploration start column A with something like Eq:=Fml("Trade Equity GV LE"), and this definition is necessary even if the "Eq" value is actually never used. Calling the master indicator with Fml() forces all GV variables to be refreshed to reflect values pertaining to the current security.
This is probably more detail than you were wanting so I apologise for that. I'll also concede that my suggestions might not work for all situations. However, you know where to find me if you need any more info.
Regards
Roy
----- Original Message -----
From: jawjahtek
To: equismetastock@xxxxxxxxxxxxxxx
Sent: Tuesday, February 19, 2008 2:41 AM
Subject: [EquisMetaStock Group] 20 variable limit in MS 10
Hi folks,
I am trying to create a formula/indicator that contains more than 20
variables. MS 9 gives me the error message to not exceed 20 variables.
I seem to recall someone mentioning that MS 10 does not have the 20
variable limit. I searched through past group postings and found
related discussions of the 20 variable limit, but not a direct answer
to the question for MS 10. I did find a message from Preston mentioning
a way to get around the limit, but I could not find where Preston (or
someone else) has shown the way to get around the 20 variable limit.
My questions:
1. Does MS 10 allow more than 20 variables in indicators?
2. Does MS 10 allow more than 20 variables in the System Tester?
3. If the answer to the above questions is no, what is the way to get
around the 20 variable limit? Does it work for both indicators and the
System Tester?
Ross
__________ NOD32 2883 (20080218) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/equismetastock/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:equismetastock-digest@xxxxxxxxxxxxxxx
mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|