Traderji.com - Discussion forum for Stocks Commodities & Forex

How to Design a Trading System Within MetaStock.

Discuss How to Design a Trading System Within MetaStock. at the Technical Analysis within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Recd this by email. As I dont use metastock I cant answer any questions on ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > METHODS & STRATEGIES > Technical Analysis

Notices

Technical Analysis Discussion of all the principles involved in technical analysis.


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #1  
Old 21st February 2006, 08:53 AM
Member
 
Join Date: Jul 2004
Posts: 296
Appreciation: 24
tanewbie is on a distinguished road
Default How to Design a Trading System Within MetaStock.

Recd this by email. As I dont use metastock I cant answer any questions on it.


How to Design a Trading System Within MetaStock.

Let`s start right where we left off. We had just finished discussing the major components when designing any mechanical entry system. They included a measure of:
1. Price.
2. Liquidity.
3. Trend.
4. Volatility.
Now how do we code this into MetaStock?
Well let me offer the most valuable gem of knowledge I have learned over the years regarding MetaStock formula writing. This one secret, although very simple, will ultimately turn you into a MetaStock master...
Let me put it this way... Do you think I know all of MetaStock`s hundreds of preprogrammed formulas and propriety indicators? No, I`m good... but not that good ;-)
So what is my secret?
Well, when coding in MetaStock, the key to getting it "right" is to write "down in English" what it is you are trying to achieve. Once done, it is quite easy to convert this into MetaStock formula.
Let`s see what I mean by looking at an example. Our first entry condition is a measure of price. As mentioned in the last issue, the aim of setting price minimums is to remove speculative stocks.
Please note: the values you select will depend on the exchange you are trading (some markets tend to be more expensive than others.) However, for this example, we are looking to design a long-term trend following system to trade on the Australian Stock Exchange.
In Australia, anything under $1 could be classed as speculative. So how do you stipulate those stocks must be greater than $1? Now here comes the "write it in English first" part:
We want stocks with a 21-day average of closing price to be greater than $1.
Next, we must convert this into MetaStock formula.
Using the formula reference guide in the MetaStock Programming Study Guide, you can check the syntax of a moving average. With this information, it`s simply a matter of plugging in the correct numbers. Then, by using the "greater than" symbol, you can stipulate the price to be greater than e.g. $1.
The MetaStock code looks like this:
Mov(c,21,s) > 1
See? I told you it was easy.
Let`s move onto the next component... Liquidity. This is a measure of how much money a stock trades. It is important to identify stocks that have enough money moving through them so you`re never caught with a stock you can`t get out of.
For our example, let`s say we require...
The 21-day average of volume multiplied by the closing price to be greater than $200,000.
In MetaStock language this would be:
Mov(v,21,s)*C > 200000
Our next component is trend identification. Remember "the trend is your friend" and you always want to trade with it, not against it.
Think of it this way, if you were swimming in the sea, and got yourself caught in a rip, is it easier to swim with the current or against it? Similarly, do you think it is easier to trade with the trend or against it?
There are many ways to identify trends, and it`s not important which method you use, just that you have a method in place.
One of my preferred methods for identifying trending stocks is to find stocks trading at their current highs. One way to do this is stipulate that the highest high price must have been achieved in the last "x" number of days.
Once again, the variables you use will depend on the time frame you are trading. But for our example: We want the highest high price in the last 240 days to have occurred in the last 20 days.
Using the formula reference guide in the MetaStock Programming Study Guide, we know the syntax of the highest high function and therefore it is simply a matter of plugging in the details. Then, using the "less than" symbol, we can stipulate the number of days must be less than 20.
In MetaStock language that would be:
HHVBars(H,240) < 20
Last, we need a volatility measure. The aim of including this formula is to identify stocks that move enough for us to make a profit, yet they aren`t so erratic that they keep you awake at night.
There are a few ways to measure volatility. However, my favorite is the ATR method (covered in a previous edition of the MetaStock Formula Newsletter.) In basic terms, it indicates how much a stock will move, on average, over a certain period.
For example, a one-dollar stock might move five cents on average over the last 20 days. We can simply divide this value by the price of the stock and you will be given the average percentage movement of a stock. With these values, we can stipulate a minimum and maximum daily volatility value.
For example:
We may want the ATR divided by the average closing price, over the last 21 days, to be greater than 1.5%. In short, we are saying that the average minimum volatility must be greater than 1.5%.
Additionally we may want the ATR divided by the closing price, over the last 21 days, to be less than 6%. In short, we are saying that the average maximum volatility must be less than 6%.
In MetaStock language that would be:
ATR(21)/Mov(C,21,S)*100 > 1.5 and
ATR(21)/Mov(C,21,S)*100 < 6
Now let`s put all our code together to see what our entry system looks like:

C>1 and
Mov(v,21,s)*C > 200000 and
HHVBars(H,240) < 20 and
ATR(21)/Mov(C,21,S)*100 > 1.5 and
ATR(21)/Mov(C,21,S)*100 < 6
Congratulations!!
You have now been a part of creating a workable entry system. Not only did we construct a robust system... but this system also adheres to the KISS principal (Keep It Simple Simon.)
This system can now simply be cut and pasted into the Explorer within MetaStock... that said, please realize, the entry (what we have just designed) is the smallest component of a successful trading system.
In later parts of this series, you`ll find what it really takes to have a profitable trading system.
This concludes part two of our "How to Design a Trading System within MetaStock." It is extremely important you keep an eye out for next month`s issue since we`ll work through our exit conditions and code them into MetaStock.
Reply With Quote
  #2  
Old 18th July 2007, 03:09 PM
Member
 
Join Date: Jul 2007
Posts: 1
Appreciation: 20
etphonehomea_a is on a distinguished road
Default Re: How to Design a Trading System Within MetaStock.

thanks for the info regarding to the metastock trading...
Reply With Quote
  #3  
Old 18th July 2007, 03:53 PM
Moderator
 
Join Date: Nov 2005
Posts: 7,572
Appreciation: 65
uasish will become famous soon enough
Default Re: How to Design a Trading System Within MetaStock.

Simon,
After many months could see someone do things in Metastock easily,looking forward to your next post,i would still love it more if each variables are each being assigned one lines ,so that in future when necessary we can call each seperate functions by different fmls,embedded in one.
Asish
Reply With Quote
  #4  
Old 19th July 2007, 05:59 PM
Member
 
Join Date: Jul 2007
Posts: 4
Appreciation: 20
feltra is on a distinguished road
Question Re: How to Design a Trading System Within MetaStock.

Hi,

Thanks for a very good article on MS.

Would you be able to find out the source or how to access the other parts of this tutorial? There appear to be other parts to this tutorial on MS - thats why I am asking.

Thanks & Regards,
-feltra


[quote=tanewbie;34480]Recd this by email. As I dont use metastock I cant answer any questions on it.


How to Design a Trading System Within MetaStock.
Reply With Quote
  #5  
Old 19th July 2007, 09:19 PM
Member
 
Join Date: Feb 2006
Posts: 45
Appreciation: 20
mfire is on a distinguished road
Default Re: How to Design a Trading System Within MetaStock.

Hi,
Thanks for a very good article on designing system in MS
Mfire
Reply With Quote
  #6  
Old 25th January 2008, 04:19 PM
Member
 
Join Date: Jun 2007
Posts: 1
Appreciation: 20
trilion_2000 is on a distinguished road
Default Re: How to Design a Trading System Within MetaStock.

The first part can be found at:

http://www.systemtradingblog.com/des...astock-part-1/
Reply With Quote
Sponsored Links


Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads for: How to Design a Trading System Within MetaStock.
Thread Thread Starter Forum Replies Last Post
TrendRider Trading System ravi_s_ghosh Software 4 1st March 2008 12:47 PM
Enhanced system tester and Optionscope in Metastock sh50 Software 2 3rd September 2004 11:42 PM


All times are GMT +5.5. The time now is 02:42 PM.

Indemnity, Disclaimer & Disclosure Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum Rules Disclaimer & Disclosure and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum.
Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com