Australian (ASX) Stock Market Forum

MetaStock Exploration question

Joined
10 November 2007
Posts
64
Reactions
0
Hi,
Can someone help me with an exploration for finding a stochastics crossover.
eg when the %K line crosses the %D line (not looking for when it cross the 80 or 20).
Something along the lines of when the %K equals the %D, or something to do with the "cross" function.
I've been trying to work it out myself and have seen "cross" used in other explorations but I dont know how to "cross" the K and D.

Also, can someone tell me how to save the settings to display a certain time period (say 6 months) but load the whole lot of data. I know how to change it in the chart when its open already, but i can't save it so it always opens to display that time period first up. It will save alot of time when doing quick eyeball scans.

cheers
 
Hi,
Can someone help me with an exploration for finding a stochastics crossover.
eg when the %K line crosses the %D line (not looking for when it cross the 80 or 20).
Something along the lines of when the %K equals the %D, or something to do with the "cross" function.
I've been trying to work it out myself and have seen "cross" used in other explorations but I dont know how to "cross" the K and D.

Also, can someone tell me how to save the settings to display a certain time period (say 6 months) but load the whole lot of data. I know how to change it in the chart when its open already, but i can't save it so it always opens to display that time period first up. It will save alot of time when doing quick eyeball scans.

cheers

=====

:)

Hi kingie,

First, set one chart up exactly as you need it, then save it as a
template ..... and be sure to save it as the default template as well,
as that is what makes it opens each chart in the desired format,
every time ..... :)

As for the formulas ..... for a mountain of stuff, just go to:

http://www.google.com.au/search?q=metastock+formulas&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:eek:fficial&client=firefox-a

happy days

paul

:)

=====
 
I reckon an even better resource than Google for MS formulas is the MS User Manual that comes with the application! Read the instructions from cover to cover, then read it again. Then, download the free Equis Formula Primer and work through the exercises contained therein. In no time, you will be your own code guru!

In the mean time, try this; in the explorer filter, add the following code:

Code:
Kprd:=5;
Kslow:=3;
Dprd:=3;

K:=Stoch(Kprd,Kslow);
D:=Mov(K,Dprd,S);

Cross(K,D);

Make sure to load at least 100 bars of data when you run this exploration (or more, just to be on the safe side)

Hope this helps.

wabbit :D
 
Hi guys,
Thanks for the replies. I read through the Formula Primer and figured out how to find the stoch cross. But...
I am now trying to make up the system tester and I've put in Long Buy and Short Sell orders which are working as advertised in the tester.
However, for the exits, I am trying to use a trailing stop of 1 ATR away from the highest low (for longs) and lowest high (for shorts).
Here is the formula for the ATR BAND (light blue bands in pic) indicator which gives me the bands so I can manually trail the stop:

stdha := Mov(H,1,E)+1*(ATR(10));
stdla := Mov(L,1,E)-1*(ATR(10));
stdha;
stdla

So using those bands, I am trying to set my sell order formula (for longs) and buy to cover shorts (for shorts).

I'll use BOL with a short order as an example
If (in real life) I was to set an auto stop at the band, and trail it down (but never up)as the days go, then I would be stopped out if on a day where the high was higher than the band/stop.
So I figure that to code this into the system tester I would use the formula which is in the pic:
H>LLV((Mov(H,1,E)+1*(ATR(10))),5)

eg. close position if the HIGH is greater than the LOWEST LOW VALUE of "THE UPPER ATR BAND" of the last 5 days.

I used 5 days because I wasn't sure how to make it start trailing from when the position was opened.

But as you can see in these pics, a short position was opened the day after the cross (as per the short formula) - BUT - the system closed the position the next day (6/22/2007) which it should only do if there was a trigger the day before.
You can see in the pic that the high is way below the upper atr band (and even the lowest low of that band for the last 5 days) so why I ask you, did it trigger to close the position.

Can someone help me to rearrange my close position formula to match the intended purpose. I look at the formula I have worked out for it, and it seems to make sense to me! (except maybe the five day thing - if anyone can help to make it start when the position is opened then that would be great too)
 

Attachments

  • system 1.jpg
    system 1.jpg
    97.3 KB · Views: 31
Here is the system tester pics
 

Attachments

  • system 2.jpg
    system 2.jpg
    18 KB · Views: 31
  • system 3.jpg
    system 3.jpg
    33.5 KB · Views: 48
kingie,

Swing past the Equis Forum at http://forum.equis.com and find a copy of the Forum.dll (it contains a really useful (but generically programmed) latch function) and then visit Richard Dale's site at http://www.tradernexus.com/ and grab a copy of his Advanced Trailing Stop.

Both of these tools can help alleviate the troubles of trying to "bend" MS to do things it doesn't do naturally.


wabbit :D
 
Top