Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 10/25/2005(UTC) Posts: 7
|
I was thinking about posting some of my ideas here to the forum.dll development wishlist but some of the requests there were for pretty specific indicators. I thought instead that looking at things from the current limitations of the MFL might suggest general areas for possible improvements.
Perhaps some of these things can be done already with the tools at hand but they're currently beyond my ken. Please correct me if I'm wrong. :)
The ability to self reference a variable.
With the PREV function one can self-reference the indicator but is it possible to self-reference a variable or multiple variables and ALSO the indicator? I'm thinking maybe this can be worked around by creating an indicator and calling that as a varaible but I'm not sure. Is that possible? Is there a better alternative?
Referencing a specific point on a binary wave plot.
Probably there is a trick to it that I'm ignorant about but is there a way to to plot a buy arrow at the last or nth instance that condition = 1 and only at that point and no other point?
Undefine an indicator.
The IsDefined and IsUndefined functions don't appear in the Formula Primer from what I can tell so I have no idea what they are for. Maybe they might help in the following case but I don't know. Let's say I want to create a two color parabolic sar one color when it is above the price another when it is below the price. How do I do that? With an oscillator gyrating around zero one plots two plots with one plot = to zero when the other plot is giving the signal. Nice and tidy. With the parabolic sar that would be awkward. If you are looking at an index valued at 1000+ zero is far far away. From what I know it can be done relatively cleanly but with an additional line running somewhere around the chart. If an indicator could be undefined for certain portions and not plot, that excess info would not be a distraction.
I'm sure there must be other limitations to the MFL, what are they or what is the workaround?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/28/2005(UTC) Posts: 276 Location: Salt Lake City, UT
|
Sorry, posted to wrong thread.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Capablanca
PREV is as easily applied to a variable as it is an indicator or formula. Just give the variable a name, then PREV only references the previous value of that variable.
There are many tricks to referencing a particular point on any plot. Before it can be defined in code however, it must defineable (is that word) in the English language. A wishy-washy or illogical definition is impossible to code, so that's the first issue you have to resolve. Once that's done there are many methods, techniques and tricks you can use to get at exactly the data you want.
IsDefined and IsUndefined are poorly implemented MetaStock functions that promise much but don't really deliver. A 10 period moving average will have an "undefined" period of 9 bars at the left side of the chart, and IsDefined(Mov(C,10,S)) plots a zero (FALSE) for the first 9 bars and 1 (TRUE) for all subsequent bars. IsUndefined() plots the opposite polarity. These functions don't really do a heck of a lot that can't be accomplished in other ways.
However it appears the Equis came up with a fix for the deficient IsDefined() function and just forgot to tell anybody about it. I have a BBS.DLL file in MetaStock that does what IsDefined() should have done from its first release inf MS 7.0 - it accepts a variable name or expression and plots a specified value for that expressions N/A period, then plots the proper expression result from there on. I take back every complaint I ever made about the IsDefined() function. The solution must have been in front of me all the time and I just didn't relize it.
ExtFml("BBS.IfNotDefined",Mov(C,10,S),0);
One small problem that still remains is that the second parameter must be a constant. Fortunately there are also ways to get around that. Zero is not a good value to substitute for a moving average as it tends to distort the price-plot.
There are many work-arounds for perceived MetaStock formula issues. It can take several yeras to work out most of them, but less if you get a fair amount of help along the way. The MetaStock User Manual and the Formula Primer are both essential resources but neither of them cover everything, nor can they.
Roy
MetaStock Tips & Tools
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 7/21/2005(UTC) Posts: 74 Location: Oklahoma USA
|
Hi Roy, I have a question on the PREV function in my post of 11/17/2005. http://forum.equis.com/v...ic.php?t=2749&highlight= Perhaps you could take a look and provide some assistance to me. I am sure the solution is probably easy but I am at a loss on this one and how I can use the PREV with a variable instead of the indicator. Thanks, Charley
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.