Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/27/2006(UTC) Posts: 135
|
Is possible to change the P variable to represent Open High or Low rather than just close?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
The use of the P variable is used to plot an indicator based on data from another chart.
It doesn't have to be the close. What ever plot or indicator is highlighted or clicked on becomes the "P Value"
another way is to use the security function
|
|
|
|
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)
|
Hi Flexi
To expand on Henry's comments, The default value returned by P is CLOSE when the price plot is selected. However, you can create an indicator for any other price, moving average, or whatever, and pick up that value using the P variable. The only real restrictions with P is that it cannot return more than one value and it can only be applied to the currently active chart.
If your version of MetaStock supports the Security() function, all versions from 8.01 plus MS Pro 7.2 I think, then you have the ability to call virtually any value or values from any security without having to have any particular security as the currently active chart.
What you must remember with the Security() function is that a full pathname must be used when calling a security that is not in the same folder as the currently active chart. I find it best to always include the pathname.
A word of caution; some MetaStock tools do not report an error when the security pathname is invalid (the EST is a classic example) - other than getting unexpected results you may not get a message pointing to the real problem.
Hope this helps.
Roy
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/27/2006(UTC) Posts: 135
|
If manually selecting the plot, the p variable would represent any indicator or value. But if wanted to use the p variable in explorer, the default value is close. If the P variable has a function like P(OHLC) that would be nice because this would allow selecting of different value. Or is possible to change the programming that represent the default close for the p variable using some editor or what? Or using the forum dll to complement the P variable?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
in an exploration or expert or system test,you would have to use the security function or fml function or fmlvar function. Any fml or fmlvar function that has inputs in their code would default to the default settings
|
|
|
|
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)
|
Hi Flexi
There's no point in writing about "what would be nice" because those things are very unlikely to happen. One could almost count the type of MetaStock changes that you are suggesting over the last 10 years on one hand and still have fingers to spare. Rather than "wishing and hoping", a remedy that is already available should be where you look for a solution. I wrote in my earlier post that "The default value returned by P is CLOSE when the price plot is selected. However, you can create an indicator for any other price...". In practical terms this means that you can create a series of indicators as shown below, drop whichever one of them you want onto a chart (preferably but not necessarily in a separate window), mark it, then run your exploration using the P variable. I can assure you that the exploration WILL pick up the appropriate price from your indicator and you will not be forced to accept CLOSE as the inevitable default value.
{* P Price Plot OPEN}
OPEN;
{* P Price Plot HIGH}
HIGH;
{* P Price Plot LOW}
LOW;
Beginning the indicator names with an asterisk ensures that they appear in the Indicator Quicklist immediately after ZigZag and so are very easy to access.
In summary, you are only restriced to CLOSE as the default value for the P variable if you select a price plot as the data source (bars, candles etc. I have not checked what you get for P&F and other exotic price plots). Creating an alternative price source is as easy as copying the above indicators into your Indicator Builder.
Hope this helps.
Roy
|
|
|
|
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)
|
Hi Flexi
Further to my previous post and to give credit to Equis, the introduction of the Security() function to MS EOD in 2002 or 2003 was one of the rare improvements that added real value to MetaStock (digit #2 perhaps). In effect it provides precisely the flexibility (and much more) that that you are now wanting from in the P variable.
Roy
|
|
|
|
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.